[pmwiki-users] php q
noskule
noskule at gmx.net
Mon Jul 16 08:20:25 CDT 2007
hi list
I have some trouble to get this php code to runn properly, could please
someone giving me a hand?
I try to get the basename of a page:
SomeGroup.SomeName-Topic-12 -> SomeGroup.SomeName
GLOBAL $TopicBaseName,$CommentBaseName;
$name = PageVar($pagename, '$Name');
$backnametopic = explode('-Topic-',$name);
$backnametopic = $backnametopic[0];
$FmtPV['$TopicBaseName'] = $backnametopic;
this work like expected.
SomeGroup.SomeName-Topic-12-Comment-3 -> SomeGroup.SomeName-Topic-12
$name = PageVar($pagename, '$Name');
$backnamecomment = explode('-Comment-',$name);
$backnamecomment = $backnamecomment[0];
$FmtPV['$CommentBaseName'] = $backnamecomment;
this don't work and gives me: -12
does anyone have an idea what I'm doing wrong?
Thanks for any hints
nos
More information about the pmwiki-users
mailing list