[Pmwiki-users] Re: Finding author name in page
Christian Ridderström
chr
Sun Feb 29 01:30:43 CST 2004
On Sat, 28 Feb 2004, Patrick R. Michaud wrote:
> On Sun, Feb 29, 2004 at 01:56:55PM +1300, Robin Sheat wrote:
> > Hey there, I'd like to have a little thing at the bottom of some of my
> > pages "Last modified [date] by [author]", where it puts the IP if there
> > is no author name supplied. Can this be done? I have happily got
> > Last Modified [[$LastModified]] by [[$LastModifiedHost]]
> > but would prefer the authors name if it was avaliable.
>
> Currently [[$LastModifiedBy]] gives the author's name if one was
> supplied, otherwise it's empty.
> Many people would like to have a markup that uses the author's name or
> the IP address of the modifying host if no author is supplied, which
> makes good sense to me
> As I see it, I'd like to have the variables/markup structured such that
> the following options are possible:
> - Display the author's name if available, otherwise IP of the modifying host
> - Link to the author's profile page if available
> - Provide a (?-)link to create the author's profile page if not available
> - Place similar author information into a header or footer, linked or not
> linked as appropriate
Here's one idea for a syntax:
* '[[$LatestAuthor]]' -> author name as simple text, or ""
* '[[LatestAuthor:]]' -> author name as link to profiles page, or "" (?)
* '[[$LastHost]]' -> host name or IP
* '[[$LastIP]]' -> IP of computer that last edited the page
* '[[$LastModifiedBy]]' -> author name, host or IP-number
* '[[LastModifiedBy:]]' -> author name as link, or host or IP-number
Where I've mixed 'Last' and 'Latest'... can't decide which I prefer.
Anyway, the main idea is that [[$...]] just gives the name, and [[...:]]
produces a link.
An alternative idea is to use '[[LatestAuthorProfile:]]' to produce a link
to the profile page.
/Christian
PS.
Using the word 'LatestAuthor' made me think that maybe it'd be a good idea
to introduce a concept for 'MainAuthor' (or possibly 'MainAuthors') of a
page. 'LatestAuthor' would be of course be the person who modified the
page the last time, whereas 'MainAuthor' is the one "in charge" of the
page.
If the markup '[[Author:chr]]' had been used in the beginning of a page,
then we could imagine that using '[[$MainAuthors]]' or '[[$Authors]]' in
the GroupFooter should output 'chr' for this page. Similarly,
'[[$AuthorProfiles]]' would output the equivalent of "{{~chr}}".
--
Christian Ridderstr?m http://www.md.kth.se/~chr
More information about the pmwiki-users
mailing list