It depends on how you want to format it. If you know PHP, you can go to line 60 and change TimeDiff($Context, $Discussion->DateLastActive, mktime()) to anything using $Discussion->DateLastActive. That variable is just a Unix timestamp, so you can format it with any of the various PHP date functions.
Ah. In that case, find: TimeDiff($Context, $Discussion->DateLastActive, mktime()) And replace it with: date('F j, Y', $Discussion->DateLastActive) That should do the trick.
I've posted a minor update, version 1.1.2. Now, to an unauthenticated user, it will no longer try to show the number of new comments in a discussion. (Trying to fetch that when a user is not logged in just provides the total number of comments in the discussion, so it's not very useful to show that as the number of "new" comments.)
Hi,
Could you tell me please how to modify your plugin to show the time every post was wrote besides the title of the post ?
Actually I get a list of 20 item:
item1
time was wrote item1
item2
time was wrote item2
item3
time was wrote item3
and so on...
And I like to get something like this:
item1 (time was wrote item1)
item3 (time was wrote item2)
item2 (time was wrote item3)
Thank you !
Doesn't work for me, I got this message:
Fatal error: Cannot redeclare latestdiscussions_addfilters() (previously declared in /home/.inkus/holidayp/holidaypad.net/community/extensions/DiscussionFilters/default.php:40) in /home/.inkus/holidayp/holidaypad.net/community/extensions/LatestDiscusssionsPrime/default.php on line 40
Can't see what the problem could be and now I can't access my forum at all!
http://www.holidaypad.net/community/
Not good!
It seems as you have a conflict between extensions LatestDiscusssionsPrime and DiscussionFilters. Both of them use the same function.
So, you have to disabled one of them.
That's very odd. My forum uses Latest Discussions Prime alongside Discussion Filters with no problems, and I checked the Discussion Filters code, and it definitely does not declare a function of that name. The fact that they both say Line 40 suggests that your copy of Discussion Filters might have accidentally gotten replaced with a duplicate of Latest Discussions Prime. Have you checked on that?
Just for the record, to 'delete' the extensions you also need to remove their references from conf/settings.php which will stop vanilla using them. It's very rare to have to reinstall your whole forum.
Cheers mini, you'll be pleased to know I figured that out (about the reference in the conf, although it's the extensions.php file rather than settings)
Anyway, now I know how to remedy the situation I'll have another bang at it ;-)
Comments
TimeDiff($Context, $Discussion->DateLastActive, mktime())
And replace it with:
date('F j, Y', $Discussion->DateLastActive)
That should do the trick.
Pol's comment seems pretty realistic, though.