1 davidryman Feb 28, 2010 20:29
3 yabba Mar 01, 2010 13:40
If your code works with the shipped version of jquery then you can do :
functionSkinBeginHtmlHead()
{
require_js('#jquery#');
require_js( $this->get_plugin_url().'your.js', true);
}
¥
4 davidryman Mar 01, 2010 19:23
That's pretty much what I need. Is there another php function require_css?
Most important is to follow the 'standard' so that my work, if good enough, will be accepted and shared with others.
5 yabba Mar 01, 2010 19:25
There is, and you'll never guess at it's name :p
require_css( file, [boolean] absolute path );
false == /rsc/css/file
¥
6 davidryman Mar 01, 2010 20:01
:p, I figured it out for myself.
require_css($this->get_plugin_url()."css/jquery-1.3.2-lightbox-1.0.css", true);
Thought it might be useful for someone else on the same path though.
Does lead to another question. What is the function of the true/false absolute path?
7 yabba Mar 01, 2010 20:16
false == "load from /rsc/[css||js]/[path/file]" (depending on the require_*() hook)
true == "load from url given"
There's also "add_headline()" which will spit out the results in <head />
¥
8 davidryman Mar 01, 2010 21:18
thanks
I did find in _plugins_admin.class.php a list of supported hooks including SkinEndHtmlBody. I tried that and it works. Putting the code at the end of the body is fine, but it would be nice to have SkinStartHtmlBody and SkinEndHtmlHead. Also an SkinAddToBodyTag hook could be useful. I maybe over-thinking this as jquery can handle this programmagically.
Also have to remember with skins and plugins to reload them before testing.
Any comments?