[TYPO3-english] yag nivoslider theme

Richard Davies richard at ocular.co.nz
Mon Mar 5 00:42:16 CET 2012


Hi,

You are including jquery twice:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js
<view-source:http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js>"
type="text/javascript"></script>

<script src="typo3conf/ext/yag_themepack_jquery/Resources/Public/GallerySource/NivoSlider/jquery.nivo.slider.pack.js?1330716371
<view-source:http://test16.h3online.hu/typo3conf/ext/yag_themepack_jquery/Resources/Public/GallerySource/NivoSlider/jquery.nivo.slider.pack.js?1330716371>"
type="text/javascript"></script>...

...

<meta name="Author" content="Horn Gábor - H3 Kft, http://www.h3online.hu/" />
	<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js
<view-source:http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js>"></script>
	<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jquery-ui.min.js
<view-source:http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jquery-ui.min.js>"></script>


This causes a conflict. Check for multiple inclusions if you get js errors
like this.
Richard

2012/3/5 Gábor Horn <gabor at h3online.hu>

> Hello Oliver,
>
> i tried what you suggested, now the inclusion order is:
>
> <script src="http://ajax.googleapis.**com/ajax/libs/jquery/1.6.4/**
> jquery.min.js<http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js>"
> type="text/javascript"></**script>
>
>
> <script src="typo3conf/ext/yag_**themepack_jquery/Resources/**
> Public/GallerySource/**NivoSlider/jquery.nivo.slider.**pack.js?1330716371"
> type="text/javascript"></**script>
>
>
> unfortunatelly it still doesn't work still says nivoSlider is not a
> function. You can see it here: http://test16.h3online.hu/
>
> the nivoSlider JS is clearly included after the jQuery one, using firebug
> i can see the images in the corresponding div, so i still don't understand
> why it doesn't recognize nivoSlider as a function :( Any other hint pls?
> Maybe can you provide a link to your working solution so i can compare the
> js sources?
>
> thanks, Gabor
>
> 2012.03.04. 16:53 keltezéssel, Oliver Salzburg írta:
>
>  On 2012-03-04 16:32, Gabor Horn wrote:
>>
>>> Hello,
>>>
>>> i!m using typo3 4.5.11 and yag 1.4.5 and yag themepack jquert 0.5.0. I'd
>>> like to use the nivoSlider theme to show an ImageList. On the frontend
>>> the images doesn't show with this theme (they appear with lightbox theme
>>> so the image settings are ok i guess), and i see the following
>>> javascript error in debug:
>>>
>>> jQuery('#nivoSlider-3').**nivoSlider is not a function
>>>
>>> examining the source i see the two following JS inclusions:
>>>
>>> <script
>>> src="typo3conf/ext/yag/**Resources/Public/Js/JQuery/**
>>> jquery-1.6.4.min.js?**1330716192"
>>> type="text/javascript"></**script>
>>>
>>> <script
>>> src="typo3conf/ext/yag_**themepack_jquery/Resources/**
>>> Public/GallerySource/**NivoSlider/jquery.nivo.slider.**
>>> pack.js?1330716371"
>>> type="text/javascript"></**script>
>>>
>>> i can click on both and can see their js source, so i'm not sure why
>>> they not get included properly (if that is the problem). Unfortunatelly
>>> in the YAG docs i didn't find if i have to make any extra steps to
>>> install niveSlider. After taht i found a niveSLider extension in TER, i
>>> installed it, but that also didn't help. Do i need to build a custom
>>> jQuery for my site with the jQuery plugin? Or should Yag jQuery stuff
>>> would work "out of the box" with that 2 js include what i can see in the
>>> html head?
>>>
>>> thanks, Gabor Horn
>>> ______________________________**_________________
>>> TYPO3-english mailing list
>>> TYPO3-english at lists.typo3.org
>>> http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-**english<http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english>
>>>
>>
>> If I remember correctly, this is somehow a problem with inclusion order
>> of the .js files.
>>
>> The nivoslider extension is definitely not required (I thought so too
>> at some point).
>>
>> Try this TypoScript:
>>
>> Constants:
>> config {
>>   // Tell YAG to not include jQuery
>>   yag.addjQuery = 0
>> }
>>
>> Setup:
>> page {
>>   includeJS {
>>     // Force include of jQuery as first library
>>     jquery            =
>> http://ajax.googleapis.com/**ajax/libs/jquery/1.6.4/jquery.**min.js<http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js>
>>     jquery.external   = 1
>>     jquery.forceOnTop = 1
>>   }
>> }
>>
>> If I remember correctly, that's all that's needed to make it work.
>>
>> Cheers
>> Oliver
>>
>
> ______________________________**_________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-**english<http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english>
>


More information about the TYPO3-english mailing list