Thread Title Variable

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

  1. Nick

    Nick Regular Member

    Joined:
    Jul 27, 2008
    Messages:
    7,441
    Likes Received:
    218
    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

    Joined:
    Mar 18, 2009
    Messages:
    134
    Likes Received:
    2
    First Name:
    Jamie
    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

    Joined:
    Jul 27, 2008
    Messages:
    7,441
    Likes Received:
    218
    Hopefully Wayne will be to the rescue soon. :p
     
  4. Wayne Luke

    Wayne Luke Regular Member

    Joined:
    Apr 2, 2009
    Messages:
    991
    Likes Received:
    276
    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

    Joined:
    Mar 18, 2009
    Messages:
    134
    Likes Received:
    2
    First Name:
    Jamie
    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

    Joined:
    Jul 27, 2008
    Messages:
    7,441
    Likes Received:
    218
    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