Welcome to Geeklog Monday, November 20 2017 @ 12:55 am EST


Status: offline

::Ben

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

I'm working on the next paypal plugin version. I can set a css file in the plugin_getheadercode_paypal function
PHP 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.

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


Confused:

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

Status: offline

Laugh

Site Admin
Admin
Registered: 27/09/2005
Posts: 1240
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

http://project.geeklog.net/tracking/view.php?id=1358


Tom
One of the Geeklog Core Developers.

All times are EST. The time is now 12:55 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