We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28162
    • 3 Posts
    Hi all,

    I have not been working with php since Mambo was a novelty, so I’ve lost some bits and pieces in coding skill. In other words; I need you help. I am going to include slimstats in my template, but I can not figure out how to do it. I guess I need to call a snippet, but how do I do that? And how should the snippet be configured?

    Thanks
      • 18419
      • 1 Posts
      You can find the answer here: http://modxcms.com/slimstat-plugin-for-modx.html

      I did get an error message but when I used the folowing line in the snippet (instead of the one provided in the explation) the problem was solved:

      <?php @include_once( "yourSiteName.com/assets/plugins/slimstat/inc.stats.php" ); ?>

      Greetings,

      Marmein
        • 28162
        • 3 Posts
        Thanks!
        But follwing the above instructions do not make any records in the slimstats database. Looking at the reports in modx I find the following error:

        parse error, unexpected ’<’


        Parse error: parse error, unexpected ’<’ in C:\Inetpub\peatcom\modx-0.9.5\modx-0.9.5\manager\includes\document.parser.class.inc.php(724) : eval()’d code on line 1

        any ideas, anyone?
          • 1294
          • 16 Posts
          I use the following for the plugin code - there are no php tags and it works in 0.9.5:

          @include_once( $_SERVER["DOCUMENT_ROOT"]."/assets/plugins/slimstat/inc.stats.php" );

          Hope this helps,
          Al
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Just remove the extraneous <?php at the beginning, and the ?> at the end.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org