WBCE CMS Forum

WBCE CMS – Way Better Content Editing.

Du bist nicht angemeldet.

#1 23.02.2018 10:25:07

casi
Mitglied

minigal-v2.5.0

Hi. My template requires jquery-2.1.3.min.js / The Mini Gallery only works if I deactivate this jquery-2.1.3.min.js version. I read on the Modul homepage that Jquery only until version 1.9 will work.... Is there a way to go around this? Thank you.

Offline

#2 23.02.2018 11:39:33

florian
Administrator

Re: minigal-v2.5.0

hm, I just checked MiniGallery with the default jquery version of WBCE which is 2.2.4 and had no issues with 2.1.3 either.
If you're not loading jquery by register_frontend_modfiles('jquery'), please add the following lines to the <head> your template:

<script type="text/javascript">
var URL = '<?php echo WB_URL; ?>';
var WB_URL = '<?php echo WB_URL; ?>';
var TEMPLATE_DIR = '<?php echo TEMPLATE_DIR; ?>';
</script>

Please make sure that jquery is not loaded twice.

Open the error console by hitting the F12 key on your keyboard and check if any error messages appear. Or give us a link to the page so we can have a look on it.


Code allein macht nicht glücklich. Jetzt spenden!

Offline

#3 23.02.2018 12:30:51

casi
Mitglied

Re: minigal-v2.5.0

Thank you. I think jquery does gets loaded twice. In the cms template header I have this code:

<?php
if(function_exists('register_frontend_modfiles')) {
 register_frontend_modfiles('css');
 register_frontend_modfiles('jquery');
 register_frontend_modfiles('js');
}
?>

and the design of the template is loading this at the end of the document:

<!-- jQUERY --><!-- muss ausgeblendet sein dass die Gallery funktioniert
	<script src="/templates/TPL_Assets/assets/js/jquery-2.1.3.min.js"></script> -->

	<!-- BOOTSTRAP JS -->
	<script src="/templates/TPL_Assets/assets/js/bootstrap.min.js"></script>

	<!-- VIEWPORT -->
	<script src="/templates/TPL_Assets/assets/js/viewport/jquery.viewport.js"></script>

I had to comment out the jquery-2.1.3.min.js script to get the gallery running, but not really a good way...

Offline

#4 23.02.2018 12:49:49

florian
Administrator

Re: minigal-v2.5.0

Well you can choose, either you use the jquery which is shipped with WBCE, then you don't need the line

<script src="/templates/TPL_Assets/assets/js/jquery-2.1.3.min.js"></script>

Or yu choose to load the older jquery from the template, then you have to remove the line

register_frontend_modfiles('jquery');

and add

<script type="text/javascript">
var URL = '<?php echo WB_URL; ?>';
var WB_URL = '<?php echo WB_URL; ?>';
var TEMPLATE_DIR = '<?php echo TEMPLATE_DIR; ?>';
</script>

If it is not required by Bootstrap, I would recommend the first way, e.g use the included jquery.

I do not understand why "this is not a good way"?


Code allein macht nicht glücklich. Jetzt spenden!

Offline

#5 23.02.2018 12:53:46

casi
Mitglied

Re: minigal-v2.5.0

Thank you for your help. Appreciated. Which version of jquery gets loaded (shipped) with WBCE?

Offline

#6 23.02.2018 12:56:41

florian
Administrator

Re: minigal-v2.5.0

It depends on the WBCE version:
WBCE 1.3 / 1.3.1 => jq 2.2.4
WBCE 1.2 => jq 1.12.4
WBCE 1.1.11 => jq 1.7.1


Code allein macht nicht glücklich. Jetzt spenden!

Offline

Fußzeile des Forums

up