Created new plugin but do not need it on mobile style


Well-known member
Okay I created some tabs that are on the side on the forum and works great but it shows on mobile skin which i do not want.

Anyone know any condition statements i can put not to show it ?

I been searching and unable to find anything.

Right now i have module called in 2 hooks - header and body .

So i know why it is showing up in both skins but unable to figure out how to just specifiy a specific style.


Well-known member
Okay this is the php file. I have tried to use an IF then and it still does not work. I believe because it is not accepting {$style.title}. I think i can redo the module where you have to put a hook in the template but rather not . Any ideas ?

class socialaddon_Listener_social
    public static function templateHook($hookName, &$contents, array $hookParams, XenForo_Template_Abstract $template)
        if($hookName == 'body')
            $contents .= ob_get_contents();


this condition should work

$visitor = XenForo_Visitor::getInstance();
if ($visitor['style_id'] != MOB_STYLE_ID) {


then the code inside of the if condition won't be run in the mobile style:)


Formerly CyclingTribe
thanks ragtek but where would i put that and wouldn't the style ID be different for everyone install ?
No - the style ID is an internal XF reference to the style so everyone using that style will have the same number - just hover over the mobile style link in your ACP and you'll see the style ID in the URL.

Then update ragtek's conditional to include the number of your mobile style and put your tabs code inside the curly brackets. (y)

Shaun :D