![]() |
How to made if and else in vbulletin?
Hello, I want to put code in postbit so that I am able to have in some specific forums banners but when I don't have them (too many) than one common banner or message. Thanx in advance.
So here is the code and explanation inside that code: Code:
|
I'm not sure what you are asking really but is this what you want:
Code:
<if condition="in_array($forumid, array(1, 2, 3))"> |
No, I want to display different banners for different forums, no different user groups.
Banner 1 for forumID35 Banner 2 for forumID67 ... Banner 5 for forumID32 Banner 6 for all other forum ID's on my forum So we need command else and if. I know something about that, but I don't have idea how to made that in vbulletin. I want to display different banners on different forums, so I have few banners (for example 5) and I want every banner for one forum. So five banners for five forums. Now becouase I have more than for example 50 forums, for rest I want to display one general banner, so when users are on the forums which don't have own banner (from group of the 5 banners) I want to display one general banner. |
Ops has it right, if I get your meaning. Use the first conditional to show your forum specific banners (if condition = forum 1/2/3), else show the default banner.
|
Quote:
Option I for forumid1 if not Option II for forumid2 if not Option III for forumid3 if not GENERAL OPTION for rest of the forums |
The code is in Opserty's post man. :)
|
It it all in my post... I can't understand what you don't get...
Quote:
Code:
<if condition="$forumid == 1"> |
Except that the "Displayed to ..." text now doesn't match the conditions. ;)
-- hugh |
~ Edited.
|
Quote:
How is now I think that code displey banner from third (general) option on all forums, even on forum id 1 and forum id 2? |
All times are GMT. The time now is 08:17 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|