Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Google Analytics in Garden

edited September 2009 in Vanilla 2.0 - 2.8
Does anyone know how to add the Google Analytics Code to the Garden tpl, without breaking the forum?

Comments

  • Options
    Putting the analytics script just before the closing body tag in default.master.tpl works for me. What kind of breakage are you seeing?
  • Options
    This should be very easy to set up as a plugin.. I'll look into it once I have some spare time if no one else has by then.
  • Options
    that would be awesome! right now i am getting a Fatal Error in PHP.ErrorHandler();
    Smarty error: [in .../applications/garden/views/default.master.tpl line 90]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590
  • Options
    bump
  • Options
    Yeah smarty does sorta kill a lot of stuff, i tried integrating a profiler and get smarty errors as im inserting normal php into a smarty .tpl file. The problem is i also want it to show on the non smarty pages.
  • Options
    MarkMark Vanilla Staff
    You don't have to use the smarty template if you don't want to. Check out this documentation on theming:

    http://vanillaforums.org/page/ThemeQuickStart

    And here is a copy of the non-smarty template if you want to give it a shot:

    http://vanillaforums.org/page/PHPMasterView
  • Options
    Hey, mark. How would i make it so that it switches to the php master view rather than the smarty one from my plugin? As this plugin could be used by other people with a default install.
  • Options
    MarkMark Vanilla Staff
    @Todd wrote the smarty implementation, but as I understand it, you just delete the smarty template altogether and use the php version. Todd might know of a way to programmatically force it to use the php one...
Sign In or Register to comment.