Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Responsive FileManager
(2019-04-11, 19:33:33)datiswous Wrote: Hello, why is the following code present on every page in the frontend? This is after the </footer>

Code:
<!-- Responsive FileManager Javascripts loading ver. 2.5 -->
<script>
function loadjscssfile(filename, filetype){
   if (filetype=="js"){ //if filename is a external JavaScript file
       var fileref=document.createElement('script');
       fileref.setAttribute("type","text/javascript");
       fileref.setAttribute("src", filename);
        fileref.async = false;
   }
   else if (filetype=="css"){ //if filename is an external CSS file
       var fileref=document.createElement("link");
       fileref.setAttribute("rel", "stylesheet");
       fileref.setAttribute("type", "text/css");
       fileref.setAttribute("href", filename);
   }
   if (typeof fileref!="undefined") {
        document.body.appendChild(fileref);
    }
}
if (window.addEventListener)
    window.addEventListener("load", loadjscssfile, false);
else if (window.attachEvent)
    window.attachEvent("onload", loadjscssfile);
else window.onload = loadjscssfile;

if (document.querySelector('.prettyPhoto') !== null) {
    loadjscssfile(".../plugins/responsivefilemanager/css/prettyPhoto.css", "css");
    loadjscssfile(".../plugins/responsivefilemanager/js/prettyPhoto/jquery.prettyPhoto.js", "js");
    loadjscssfile(".../plugins/responsivefilemanager/js/prettyPhoto/rfm_prettyphoto.js", "js");
}
if (document.querySelector('.fancybox') !== null) {
    loadjscssfile(".../plugins/responsivefilemanager/js/FancyBox/jquery.fancybox.css", "css");
    loadjscssfile(".../plugins/responsivefilemanager/js/FancyBox/jquery.fancybox.pack.js", "js");
    loadjscssfile(".../plugins/responsivefilemanager/js/FancyBox/rfm_fancybox.js", "js");
}
if (document.querySelector('.baguettebox') !== null) {
    loadjscssfile(".../plugins/responsivefilemanager/js/BaguetteBox/baguetteBox.min.css", "css");
    loadjscssfile(".../plugins/responsivefilemanager/js/BaguetteBox/baguetteBox.min.js", "js");
    window.onload = function() {
        baguetteBox.run('.baguettebox', {
            // Custom options
            fullScreen: false,
            animation: 'fadeIn',
            buttons: true,
            overlayBackgroundColor: 'rgba (0,0,0,.8)',
            captions: function(element) {
                return element.getElementsByTagName('img')[0].alt;
            }
        });
    };
}
</script>
(I made some of the urls shorter)

Might this be related to a previous post from Shawn about loading css?

Hello.
Initially I use absolute path to all JS and CSS sources for best compatibility.
But you can use relative path if it works good on your server.
And do not forget add code for Jquery script loading because it required for prettyPhoto and Fancybox.
On your code example this part not included.
Reply


