Usage in case of multisite setup
open-keywords - October 21, 2008 - 14:54
| Project: | jQuery Update |
| Version: | 5.x-2.x-dev |
| Component: | Miscellaneous |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
When running multiple sites on top of the same source code, it is difficult to follow the instructions without requiring to upgrade jquery on *all* sites since it is requested to replace jquery.js in the common folder drupal/misc
To workaround this I did the following:
- installed the module in drupal/sites/*sitename*/modules/
- added a redirect rule in apache to redirect http://sitename/misc/jquery.js to the site specific path hosting jQuery 1.2.6
If this can help

#1
Thanks for the idea - just hit this problem enabling Lightbox2 on just 2 sites in a 15-strong multisite setup. I really don't want to have to enable this module on all those 15 sites if they don't need it.
I am assuming that over-writing the various JS files in misc/ and not enabling the module is A Bad Idea.
#2
Thanks for the feedback
Additionally, if you want to disable the system warning on admin/logs/status (saying the jquery.js file hasn't been updated in /misc ) you can comment out the corresponding code in jquery_update.install
#3
To be clean and complete, you need to have a redirect rule for every javascript file provided in jquery_update/misc/
If you don't, you may experience trouble like collapsible fieldsets not closing after being expanded.
Regards
#4
Yep. Not using this anymore, so forgive me if this is inefficient/broken/unfinished, but for any lighty users:
## Redirects for D5 sites with JQuery update 2.x## These sites should have jquery_module 2.x installed and enabled
$HTTP["host"] =~ "example\.com" {
url.redirect = (
"^/misc/collapse\.js$" => "/sites/example.com/modules/jquery_update/misc/collapse.js",
"^/misc/farbtastic/farbtastic\.js$" => "/sites/example.com/modules/jquery_update/misc/farbtastic/farbtastic.js",
"^/misc/jquery\.js$" => "/sites/example.com/modules/jquery_update/misc/jquery.js",
"^/misc/tableselect\.js$" => "/sites/example.com/modules/jquery_update/misc/tableselect.js",
"^/misc/upload\.js$" => "/sites/example.com/modules/jquery_update/misc/upload.js"
)
}
Could be cleaner, but there we go.