2006-06-10, 08:33 PM
neophyte mentioned this in the "Suggestions" forum, so I made a small mod for it.
Basically it calculates how old your forum is and outputs it as a variable in a template.
Open global.php
FIND:
Upload modified global.php
You can now include the variable $forumage in any template.
This will output in the form "x Years, x Months, x Weeks, x Days, x Hours, x Minutes, x Seconds".
Basically it calculates how old your forum is and outputs it as a variable in a template.
Open global.php
FIND:
$datenow = mydate($mybb->settings['dateformat'], time(), '', false);
$timenow = mydate($mybb->settings['timeformat'], time());
AFTER ADD: //Forum Age
$age_query = $db->query("SELECT regdate FROM ".TABLE_PREFIX."users ORDER BY regdate LIMIT 1");
$age_result = $db->fetch_array($age_query);
$age = time() - $age_result['regdate'];
$forumage = nice_time($age);
Upload modified global.php
You can now include the variable $forumage in any template.
This will output in the form "x Years, x Months, x Weeks, x Days, x Hours, x Minutes, x Seconds".