[pmwiki-users] CommentBoxPlus: user defined forms

Hans design5 at softflow.co.uk
Fri Sep 5 03:14:05 CDT 2008


Thursday, September 4, 2008, 6:40:40 AM, Marcus wrote:

> Does anybody have an example of how user defined forms work in CommentBoxPlus?

CommentBox and CommentBoxPlus both have the forms hardcoded
via the $CommentBoxFmt variable, which could be set in config.php.
The recipes do not use wiki markup like (:input ..:) to define the
form, so they don't lend themselves for user defined forms.
If you want much better user control via markup for your forms, i
would use Fox with a Fox CommentBox:
http://www.pmwiki.org/wiki/Cookbook/FoxCommentBox


> I guess I need to know which variables are required. I especially need
> to add Captcha manually, so I can format it as required. I do *not*
> want to enable it as a global requirement in config.php.

you could enable Captcha in config.php conditioanally for pages with
input forms like commentbox, and also conditioanally for visitors,
i.e. not show Captcha if you are logged in with page edit
permissions.

For instance like:

if ($pagename=='Main.CommentPage')
     $EnablePostCaptchaRequired = 1;
if (CondAuth($pagename,'edit'))
     $EnablePostCaptchaRequired = 0;
include_once('cookbook/captcha.php');

CommentBox Plus will only show a captcha field if
$EnablePostCaptchaRequired is true.

Hope this helps

  ~Hans




More information about the pmwiki-users mailing list