![]() |
How to reference forum IDs in additional.css
As the title suggests, I am trying to reference the forum ID in additional.css so that i can apply some custom background to different forums.
|
Well, you can't (I don't think) because when the CSS template is rendered it's running the css.php script and the forum isn't available. You may be able to edit the headinclude_bottom template to include different CSS files depending on the forumid (although I'm not sure what variable you'd check).
Or maybe you could put your CSS in <style type="text/css">...</style> tags in the template you're interested in changing (like SHOWTHREAD). |
^ Yeap kh99, I've had to do that on a few custom styles now, I try to avoid it but due to how some CSS is called (Profiles in Dark Styles more so) it seems that is required on occasion.
You should be able to check the the forumid using: Code:
<vb:if condition="$GLOBAL[forumid] == x"> In some templates Code:
<vb:if condition="$forum[forumid] == x"> Code:
<vb:if condition="$thread[forumid] == x"> Edit: OR actually you could simply whip up a plugin using the parse_templates hook location to render this in headinclude_bottom... something to the effect of: Code:
if ($vbulletin->userinfo['usergroupid'] == '1'){ |
Ok, I was told that it needs to be references in the additional.css, basically I am trying to add images to the forum categories just like this website. Do you have any info regarding that? I am on 4.1.7 as well Thanks
|
Inspecting the example you gave with Firebug, you see the following (one forum in the list used as an example...
Code:
<li class="forumbit_post old L2" id="forum61"> Code:
#forum61 .foruminfo { You then edit the correct templates (forumhome_forumit_), adding id=forum$forum[forumid] (not exactly sure) to the <li> tag. |
omg thank you! i think i love you haha, ive been trying to figure this out for several days
|
All times are GMT. The time now is 04:25 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:
|