The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Changing the link of the Post New Thread button
So i have a few forms which do certain things, main one is the application form, there is a specific forum for it, now my question is can i change the link of the "Post New Thread" button so it directs the user to my form and not create a new topic?
Help is appreciated |
#2
|
||||
|
||||
Just edit the template and put in a condition - if in forumid xx, then this link, else that link.
|
#3
|
|||
|
|||
Which template do i add it too and whats the full code I need to add?
Thanks |
#4
|
||||
|
||||
To find the template to modify, do this - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code. (Sometimes the template is the one mentioned at the very top of the page source.)
I'm guessing you are talking about the FORUMDISPLAY template. I'd guess you'd want something like (in a couple places): HTML Code:
<vb:if condition="$foruminfo['forumid'] == x"> your link <vb:else /> <a href="newthread.php?{vb:raw session.sessionurl}do=newthread&f={vb:raw foruminfo.forumid}" rel="nofollow" class="newcontent_textcontrol" id="newthreadlink_top"><span>+</span> {vb:rawphrase post_new_thread}</a> </vb:if> |
#5
|
|||
|
|||
Correct, this works great. Thanks for the help!
EDIT: Is there a elseif function? Because theres another seperate forumid i want to add which goes to a different link and have found not an easy or practical way. |
#6
|
||||
|
||||
Yes, <vb:elseif condition="stuff" />
|
#7
|
|||
|
|||
Works great thanks alot!
|
#8
|
|||
|
|||
Quote:
|
#9
|
|||
|
|||
The forumdisplay template is in Admin > Styles & Templates > Style Manager > (The style your using) > Forum Display Templates > and edit FORUMDISPLAY.
I added the lines in the body under here: Code:
<body> {vb:raw header} {vb:raw navbar} <vb:if condition="$announcebits"> <ol id="announcements" class="announcements"> {vb:raw announcebits} </ol> </vb:if> |
#10
|
|||
|
|||
Thanks for your fast reply, that helped a bit but what I was aiming at was editing the code:
I want to redirect a specific 'Post New Thread' link to a form I created using Easy Form Mod. The link I want to redirect is http://www.spyike.org/newthread.php?do=newthread&f=19 and I want to redirect that to http://www.spyike.org/misc.php?do=form&fid=1 I also want to do this with other 'Post New Threads' Code:
<vb:if condition="$foruminfo['forumid'] == x"> your link <vb:else /> <a href="newthread.php?{vb:raw session.sessionurl}do=newthread&f={vb:raw foruminfo.forumid}" rel="nofollow" class="newcontent_textcontrol" id="newthreadlink_top"><span>+</span> {vb:rawphrase post_new_thread}</a> </vb:if> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|