Welcome Guest[3.142.172.190], connected from
How Many Minutes and Hours Past Since Last Post or Thread.
|
09-01-2009, 09:32 PM
(This post was last modified: 09-01-2009 09:34 PM by ghazal.)
Post: #1
|
|||
|
|||
How Many Minutes and Hours Past Since Last Post or Thread.
Name: How Many Minutes and Hours Past Since Last Post or Thread.
Description: It will show that how many minutes or hours OR both past since there was a post or thread was made. The result will be shown on Index.php file (i.e. homepage) and Forumdisplay.php file. Coding: So lets start coding. Open inc/functions.php Add following code to the bottom of this file before ?> . PHP Code:[Highlight] /** and save the file, Now open .inc/functions_forumlist.php and about 1/3rd of its bottom, find this code. PHP Code:[Highlight] $lastpost_date = my_date($mybb->settings['dateformat'], FOUND... ! okay, Just replace it with the following, PHP Code:[Highlight] $lastpost_time = timeAgo($lastpost_data['lastpost']); and save the file, Now open forumdisplay.php and about 1/3rd to its bottom, find the following code, PHP Code:[Highlight] $lastpostdate = my_date($mybb->settings['dateformat'], $thread['lastpost']); FOUND... ??? Okays, lets replace it with the following code, PHP Code:[Highlight] $lastposttime = timeAgo($thread['lastpost']); and save the file, Now go to .inc/languages/english/ and open global.lang.php file and add the following code before ?> PHP Code:[Highlight] $l['df_ago'] = "Ago"; FINISHED. . . ! Now refresh your index (homepage) , It should look like this, SCREENSHOT: Now open Your forumdisplay.php , It should look like this, SCREENSHOT: Cool... ENJOY. |
|||
Post: #2
|
|||
|
|||
RE: How Many Minutes and Hours Past Since Last Post or Thread.
Thank you for this wonderful tip. I may use it someday.
|
|||
Post: #3
|
|||
|
|||
RE: How Many Minutes and Hours Past Since Last Post or Thread.
(09-27-2009 09:32 AM)Hero Wrote: Thank you for this wonderful tip. I may use it someday. Yours welcome |
|||
Post: #4
|
|||
|
|||
RE: How Many Minutes and Hours Past Since Last Post or Thread.
Yah another nice tutorial
|
|||
Post: #5
|
|||
|
|||
RE: How Many Minutes and Hours Past Since Last Post or Thread.
very good tutorial.
|
|||
1 member(s) viewed this thread in the last 365 days :
|
Yeke |
« Next Oldest | Next Newest »
|
WWWHostingServer.com
|
||||||
|
||||||
|
|
|
|
|
Powered By MyBB, © 2002-2024 MyBB Group. Golden Crown - Designed and Published by ghazal & exdiogene of MyBBCodes. Hosting provided by WWWHostingServer.com |