XF 1.5 Zombie thread alert

JamesBrown

Well-known member
A Google search took me to an old thread on Mumsnet. At the top of the page was the following warning. What a good idea. Does anyone know if this can be done in xF

xzombie_hazard.png.pagespeed.ic.1S-sJ_-cwR.png

ZOMBIE THREAD ALERT: This thread hasn't been posted on for a while.
 
Was bored, so had a mess around with this. Just used simple text, but would be easy enough to expand and use images. Conditional uses a year from the last post date/time.
year conditional.webp

I make no claims on how good this works or even if it's the proper way to do it as I'm not a coder of any kind lol

Code:
<xen:if is="({xen:calc '{$serverTime} - 31556926'} > {$thread.last_post_date})">
<h1>Show this notice</h1>
</xen:if>

I also tested it using one day - change the 31556926 string to 86400.

/EDIT

Oh yeah, I put it at the top of the thread_view template.
 
Little more messing around... still nothing special, but I think it works better displaying just above the quick reply - that way you're not assuming everyone who goes into the thread is there to post, they might be there just to read...

If they get as far as quick reply, the notice seems more logical:-

above quick reply.webp

I cheated and put the code inside the ad_thread_view_below_messages template and put the image in a class so i could add some css.

Looks kinda cute.
 
@Lisa, if we just wanted something really basic, would it be really easy to make a duplicate of the thread status notice?

Notice.webp

Instead of the above message, though, it would be something like, "Notice: This thread hasn't received a reply since August 21, 2015." And the lock icon would, of course, not be there. I assume it's just a matter of copying and pasting the code for the thread status in the corresponding template and then adjusting it accordingly. But everything's not always that easy, is it? ;) So I'm just making sure.
 
Little more messing around... still nothing special, but I think it works better displaying just above the quick reply - that way you're not assuming everyone who goes into the thread is there to post, they might be there just to read...

If they get as far as quick reply, the notice seems more logical:-

View attachment 139513

I cheated and put the code inside the ad_thread_view_below_messages template and put the image in a class so i could add some css.

Looks kinda cute.
I would actually love to get that exact code block from you, I will repost the picture or choose another of course!
 
Was bored, so had a mess around with this. Just used simple text, but would be easy enough to expand and use images. Conditional uses a year from the last post date/time.
View attachment 139509

I make no claims on how good this works or even if it's the proper way to do it as I'm not a coder of any kind lol

Code:
<xen:if is="({xen:calc '{$serverTime} - 31556926'} > {$thread.last_post_date})">
<h1>Show this notice</h1>
</xen:if>
Hi! How to specify message to be displayed in a particular subforum only?

Code:
{xen:calc '{$serverTime} - 31556926'} > {$thread.last_post_date}) + {forumid=}
?
 
Back
Top Bottom