Precisium Logo
PRECISIUM
Pricing      Policies      Support/FAQ      Contact      Payments      Webmail
Phone:   +61 2 9966 8228
Fax:   +61 2 9901 3027
Email:   info@precisium.com.au

YUI phploader.

There is a PHP Loader utility for the YUI javascript library which assists in configuring a page to use the YAHOO® YUI javascript components.

About this example

In general it is recommended to link to the YUI libraries served from the YAHOO® content distribution network.
In some circumstances you may wish to use a local copy of the YUI libraries, in which case the base url can be explicitly set.
See the YAHOO® Developer network site for information on the PHP Loader Utility

The loader.php utility is already installed and available to your PHP pages - simply include the line:
include("yui/phploader/loader.php");


include("yui/phploader/loader.php");
$loader = new YAHOO_util_Loader("2.8.0r4");

//$loader->comboBase = "http://precisium.com/yui/phploader/combo.php?"; 
//$loader->comboBase = "https://secure.precisium.com/yui/phploader/combo.php?"; 

//Turn on rollups (this is actually on by default)
$loader->allowRollups = true;

//Specify YUI components to load
$loader->load("yahoo", "dom", "event", "tabview", "grids", "fonts", "reset");
example of $loader->tags() output:
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/combo?2.8.0r4/build/reset-fonts-grids/reset-fonts-grids.css&2.8.0r4/build/tabview/assets/skins/sam/tabview.css" />

example of $loader->css() output:
<script type="text/javascript" src="http://yui.yahooapis.com/combo?2.8.0r4/build/yahoo-dom-event/yahoo-dom-event.js&2.8.0r4/build/element/element-min.js&2.8.0r4/build/tabview/tabview-min.js"></script>