MyBB Support

years of service support

Submitted by Tutti Frutti, , Thread ID: 46643

Thread Closed

RE: years of service support

Guest
Level:
0
Posts:
N/A
Likes:
0
Credits:
0
11-09-2017, 11:51 PM
#4
Ugh you coul've said you don't know squat about php beforehand.
Replace

Code:
<setvar years>floor((TIME_NOW-$post['regdate'])/(60*60*24*365))</setvar>
<div class="years-tags yearly-tags-{$GLOBALS['tplvars']['years']}">{$GLOBALS['tplvars']['years']} Years of Service</div>
With
PHP Code:
<setvar years>floor((TIME_NOW-$post['regdate'])/(60*60*24*365))</setvar>
<if{
$GLOBALS['tplvars']['years']}!=="0"then>
<
divclass="years-tagsyearly-tags-{$GLOBALS['tplvars']['years']}">{$GLOBALS['tplvars']['years']}YearsofService</div>
</if> 

It might work, it might not. I'm not a wold class programmer

Users browsing this thread: 2 Guest(s)