From: Tim B. <tim...@wc...> - 2002-01-25 17:14:25
|
On Friday 25 January 2002 11:57 am, Jeff Dairiki wrote: > On Thu, 24 Jan 2002 11:45:00 -0500 > > "Tim Bogart" <tim...@wc...> wrote: > > I added this line to the very begining... > > > > $ldt=date("Y-m-d G:m:s"); > > > > and added this line further down ... > > > > <form method="post" action="${BROWSE}EditPage"> > > <textarea class="wikiedit" > > name="content" > > rows="${EDIT_AREA_HEIGHT}" > > cols="${EDIT_AREA_WIDTH}" > > wrap="virtual">$FORMVARS[content] > > <? echo $ldt ?></textarea> <-----THIS IS THE LINE I ADDED > > > > which does what I wish, but it happens too late. It happens the *next* > > time > I push the edit button. Which is one save too late. > > I'm not sure I understand exactly what you want (from what I do > understand, I think the solution you've proposed here is a good one.) > > Whenever someone edits a page, your patches (above) add a line with the > current date at the bottom of the page text. Assuming your users follow > the prescribed protocol, they just add their edits below that line... > What about that don't you like? > It doesn't work properly. You push the edit button and that's when it's stamped. Not when the save button is pushed. I want the time stamp to occur when the save button is pushed. I'm now trying to edit the savepage.php file to do this. I've added a line to your savepage.php file, thus... //////////////////////////////////////////////////////////////// // // From here on, we're actually saving. // $content = date("Y/m/d H:i:s - ") .$content; <----THIS IS THE LINE $newrevision = $page->createRevision($editversion + 1, $content, $meta, ExtractWikiPageLinks($content)); but it doesn't work. It doesn't error, it just doesn't do anything. > > One of my co-workers suggested that I add a database table with the > > timestamp > and extract it and print it to the screen at the beginning of > the > savepage.php script, which seems like a good idea, if I knew what I > was doing > and how to do it. Any help would be most appreciated. > > As noted before, whenever you save a new version of a page, a timestamp is > already recorded --- it's already there, and, as has been pointed out, you > can access it(among other ways) via the PageHistory display. > Yes, I have found this out. I would like to append this timestamp at the end of the typed text when the save button is pushed and (as I am learning) the savepage.php script is executed. > I guess I don't understand exactly what you're proposing to do with it.... > > > Eventually, PhpWiki will support weblog style pages. As I envision them, > these are, essentially: append-only pages, where each edit(appendation) is > annotated with the author and date. Is that what you're looking for? YES! This is *exactly* where I am trying to go. But alas, I know not what I do. But I *am* trying. Thanks! Tim B. |