Messages In This Thread
Responsive FileManager - by asemion - 2015-07-27, 20:20:57
RE: Responsive FileManager - by vallhund - 2015-07-28, 16:09:11
RE: Responsive FileManager - by datiswous - 2015-07-29, 09:03:18
RE: Responsive FileManager - by asemion - 2015-07-30, 02:55:10
RE: Responsive FileManager - by datiswous - 2015-07-30, 11:41:46
RE: Responsive FileManager - by datiswous - 2015-07-30, 23:36:33
RE: Responsive FileManager - by asemion - 2015-07-30, 23:54:04
RE: Responsive FileManager - by datiswous - 2015-07-31, 02:07:27
RE: Responsive FileManager - by asemion - 2015-07-31, 03:34:59
RE: Responsive FileManager - by shawn_a - 2015-07-31, 03:58:42
RE: Responsive FileManager - by Tyblitz - 2015-08-01, 00:55:25
RE: Responsive FileManager - by shawn_a - 2015-08-01, 01:19:52
RE: Responsive FileManager - by shawn_a - 2015-08-01, 02:00:26
RE: Responsive FileManager - by asemion - 2015-08-02, 20:12:05
RE: Responsive FileManager - by vallhund - 2015-08-08, 23:34:49
RE: Responsive FileManager - by asemion - 2015-08-13, 00:27:44
RE: Responsive FileManager - by shawn_a - 2015-08-09, 01:05:30
RE: Responsive FileManager - by asemion - 2015-08-13, 00:43:46
RE: Responsive FileManager - by shawn_a - 2015-08-13, 00:43:36
RE: Responsive FileManager - by shawn_a - 2015-08-13, 01:47:05
RE: Responsive FileManager - by kuguar - 2015-08-14, 09:53:35
RE: Responsive FileManager - by asemion - 2015-08-19, 05:48:03
RE: Responsive FileManager - by shawn_a - 2015-08-19, 06:10:39
RE: Responsive FileManager - by asemion - 2015-08-26, 04:10:20
RE: Responsive FileManager - by Oleg06 - 2015-08-26, 06:40:43
RE: Responsive FileManager - by asemion - 2015-08-26, 18:22:08
RE: Responsive FileManager - by thangnaodo - 2016-01-15, 00:18:13
RE: Responsive FileManager - by asemion - 2016-01-15, 23:44:34
RE: Responsive FileManager - by shawn_a - 2015-08-26, 23:36:20
RE: Responsive FileManager - by Frens - 2015-09-22, 04:44:16
RE: Responsive FileManager - by asemion - 2015-09-23, 00:42:11
RE: Responsive FileManager - by Frens - 2015-09-23, 02:38:25
RE: Responsive FileManager - by Frens - 2015-09-22, 21:42:21
RE: Responsive FileManager - by asemion - 2015-09-23, 00:56:11
RE: Responsive FileManager - by Frens - 2015-09-23, 03:14:10
RE: Responsive FileManager - by Frens - 2015-09-24, 05:17:21
RE: Responsive FileManager - by Frens - 2015-09-26, 21:50:56
RE: Responsive FileManager - by asemion - 2015-09-28, 02:07:48
RE: Responsive FileManager - by Frens - 2015-09-28, 02:40:42
RE: Responsive FileManager - by asemion - 2015-09-29, 04:52:52
RE: Responsive FileManager - by Frens - 2015-09-29, 05:26:20
RE: Responsive FileManager - by asemion - 2015-10-05, 03:38:37
RE: Responsive FileManager - by Frens - 2015-09-28, 03:51:09
RE: Responsive FileManager - by Frens - 2015-10-01, 19:52:58
RE: Responsive FileManager - by asemion - 2015-10-05, 03:41:19
RE: Responsive FileManager - by Frens - 2015-10-05, 03:56:48
RE: Responsive FileManager - by asemion - 2015-10-17, 00:08:21
RE: Responsive FileManager - by Frens - 2015-10-17, 04:20:51
RE: Responsive FileManager - by Frens - 2015-11-07, 05:57:45
RE: Responsive FileManager - by asemion - 2015-11-10, 07:45:38
RE: Responsive FileManager - by Frens - 2015-11-10, 09:13:48
RE: Responsive FileManager - by asemion - 2015-11-11, 05:21:21
RE: Responsive FileManager - by Frens - 2015-11-11, 07:43:35
RE: Responsive FileManager - by asemion - 2015-11-12, 18:21:25
RE: Responsive FileManager - by Frens - 2015-11-13, 02:33:27
RE: Responsive FileManager - by Frens - 2015-12-07, 20:39:23
RE: Responsive FileManager - by asemion - 2015-12-09, 18:56:49
RE: Responsive FileManager - by Frens - 2015-12-09, 19:14:06
RE: Responsive FileManager - by asemion - 2015-12-11, 19:26:20
RE: Responsive FileManager - by duylee - 2015-12-12, 01:01:09
RE: Responsive FileManager - by Frens - 2015-12-13, 06:19:06
RE: Responsive FileManager - by asemion - 2015-12-14, 19:05:20
RE: Responsive FileManager - by Frens - 2015-12-16, 20:37:13
RE: Responsive FileManager - by asemion - 2015-12-17, 16:32:01
RE: Responsive FileManager - by Frens - 2015-12-17, 21:14:37
RE: Responsive FileManager - by asemion - 2015-12-18, 01:48:23
RE: Responsive FileManager - by Oleg06 - 2016-01-15, 01:58:05
RE: Responsive FileManager - by mengi - 2016-04-16, 13:36:48
RE: Responsive FileManager - by asemion - 2016-04-18, 17:53:53
RE: Responsive FileManager - by asemion - 2016-08-14, 06:12:25
RE: Responsive FileManager - by asemion - 2016-08-26, 21:28:15
RE: Responsive FileManager - by sidotij - 2016-09-28, 10:07:56
RE: Responsive FileManager - by asemion - 2016-09-29, 22:40:51
RE: Responsive FileManager - by Carlos - 2016-09-29, 01:07:58
RE: Responsive FileManager - by sidotij - 2016-09-29, 10:16:40
RE: Responsive FileManager - by Carlos - 2016-09-29, 15:50:58
RE: Responsive FileManager - by sidotij - 2016-09-29, 23:59:30
RE: Responsive FileManager - by asemion - 2016-09-30, 00:21:40
RE: Responsive FileManager - by sidotij - 2016-09-30, 22:16:27
RE: Responsive FileManager - by Shasaar - 2016-12-26, 19:35:47
RE: Responsive FileManager - by asemion - 2016-12-29, 18:35:18
RE: Responsive FileManager - by asemion - 2017-01-06, 01:25:49
RE: Responsive FileManager - by asemion - 2017-02-15, 00:46:32
RE: Responsive FileManager - by islander - 2017-02-15, 22:51:46
RE: Responsive FileManager - by asemion - 2017-02-17, 23:42:48
RE: Responsive FileManager - by asemion - 2017-06-09, 21:00:12
RE: Responsive FileManager - by AviaBarsik - 2018-02-23, 18:38:28
RE: Responsive FileManager - by asemion - 2018-02-24, 06:32:53
RE: Responsive FileManager - by asemion - 2018-03-15, 22:09:21
RE: Responsive FileManager - by asemion - 2018-06-18, 21:37:42
RE: Responsive FileManager - by acenda - 2018-08-01, 22:16:26
RE: Responsive FileManager - by asemion - 2018-08-01, 22:52:18
RE: Responsive FileManager - by acenda - 2018-08-01, 23:08:30
RE: Responsive FileManager - by Oleg06 - 2019-03-24, 23:53:02
RE: Responsive FileManager - by asemion - 2019-03-25, 17:48:23
RE: Responsive FileManager - by Georg - 2019-04-03, 05:52:02
RE: Responsive FileManager - by Oleg06 - 2019-04-05, 06:41:36
RE: Responsive FileManager - by islander - 2019-04-05, 07:40:17
RE: Responsive FileManager - by datiswous - 2019-04-11, 19:33:33
RE: Responsive FileManager - by asemion - 2019-04-11, 22:55:59
RE: Responsive FileManager - by islander - 2019-04-11, 23:01:51
RE: Responsive FileManager - by datiswous - 2019-04-14, 02:05:33
RE: Responsive FileManager - by islander - 2019-04-14, 05:28:46
RE: Responsive FileManager - by datiswous - 2019-04-16, 19:49:21
RE: Responsive FileManager - by asemion - 2019-10-24, 23:11:19
RE: Responsive FileManager - by acenda - 2020-03-10, 06:45:19
RE: Responsive FileManager - by islander - 2020-03-10, 08:12:30
RE: Responsive FileManager - by acenda - 2020-03-10, 22:05:59
RE: Responsive FileManager - by acenda - 2020-03-11, 20:49:51
RE: Responsive FileManager - by islander - 2020-03-11, 22:31:35
RE: Responsive FileManager - by acenda - 2020-03-12, 00:17:43
RE: Responsive FileManager - by islander - 2020-03-12, 00:44:04
RE: Responsive FileManager - by acenda - 2020-03-19, 01:36:56
RE: Responsive FileManager - by acenda - 2020-03-11, 21:01:03
RE: Responsive FileManager - by acenda - 2020-03-26, 19:48:14
RE: Responsive FileManager - by acenda - 2020-04-08, 20:13:44
RE: Responsive FileManager - by acenda - 2020-04-29, 17:39:25
RE: Responsive FileManager - by acenda - 2020-08-18, 23:02:21
RE: Responsive FileManager - by islander - 2020-08-18, 23:49:32
RE: Responsive FileManager - by acenda - 2020-09-01, 16:13:04
RE: Responsive FileManager - by acenda - 2020-10-22, 00:29:47
RE: Responsive FileManager - by islander - 2020-10-22, 01:10:51
RE: Responsive FileManager - by acenda - 2020-10-28, 19:51:51
RE: Responsive FileManager - by islander - 2020-10-28, 20:20:07
RE: Responsive FileManager - by acenda - 2021-01-15, 00:54:28
RE: Responsive FileManager - by acenda - 2021-01-15, 00:55:30
RE: Responsive FileManager - by odinia - 2022-08-09, 09:20:19
RE: Responsive FileManager - by islander - 2021-01-15, 01:29:14
RE: Responsive FileManager - by acenda - 2021-11-04, 18:25:36
RE: Responsive FileManager - by acenda - 2022-12-01, 06:58:33
RE: Responsive FileManager - by acenda - 2022-12-01, 06:59:41
RE: Responsive FileManager - by multicolor - 2022-12-01, 07:08:48
RE: Responsive FileManager - by acenda - 2023-02-15, 18:12:46
RE: Responsive FileManager - by multicolor - 2023-02-15, 18:58:58
RE: Responsive FileManager - by islander - 2023-02-15, 21:52:49
RE: Responsive FileManager - by acenda - 2023-03-29, 04:03:41



Users browsing this thread: 1 Guest(s)