[Pmwiki-users] Finding author name in page

Patrick R. Michaud pmichaud
Sat Feb 28 18:37:13 CST 2004


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.
> 
> Is there a way to do this (or better said:which way should I do this :) ?

There's not a good way to do this, yet, but I'd like to build one.  
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, but there are a
couple of other factors to take into account also.  So, lacking a clear
markup direction, I haven't done anything about this yet.  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

Any suggestions for what makes intuitive sense about how this should work--
i.e., what should variables be named or markup sequences look like?

Pm



More information about the pmwiki-users mailing list