On Tue, Jan 23, 2007 at 10:49:43AM -0000, marc wrote:
> Patrick R. Michaud said...
> > Simply be sure to also (re)set $AuthorLink when changing $Author:
> > 
> >     include_once("$FarmD/scripts/author.php");
> >     include_once("$FarmD/scripts/authuser.php");
> >     $Author = "$AuthId-" . preg_replace('/^[^-]*-/', '', $Author);
> >     $AuthorLink = "[[~$Author]]";
> 
> Isn't there a glitch with the hyphen after $AuthId? Won't Author be 
> displayed, and recorded in RecentChanges, as
> 
>     Fred-

Yes, you're correct (good catch!).  How about the following instead?

    include_once("$FarmD/scripts/author.php");
    include_once("$FarmD/scripts/authuser.php");
    if (!$Author) $Author = $AuthId;
    else $Author = "$AuthId-" . preg_replace('/^[^-]*-/', '', $Author);
    $AuthorLink = "[[~$Author]]";

Thanks!

Pm

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

Reply via email to