[pmwiki-users] setting $Author with $AuthId as prefix
marc
gmane at auxbuss.com
Tue Jan 23 04:49:43 CST 2007
Patrick R. Michaud said...
> On Mon, Jan 22, 2007 at 05:24:41PM +1100, Kathryn Andersen wrote:
> Simpler is:
>
> include_once("$FarmD/scripts/author.php");
> include_once("$FarmD/scripts/authuser.php");
> $Author = "$AuthId-" . preg_replace('/^[^-]*-/', '', $Author);
>
> > - the Recent Changes page says that the change was made by "Kathryn".
> > (bad)
> > ...
> > So why isn't the "userid-Kathryn" being used in the Recent Changes page
> > in case A?
>
> The RecentChanges pages use $AuthorLink (not $Author) for
> generating the attributions in each entry. $AuthorLink is
> set by author.php -- which for a first-time login is happening
> before the $AuthId manipulations a bit later.
>
> 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-
Maybe I need more coffee this morning.
--
Cheers,
Marc
More information about the pmwiki-users
mailing list