(2015-07-19, 08:15 AM)Akay Wrote: Easy, you need this plugin to make it work ~ http://mybbhacks.zingaburga.com/showthread.php?tid=260
<if $post['regdate']+(60*60*24*365) <= TIME_NOW then><span style="color: gold;">One Year of Service</span></if>
(2015-07-19, 09:10 AM)Adamas Wrote: Or:
<setvar years>floor((TIME_NOW-$post['regdate'])/(60*60*24*365))</setvar> <span class="service-{$GLOBALS['tplvars']['years']}">{$GLOBALS['tplvars']['years']} years of service</span>
(The number will be an integer, ie 1, 2, 3, instead of one, two, three)
Then, in global.css, stuff like this works:
.service-1 { color: pink; } .service-2 { color: yellow; } .service-3 { color: red; } .service-4 { color: orange; }
et cetera, where the number is the number of years of service.
But how would I calculate the time for each year? That's what I get messed up with.
(2015-07-19, 08:15 AM)Akay Wrote: Easy, you need this plugin to make it work ~ http://mybbhacks.zingaburga.com/showthread.php?tid=260
<if $post['regdate']+(60*60*24*365) <= TIME_NOW then><span style="color: gold;">One Year of Service</span></if>
So I tried doing it just to test and see if the <span> would work, and no text popped up? Unless it has to be postbit_classic?