Welcome to Geeklog, Anonymous Monday, December 23 2024 @ 07:05 pm EST

Geeklog Forums

bug in comment preview.


Status: offline

jlawrence

Forum User
Chatty
Registered: 12/30/04
Posts: 49
Location:Plymouth, Devon, UK
confused
Hi,
I think I've found a bug in the comment preview - it's nothing major, just slightly anoying.
If you create a comment on an article, then click preview. You'll see the following:
Authored by: <author> on <date>
it's the <date> that's always wrong. On my system it reports 'January 01 1970' on geeklog.net is reports 'December 31 1969'

This date is generated by code that pulls it from the comments database.
Since the comment hasn't been saved yet, there's nothing to pull out, so the date displayed is rubbish Smile

To fix this, I've changed lib-common.php as follows:
remove line 2903.
insert the following at line 2903:
if ( $preview ){
$template->set_var( 'date', strftime( $_CONF['date'],time()));
}else{
$template->set_var( 'date', strftime( $_CONF['date'], $A['nice_date'] ));
}

This cures the problem and should only do anything is $preview is set.

Regards,
Jon Lawrence


www.plymouthcricketclub.com - providing cricket for all ages in the Plymouth area.
 Quote

All times are EST. The time is now 07:05 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content