1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 Zombie thread alert

Discussion in 'Styling and Customization Questions' started by JamesBrown, Aug 21, 2016.

  1. JamesBrown

    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

    ZOMBIE THREAD ALERT: This thread hasn't been posted on for a while.
    ŽivaAkcija likes this.
  2. Mike

    Mike XenForo Developer Staff Member

    It should be doable by adding a conditional based on the thread's last post date compared to the current time.
  3. The Sandman

    The Sandman Well-Known Member

    Could also do with a better zombie.
    Steve F and Brad P like this.
  4. Xon

    Xon Well-Known Member

    I use @W1zzard TPU: Show Warning when bumping Old Threads's add-on(I contributed a chunk to it) to provide a notice and it requires the user to select a checkbox to acknowledge that they are replying to a really old thread.

    It cuts down on point-less posting in long dead threads by a lot.
  5. Lisa

    Lisa Well-Known Member

    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.png

    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

    <xen:if is="({xen:calc '{$serverTime} - 31556926'} > {$thread.last_post_date})">
    <h1>Show this notice</h1>
    I also tested it using one day - change the 31556926 string to 86400.


    Oh yeah, I put it at the top of the thread_view template.
    Brad P likes this.
  6. Lisa

    Lisa Well-Known Member

    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.png

    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.
    ŽivaAkcija likes this.
  7. ŽivaAkcija

    ŽivaAkcija Well-Known Member

    new add on comming
    Lisa likes this.
  8. Amaury

    Amaury Well-Known Member

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


    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.
  9. Lisa

    Lisa Well-Known Member

    Yeah, it'd be simple to do.
    Amaury likes this.
  10. JamesBrown

    JamesBrown Well-Known Member

    I agree. On their site though the zombie is a little smaller and doesn't look too bad.

    Gemma likes this.
  11. The Sandman

    The Sandman Well-Known Member

    Yeah, it's usually not a good sign when something looks better the smaller it is.
  12. suineg

    suineg Member

    I would actually love to get that exact code block from you, I will repost the picture or choose another of course!
  13. karabaja

    karabaja Member

    Hi! How to specify message to be displayed in a particular subforum only?

    {xen:calc '{$serverTime} - 31556926'} > {$thread.last_post_date}) + {forumid=}

Share This Page