[pmwiki-users] discussion backlink

noskule noskule at gmx.net
Mon Mar 27 09:23:53 CST 2006


Hans schrieb:

>Friday, March 24, 2006, 11:50:55 AM, noskule wrote:
>  
>
>>but how it works if I want to replace
>>    
>>
>
>  
>
>>Group.Name-Discussion -> Group.Name
>>    
>>
>
>link to discussion page:
>    [[Discussion -> {$Group}.{$Name}-Discussion]]
>
>link back from discussion page:
>    [[back to page -> {$Group}.{$BaseName}]]
>
>add in config.php:
>    $name = PageVar($pagename, '$Name');
>    $FmtPV['$BaseName'] = 'substr($name,0,-11)';
>
>(name less 11 characters from the end)
>
>
>Best,
> Hans                           
>
>
>  
>
yep this  works, and I modified it to:

$name = PageVar($pagename, '$Name');
$backname = explode('-',$name,2);
$backname = $backname[0];
$FmtPV['$BaseName'] = $backname;

So it supports various names . . .
grz nos




More information about the pmwiki-users mailing list