Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Moving jQuery to an EXTERNAL folder
I’m not sure what Textpattern uses jQuery for, but I use it around my front-end website. However wouldn’t it be much better outside of the textpattern folder? In say a /scripts/ directory, the same as you have your /files/ and /images/
~ Cameron
Offline
Re: Moving jQuery to an EXTERNAL folder
It’s used by the admin side which is why it’s in the textpattern folder.
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Re: Moving jQuery to an EXTERNAL folder
I use a symlink to have jquery.js available in both places: the textpattern folder and my usual scripts folder.
Code is topiary
Offline
Re: Moving jQuery to an EXTERNAL folder
a symlink?
~ Cameron
Offline
Offline
Re: Moving jQuery to an EXTERNAL folder
Why can’t you just have jquery.js in both folders, J?
Keith
Blyth, Northumberland, England
Capture The Moment
Offline
Re: Moving jQuery to an EXTERNAL folder
You can; I just prefer having only one file to keep up to date.
Code is topiary
Offline
Re: Moving jQuery to an EXTERNAL folder
If you don’t want textpattern path to appear in source of your site, you can use apache’s mod_rewrite for redirecting /scripts/jquery.js
to /textpattern/jquery.js
. At least, if I had such problem, i would use this way
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
Re: Moving jQuery to an EXTERNAL folder
Ah – thanks for that, J.
I thought there might be some sort of technical reason for not duplicating the file.
Keith
Blyth, Northumberland, England
Capture The Moment
Offline
#10 2009-08-12 01:00:56
- Maria2009
- New Member
- Registered: 2009-08-08
- Posts: 1
Re: Moving jQuery to an EXTERNAL folder
keith wrote:
Ah – thanks for that, J.
I thought there might be some sort of technical reason for not duplicating the file.
thanks for your suggestion
Last edited by Maria2009 (2009-08-12 01:01:08)
Offline
Re: Moving jQuery to an EXTERNAL folder
Or you can let Google server you jquery— aam_if_host allows you to link to textpattern’s copy during development, and Google’s copy when deployed:
<script type="text/javascript"↵
src="<txp:aam_if_host name="examplesite.dev"><txp:site_url/>textpattern/jquery.js↵
<txp:else/>↵
http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js↵
</txp:aam_if_host>" charset="utf-8"></script>
Last edited by johnstephens (2009-08-12 01:55:16)
Offline
Re: Moving jQuery to an EXTERNAL folder
or store jQuery inside TxP
aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)
Offline