1
neogabo
addStylesheet in the admin
  • 2009/12/18 16:23

  • neogabo

  • Just popping in

  • Posts: 22

  • Since: 2009/11/9


hi!, does someone knows how can i use

$xoTheme->addStylesheet(XOOPS_URL . '/modules/yourmodule/style.css');

to add css in the admin?.

2
ghia
Re: addStylesheet in the admin
  • 2009/12/18 17:01

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Why do you need that?

3
neogabo
Re: addStylesheet in the admin
  • 2009/12/18 17:07

  • neogabo

  • Just popping in

  • Posts: 22

  • Since: 2009/11/9


i need to do that because i will use a javascript tree to add atributes to a category(like the win explorer). also i need to add js files, but i guess i will have to drop them before my code starts right?

4
ghia
Re: addStylesheet in the admin
  • 2009/12/18 17:44

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Is this for a module you are developing?

5
neogabo
Re: addStylesheet in the admin
  • 2009/12/18 18:05

  • neogabo

  • Just popping in

  • Posts: 22

  • Since: 2009/11/9


yes

6
voltan
Re: addStylesheet in the admin
  • 2009/12/18 18:30

  • voltan

  • Theme Designer

  • Posts: 724

  • Since: 2006/12/5



7
neogabo
Re: addStylesheet in the admin
  • 2009/12/18 18:44

  • neogabo

  • Just popping in

  • Posts: 22

  • Since: 2009/11/9


?

8
trabis
Re: addStylesheet in the admin
  • 2009/12/18 19:59

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Quote:

neogabo wrote:
hi!, does someone knows how can i use

$xoTheme->addStylesheet(XOOPS_URL . '/modules/yourmodule/style.css');

to add css in the admin?.



If you are using XOOPS 2.4.x just use
$xoTheme->addStylesheet(XOOPS_URL . '/modules/yourmodule/style.css');
after
xoops_cp_header(),

Use $xoTheme->addScript() for javascript.

9
neogabo
Re: addStylesheet in the admin
  • 2009/12/18 20:07

  • neogabo

  • Just popping in

  • Posts: 22

  • Since: 2009/11/9


i tried, i can't get it to work:


xoops_cp_header();

$xoTheme->addStylesheet(XOOPS_URL . '/modules/yourmodule/style.css');

xoops_cp_footer();

Error:
Fatal error: Call to a member function addStylesheet() on a non-object .........


Version.php:
/**
* DEFINE Versioning
*/
define('XOOPS_VERSION', 'XOOPS 2.4.0');

10
trabis
Re: addStylesheet in the admin
  • 2009/12/18 20:15

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


try:
xoops_cp_header();
global 
$xoTheme;        
$xoTheme->addStylesheet(XOOPS_URL '/modules/yourmodule/style.css');    
            
xoops_cp_footer();


Login

Who's Online

401 user(s) are online (286 user(s) are browsing Support Forums)


Members: 0


Guests: 401


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