The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
telling a plugin not to do what it does for mobile themes
There is a plugin I use that replaced a bit of the postbit mini profile but this causes the mobile themes not to display the postbit correctly. Can't see posts on the mobile theme.
Is there like a style condition ID to allow the mod to only work on a selected amount of styles and not on mobile styles? |
#2
|
|||
|
|||
|
#3
|
|||
|
|||
Quote:
I tried adding it myself but get errors. Code:
<!-- see bottom of postbit.css for .userinfo .popupmenu styles --> <phpcode> $xstyleid = '5 3 7'; $nstyleid = preg_split('#\s+#s', $xstyleid, -1, PREG_SPLIT_NO_EMPTY); if (in_array($style['styleid'],$nstyleid)) { </phpcode> your code here <phpcode> } </phpcode> {vb:raw template_hook.postbit_end}]]></template> |
#4
|
|||
|
|||
I don't know what the person who posted that was getting at. If you want to check a list of styles, then it would be easier to just create an array instead of using a regular expression to split a string. In any case, maybe you want something like this:
Code:
$standard_styles = array(3, 5, 7); if (in_array(STYLEID, $standard_styles)) { your code here } But that thread wasn't asking specifically about mobile styles. I'm thinking since they're in a separate section in the style manager, there has to be a way to check if the current style is a mobile style without having to list the ids in the code. |
#5
|
|||
|
|||
...and it seems that there is, it's IS_MOBILE_STYLE. So you would just want:
Code:
if (!IS_MOBILE_STYLE) { // problem code here } |
#6
|
|||
|
|||
Thank you for your help but were would I add that in the attachment below?
I'm really bad at code other then CSS. The goal is to let the plugin only work on normal themes and not do anything on mobile themes. Thanks so much for your help! |
#7
|
|||
|
|||
Any help guys? I'm still stuck at solving this.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|