HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Not working in 2.2?

edited April 2016 in Feedback

I installed this into plugins folder, enabled it and I dont see the ability to change the theme by clicking on the gear as shown in images

Comments

  • Options

    the link to switch the layout is just above "All Categories"; not in the dropdownof the gear icon

  • Options

    i confirm i cannot see the link. But i really do not know why this link is not parsed. Are you sure you have the plugin enabled?

  • Options

    yes I do

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    I suggest to change a couple things to ad the jquery, might work better

    public function base_render_before($sender) {
    
            $SWTjQuerySource=
        '<script type="text/javascript">
    
        jQuery( document ).ready(function( $ ){
          if($.cookie("css")) {
             $(".switchlayout").attr("href",$.cookie("css"));
          }
             $("#layout li a").click(function() { 
             $(".switchlayout").attr("href",$(this).attr("rel"));
             $.cookie("css",$(this).attr("rel"), {expires: 365, path: "/"});
             return false;
          });
       });
    </script>';
    $Sender->Head->AddString($SWTjQuerySource);
    
          // add the JS/CSS
          $Sender->AddJsFile($this->GetResource('js/jquery.cookie.js', FALSE, FALSE));
         // $Sender->AddJsFile($this->GetResource('js/switchlayout.js', FALSE, FALSE));we are adding this code in the default.php so no need here
          $Sender->AddCSSFile($this->GetResource('design/switchlayout.css', FALSE, FALSE));
    
    
       }
    
  • Options

    uhmmm what?

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    That was meant for @jackmaessen to fix his code for the plugin. To replace that entire function with this one ...

  • Options

    thanks @vrijvlinder

Sign In or Register to comment.