TinyPortal

Development => Support => Topic started by: @rjen on December 15, 2015, 07:24:01 PM

Title: Tinyportal conflict with sound in Yandexgarland mod
Post by: @rjen on December 15, 2015, 07:24:01 PM
Question, see if you guys can help.

The last few years I have been using a mod in my SMF forum around Chrismas time: Yandexgarland Christmas mod (see SMF mods). When activated the mod displays some X-mas decorations above the forum.

These decorations play tingling sounds when you hover the mouse over the Christmas balls.

All this time I was also running TP version 1.0 and all was OK. Now that I have upgraded to TP 1.2 the X-mas mod does not play the sounds anymore. Some testing on a local forum copy helped me finding the cause: Tinyportal.

After uninstalling TP 1.2 the sounds play again. Reinstalling TP: sounds gone.

I have raised the question also to the Yandex mod thread on SMF, but since it is something that seems to be caused by TP1.2 I am also asking support here. Anyone with a solution?

Thanks in advance for any help...

Bij the way: the forum is www dot fjr-club dot nl
Title: Re: Tinyportal conflict with sound in Yandexgarland mod
Post by: illori on December 15, 2015, 07:36:37 PM
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>

you are loading jquery 2 times. you need to remove one of those calls. after you remove one, does that help make it work?
Title: Re: Tinyportal conflict with sound in Yandexgarland mod
Post by: @rjen on December 15, 2015, 08:02:33 PM
You may have a point there. I have a test copy of my forum at test dot fjr-club dot nl.

Ther I have uninstalled TP1.2, and the sounds work now. In this site the second jquery call disappears when TP is uninstalled.

Where excatly is this call located? Can I switch that off? Or do I need to find the first call and remove that?
Title: Re: Tinyportal conflict with sound in Yandexgarland mod
Post by: @rjen on December 15, 2015, 08:20:44 PM
Ok, found it: in TPortal.php.

Code:


// Load JQuery if it's not set (anticipated for SMF2.1)
if (!isset($modSettings['jquery_source']))
$context['html_headers'] .= '
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>';


Since it suggests it is there for SMF 2.1 I commented out the code: and now it works again. I see no direct downside on Tinyportal...

Is there a way to deactiate the modsetting ' jquery_source' from the admin panel?
Title: Re: Tinyportal conflict with sound in Yandexgarland mod
Post by: illori on December 15, 2015, 08:27:53 PM
just remove that whole bit of code, i would not worry about the modSetting part.
Title: Re: Tinyportal conflict with sound in Yandexgarland mod
Post by: @rjen on December 15, 2015, 08:33:30 PM
Ok, thanks. It is commented out now. Will make a note of the manual edit should I upgrade to TP1.3 in the future.

Whenever SMF 2.1 will be stable I will need to see if the X-mas mod will remain in use anyway...

Thanks for the quick support!
Title: Re: Tinyportal conflict with sound in Yandexgarland mod
Post by: lurkalot on December 15, 2015, 08:39:05 PM
@rjen, thanks for bringing this to our attention.  Removing that code does indeed cure the problem.

Quote from: illori on December 15, 2015, 08:27:53 PM
just remove that whole bit of code, i would not worry about the modSetting part.

Illori, any ideas where that came from?  I'm guessing it will need removing in the next update.
Title: Re: Tinyportal conflict with sound in Yandexgarland mod
Post by: illori on December 15, 2015, 08:40:16 PM
come SMF 2.1 you will need to remove the jquery call from the yandexgarland mod as SMF 2.1 calls jquery by default.

if you do remove that mod by change, you may want jquery back if you use the shoutbox.

it is a conflict with the mod, this could happen with any mods that use jquery. nothing that we can really fix on our end. i would not remove it as that will break the autoloading of the shoutbox.

the modSetting part is not breaking anything so does not hurt to leave it.
Title: Re: Tinyportal conflict with sound in Yandexgarland mod
Post by: lurkalot on December 15, 2015, 09:14:35 PM
Illori, I guess simply commenting out the code as @rjen suggested would be the way to go then.  As you say, it'd need to added back if you remove that mod.
Title: Re: Tinyportal conflict with sound in Yandexgarland mod
Post by: Ken. on December 15, 2015, 11:53:51 PM
Commenting out the code works well... now we just need to remember to re-activate the code after the Holidays!  ;D
http://www.ourfamilyforum.org/FamilyForum/index.php?action=forum