![]() |
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:
|
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.
|
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?
|
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? |
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:
|
* 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:
|
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.
|
Quote:
|
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.
|
Quote:
|
All times are GMT. The time now is 07:09 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:
|