[pmwiki-users] Amending ctime from Within PmWiki

Ian Barton lists at manor-farm.org
Mon Jul 17 14:05:55 CDT 2006


>>
>> Is there a way from within PmWiki to amend the ctime of a page? I am 
>> using newpagebox plus to create the page, so I guess a I need to create 
>> a function within it to update the ctime to the reflect the date 
>> specified by the page name. Any ideas or pointers appreciated.
>>
> Now I have looked at the source for NewPageBoxPlus it seems to be 
> straightforward to do what I need.
> 
I seem to have hit a problem. If I amend the following in 
newpageboxplus.php by hard coding in a ctime:

           if ($p['text'] > '') $new['text'] = $p['text'];
           $new['author'] = $Author;

	  # Should be 21 July 2006
           $new['ctime'] = 1153436400;

           #$new['ctime'] = $Now;
           }
         SaveAttributes($newpage, $new, $new);
         PostPage($newpage, $new, $new);
         PostRecentChanges($newpage, $new, $new);
         Redirect($newpage);
        }

The page is always created with a ctime of $Now. I assume that PmWiki is 
overwriting the ctime set in the script. Any ideas of how I can modify 
this behaviour?

Ian.





More information about the pmwiki-users mailing list