Loading...
 
Features / Usability

Features / Usability


Date and Time stamp in Blog

posts: 131 Singapore

Currently if I amend or modify a posting, the Last modified date and time stamped is not changed. For example I created a blog on 1 Nov 05 (12:00) and made some changes to this post today. The date and time stamp still remains as 1 Nov 05 (12:00). I would expect the date and time stamp to be shown as Last modified : 21 Nov 05 (13:00). Is there a easy hack for this??

--kwow

posts: 1092

There is only a created date in the database. We need to add an additional column to tiki-blog_posts
if you want to do a big trick by updating the created date in the function update_post in lib/blogs/bloglib.php do

Image
Copy to clipboard
$query = "update `tiki_blog_posts` set `blogId`=?,`trackbacks_to`=?,`data`=?,`user`=?,`title`=?, `created`=? where `postId`=?"; $result = $this->query($query,array($blogId,$trackbacks,$data,$user,$title,date("U"), $postId));

code with no garantie

sylvie

posts: 131 Singapore

Cool cool it works. Thanks sylvie winkwink

One more thing to bother you. The blog post date and time stamp has changed but on the Blog listing it does not reflect the date and time stamp changes. Can you help to advise where to do a code hack on this?? Way over my head on this...

Thanks a million.

--kwow

posts: 1092

With no garanty

Image
Copy to clipboard
$query = "update `tiki_blogs` set `lastModif`=? where `blogId`=?"; $result = $this->query($query,array(date('U'),(int) $blogId));

in the same routine
perhaps better to have $now=date('U') and use $now in the both place to have the same date in the post and the blog
sylvie

posts: 131 Singapore
> Image
Copy to clipboard
$query = "update `tiki_blogs` set `lastModif`=? where `blogId`=?"; > $result = $this->query($query,array(date('U'),(int) $blogId));

> in the same routine

The above hack has no effect on the last modified date when I tried changing the date of the blog post. I cracked my head but do not understand why the last modified date still does not change. ????? Do you have any idea??rolleyes

> perhaps better to have $now=date('U') and use $now in the both place to have the same date in the post and the blog
I have tried using $now in replace of date("U") but still does not work...please help.cry

I have also found out that if I do an Edit Blog selection, now the Last Modified date and time stamp changes. Why is this happening in the Edit Blog and not from the posting itself?! Baffling me quite a bit.....Appreciate anyone's enlightment on this...

TIA.

--kwow

posts: 131 Singapore

In addition to the above, I found that updating of one's blog posting does not affect the Blog header section directly. So by changing the code

Image
Copy to clipboard
$query = "update `tiki_blogs` set `lastModif`=? where `blogId`=?"; $result = $this->query($query,array(date('U'),(int) $blogId));


will not have any effect on the Last modification date. Unless you perform an edit_blog if not there is no change in the date and date stamp.

I was trying hard to play around with code but without any success. This is kinda of expected as I am not a php grogrammer so any help will be great and appreciated.

TIA.

--kwow


Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting