The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once



UserSpice
jQuery cdn fallback - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26)
+--- Thread: jQuery cdn fallback (/showthread.php?tid=560)



jQuery cdn fallback - firestorm - 05-14-2017

some countries don't allow cdn or cdn goes down for some reason, or your working in localhost with no outside connection then fallback should be added to account for this, I've added to my pull request on github the following, which is added to users/includes/header.php.

<pre>
Code:
<!-- jQuery Fallback -->
<script type="text/javascript">
    if (typeof jQuery == 'undefined') {
        document.write(unescape("{3bc1fe685386cc4c3ab89a3f76566d8931e181ad17f08aed9ad73b30bf28114d}3Cscript src='<?=$us_url_root?>users/js/jquery.js' type='text/javascript'{3bc1fe685386cc4c3ab89a3f76566d8931e181ad17f08aed9ad73b30bf28114d}3E{3bc1fe685386cc4c3ab89a3f76566d8931e181ad17f08aed9ad73b30bf28114d}3C/script{3bc1fe685386cc4c3ab89a3f76566d8931e181ad17f08aed9ad73b30bf28114d}3E"));
    }
</script>
</pre>




jQuery cdn fallback - mudmin - 05-14-2017

I like this. I'm adding this to the list. I should get an update out this week.

One of the other things I ran into is that I'm building an escape room based on userspice, mqtt, and a bunch of raspberry pi's and arduinos. For security reasons it is air-gapped (no internet connection). I had to go through all the headers and footers and re-point all the jq, bootstrap, and font awesome to local versions. Serious pain. I guess it would be good to have fallback through the whole project. I didn't even know that was a thing.


jQuery cdn fallback - firestorm - 05-14-2017

sounds awesome, i discovered years back working with wordpress, defo a must for a project of this kind, shouldn't be a problem for other scripts