• Author
    Posts
  • #12893

    donny-webecks.com
    Participant

    Hi, I want to use this external script
    http://code.jquery.com/jquery-1.7.1.js

    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?

    Thanks,
    Donny

  • #12909

    Damian Baker
    Participant

    Hi Donny,

    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.

    Regards,
    Damian

  • #12910

    donny-webecks.com
    Participant

    Yes, I see it under my username.
    What is the best way to use external script function of CSS JS Toolbox Plujs?
    Should I put:
    http://code.jquery.com/jquery-1.7.1.js
    or
    //code.jquery.com/jquery-1.7.1.js
    or should I start it with <script ….

    Thanks,
    Donny

  • #12911

    Damian Baker
    Participant

    Hi Donny,

    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.

    Regards,
    Damian

  • #13231

    katw
    Participant

    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 3 months, 1 week ago by  katw. Reason: list tags not working
  • #13233

    Damian Baker
    Participant

    Hi there,

    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.

    Regards,
    Damian Baker

You must be logged in to reply to this topic.