On 05/03/2017 17:06, [email protected] wrote:
So, the author link markup is defined in scripts/author.php

So I figured I could just copy what was there and make some changes in
my config.php (adding action=browse):


SDV($AuthorGroup,'Profiles');
Markup('[[~','<links','/\\[\\[~(.*?)\\]\\]/',"[[$AuthorGroup/$1?action=browse|$1]]");


But inside of PageActions wehre there is:

* %item rel=nofollow class=profile   accesskey="$[ak_profile]"%''
[[~{$Author} | Welcome {$Author} ]]''

I end up seeing:

Welcome author ?action=browse|author | Welcome author/

/Instead of just:

Welcome author

which is what I see without my override.

Any ideas on how to fix this?



_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

The problem is that the pattern extracts everything between '~' and ']]' into $1. Your replacement assumes that $1 contains only the author.

The most reasonable solution is to place the '?action=browse' in PageActions:

Markup('[[~','<links','/\\[\\[~(.*?)\\]\\]/',"[[$AuthorGroup/\$1]]");

[[~{$Author}?action=browse | Welcome {$Author} ]]

If you really want to do this in the Markup rule:

Markup('[[~','<links','/\\[\\[~([^\]|]*)(.*?)\\]\\]/',"[[$AuthorGroup/\$1?action=browse\$2]]");

[[~{$Author} | Welcome {$Author} ]]


Chuck G



_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to