[pmwiki-users] Question include, Fox

Hans design5 at softflow.co.uk
Tue Jan 22 06:39:54 CST 2008


Tuesday, January 22, 2008, 8:16:08 AM, Anke Wehner wrote:

> I'm using Fox (slightly altered FoxCommentBox) to post comments to
> another group (target is Comments-{*$Group}.{*$Name}), appending to
> the end of the page, and include that page on the original one.
> Is there a way to include only the last X comments, rather than the
> whole page, without going and manually moving an anchor around on the
> comments page?

One way may be to enhance the form in a way that each comment div gets
an id marker with  a numeric suffix. This gets increased for each
post, governed by a comment counter PTV. Then you could use a
(:include :) directive with a from= parameter which refers to section
n-x, n is the last section, x the number of sections you wish to
include.

FoxForum uses a mechanism to create section Ids, maybe you can take a
look at the code used in the forum commment form.

sorry this is not a ready&done solution!

> Also, from trial and error it seems I have to set $FoxAuth = 'read';
> for all groups in which I want to place the comment form, not only the
> Comments group, is that right?

to enable user who have read access but no edit rights to post, you
need to set $FoxAuth = 'read'; for the target comment pages, not the
necessarily the form page. You can place the comment form in the Site
group, or a FoxTemplates group, and include it where you want to use
it.


  ~Hans




More information about the pmwiki-users mailing list