On Sun, Feb 24, 2008 at 03:29:30PM +0000, Hans wrote:
> Sunday, February 24, 2008, 2:30:06 PM, Patrick R. Michaud wrote:
>
> > To add an attribute for 'cauthor':
>
> > $PageAttributes['cauthor'] = '$[Page created by:]';
>
> thanks!
>
> And is there a mechanism with which to populate this with
> some default value, perhaps taken from $Author, when a new page
> gets saved fist time?
## not tested, but gives the general idea
function SetPageCreator($pagename, &$page, &$new) {
global $EnablePost, $Author;
if ($EnablePost) SDV($new['cauthor'], $Author);
}
unshift($EditFunctions, 'SetPageCreator');
Pm
_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users