Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Vanilla With Your Mint?

edited February 2006 in Vanilla 1.0 Help
Has anyone had success in getting Mint to track Vanilla stats? I haven't been about to figure out how to penetrate the headers to place in the javascript for tracking. I've already posted on the Mint forums, and the writer of Mint hasn't figured a way out either. WIll all of this be solved with the next version of Vanilla as far as templating? I'll just wait until then if that is the case. Any help would be appreciated!

Comments

  • Options
    NickENickE New
    edited October 2005
    Not exactly sure if this is what you need, as I don't really know what's required to integrate the two, but if all you have to do is add a javascript to the html head tag then just create a small extension that calls the function $Head->AddScript("[your script location here]").
  • Options
    edited October 2005
    my extensions/Mint.php

    <?php /* Extension Name: Mint Stats plugin Extension Url: http://bored.36-degrees.co.uk Description: Adds mint stats tracking to vanilla Version: 1.0 Author: Stuart frisby Author Url: http://www.36-degrees.co.uk */ if(in_array($Context->SelfUrl, array("index.php", "categories.php", "comments.php", "search.php", "post.php", "account.php", "settings.php"))){ $Head->AddScript("path/to/mint/mint.js.php"); } ?>

    Does the job, simple enough.
  • Options
    Will that work with Mint 1.2?
  • Options
    Not sure, I haven't looked at 1.2 yet, but unless Shaun is changing the way the script is included in normal documents, then yes, it will work.
  • Options
    gigingergiginger New
    edited October 2005
    He has changed the way it's included and also the actual folder structure.

  • Options
    I see, in that case it's a simple matter of changing the path to the js file in the example above.
  • Options
    Thanks for that.

    If i get my forum working again I'll test it out :)
  • Options
    I know this topic is a little old, but I'm trying to get mint to work with vanilla. Is it right that I just replace

    "path/to/mint/mint.js.php"

    with...

    "http://mysite.com/mint/?js"

    Thanks for your time.
  • Options
    I don't see why not, it's just going to be used in a script tag in the document.
  • Options
    Great, it works. :) Thanks for the re-assurance.
  • Options
    Is anyone having problems with the Mint.phps extension together with Page Manager and FeedReader?

    I get errors about the header already being submitted.

    I can't seem to have all 3 together, the two and no Mint or Mint and not the two.

    I made the change listed above as well

    "http://mysite.com/mint/?js"
  • Options
    edited February 2006
    if(in_array($Context->SelfUrl, array("index.php", "categories.php", "comments.php", "search.php", "post.php", "account.php", "settings.php"))){ $mint_code = <<< ENDCODE <script type="text/javascript" src="http://www.cmehil.com/mint-scs/?js"></script> ENDCODE; $Head->AddString($mint_code,false);

    By changing the code like that I seem to have eliminated all of the strange errors I was getting expect in the "singout" I get the headers have already been submitted error.

    Which I assume is what AddScript does for you?
  • Options
    OK I finally just manually added the

    <script type=\"text/javascrip\t" src=\"http://www.cmehil.com/mint-scs/?js\"></script>

    Before the TITLE in the Lussumo.Functions.php and that solved all the problems. It must be that this line HAS to before the title and the AddScript or the above way just wasn't cutting it??
This discussion has been closed.