The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
In vbulletin 2.2.1, we want different "New Thread" graphics for each forum.
In the template called "forumdisplay_newthreadlink" The original code shows <a href="newthread.php?s=$session[sessionhash]&action=newthread&forumid=$foruminfo[forumid]"> <img src="{newthreadimage}" border="0" alt="Post New Thread"></a><br> ----------------------------------------- How can we change the image tag to be dependent on the $foruminfo[forumid] The could might be something like: //------------------------------------------------------------; switch($foruminfo[forumid]) { case "84": <img src="/images/image84.gif" border="0" alt="Post New Thread"></a><br> break; //--- break prevents the code from running other cases; case "5": <img src="/images/image5.gif" border="0" alt="Post New Thread"></a><br> break; case "3": <img src="/images/image3.gif" border="0" alt="Post New Thread"></a><br> break; default: <img src="{newthreadimage}" border="0" alt="Post New Thread"></a><br> break; }//-- end switch; --------------------------------------------- but this doesn't work as an in-line script. Any ideas of a script that would switch out the button code based on the forum id? Thanks in advance |
#2
|
||||
|
||||
![]()
Put this in the proper part of forumdisplay.php
PHP Code:
PHP Code:
PHP Code:
|
#3
|
|||
|
|||
![]()
it worked - thanks !
|
#4
|
||||
|
||||
![]()
No problem, glad I could help
![]() |
#5
|
||||
|
||||
![]()
demo/ss?
|
#6
|
||||
|
||||
![]()
It just changes your newthread button depending on which image you choose for which forumid.
|
#7
|
||||
|
||||
![]()
The easiest thing to do here would be to to add a new field to the forum table
![]() - miSt |
#8
|
||||
|
||||
![]()
or edit the template
Code:
img src="newreply{forumid}.gif" |
#9
|
||||
|
||||
![]()
^ The best idea i've heard all day
![]() [high]* Mist wonders how he forgets the easy things like this [/high] I think you may have to use a variable instead but that's a good principle - you'll have to make a new image for EVERY forum you have though unfortunately ![]() - miSt |
#10
|
||||
|
||||
![]()
Yep that's why my way is still better
![]() You can have an else statement, and you don't have to name your reply buttons your forumids ![]() |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|