How to change the link for the "Post New Thread" button in vBulletin 3 (for a specific subforum)
- Login to the vBulletin Admin Control Panel for your site.
- Expand the section in the left navigation called “Styles and Templates” and select the subsection “Search in Templates”
- At the top of the page is a text field labeled “Search for Text.” Write in the field “FORUMDISPLAY”
- 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. - Find the section <!-- controls above thread list -->
- Find this code
<a href="newthread.php?$session[sessionurl]do=newthread&f=$foruminfo[forumid]" rel="nofollow">
- 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&f=$foruminfo[forumid]"</if>" rel="nofollow">
- 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)
- 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)
- Repeat steps 6-9 in the section <!-- controls below thread list -->
- DONE!
vBulletin 4
Changing the link for the "Post New Thread" button for a specific subforum in vBulletin 4
- Login to the vBulletin Admin Control Panel for your site.
- Expand the section in the left navigation called “Styles and Templates” and select the subsection “Search in Templates”
- At the top of the page is a text field labeled “Search for Text.” Write in the field “FORUMDISPLAY”
- 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. - 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&f={vb:raw foruminfo.forumid}"
- 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&f={vb:raw foruminfo.forumid}</vb:if>"
- 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)
- 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)
- DONE!
Changing the "Post New Thread" button text for a specific subforum in vBulletin 4
- Login to the vBulletin Admin Control Panel for your site.
- Expand the section in the left navigation called “Styles and Templates” and select the subsection “Search in Templates”
- At the top of the page is a text field labeled “Search for Text.” Write in the field “FORUMDISPLAY”
- 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. - Locate the section <div id="above_threadlist"
- Locate the code {vb:rawphrase post_new_thread}
- 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>
- Replace the forumid in step 7 with the id of the subforum you wish to target. (in this example, we are targetting subforum 4)
- 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)
- Locate <div id="below_threadlist" and repeat steps 6-9.
- DONE!!
No comments:
Post a Comment