View Full Version : Template conditional based on registration date?
JamesAB
10-16-2015, 07:37 PM
I'd like to add a template conditional that would be based on how long ago a member registered. Basically, if they registered more than 2 months ago - show something unique.
Yet I can't wrap my head around how to implement this.
Any suggestions?
All help would be greatly appreciated.
Thanks,
James
It's a bit hacky in vBulletin 3;
<if condition="$timenow=TIMENOW AND $bbuserinfo[joindate] > 0">
<if condition="$timenow - $bbuserinfo[joindate] > 5256000">
registered for at least 2 months
</if>
</if>
5256000 is the amount of seconds.
JamesAB
10-17-2015, 11:38 AM
Thanks Dave.
I didn't know we were allowed to use variables like TIMENOW in templates. Nor did I know we could assign new variable in templates.
I'll test it out.
Thanks for your help.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.