Sunday, February 24, 2008, 6:18:53 PM, Hans wrote:

> The SetPageCreator function sets cauthor everytime new when the page
> is saved, not just when the page is saved the first time.

I think this will do it:
the 'author' attribute does not exist before the first page save:

# set page creator attribute 'cauthor' automatically to $Author
function SetPageCreator($pagename, &$page, &$new) {
        global $EnablePost, $Author, $PageCreator, $Now;
        SDV($PageCreator, $Author);
        if ($EnablePost && !$new["author"])
                $new["cauthor"] = $PageCreator; 
}
array_unshift($EditFunctions, 'SetPageCreator');



  ~Hans


_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to