[pmwiki-users] discussion pages?
Patrick R. Michaud
pmichaud at pobox.com
Tue Jun 21 12:59:50 CDT 2005
On Tue, Jun 21, 2005 at 01:37:15PM -0400, Neil Herber wrote:
> I was just looking for a quick and dirty (well, pretty clean, really) way
> of allowing people to comment about edit-protected pages.
>
> Jon Haupt's suggested using this markup on the edit protected page:
>
> [[Comments.{$Group}-{$Name} | Comments]]
>
> I plan to put this markup in a group header on a protected group, so it
> automatically creates the links.
>
> In the actual comments group (which is not edit-protected in any way), I
> would like to insert a group header that creates an automatic backlink:
>
> [[Group.Name]]
>
> But i need markup that can parse the hyphenated comments page name.
This most likely won't ever be a part of official PmWiki, but:
Markup('{$BaseName}', '>{$fmt}',
'/{\\$BaseName}/',
str_replace('-', '.', $pagename, 1));
Then you can do
[[{$BaseName}]]
and it will convert Comments.Group-Name to be "Group.Name".
Note that this won't work if there are any hyphens in the group name.
Pm
More information about the pmwiki-users
mailing list