Enthusify: How do you redirect the "Post New Thread" or "New Thread" buttons in vBulletin

Thursday, October 4, 2012

How do you redirect the "Post New Thread" or "New Thread" buttons in vBulletin

vBulletin 3

How to change the link for the "Post New Thread" button in vBulletin 3 (for a specific subforum)

  1. Login to the vBulletin Admin Control Panel for your site.
  2. Expand the section in the left navigation called “Styles and Templates” and select the subsection “Search in Templates”
  3. At the top of the page is a text field labeled “Search for Text.” Write in the field “FORUMDISPLAY”
  4. A list of templates should load on the left side of the main window. Select “FORUMDISPLAY” and click on the “Customize” button on the right side of the window. (If you’ve edited this template before, click on the “Edit” Button instead.)
    Note: The template name will be red if it has been edited before.
  5. Find the section <!-- controls above thread list -->
  6. Find this code
<a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]" rel="nofollow">

  1. Replace the code in step 3 with this code
<a href="<if condition="$foruminfo['forumid']=='21'">http://www.skilodgeforum.com/classifieds.php<else />newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]"</if>" rel="nofollow">

  1. Replace the 'forumid' in step 7 with the id of the sub-forum you wish to target. (in this example, we are targeting subforum 21)
  2. Replace the url in step 7 with the url you wish to link the "Post new thread button" to. (in this example we are linking to http://www.skilodgeforum.com/classifieds.php)
  3. Repeat steps 6-9 in the section <!-- controls below thread list -->
  4. DONE!
-----------------------------------------------------------------------------------------------------------------------------------------------
vBulletin 4

Changing the link for the "Post New Thread" button for a specific subforum in vBulletin 4
  1. Login to the vBulletin Admin Control Panel for your site.
  2. Expand the section in the left navigation called “Styles and Templates” and select the subsection “Search in Templates”
  3. At the top of the page is a text field labeled “Search for Text.” Write in the field “FORUMDISPLAY”
  4. A list of templates should load on the left side of the main window. Select “FORUMDISPLAY” and click on the “Customize” button on the right side of the window. (If you’ve edited this template before, click on the “Edit” Button instead.)
    Note: The template name will be red if it has been edited before.
  5. Find this code. It appears multiple times. I counted 3 times.
<a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}newthread.php?{vb:raw session.sessionurl}do=newthread&amp;f={vb:raw foruminfo.forumid}"

  1. Replace each instance of the code in step 5,  with this code
<a href="<vb:if condition="$foruminfo['forumid'] == 4">http://www.theautopartsforum.com/vbtest/classifieds.php<vb:else />{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}newthread.php?{vb:raw session.sessionurl}do=newthread&amp;f={vb:raw foruminfo.forumid}</vb:if>"

  1. Replace the 'forumid' in step 6 with the id of the sub-forum you wish to target. (in this example, we are targeting subforum 4)
  2. Replace the url in step 6 with the url you wish to link the "Post new thread button" to. (in this example we are linking to http://www.theautopartsforum.com/vbtest/classifieds.php)
  3. DONE!

Changing  the "Post New Thread" button text for a specific subforum in vBulletin 4
  1. Login to the vBulletin Admin Control Panel for your site.
  2. Expand the section in the left navigation called “Styles and Templates” and select the subsection “Search in Templates”
  3. At the top of the page is a text field labeled “Search for Text.” Write in the field “FORUMDISPLAY”
  4. A list of templates should load on the left side of the main window. Select “FORUMDISPLAY” and click on the “Customize” button on the right side of the window. (If you’ve edited this template before, click on the “Edit” Button instead.)
    Note: The template name will be red if it has been edited before.
  5. Locate the section <div id="above_threadlist"
  6. Locate the code  {vb:rawphrase post_new_thread}
  7. Replace the code in step 6 with this code
<vb:if condition="$foruminfo['forumid']== 4">Sell an Item<vb:else /> {vb:rawphrase post_new_thread}</vb:if>

  1. Replace the forumid in step 7 with the id of the subforum you wish to target. (in this example, we are targetting subforum 4)
  2. In step 7, after the formid and before the <else> statement, write in the text you'd like to replace "Post New Thread" with. (In this example, we have renamed the button "Sell an Item")

Note: This approach does a flat override of the text in the button. This approach does not support dynamic changes to the text (example: if your users are using vBulletin in a different language)

  1. Locate <div id="below_threadlist" and repeat steps 6-9.
  2. DONE!!

No comments:

Post a Comment