[pmwiki-users] ccommentboxplus update
marc
gmane at auxbuss.com
Thu Nov 2 09:44:47 CST 2006
Hans said...
> Wednesday, November 1, 2006, 2:16:10 PM, marc wrote:
>
> > SDV($NoCommentMessage, '$[Please enter a comment to post]');
> > SDV($NoAuthorMessage, '$[Please enter your name as author]');
> > SDV($NoCodeMessage, '$[Please enter the code number]');
>
> > The $[] display in the error messages when using cboxcheck
>
> > Probably because of the Keep here:
>
> > Markup('cboxcheck', '>block', '/\\(:cboxcheck:\\)/', Keep
> > ($CommentBoxCheckFmt));
>
> Marc, the messages display fine with me. Can you give more details?
Sure, the HTML output is:
<script type='text/javascript' language='JavaScript1.2'>
function checkform ( form ) {
if (form.text && form.text.value == "") {
window.alert( '$[Please enter a comment to post]' );
form.text.focus();
return false ;
}
if (form.author && form.author.value == "") {
window.alert( '$[Please enter your name as author]' );
form.author.focus();
return false ;
}
if (form.access && form.access.value == "") {
window.alert( '$[Please enter the code number]' );
form.access.focus();
return false ;
}
return true ;
}
</script>
When you change
SDV($NoCommentMessage, '$[Please enter a comment to post]');
to
SDV($NoCommentMessage, 'Please enter a comment to post');
then the $[] disappear - no big surprise after it's been removed.
Anyway, removing the Keep() makes no difference, so I'm not sure why the
conversion isn't happening.
> I found that the cboxcheck is pretty useless, and I should let go of
> the idea that you can a simple formcheck when using (:input:) markup
> to construct a commentbox, since the form needs the following inserted:
>
> onsubmit='return checkform(this);'
>
> But we can't generically allow javascript being added to a form input
> markup directive. Which leaves the formcheck being done only with
> (:commentbox:) markup. And the cboxcheck markup can be scrapped.
Well, I find it useful. I don't use your form - I override it thus:
include_once("$FarmD/cookbook/commentboxplus.tmpl");
include_once("$FarmD/cookbook/commentboxplus.php");
where the .tmpl defines $CommentBoxFmt.
--
Best,
Marc
More information about the pmwiki-users
mailing list