11
ianez
Re: jquery being loaded multiple times
  • 2011/4/19 15:08

  • ianez

  • Not too shy to talk

  • Posts: 188

  • Since: 2006/1/26


I've discovered that the jscript are loaded via addScipt method..
so I've changed the path of the mentioned skin to go on browse.php?Frameworks/jquery/jquery.js..
(this should be used for avoiding duplicates and corrected in all mymenu skins..)
but with fmContent the lightbox is not working anyway..

Ian

12
voltan
Re: jquery being loaded multiple times
  • 2011/4/19 15:29

  • voltan

  • Theme Designer

  • Posts: 724

  • Since: 2006/12/5


you want add jquery.js whit thsi link : browse.php?Frameworks/jquery/jquery.js and this method :

<{php}>
/** add JQuery and JQuery UI */
global $xoTheme;
$xoTheme->addScript("browse.php?Frameworks/jquery/jquery.js");
$this->assign('xoops_module_header', $xoTheme->renderMetas(null, true));
<{/php}>

in your theme and remove all other jquery.js files . for mymenu I think it good if you remove all this codes :









and add all js files in theme header whit this method :

$xoTheme->addScript("browse.php?Frameworks/jquery/pluginsjquery.ui.js");

$xoTheme->addScript("browse.php?modules/mymenus/skins/superfish/js/hoverIntent.js");

and more and remove


13
ianez
Re: jquery being loaded multiple times
  • 2011/4/19 16:26

  • ianez

  • Not too shy to talk

  • Posts: 188

  • Since: 2006/1/26


yeah I've done all thise step...
I was trying to find a solution which did not need manual hacking..
I think superfish menu has anyway some conflicts with lightbox..

I can't manually add
$xoTheme->addScript("browse.php?Frameworks/jquery/pluginsjquery.ui.js");
to menu theme because the path is written in skin_version.php file and then processed by /blocks/mymenus_block.php and this path is processed correctly using addScript method..
as a partial solution I've written in skin_version.php a path like
../../../../browse.php?Frameworks/jquery/jquery.js
this works but return a very strange path in the source..

my impression is that when using the module_header injection of jquery each module request came before the theme request, infact the other jscript need for menu are loaded 'before' the jquery declaration.. this leading to errors..

ps Voltan.. in fmcontent when opening a dynamic page all jscript is broken and I receive the error from firebug:
$("#content_1").editable is not a function (where 1 is the id of the page as you know..), can't understand why jquery is not working here.. even if I disable mymenu module..

Ian

Login

Who's Online

456 user(s) are online (332 user(s) are browsing Support Forums)


Members: 0


Guests: 456


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits