Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Plugin Request: Javascript Manager
I would like to request for a “javascript manager”, something like managing txp styles. (Even a hack would be great). Can somebody help?
“Take a point, stretch it into a line, curl it into a circle, twist it into a sphere, and punch through the sphere.”
— Albert Einstein
Offline
#2 2005-11-19 08:52:57
- nardo
- Member

- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: Plugin Request: Javascript Manager
u know u can use your ‘stylesheets’ for javascript, right? make a new stylesheet called “js” then just bung this in your head:
<script src="http://www.domain.com/textpattern/css.php?n=js" type="text/javascript"></script>
maybe not for the purists but it works and life is short
Offline
Re: Plugin Request: Javascript Manager
Nardo, thanx for the tip. Looks like browsers do not like it, because “css.php” defines the output as a Style sheet.
<blockquote>
maybe not for the purists but it works and life is short
</blockquote>
Well, I’m not a purist, but I’m trying to become one. I thought I’d request for a plugin before giving the “Stylesheet” approach a go :)
“Take a point, stretch it into a line, curl it into a circle, twist it into a sphere, and punch through the sphere.”
— Albert Einstein
Offline
#4 2005-11-19 09:43:21
- nardo
- Member

- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: Plugin Request: Javascript Manager
I’m using this technique for a site and I know it works! what browser did u have probs in… maybe you know something I don’t : )
Offline
#5 2005-11-19 09:45:02
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Plugin Request: Javascript Manager
Someone was discussing a simple mod for this just a little while ago. I’ll see if I can find it.
Offline
#6 2005-11-19 10:03:57
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Plugin Request: Javascript Manager
Well, I can’t find it. The basic idea was you make a copy of css.php, adjust it to output the correct header, and just use the existing style manager to hold your javascript.
A plugin would be neater, though.
Offline
#7 2005-11-19 10:07:33
- nardo
- Member

- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: Plugin Request: Javascript Manager
header('Content-type: text/css');
bugger
Offline
Re: Plugin Request: Javascript Manager
Nardo & Mary. Thanks.
I found <a href=“http://textpattern.org/tips/333/external-javascript-in-txp”>this</a>. Looks like I’m not the only one who requires a JS manager (see the comments). It would be really cool if a plugin could be made to manage js scripts.
Who else is with me on this?
Edit:
<blockquote>I’m using this technique for a site and I know it works! what browser did u have probs in… </blockquote>
Nardo, It sure does work. I was only saying that browsers get suspicous and secondly it doesnt seem to validate.
Last edited by creativesplash (2005-11-19 10:45:43)
“Take a point, stretch it into a line, curl it into a circle, twist it into a sphere, and punch through the sphere.”
— Albert Einstein
Offline
Re: Plugin Request: Javascript Manager
I’d be down. It would prove really useful in upcoming client work, although, it seems just as easy to put it in a JS file.
?
Matthew
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
Re: Plugin Request: Javascript Manager
Matthew, I agree with you. It is quite easy to throw in a js file. But what if you are not able to access your FTP and you want some changes in the script? Its gives you quite a headache!
So is anyone willing to work on such a plugin?
“Take a point, stretch it into a line, curl it into a circle, twist it into a sphere, and punch through the sphere.”
— Albert Einstein
Offline
Re: Plugin Request: Javascript Manager
I’ll third the request. B neat, useful, intentional, and simple.
“If you build it, they will come.”
Offline
Re: Plugin Request: Javascript Manager
Anyone else?
“Take a point, stretch it into a line, curl it into a circle, twist it into a sphere, and punch through the sphere.”
— Albert Einstein
Offline