Welcome to Geeklog, Anonymous Saturday, December 02 2023 @ 03:50 am EST

Geeklog Forums

Setting css file issue with script class

Status: offline


Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France

I'm working on the next paypal plugin version. I can set a css file in the plugin_getheadercode_paypal function
Text Formatted Code
$_SCRIPTS->setCSSFile('paypal_datepicker_css', '/jquery/datepicker/datepicker.css', false);

but I need to use this css file only on admin paypal plugin admin pages.

So if I set this css file in my admin page, this doesn't works while setting a js file in my admin page works.

Text Formatted Code
$_SCRIPTS->setJavaScriptFile('paypal_datepicker_js', '/jquery/datepicker/datepicker.js');


I'm available to customise your themes or plugins for your Geeklog CMS

Status: offline


Site Admin
Registered: 09/27/05
Posts: 1468
You need to make sure that the css file is set by the scripts class BEFORE calling COM_siteHeader. COM_siteHeader creates the header so once that is execute nothing can be changed in it. That is why it is best to execute COM_siteHeader and COM_siteFooter as late as possible in code.

I have added a feature request to hopefully address this problem at some point


One of the Geeklog Core Developers.

All times are EST. The time is now 03:50 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content