Add call a script in the head section of the template

GK User
Wed Aug 06, 2014 1:22 pm
Hi.

I need to add a call: <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"> </ script> to the top of the head section in the template Gk_game_magazine

How I can do?

Thanks in advance.
User avatar
Fresh Boarder

GK User
Wed Aug 06, 2014 2:25 pm
That is not the best idea, as this template already uses jQuery in version v1.8.3. It uses also MooTools, so you need to use jQuery in no conflict mode.
Adding another version of jquery will break the sites javascripts.
User avatar
Moderator

GK User
Thu Aug 07, 2014 12:53 am
Thank´s Cyberec.

The problem is I want to embed a youtube channel on my site.
The code I use is a script as this:
Code: Select all
<script type="text/javascript" src="https://ytchannelembed.com/ytce-frgallery.js"></script><div style="width:100%;max-width:130px;" class="ytce" data-user="My_channel ID" data-rows="1" data-ratio="hd" data-width="130" data-margin="15" data-desc="100" data-desc_color="9E9E9E" data-title="30" data-title_color="000000" data-https="0" data-duration="1" data-views="1" data-likes="1" data-dislikes="1" data-fav="1" data-cols="1" ></div>

When I insert the script in the JCE editor not working, but the problem is not the filter editor is that the script needs to call the above mentioned libraries.
If in the JCE editor I insert the script itself and I include as the first line as follows:

Code: Select all
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"> </ script>


The script works, but stops working B2J calendar module.
I tried to include the libraries and scripts that calls the script listed above directly to a folder in the installation path, but neither works.

I do not know what to do
User avatar
Fresh Boarder

GK User
Thu Aug 07, 2014 6:13 am
As I have mentioned - if you will include different jQuery library, then some elements on site will break.
Whats more important - we don't support this kind of modification, so if you would like to give it a try:
/templates/gk_gamemagazine/layouts/blocks/head.php
is the place.
User avatar
Moderator

GK User
Thu Aug 07, 2014 9:56 am
Ok.
So my only alternative is to change the script.
How do I call jQuery included in the template?

Thak´s
User avatar
Fresh Boarder

GK User
Mon Aug 11, 2014 3:30 pm
It is loaded by default, the only thing to have in mind is to use it in noconflict mode.
Please check:
/templates/gk_game_magazine/js/gk.scripts.js
for details.
User avatar
Moderator


cron