Tagged: external script
January 30, 2017 at 4:01 PM #12893donny-webecks.comParticipant
Hi, I want to use this external script
so I go to Panel -> External Script then I put that link there.
Then I click “Link External” button, but it did not do anything.
How do I know if the script has been loaded?
Because my code that is using that script is still not working.
And if I want to remove this external script, how do I do that?
January 30, 2017 at 10:56 PM #12909
Placing third party scripts using the External Script function saves the script in Templates so you can embed or link them. If you were to go into Templates you should see it in there. You should be able to check to see if it is linked to the Code Block in the Templates Panel.
Hope this helps.
January 30, 2017 at 11:19 PM #12910
January 31, 2017 at 11:14 PM #12911
I believe you are doing things correctly with using the External Script function and I am glad to know that it shows under your username. The reason the script is not outputting is because a Code Block cannot be empty. Please consider writing a single line of code in the Code Block. For example, a HTML comment such as:
<!-- Linking jquery-1.7.1.js script -->
This will force CJT to output the template (i.e. external script) that is linked to your Code Block.
April 6, 2018 at 6:11 AM #13231katwParticipant
The behaviour is somewhat confusing and impractical when wanting to use external scripts.
The CJT interface has you insert a URL to the script you wish to link… then it says nothing, so you think something is wrong.
Well something is wrong, it has ‘stolen’ the script and copied it to a template which will become a local file on your website.
What’s wrong? Well:
- #1 — The script has been stolen, copied and duplicated – *copyright* anyone?!
- #2– The script now being locally stored is a snapshot of code *at a point in time* – *out of sync and out of maintenance* reach by the original script owner/provider!
- #3– The script is no longer identifiable at code or file system level; it has been renamed from original name and the filepath is obscure and long-winded – adding bytes weight (albeit small) to the page code
- #4– To edit and maintain the script you have to go through a ‘clunky’ template manager which sports none of the code editing window features you expect from code blocks
- #5– Although you have already told CJT you wanted to ‘Link external script’ you have to do a second step of ‘Template lookup’ to actually activate the link to the script file – The first button step should be called “LOAD EXTERNAL SCRIPT” to be accurate.
- #6– AND you have to be a mind reader to know the code block window which is being used to link the script CANNOT be empty and must have at least a comment block – This should be pre-populated with a sample if empty at time of “Link External file’
- #7– CJT ignores the load at HEAD/FOOTER setting for external scripts. I had it set to footer and on viewing code CJT linked the external script inside the <HEAD>
If It wasn’t for finding this post I wouldn’t have got this far as the documentation is missing key steps and info on EXTERNAL SCRIPTS.
I hope this info fills in the blanks for those struggling to get external linking going, and hope this gives suggestions for improvements to the developer.
- This reply was modified 4 years, 9 months ago by katw. Reason: list tags not working
April 8, 2018 at 8:38 PM #13233
Thanks for your feedback. I am currently working to redo the entire documentation with videos, write-ups and examples. A lot of what you said makes sense, and I am sure future releases can make this feature a lot more user-friendly and intuitive.
Also, it is up to the end-user to use this feature responsibly. Scripts cannot be ‘stolen’ if they are freely provided as open source (e.g. with a GPL, MIT or BSD license). Copyrights are kept intact because these scripts often have the script author in the header, which is often stipulated by the license.
Again, the end-user must adhere to the licensing for scripts hosted on CDNs and make sure there is compliance before using the External Script feature.
Anyway, I appreciate what you have said and will add some of these ideas to the tasks list for future developments.
- You must be logged in to reply to this topic.