[pmwiki-users] Amending ctime from Within PmWiki

Patrick R. Michaud pmichaud at pobox.com
Mon Jul 17 15:59:02 CDT 2006


On Mon, Jul 17, 2006 at 08:05:55PM +0100, Ian Barton wrote:
> >>
> >> 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. 

PmWiki *never* overwrites the ctime, so that's not the issue.  

> Any ideas of how I can modify this behaviour?

The problem must be somewhere else (although at this moment
I'm not sure where).

Pm




More information about the pmwiki-users mailing list