[pmwiki-users] simpleforum

Hans design5 at softflow.co.uk
Mon Sep 4 14:23:11 CDT 2006

Monday, September 4, 2006, 3:56:36 PM, Florian wrote:

> Hello Hans,

> thanks for your help. But there is a problem left.
> i used 
>  (:if !exists Forum.{$Name}:)
>  (:newforumtopic base=Forum.Forum label='Add new topic':)
>  (:if exists Forum.{$Name}:) [[Forum.{$Name}|See Discussion about
>  {$Name}]]
>  (:if:)

> and included it into the groups GroupFooter.
> If the topic doesn´t exist, everything works fine, but if it
> exists. the link is not created. It
> shows me

> [[Forum.Topic | See Discussion about
>  Topic]]

> What is going wrong there?

Make sure the third and fourth line are just one line:

(:if exists Forum.{$Name}:)
[[Forum.{$Name}|See Discussion about {$Name}]]

The link can't have a line break in it, it was put there by the email
program formatting output.

This works, but it is still not the best solution, as users need to
enter the exact name of the article page. This should really be
automated. Try the following (:input:) button form instead of
(:newforumtopic base=Forum.Forum label='Add new topic':),
enclose with the (:if.. conditions as before:

(:input form  action={$PageUrl} method=post:)
(:input hidden n {$FullName}:)
(:input hidden action newtopic:)
(:input hidden base value='Forum.Forum' :)
(:input hidden name value='{$Name}':)
(:input submit post 'Create New Topic' class='inputbutton':)
(:input end:)

This will display as a post button, with label 'CreateNew Topic',
which post Name of page as new forum topic in Forum group.


More information about the pmwiki-users mailing list