Getting Stats Box to work in 2.3

I like stats box, but it didn't work in v2.3 since it wasn't loading the stylesheet, so I fixed it by changing line #88
from
$Sender->AddCSSFile($this->GetResource('design/statsbox.css', FALSE, FALSE));
to
$Sender->addCssFile('statsbox.css', 'plugins/StatsBox');

Comments

  • I uploaded 1.5.1 with your changes.

    Thanks!

  • Hi, I was unable to connect the plugin :(

    Vanilla 2.3

  • There is a missing single quote in line 88, change to this

    private function _AddResources($Sender, $Forced = FALSE) {
        if(C('Plugins.StatsBox.DisableCSS', FALSE) == FALSE || $Forced) {
          $Sender->AddCSSFile('statsbox.css', 'plugins/StatsBox');
        }
      }
    
  • @vrijvlinder said:
    There is a missing single quote in line 88, change to this

    private function _AddResources($Sender, $Forced = FALSE) {
        if(C('Plugins.StatsBox.DisableCSS', FALSE) == FALSE || $Forced) {
          $Sender->AddCSSFile('statsbox.css', 'plugins/StatsBox');
        }
      }
    

    Look, I installed this plugin

    and there are changes

    private function _AddResources($Sender, $Forced = FALSE) {
    if(C('Plugins.StatsBox.DisableCSS', FALSE) == FALSE || $Forced) {
    $Sender->AddCSSFile('statsbox.css', 'plugins/StatsBox');
    }
    }

    :o

  • So ? I don't understand what you are saying... hgtonight uploaded a new version and it had this problem on that line and that caused the fatal error. Do what you want. Fix it or don't . It's up to you.

  • kopnakopna
    edited January 2017

    @vrijvlinder said:
    So ? I don't understand what you are saying... hgtonight uploaded a new version and it had this problem on that line and that caused the fatal error. Do what you want. Fix it or don't . It's up to you.

    @vrijvlinder
    Thank you for your reply, but I do not understand what should I change. Plugin the already updated.

    @hgtonight said:
    I uploaded 1.5.1 with your changes.

    Thanks!

  • THE PLUGIN THAT WAS UPLOAD UPDATED VERSION 1.5.1 HAS A MISTAKE THAT CAUSE A FATAL ERROR !!!!!!!

    IN THE PLUGIN THIS LINE HAS A MISTAKE LOOKS LIKE THIS$Sender->AddCSSFile('statsbox.css', 'plugins/StatsBox);

    TO FIX THAT MISTAKE MAKE LINE LOOK LIKE THIS $Sender->AddCSSFile('statsbox.css', 'plugins/StatsBox');

  • @vrijvlinder said:
    THE PLUGIN THAT WAS UPLOAD UPDATED VERSION 1.5.1 HAS A MISTAKE THAT CAUSE A FATAL ERROR !!!!!!!

    IN THE PLUGIN THIS LINE HAS A MISTAKE LOOKS LIKE THIS$Sender->AddCSSFile('statsbox.css', 'plugins/StatsBox);

    TO FIX THAT MISTAKE MAKE LINE LOOK LIKE THIS $Sender->AddCSSFile('statsbox.css', 'plugins/StatsBox');

    I also know how to cry, pressing Caps Lock :-)
    private function _AddResources($Sender, $Forced = FALSE) {
    if(C('Plugins.StatsBox.DisableCSS', FALSE) == FALSE || $Forced) {
    $Sender->AddCSSFile('statsbox.css', 'plugins/StatsBox);
    }
    }

    This part of the code with the updated plugin.

  • edited January 2017

    I give up... you must need glasses or are stubborn and refuse to read my comments.

  • @vrijvlinder said:
    I give up... you must need glasses or are stubborn and refuse to read my comments.

    ))) well, you've written:
    IN THE PLUGIN THIS LINE HAS A MISTAKE LOOKS LIKE THIS$Sender->AddCSSFile('statsbox.css', 'plugins/StatsBox);
    next:
    TO FIX THAT MISTAKE MAKE LINE LOOK LIKE THIS $Sender->AddCSSFile('statsbox.css', 'plugins/StatsBox');
    where I see the difference?

  • @vrijvlinder Thanks for finding that, not sure how a broken plugin got committed o:)

    Updated to 1.5.2

  • @hgtonight said:
    @vrijvlinder Thanks for finding that, not sure how a broken plugin got committed o:)

    Updated to 1.5.2

    I would guess that you are entering the age of need for reading glasses ? Welcome to my world !!

Sign In or Register to comment.