![]() |
Limit a widget to certain style?
How can I limit a cms widget to a particular style?
The problem is I have only one light style and I design any widgets for the dark styles as there are more of them. I know I should stick with one style but I just can't choose .... they are all my babies :) |
Why not just fix the widget in the style?
|
Quote:
--------------- Added 23 Jul 2014 at 14:33 --------------- A simple method, if you just have a few widgets to modify, is to surround the widget with a style ID conditional. Code:
<!-- Do not display the current style if the current style is ID "6" --> |
Quote:
|
What type of widget is it?
|
Quote:
|
That's not quite what I ment, is it a PHP or a HTML type?
|
Quote:
It's html. |
Quote:
Quote:
Quote:
Here's one I edited to make the background dark: Code:
<iframe src="http://cache.www.gametracker.com/components/html0/?host=12.34.567.891:1234&bgColor=000000&fontColor=F5F5F5&titleBgColor=000000&titleColor=FFFFFF&borderColor=000000&linkColor=00CCFF&borderLinkColor=00CCFF&showMap=0¤tPlayersHeight=160&showCurrPlayers=1&showTopPlayers=0&showBlogs=0&width=240" frameborder="0" scrolling="no" width="240" height="348"></iframe> |
Quote:
Code:
<center><iframe src="http://cache.www.gametracker.com/components/html0/?host=216.52.148.11:24240&bgColor=CCCCCC&fontColor=000000&titleBgColor=CCCCCC&titleColor=FF2B00&borderColor=F5F4F4&linkColor=493C08&borderLinkColor=4D4B4B&showMap=0¤tPlayersHeight=200&showCurrPlayers=1&showTopPlayers=0&showBlogs=0&width=270" frameborder="0" scrolling="no" width="270" height="388"></iframe></center> While I'm thinking about it, if I could just exclude the widget from the dark styles that would be good too. |
Just assign a class to it, in the dark styles, have the class be a dark background, in the light styles, a light background, this is html/css 100.
|
Quote:
Template name: vbcms_widget_static_page_ts Template contents: Code:
<div class="teamspeakwidget"> Code:
.teampseakwidget { Now create a new plugin: AdminCP > Plugins & Products > Add New Plugin Product: vBulletin Hook location: parse_templates Title: Hide Teamspeak Widget per style Execution Order: 5 PHP Code:
Now go back to the widgets in admincp, on your teamspeak widget change the template name being used to vbcms_widget_static_page_ts and save, now the widget should use this template and it will show in all styles except the one you excluded within the plugin. |
Thanks for all this ....
I did this 3 times and double checked your instructions. This removes the Teamspeak widget in all styles. I made sure to change the 99 to the style id I did NOT want this widget to show on. I'm in no hurry whatsoever so don't sweat it. It all looks as if it should work, but it just don't :( BTW, I gave your status back in case you want to check it out for yourself. The info is in that pm I sent you the other day. |
UPDATE:
I've come up with a happy median for both light and dark styles. --------------------------------------------------------------- Been sitting here having a cup of coffee and thinking about ..................... I'm done with having multiple styles. I'm going with the Avenger style. |
Yep, just one more thing to maintain. :)
|
Quote:
I'll keep the other styles just not viewable by guests. |
All times are GMT. The time now is 10:30 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:
|