PEAK XOOPS - Comment anywhere How to change Plain text in englishin japanese

Comment anywhere How to change Plain text

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
Previous post - Next post | Parent - Children.1 .2 .3 .4 .5 | Posted on 2009/8/4 12:53 | Last modified
xsell  企霹始   Posts: 6
Hello

How do i change the plain text with comment anywhere to the dhtml form ..

I read this in the summry "If you want to change plain textarea to XOOPS dhtml form, use the plug-in for Smarty named "smarty_dhtml_v100"
You can find it in sourceforge.jp (http://sourceforge.jp/projects/exmodules)"

But the plug in alredy included in xoops 2.3 .. and Now wht . Can you Pleae excplain More detail for Me ..

How to get the plain text replaced with the dhtml..

and / or how to make the title on the plain text Requiered .. Now any one can post without title ..

Thx
Votes:7 Average:10.00
Previous post - Next post | Parent - No child | Posted on 2009/8/13 13:29
GIJOE  黎扦烦菱   Posts: 4110
hi xsell.

I had already stop using XoopsComment system.
(All of my sites use d3comment itegration entirely.)
And I don't use XOOPS 2.x from xoops.org.

Then you should know there are no proofs in my answers.

Quote:

I read this in the summry "If you want to change plain textarea to XOOPS dhtml form, use the plug-in for Smarty named "smarty_dhtml_v100"
You can find it in sourceforge.jp (http://sourceforge.jp/projects/exmodules)"
Just upload the plugins.
If you have installed the plugin, just edit the template.

commentany_center.html
	<textarea name="com_text" cols=50 rows=4></textarea>
	<{xoops_dhtmltarea cols=50 rows=4}>

Quote:
and / or how to make the title on the plain text Requiered .. Now any one can post without title ..
CommentAny never add any validations posted data.

If you don't want blank subjects, try to add JavaScript Validation by editing the template.
Votes:10 Average:9.00
Previous post - Next post | Parent - Children.1 .2 | Posted on 2009/8/15 19:02
xsell  企霹始   Posts: 6
Thank you ..

But it didt work .. this wht i have done

1- went to the above link ..
2- downloaded the archive smarty_dhtml_v100.zip
3-unziped then copied and overwrite the Previouse on from xoops Core .htdocs\class\smarty\plugins
4- Edited template commentany_center.html by removing every thing and Insert the code you provided me above.
5- Got error..
Error: Smarty error: [in db:commentany_center.html line 2]: syntax error: unrecognized tag 'xoops_xoopsdhtmltarea' (Smarty_Compiler.class.php, line 599)

wht have i done wrong ?
Votes:8 Average:10.00
Previous post - Next post | Parent - Children.1 | Posted on 2009/8/16 12:40
xsell  企霹始   Posts: 6
That Exactly wht i have done .. Copied the code to Notpad then opened the template wit Notpad ++ pasted it . Copied the plugin and overwrite the old One and got the error above..
Votes:16 Average:5.00
Previous post - Next post | Parent - No child | Posted on 2009/8/20 4:01
GIJOE  黎扦烦菱   Posts: 4110
Quote:

xsell wrotes:
That Exactly wht i have done .. Copied the code to Notpad then opened the template wit Notpad ++ pasted it . Copied the plugin and overwrite the old One and got the error above..
The post describing copy and paste by notepad etc. must be a SPAM
I've just removed the post and its account.
Votes:9 Average:8.89
Previous post - Next post | Parent - No child | Posted on 2009/8/20 4:14
GIJOE  黎扦烦菱   Posts: 4110
hi xsell.

Quote:

2- downloaded the archive smarty_dhtml_v100.zip
3-unziped then copied and overwrite the Previouse on from xoops Core .htdocs\class\smarty\plugins
4- Edited template commentany_center.html by removing every thing and Insert the code you provided me above.
5- Got error..
Error: Smarty error: [in db:commentany_center.html line 2]: syntax error: unrecognized tag 'xoops_xoopsdhtmltarea' (Smarty_Compiler.class.php, line 599)
It's a typo.

	<textarea name="com_text" cols=50 rows=4></textarea>
	<{xoopsdhtmltarea name="com_text" cols=50 rows=4}>

And if you already have function.xoopsdhtmltarea.php in smarty/plugins, you don't have to overwrite it.

There are two versions of function.xoopsdhtmltarea.php

- minahito (original)
- GIJOE (newer and used/included by D3 modules)

Both will work fine.
Votes:8 Average:10.00
Previous post - Next post | Parent - No child | Posted on 2009/8/20 15:09
xsell  企霹始   Posts: 6
Thank you Admin , that wokred Perfect , Now just i have problem with the Title .. Now when no title inserted , I get the Comment with title' No title' .. from the Template i see this Code
<input type="text" name="com_title" size="64" maxlength="255" value="<{$xoops_default_comment_title}>">
that looked to me as if no title was inserted then the title of whtever page you try to comment at will be the title .. but that Not working ..

So Java is the easiest Way to do validation if the title was inserted .. i found some but i couldt do it .. here a link for wht suppose to be easy way .. Can you look at it and see.
http://www.javascript-coder.com/html-form/javascript-form-validation.phtml
Votes:11 Average:10.00
Previous post - Next post | Parent - No child | Posted on 2009/8/20 17:35
xsell  企霹始   Posts: 6
this wht i have done .. on the Top i inserted this java script but didt work..

<form name = "myform" action="comment_post.php" method="POST" onsubmit = "return validate()> 

<script type = "text/javascript">

function validate() {
var x = document.myform.com_title.value;
if (x.length <  5) {  // or whatever minimum length is sensible
alert ("You must enter a title!");
document.myform.com_title.value = "";  // clear the field
document.myform.com_title.focus();  // and focus on it
return false;
</script>
Votes:9 Average:10.00
Previous post - Next post | Parent - No child | Posted on 2009/8/20 18:34
xsell  企霹始   Posts: 6
Hello
This is me again .. Finaly Found simple Code and Done , if any looking to how . Just copy and Past the text below to the commentany_center.html template..
<html>
<head>
<title>Javascript Form Validation</title>
<script language='JavaScript' type='text/JavaScript'>
<!--
function validate() {
	if(document.com_title.com_title.value=='')
		{
		alert('Fill the Input box before submitting');
		return false;
		}
	
	else	{
		return true;
			}
}
//-->
</script>
</head>
<body>

<{if $commentany.com_itemid}>
<form name='com_title' action='comment_post.php' method='post' 
				onSubmit='return validate();'>
	<input type="hidden" name="com_itemid" value="<{$commentany.com_itemid}>">
	<input type="hidden" name="XOOPS_TOKEN_REQUEST" value="<{$commentany.xoops_token_request}>">
	<table class='outer' cellspacing='1' style="margin-top:2em;">
		<tr>
			<th colspan="2"><{$smarty.const._MB_COMMENTANY_LANG_NEW_COMMENT}></th>
		</tr>
		<{*
		<tr>
			<td class='head' align='left'><{$smarty.const._MB_COMMENTANY_LANG_RULE}></td>
			<td class='odd' align='left'>
				<{$commentany.rule_text}>
			</td>
		</tr>
		*}>
		<tr>
			<td class='head' align='left'><{$smarty.const._MB_COMMENTANY_LANG_ICON}></td>
			<td class='odd' align='left'>
				<{foreach item=i from=$commentany.com_icon}>
					<input type="radio" name="com_icon" value="<{$i}>"><img src="<{$smarty.const.XOOPS_URL}>/images/subject/<{$i}>">
				<{/foreach}>
			</td>
		</tr>
		<tr>
			<td class='head' align='left'><{$smarty.const._MB_COMMENTANY_LANG_TITLE}></td>
			<td class='odd' align='left'>

Title :<input type=text name=com_title value='' size="55">
			</td>
		</tr>
		<tr>
			<td class='head' align='left'><{$smarty.const._MB_COMMENTANY_LANG_TEXT}></td>
			<td class='odd' align='left'>
				<textarea name="com_text" cols=64 rows=12></textarea>
			</td>
		</tr>
		<{*
		<tr>
			<td class='head' align='left'><{$smarty.const._MB_COMMENTANY_LANG_OPTION}></td>
			<td class='odd' align='left'>
				<input type="checkbox" name="dosmiley" value="1" checked><{$smarty.const._CM_DOSMILEY}><br/>
				<input type="checkbox" name="doxcode" value="1" checked><{$smarty.const._CM_DOXCODE}><br/>
				<input type="checkbox" name="dobr" value="1" checked><{$smarty.const._CM_DOAUTOWRAP}><br/>
			</td>
		</tr>
		*}>
		<tr>
			<td class='head' align='left'></td>
			<td class='even' align='left'>
				<input type='submit' class='formButton' name='com_dopreview' id='com_dopreview' value='<{$smarty.const._MB_COMMENTANY_LANG_PREVIEW}>' />
				&nbsp;<input type='submit' class='formButton' name='com_dopost'  id='com_dopost' value='<{$smarty.const._MB_COMMENTANY_LANG_SUBMIT}>' />
			</td>
		</tr>
	</table>
	</form>
</body>
</html>
	<input type="hidden" name="dohtml" value="0" />
	<input type="hidden" name="dosmiley" value="1" />
	<input type="hidden" name="doxcode" value="1" />
	<input type="hidden" name="dobr" value="1" />

<{/if}>

<{$commentsnav|replace:'button':'hidden'}>

Votes:7 Average:10.00

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!