[Pmwiki-users] Discussionlink / DiscussionBackLink - 2

Patrick Schwarz pmwiki
Tue Jan 4 10:03:58 CST 2005


nexyufuli evo wrote:
> DiscussionLink
> ----------------------------------------------------------------------------- 
> 
> ## This adds a Link witch points back to the article
> function DiscussBacklink($pagename,$args) {
> # if the pagename ends with "-Discussion", make a link with the pagename 
> without the string "-Discussion"
> if (preg_match("/-Discussion$/",$pagename)) print
> FmtWikiLink('',"{{str_replace("/-Discussion/",,$pagename)}}","Back") '';
> }
> 
> this gives me the error:
> Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in
> /home/netstrea/public_html/wegweisungsartikel_pmwiki/local/config.php on
> line 45
> 

Try using
FmtWikiLink('','{{str_replace("/-Discussion/",,$pagename)}}','Back');
instead of
FmtWikiLink('',"{{str_replace("/-Discussion/",,$pagename)}}","Back") '';

HTH,
Patrick



More information about the pmwiki-users mailing list