XF 1.3 Marking threads as old

Razasharp

Well-known member
Is there a date conditional that I can use to alert members a thread is old?

In the docs theres:

<xen:date time="$datetime" />

But that actually gives me an error on saving the template.
 
Use a conditional combined with $servertime and xen:calc to determine if a threads date is old. I believe there is an old addon in the archive that describes it.
 
Something like this?

PHP:
$date = new DateTime("2012-03-24 17:45:12");

<xen:if is="{$thread.last_post_date} < {$date}">
show notice
</xen:if>

Not sure where I'd set the date :/
 
Code:
<xen:if is="$servertime - $post.post_date > 604800">
Show Notice
</xen:if>

That should be something along the lines of what you need. ($post.post_date may be wrong).
 
Code:
<xen:if is="$servertime - $post.post_date > 604800">
Show Notice
</xen:if>

That should be something along the lines of what you need. ($post.post_date may be wrong).

Is there anyway I can specify a date Jeremy? I want all of our imported threads to show the notice (sorry should have made that clear in the first post).
 
Top Bottom