[?]Module allows to add JS scripts similar cms_stylesheet...

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
User avatar
requish
Forum Members
Forum Members
Posts: 183
Joined: Sat Jan 24, 2009 3:12 pm

[?]Module allows to add JS scripts similar cms_stylesheet...

Post by requish »

Hi.

Im looking for module... is there exist module allows to add JS scripts, edit and manage them, and works similar like tag cms_stylesheet which allow add css?

Adding external files by ftp too much time taken to make simple changes.

So, please help to find similar module. ???

Ah, I have CMSMS 1.11.4.

Cheers
req.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: [?]Module allows to add JS scripts similar cms_styleshee

Post by Dr.CSS »

I use CMSMS file manager for all my JS uploads, drag/drop has made it very nice and easy, if you need to make changes, keep the file manager upload open in one tab, page it is on in another tab, then you can see it in action and if it isn't correct open JS in your editor make changes drag/drop, refresh page viola!...
User avatar
requish
Forum Members
Forum Members
Posts: 183
Joined: Sat Jan 24, 2009 3:12 pm

Re: [?]Module allows to add JS scripts similar cms_styleshee

Post by requish »

Hi

Thanks for fast reply! :)

Pretty OK solution. I forgot about this possibility.

However... Do You think it is good proposition to make some module to manage js files like at css we have?

...maybe exist some one that but I cant find it out...

Cheers
req.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: [?]Module allows to add JS scripts similar cms_styleshee

Post by Rolf »

What about a Global Content Block?
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
requish
Forum Members
Forum Members
Posts: 183
Joined: Sat Jan 24, 2009 3:12 pm

Re: [?]Module allows to add JS scripts similar cms_styleshee

Post by requish »

And this is can make external file (like css) ? How?
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: [?]Module allows to add JS scripts similar cms_styleshee

Post by Rolf »

requish wrote:And this is can make external file (like css) ? How?
ohw. No that can't... Thought you only needed an editor in cmsms.
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
requish
Forum Members
Forum Members
Posts: 183
Joined: Sat Jan 24, 2009 3:12 pm

Re: [?]Module allows to add JS scripts similar cms_styleshee

Post by requish »

Yeah... Im lookin for module/addon which works exactly like {cms_stylesheet} but outputting file with ext .js . ;)

Im wondering why somebody didnt created some tag, like that about css, into core CMSMS... ::)
applejack
Power Poster
Power Poster
Posts: 1014
Joined: Fri Mar 30, 2007 2:28 am
Location: London

Re: [?]Module allows to add JS scripts similar cms_styleshee

Post by applejack »

Use a coding editor such as BBEdit on a Mac which has built in (S)FTP so you are editing the files directly on the server rather than having to save and then upload. If you want to store in the database via a GCB or stylesheet you can use the Template externalizer module.
User avatar
requish
Forum Members
Forum Members
Posts: 183
Joined: Sat Jan 24, 2009 3:12 pm

Re: [?]Module allows to add JS scripts similar cms_styleshee

Post by requish »

Hi.

Thanks for reply. Hmmm:

1.I dont have a Mac ;) However some times I use Notepad++ with FTP connector (if i have access to ftp) and then I can live upload changes. It's a little bit OK.

2.BUT some times I cant enter to ftp (secure subject of clients). And then I cant use any softs/addons which allow enter on ftp...

3.Best for me is edit/build page only by one tool (I mean in this case CMSMS).

At now I have event like at point 2. Access only by CMS Admin...
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3492
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: [?]Module allows to add JS scripts similar cms_styleshee

Post by velden »

what about:

- making a new template names 'javascript' that contains only

Code: Select all

{content}
Create a new content page, connect the 'javascript' template, hide it from menu, disable wysiwyg editor for the page.

Type your JS in content area.

Then, in template where you want to include JS:

Code: Select all

<__script__ type="text/javascript" src="{cms_selflink href='alias-of-page'}"></__script>
where 'alias-of-page' must be changed of course.

Quick test shows me it works.

Caveats:
- you might want to prevent normal editors to be able to edit those pages
- the content type that the webserver sends could be 'text/html' which actually is not right. You should test this on multiple browsers. Or maybe there is a way to change that behaviour via some php/UDT in the template.
applejack
Power Poster
Power Poster
Posts: 1014
Joined: Fri Mar 30, 2007 2:28 am
Location: London

Re: [?]Module allows to add JS scripts similar cms_styleshee

Post by applejack »

You don't have to use a Mac there are tons of Windows alternatives. Their are many advantages to using a dedicated editor and I don't mean Notepad.

In your case then use CGB's.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: [?]Module allows to add JS scripts similar cms_styleshee

Post by Rolf »

In that case you could use http://dev.cmsmadesimple.org/projects/cacheremotefile to create an external file...
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
requish
Forum Members
Forum Members
Posts: 183
Joined: Sat Jan 24, 2009 3:12 pm

Re: [?]Module allows to add JS scripts similar cms_styleshee

Post by requish »

Pretty cool solution. Thanks for that!

BUT >:D If I make page for client, he will see in page structure menu list these scripts. So if he enter there and change some things, page will break down... I'm right?
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: [?]Module allows to add JS scripts similar cms_styleshee

Post by Rolf »

requish wrote:Pretty cool solution. Thanks for that!

BUT >:D If I make page for client, he will see in page structure menu list these scripts. So if he enter there and change some things, page will break down... I'm right?
Yes...
I have these pages under a dummy page, so they are not direct visible...
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
requish
Forum Members
Forum Members
Posts: 183
Joined: Sat Jan 24, 2009 3:12 pm

Re: [?]Module allows to add JS scripts similar cms_styleshee

Post by requish »

So OK, concept its OK :) and now how to hide this for clients and other users. I tried to do this using some module (news) to make the same thing. Unfortunately dont work (weird url at no prettyurl website is directing to nowhere).
Post Reply

Return to “Modules/Add-Ons”