From: Tim B. <tim...@wc...> - 2002-01-22 18:07:18
|
All, Please bare with me folks. I'm not a programmer. I don't even play one on TV. I would like to change the function of the edit button on my wiki so that it performs a time stamp along with save it does. I know from reading the php docs that php does have a time stamp function based on the system clock. How would I go about incorporating this enhancement? As always, TIA. Tim B. |
From: Tim B. <tim...@wc...> - 2002-01-24 15:44:36
|
Well, I must have asked a stumper because nobody has responded to this question. After other inquires, it has been suggested to me that I put a table in the wiki database which contains some sort of time stamp and extract it at save time. This sounds like the best idea to me. Could somebody please give me an idea how to do this? TIA, Tim On Tuesday 22 January 2002 01:32 pm, Tim Bogart wrote: > All, > > Please bare with me folks. I'm not a programmer. I don't even play one on > TV. I would like to change the function of the edit button on my wiki so > that it performs a time stamp along with save it does. I know from reading > the php docs that php does have a time stamp function based on the system > clock. > > How would I go about incorporating this enhancement? > > As always, TIA. > > Tim B. > > _______________________________________________ > Phpwiki-talk mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwiki-talk |
From: Lawrence A. <la...@us...> - 2002-01-24 16:00:30
|
Sorry - been a bit busy with the day job! Where do you want the timestamp to appear? On the page itself? That's not too hard. In fact, if you browse a page, you can see at the bottom a line which says "Last edited on ..." Is that enough for you? Or do you want the timestamp next to the changes that have been made? That's a bit harder. If you do, what happens if someone edits two different parts of the same page? You can always see the date and time of any change by looking at RecentChanges, or PageHistory. Lawrence At 16:08 24/01/2002, Tim Bogart wrote: >Well, I must have asked a stumper because nobody has responded to this >question. > >After other inquires, it has been suggested to me that I put a table in the >wiki database which contains some sort of time stamp and extract it at save >time. This sounds like the best idea to me. Could somebody please give me >an idea how to do this? > >TIA, > >Tim > >On Tuesday 22 January 2002 01:32 pm, Tim Bogart wrote: > > All, > > > > Please bare with me folks. I'm not a programmer. I don't even play one on > > TV. I would like to change the function of the edit button on my wiki so > > that it performs a time stamp along with save it does. I know from reading > > the php docs that php does have a time stamp function based on the system > > clock. > > > > How would I go about incorporating this enhancement? > > > > As always, TIA. > > > > Tim B. > > > > _______________________________________________ > > Phpwiki-talk mailing list > > Php...@li... > > https://lists.sourceforge.net/lists/listinfo/phpwiki-talk > >_______________________________________________ >Phpwiki-talk mailing list >Php...@li... >https://lists.sourceforge.net/lists/listinfo/phpwiki-talk |
From: Tim B. <tim...@wc...> - 2002-01-24 16:20:42
|
On Thursday 24 January 2002 11:00 am, Lawrence Akka wrote: > Sorry - been a bit busy with the day job! Darn...I thought I asked a stumper! > > Where do you want the timestamp to appear? At the beginning of the line where the individual editing the page started typing. > On the page itself? Yes, so the data is recorded in my postgresql database for future reference. Reports and the like. > That's not > too hard. In fact, if you browse a page, you can see at the bottom a line > which says "Last edited on ..." Is that enough for you? Unfortunately, no. I need to be able to go back and see when each entry was made, so I need a permanent record of it to show up on the page itself. > Or do you want > the timestamp next to the changes that have been made? That's a bit > harder. If you do, what happens if someone edits two different parts of > the same page? > Good point. Edicut on the page will be to append to the end. This will be observed by all using it. > You can always see the date and time of any change by looking at > RecentChanges, or PageHistory. > I was unaware of that. I looked at it, but it would be a bit cumbersome when trying to determine when specific entries were made. I would like the chronology to appear on the page itself. I added a line to the editpage.html 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. 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. Thanks, Tim > Lawrence > > At 16:08 24/01/2002, Tim Bogart wrote: > >Well, I must have asked a stumper because nobody has responded to this > >question. > > > >After other inquires, it has been suggested to me that I put a table in > > the wiki database which contains some sort of time stamp and extract it > > at save time. This sounds like the best idea to me. Could somebody > > please give me an idea how to do this? > > > >TIA, > > > >Tim > > > >On Tuesday 22 January 2002 01:32 pm, Tim Bogart wrote: > > > All, > > > > > > Please bare with me folks. I'm not a programmer. I don't even play > > > one on TV. I would like to change the function of the edit button on > > > my wiki so that it performs a time stamp along with save it does. I > > > know from reading the php docs that php does have a time stamp function > > > based on the system clock. > > > > > > How would I go about incorporating this enhancement? > > > > > > As always, TIA. > > > > > > Tim B. > > > > > > _______________________________________________ > > > Phpwiki-talk mailing list > > > Php...@li... > > > https://lists.sourceforge.net/lists/listinfo/phpwiki-talk > > > >_______________________________________________ > >Phpwiki-talk mailing list > >Php...@li... > >https://lists.sourceforge.net/lists/listinfo/phpwiki-talk |
From: Jeff D. <da...@da...> - 2002-01-25 16:57:33
|
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? > 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. 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? |
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. |