[Pmwiki-users] getting the template path?
Thomas -Balu- Walter
list+pmwiki-users
Thu Feb 26 15:19:49 CST 2004
On Tue, Feb 24, 2004 at 11:12:59PM +0100, Thomas -Balu- Walter wrote:
> I have done the following now:
>
> $author=FreeLink('{{'.$LastModifiedBy.'}}');
> printf('by <a href="%s/%s/%s">%s</a>',
> $ScriptUrl,
> $AuthorGroup,
> $author['name'],
> $LastModifiedBy
> );
This has one side-effect... Of course the link will always be displayed
wether or not the author has a profile page. Is there a way to make it
more like ThomasWalter? if the page does not exist?
Balu
PS:
// The following right before the printf above seems to work
// Is there an easier way? :)
if (!PageExists($AuthorGroup.'/'.$author['name'])) {
printf('by %4$s<a href="%s/%s/%s?action=edit" title="edit profile of %s">?</a>',
$ScriptUrl,
$AuthorGroup,
$author['name'],
$LastModifiedBy
);
return;
}
More information about the pmwiki-users
mailing list