MyBB Support

years of service support

Submitted by Tutti Frutti, , Thread ID: 46643

Thread Closed

RE: years of service support

Tutti Frutti
•̀_•́
Prime
Level:
6
Reputation:
50
Posts:
695
Likes:
103
Credits:
764
OP
11-09-2017, 11:54 PM
#5
11-09-2017, 11:51 PM
KituKatu Wrote:
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

Well apologises that I suck at php dude... and no that code above don't work.

Users browsing this thread: 4 Guest(s)