PDA

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

Dave
10-17-2015, 05:40 AM
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.