The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Style Fetching
To outline my problem, I'm using a php file for my user group colors forum-wide. With multiple styles, I need multiple usergroup colors for each style. This is all in a php file, which looks like this:
PHP Code:
|
#2
|
|||
|
|||
I think userinfo[styleid] should work, but it will only work if your php file is being passed the forumid so it knows if there's an override.
|
#3
|
|||
|
|||
Well, I don't really know PHP, so I'm not sure of how to go about that, but I also don't see how it would work. userinfo[styleid] should be pulling the styleid the user has chosen in the control panel, which would stay unchanged regardless of override, as the override doesn't actually change the user's control panel settings. It's not necessary to detect the forumid, but rather just pull whatever styleid is currently being used by the page. Is there any variable that defines this?
|
#4
|
|||
|
|||
OK, I'm confused. I thought the problem is that you wanted the override style but weren't getting it. Are you saying you always want the user selected style no matter which forum you're in?
Also, you say the code above is in a php file - which one? |
#5
|
||||
|
||||
Quote:
Try a new plugin: Product: vBulletin Hook Location: parse_templates Title: Custom CSS for our different styles (something you can easily identify etc) Execution Order: 5 Plugin PHP Code: PHP Code:
|
#6
|
||||
|
||||
* Where plugins similar to the above really come in handy are the times your heavily customizing a style and some of the different parts of vBulletin share the same CSS yet you need to make changes to location or margins/padding more specifically yet via additional.css it moves the css on all pages not just the page in question. This way via plugin you can use conditionals in it as well, here's a semi-complex yet rough example:
PHP Code:
PHP Code:
|
#7
|
|||
|
|||
Thanks for the help TheLastSuperman I decided to eliminate my PHP file and go with the plugin, and it works like a charm. Solved the problem I was having and is much cleaner. The thought actually crossed my mind before, but I didn't quite process it.
|
#8
|
||||
|
||||
Ahh I pale in comparison to kh99 in regards to helpful activity in this forum he's the best Advisor I've ever seen on this forum if I speak honestly but that's my opinion (but check his post count and the last few replies in this forum He's a Beast I tell ya! A Beast!). I chimed in because I do a lot of styles and this helps me sort those pesky issues that were giving you a headache and remember you can do many things with plugins with this being just one example so look around and you'll see more in certain threads or examples in the articles forum area now since you have the gist of things already you'll start to see more of the possibilities with vBulletin if it's not up to par for you out of the box .
|
#9
|
|||
|
|||
I need you guys keeping me honest. I was so focused on the styleid that I missed what was going on, but you nailed it.
|
#10
|
||||
|
||||
You already are imo! Also guess what? The only reason I knew about the STYLEID == is because I was using the other not so good versions of it in plugins like GLOBAL style id etc until that one thread where you, Sir Adrian, and others had a long chat about it remember? If not for that thread my idea to start using this all over when a CSS issue came up may have never occurred to me .
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|