Thread Title Variable

Discussion in 'vBulletin Discussions' started by Nick, May 18, 2009.

  1. Nick

    Nick Regular Member

    I am trying to have a bit of text displayed when you are posting a reply to a thread. I got everything working, but need the appropriate variable to show the title of the thread being replied to.

    Code:
    <if condition="THIS_SCRIPT == 'newreply'">
    <div>You are posting a reply to <strong>[I][B]thread-title[/B][/I]</strong>.</div>
    </if>
    I tried $thread[threadtitle] to no avail.
     
  2. lordtopcat

    lordtopcat Adept

    I've had a few attempts too, I tried this:

    $thread[prefix_plain_html] $thread[title]

    But that didn't work either.
     
  3. Nick

    Nick Regular Member

    Hopefully Wayne will be to the rescue soon. :p
     
  4. Wayne Luke

    Wayne Luke Regular Member

    Not sure why you have a conditional as newreply is a distinct template where you can put this at.

    Anyway, the thread array is called $threadinfo and the index you want to use is 'title' as that is the field name in the database. So your variable would be:

    $threadinfo[title]

    If you used this format {$threadinfo['title']} then it should work in vB4 as well.
     
  5. lordtopcat

    lordtopcat Adept

    Thanks for the info Wayne. I'm sure we were both driving ourselves crazy trying to figure it out, Lol

    I've added this so that the Prefix will display too:
    Code:
    {$threadinfo['prefix_plain_html']} {$threadinfo['title']}
    I wondered why this wasn't working, Lol ;) thread'indo'

    The reason for this is because the conditional is placed within the navbar template. I guess Nick thought it would be easier as there is one for newreply, newthread and the forum description to have them all in the same place.

    Thanks very much Wayne :)
     
  6. Nick

    Nick Regular Member

    Thank you very much, Wayne. I appreciate it. :)

    And thank you LTC for getting it up while I was away.
    Yep, that is correct. ;)
     

Share This Page