Copyright © 2008, Levyco Development, LLC. All rights are reserved.
Some Background Information...

Intro


This is some common background information that will help you understand some of the lower-level details about the implementation of these pages. This understanding is not necessary to use or understand the YUI elements, but may be useful if any of the PHP functionality is of interest to you.


Some Background


I use PHP on the server to handle AJAX requests, primarily, but I also have a page framework, some "helper functions" and some global variables that are used on these pages for simplicity. However, none of this is necessary for the purposes herein, it just makes my life easier (which is a good thing!). I'm going to show some of the code with PHP snippets interspersed, and I will show the actual HTML generated too (you can "view source" for the page to see the ultimate HTML output too, of course).


Also, as part of my framework, I have a module that "figures out" what YUI elements will be needed on the page. This is a server-side equivalent of the YUI Dependency Configurator tool. I had already developed my tool before that showed up (or at least before I found it), so I have stayed with my tool. I begin each "page" with something like this:


<?php Array = array("container""button""calendar"); ?>

This array of module requirements gets sent to the page framework to generate the actual YUI requirements, resulting in this code:


<link type="text/css" rel="stylesheet" href="http://yuihelp.levycodev.com/yui260/build/reset-fonts-grids/reset-fonts-grids.css">
<link type="text/css" rel="stylesheet" href="http://yuihelp.levycodev.com/yui260/build/assets/skins/sam/skin.css">
<script type="text/javascript" src="http://yuihelp.levycodev.com/yui260/build/utilities/utilities.js"></script>
<script type="text/javascript" src="http://yuihelp.levycodev.com/yui260/build/button/button-min.js"></script>
<script type="text/javascript" src="http://yuihelp.levycodev.com/yui260/build/calendar/calendar-min.js"></script>
<script type="text/javascript" src="http://yuihelp.levycodev.com/yui260/build/container/container-min.js"></script>
<script type="text/javascript" src="http://yuihelp.levycodev.com/yui260/build/menu/menu-min.js"></script>