XF 1.3 CSS Help

billybatz9

Active member
So I have this code for one of the xenforo addons:
Code:
<?php

class Waindigo_ForumListTabs_ControllerPublic_Toggle extends XenForo_ControllerPublic_Abstract
{

    public function actionIndex()
    {
        if (XenForo_Application::get('options')->waindigo_forumListTabs_enable) {
            $visitor = XenForo_Visitor::getInstance();
            $toggle = empty($visitor['use_forum_tabs']) ? 1 : 0;

            $userModel = $this->getModelFromCache('XenForo_Model_User');
            $userModel->update($visitor->toArray(), 'use_forum_tabs', $toggle);
        }

        return $this->responseRedirect(XenForo_ControllerResponse_Redirect::SUCCESS,
            $this->getDynamicRedirect(false, true));
    } /* END actionIndex */
}

How do I disable the plugin for visitors? I think this code says to enable the plugin for visitors, but I need it disabled for visitors. Any idea? Thanks
 
What are you trying to achieve? Your going along 2 different paths of thought here.

One your on about disable it to visitors (i assume you mean non-registered users right?) and then the other is you dont want it on desktop view?

Your thread says CSS, but then your posting PHP code opposed to templates.
 
What are you trying to achieve? Your going along 2 different paths of thought here.

One your on about disable it to visitors (i assume you mean non-registered users right?) and then the other is you dont want it on desktop view?

Your thread says CSS, but then your posting PHP code opposed to templates.
I am going for disabling it to visitors (non-registered users). SOrry for the confusion. I thought it was css (see? I am bad at coding lol)
 
I think in that case you can add

Code:
$this->_assertRegistrationRequired();

above

Code:
$visitor = XenForo_Visitor::getInstance();

to do that.
 
Top Bottom