PDA

View Full Version : Posttime condition


webmastersitesi
08-06-2011, 01:36 AM
I need a condition or simple plugin to show or not is post date older than a year it should not be shown to guests. Can some one help thank you.

kh99
08-06-2011, 12:28 PM
Try this

<if condition="$bbuserinfo[userid] != 0 OR $post['dateline'] > TIMENOW - 86400 * 365">
// Post code
</if>

webmastersitesi
08-07-2011, 09:03 AM
thank you for the answer but it seems does not accepted this ">" symbol and asked me to go back and fix where implemented. I plan to use it here in the postbit template
<if condition="!$show['announcement']">
$post[postdate]<if condition="!$show['detailedtime']">,

$post[posttime]

</if>

kh99
08-07-2011, 10:44 AM
Apparently the template compiler didn't like the parens, so I removed them in the above post (they weren't necessary).

webmastersitesi
08-07-2011, 03:14 PM
Thanks friend it really worked!