1
hipoonios
Theme and Jquery help
  • 2011/2/6 14:23

  • hipoonios

  • Friend of XOOPS

  • Posts: 298

  • Since: 2005/9/24


I have added a nice Jquery menu to my site. The problem that I must include jquery in my theme to make it work.

This because Xoops have not loaded jquery by default. Jquery load first then it is used. Like then a user is logging in for example. That means Jquery load twice! Is there anything I can do to prevent this?
I love Xoops!

2
voltan
Re: Theme and Jquery help
  • 2011/2/6 15:36

  • voltan

  • Theme Designer

  • Posts: 724

  • Since: 2006/12/5


Xoops method for load jquery is not good . we must find better solution for it in XOOPS 2.5.1

but you can add jquery in your theme like this:
<{php}>
/** add JQuery and JQuery UI */
    
global $xoTheme
        
$xoTheme->addScript("browse.php?Frameworks/jquery/jquery.js");
        
$xoTheme->addScript("browse.php?Frameworks/jquery/plugins/jquery.ui.js");
        
$this->assign('xoops_module_header'$xoTheme->renderMetas(nulltrue)); 
<{/
php}>


Looking to suico theme

3
hipoonios
Re: Theme and Jquery help
  • 2011/2/6 15:51

  • hipoonios

  • Friend of XOOPS

  • Posts: 298

  • Since: 2005/9/24


Works nice. Thanks Voltan!
I love Xoops!

4
hipoonios
Re: Theme and Jquery help
  • 2011/2/6 17:03

  • hipoonios

  • Friend of XOOPS

  • Posts: 298

  • Since: 2005/9/24


After some more testing I see this is not working properly.

It trashes the templates for some modules. I have tried to put the code in different places in my theme. But ithat does not work.
I love Xoops!

Login

Who's Online

146 user(s) are online (79 user(s) are browsing Support Forums)


Members: 0


Guests: 146


more...

Donat-O-Meter

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

Latest GitHub Commits