The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
Quote:
<vb:if condition="in_array($GLOBALS[forumid], array(9,11))"> <link rel="stylesheet" type="text/css" href="/clientscript/vbulletin_css/sponsor/sponsor.css" /> </vb:if> At the bottom of the headinclude template and still nothing. When removing the conditional, the file is included. So there is something up with the conditional. Also, when just trying $foruminfo[forumid], it doesn't work. wtf --------------- Added [DATE]1274041318[/DATE] at [TIME]1274041318[/TIME] --------------- It appears that regardless of the reference, the forumid variable is not rendered whether using $foruminfo[forumid] $GLOBALS[forumid] or just $forumid I've tried everything in the headerinclude and headerinclude_bottom templates. I've also tried registering $forumid @ forumdisplay_start Code:
$forum= array('forumid' => $vbulletin->GPC['forumid']); vB_Template::preRegister('header',array('forum' => $forum)); It was asked earlier why this is being made complicated. I'd like to ask the same thing at this point. |
#12
|
||||
|
||||
I just plugged this in and it worked just fine:
PHP Code:
HTML Code:
<vb:if condition="$forumid == 4"> <style type="text/css"> html {background: pink;} </style> </vb:if> |
#13
|
||||
|
||||
Sounds like Jacob is running into the same issue many people have faced - "Why aren't the standard vB Variables available to all templates?" (or my version - "How on earth do I get $forum[forumid] to be recognised outside of FORUMDISPLAY?")
|
#14
|
|||
|
|||
Quote:
Even in the FORUMHOME or FORUMDISPLAY templates, I add this: Code:
<vb:if condition="$forumid == 9"> <link rel="stylesheet" type="text/css" href="clientscript/vbulletin_css/sponsor/sponsor.css" /> </vb:if> --------------- Added [DATE]1274045759[/DATE] at [TIME]1274045759[/TIME] --------------- Kall, I can't even get FORUMDISPLAY to read $forumid in a conditional but it appears that it's read as a variable when referenced as: foruminfo.forumid - just fine. |
#15
|
||||
|
||||
It's not going to work on FORUMHOME because there is no single forumid. But, what I wrote definitely works on my 4.0.3 test board in the FORUMDISPLAY template. I have a pink background only in forumid 4. And, the plugin also works for me on my 4.0.3 test board.
|
#16
|
|||
|
|||
Quote:
So I'll be placing the condition in forumhome_forumbit_level2_post, renaming the css structures to something unique in a new css file, and then referencing them in the div where necessary so that they are only used in a specific forum. Fortunately I don't have this very odd forumid issue in the forumhome_forumbit_level2_post template. So the solution for me is to use the very same conditional statement that I've referenced throughout this post, only use it in forumhome_forumbit_level2_post with a new css structure altogether. In the end, it worked out the best for me anyhow. So your help has been appreciated and has also contributed to my effort and for that I'm grateful. Thanks Lynn, talk to you again. --------------- Added [DATE]1274115311[/DATE] at [TIME]1274115311[/TIME] --------------- To bring closure to this thread, my plan worked. :-) Basically I have a conditional in the forumhome_forumbit_level2_post template that uses one set of custom references in divs for certain forum id's, and all other forums which are not designated in the array uses the default layout and css references. The challenge here was that I needed to get all of the forrum-rollup css properties for the set of divs that were targeted for change, and recreate those css structures with properties that emulated that change but with different names. Those changes were added to additional.css. My only setback here is that the same conditional, which is pretty big, has be be placed in one other template so if someone clicks on the forum category, the subsequent forums have the same logic built into them. No biggie, but because the theme of this customization is sponsorship it does mean I will be frequenting these templates when changes occur. Now if I can just add a control panel for this in the ACP that would be hot. But that's a study for another day. Thanks for the help :-) |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|