View Full Version : Replace New Thread Button in Specific Forums
Derekclarke
05-27-2009, 12:32 PM
Hi,
I am using the easy forms Mod, and would like to replace the New Thread Button within certain forums and have a New Advert Button that links to one of the Forms i have created.
I would also like to do the Same for a Support forum, the user would click a New Ticket Button and this would take them to the new ticket form.
I have already created the Images, and placed them in the Forum description so they show as well as the new Thread button.
But people still click the New Thread and get told they do not have priviliges to do so.
Can anyone help me with this.
Thanks
Derek
Lynne
05-27-2009, 12:55 PM
Just put a condition around it - something like this :
<if condition="!in_array($foruminfo[forumid], array(x,y,z))">
New Thread Button
<else />
<if condition="in_array($foruminfo[forumid], array(x,y))">
New Advert Button
<else />
New Ticket Button
</if>
</if>
Derekclarke
05-27-2009, 01:10 PM
how do i define the button? I have only done small amounts of coding and the link.
would it be something like this?
<if condition="!in_array($foruminfo[168], array(x,y,z))"><tr><a href="misc.php?do=form&fid=1"><img src="$stylevar[imgdir_button]/new_advert.gif" alt="$vbphrase[post_new_Ad]" border="0" /></a><else /> </if>
EDIT* I just place the Above code into the FORUMDISPLAY template, and now i have both the New Thread and New Ad buttons showing right on top of each other.
Just need to work out how to remove the New Thread button from the specific forums.
--------------- Added 1243435904 at 1243435904 ---------------
Ahh.. I have just noticed this has placed the New Ad button in every forum. not just the one specified.
snakes1100
05-27-2009, 01:57 PM
<if condition="!in_array($foruminfo[forumid], array(1,2,3))">
New Thread Button
<else />
<if condition="in_array($foruminfo[forumid], array(4,168))">
New Advert Button
<else />
New Ticket Button
</if>
</if>
Derekclarke
05-27-2009, 02:17 PM
Have just tried your code too Snakes and it is not working either.
I am assuming the numbers in the array (4,168) are the forum Id's?
Lynne
05-27-2009, 02:24 PM
This is how I was intending the conditions to be used.... Let's say forumid 168 and 169 are for the New Advert Button and forumid 1 and 2 are for the New Ticket Button:
<if condition="!in_array($foruminfo[forumid], array(168,169,1,2))">
New Thread Button
<else />
<if condition="in_array($foruminfo[forumid], array(168,169))">
New Advert Button
<else />
New Ticket Button
</if>
</if>
As for the button code, you can basically copy the New Thread Button code and change the image source and link url.
snakes1100
05-27-2009, 04:33 PM
Have just tried your code too Snakes and it is not working either.
I am assuming the numbers in the array (4,168) are the forum Id's?
change the forumid's to yours, like lynne, i only used an example set of numbers for the id's
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.