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.

Get the base URL of the forum in your JS

2»

Comments

  • Since both JQthickbox and JQmedia use this method. it is causing conflict.
    both cannot coexist.
    even If i rename Vanilla.webRoot to something else it still causes problems
  • edited March 2007
    Should I be using baseURL or webRoot?
    to get path to a file
  • edited March 2007
    whatever
    var JQmedia = new PathFinder(); JQmedia .webRoot = JQmedia.getRootPath('script', 'src', 'js/global.js'); //in case the forum is using a js merger ;-) if(!JQmedia .webRoot) { JQmedia .webRoot = JQmedia.getRootPath('script', 'src', /js\/packer\.php.*$/); }
  • thanks Dino
    now thickbox and jQmedia are working together.
  • Is this something I should be including in JQThickBox Dinoboff?
  • edited March 2007
    If js and css packer is used, it should look like:if (!window.Vanilla){ var Vanilla = new PathFinder(); Vanilla.webRoot = Vanilla.getRootPath('script', 'src', 'js/global.js') || Vanilla.getRootPath('script', 'src', /js\/packer\.php.*$/) ; Vanilla.styleUrl = Vanilla.getRootPath('link', 'href', 'vanilla.css') || Vanilla.getRootPath('link', 'href', /packer\.php.*$/); Vanilla.baseURL = Vanilla.params.httpMethod + Vanilla.params.domain + Vanilla.webRoot; }
  • This solves the issue for vanilla packer, but isn't a suitable solution. I believe we need a vanilla core solution.
    One that does not depend on the presence of a <script tag pointing to 'js'global.js

    See this post getRootPath function in global.js causes problems (Mark?) # 1
This discussion has been closed.