View Full Version : Forum ID
DemOnstar
05-06-2014, 08:10 AM
Hello there..
How do we identify a forum so we can exclude it from the other forums?
By that I mean exclude it in order to style the look of it separately from the rest.
In other words, give it a different look to all the others.
Example:
The image below has a number of subforums within it and it looks a little cramped.
I know how to add space inside and around them but if I lengthen the forum to allow for it, all the other forums are affected. Meaning they all get the same height.
https://vborg.vbsupport.ru/attachment.php?attachmentid=149044&stc=1&d=1399367191
Where do I find the forum id but more to the point, what formula would I need to apply in additional.css for it to work?
Thanks.
What you could do is create a new style. You probably want it to be a child of your current style so that if you make changes that apply to all forums, you only have to make them once. Make your changes in the child style, then go to the forum manager and select your new style as the custom style for that forum.
DemOnstar
05-06-2014, 08:34 AM
OK, I get what you mean...
Seems a bit of an odd solution but I see the sense in it. I will give it a go..
Cheers for that.
I should have added, I don't believe that you can use a conditional in additional.css the way you can in other templates, because the css templates get built into .css files, so it isn't evaluated every time like other templates are.
Edit: well, I guess that's depending on your settings. Maybe it would work if you have it set to not save as files.
DemOnstar
05-06-2014, 08:52 AM
I see. This is what I thought, so it would be a template edit?
I will try your previous suggestion above to see that goes.
Thanks again.
Anyway, just for the record (and to answer your original question), if you were to use a conditional in a template, I believe it would be:
<vb:if condition="$GLOBALS['forumid'] == X">Only in forum X</vb:if>
DemOnstar
05-06-2014, 09:19 AM
I may well have to use the conditional provided. The previous solution didn't work.
I followed every step but to no avail.
Could you tell me which template I edit and where the forum id can be found?
Thanks..
Zachery
05-06-2014, 04:02 PM
What exactly did you try, and how didn't it work.
DemOnstar
05-06-2014, 04:15 PM
I tried this suggestion from the post above.
What you could do is create a new style. You probably want it to be a child of your current style so that if you make changes that apply to all forums, you only have to make them once. Make your changes in the child style, then go to the forum manager and select your new style as the custom style for that forum.
It seemed like an odd but feasible solution but it had no effect. Obviously, I will try it again to make sure I followed the correct procedure as I couldn't understand why it didn't work.
Lynne
05-06-2014, 05:14 PM
You can find the forumid in Forum Manager > click to edit Forum and on the top it gives the forumid.
DemOnstar
05-06-2014, 05:28 PM
Excellent.
Moving forward. All I need now is the name of the template to edit. Or is it not that easy?
<vb:if condition="$GLOBALS['forumid'] == X">Only in forum X</vb:if>
Once I know the template, am I to just paste in this code with the correct id?
Cheers..
Lynne
05-06-2014, 05:49 PM
To find the template to modify, do this - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code. (Sometimes the template is the one mentioned at the very top of the page source.)
DemOnstar
05-06-2014, 05:53 PM
Very good, I will see what I can do..
A little over my head but gotta learn somehow.
Thanks.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.