[pmwiki] Re: [Pmwiki-users] Another desire for Webmenu
Bernhard.Weichel@t-online.de
Bernhard.Weichel
Sat Aug 16 12:01:22 CDT 2003
Patrick R. Michaud wrote:
> Bernhard wrote:
>>
>> ThisPage:_discuss does not work but ThisPage:-discuss works. Isn't
>> "_"
>> a legcal character in a wiki word.
>
> Not by default, but it can be made a legal character by changing the
> values of three variables (in local.php):
>
> $GroupNamePattern = "[A-Z]\\w+";
> $WikiWordPattern="[A-Z]\\w*(?:[A-Z][a-z0-9_]|[a-z0-9_][A-Z])\\w*";
>
>
>
$FreeLinkPattern="{{(?>([A-Za-z]\\w*(?:(?:[\\s_]*|-)\\w+)*)(?:\\|((?:(?:[\\s
_]*|-)\\w)*))?)}}((?:-?\\w+)*)";
> $PageTitlePattern="[A-Z]\\w*(?:-\\w+)*";
>
> All this does is change [A-Za-z0-9] to be \w (which includes
> underscores)
> and [a-z0-9] with [a-z0-9_].
>
Thanks for the suggestion. It is no real problem form me, so I think I leave
it as it is.
>> So, the remaining minor problem is, if I want to make a link such as
>> [[ThisPage:-discuss discuss [[$WikiPage]]]]
>> which would mention the page title in the link.
>
> You can add this capability if you want--just add the following to
> local.php:
>
> $BrowsePage = FmtPageName('$Title_',$pagename);
> $BrowseGroup = FmtPageName('$Group',$pagename);
> $DoubleBrackets['[[$WikiPage]]'] = '$BrowsePage';
> $DoubleBrackets['[[$WikiGroup]]'] = '$BrowseGroup';
>
> This will provide markups for whatever page is being browsed.
> However, to avoid confusion with other variable names and markup I
> might suggest '[[$BrowseTitle]]' and '[[$BrowseGroup]]' instead of
> $WikiPage and $WikiGroup.
Sure, I would follow this suggestions. Would you do it in webmenu.php
or in local.php, or could you even add it to pmwiki.php?
Interestingly in 0.5.19, [[$Title]] shows the right page also.
--bernhard
> Pm
>
> _______________________________________________
> Pmwiki-users mailing list
> Pmwiki-users at pmichaud.com
> http://pmichaud.com/mailman/listinfo/pmwiki-users_pmichaud.com
More information about the pmwiki-users
mailing list