[Pmwiki-users] Discussionlink / DiscussionBackLink - 2
nexyufuli evo
noskule
Tue Jan 4 09:29:09 CST 2005
Hi List
here again the same but evereything in english and with a change in the
code (from preg_replace to str_replace)
sorry for the double mail
I did use the Discussionlink function for my wiki
now i would like to add a backlink to the disscussion page witch points
to the article again, i did try the folowing:
DiscussionLink
-----------------------------------------------------------------------------
## This adds a DiscussionLink to an article
function DiscussLink($pagename,$args) {
# if the current page already ends in "-Discussion", don't make a link
if (preg_match("/-Discussion$/",$pagename)) return '';
# otherwise, generate a link using FmtWikiLink
print FmtWikiLink('',"{{".$pagename."-Discussion}}","Discuss");
}
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
could anyone giving me a hand with this
im quiete a newbe in html/php
thanx nos
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.298 / Virus Database: 265.6.7 - Release Date: 30.12.2004
More information about the pmwiki-users
mailing list