![]() |
Date based conditional items in templates
Hello,
In showthread template I would like to add a message to all threads that are older than X days, can anybody point me in the right direction for this? |
You'd need something like this in a template (e.g. showthread)
Code:
<if condition="$thread['dateline'] < (TIMENOW - (28 * 24 * 60 * 60))"> You may need to try $threadinfo if $thread does not work. |
Unfortunately, when trying that I get the following error:
Quote:
After a little fiddling the following works: <if condition="$thread['dateline'] < TIMENOW - 2419200"> <p>test - this should only display in threads older than a month</p> </if> The VB parser obviously doesnt like the (x * y * z) part |
All times are GMT. The time now is 10:22 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|