
| I began using PHP during the summer of 2000, when working at Stan Lee Media. At the time my experience with server-side scripting was limited to PERL, which I had never felt entirely comfortable with. PHP's easy learning curve got me hooked, and its powerful feature set inspired me to learn more. Since then I've done some professional writing on PHP-related topics, and in addition to programming I've done for companies like Valley Presbyterian Hospital and WebcamNow.com I've released some small PHP software projects of my own. ColorChip is a class for working with color in a more convenient manner than the basic RGB and Hexadecimal triplets often encountered in programming, especially web-oriented programming. ColorChip allows you to define a color using RGB, HSV (Hue, Saturation, Value) or a Hexadecimal string. ColorChip objects have properties for all three of these color models, as well as methods for adjusting both RGB and HSV values - these methods automatically update all of the object's properties. Additional methods exist for getting color compliments, triads, and the nearest websafe color. ![]() A screenshot of the ColorChip demo script at http://andy.greyledge.net/ColorChip/example.php. ColorChip is released under the GNU Public License, and is available for download at http://andy.greyledge.net/ColorChip/index.php. QuickRss is a PHP class for building RSS files as objects, freeing the developer from the need to generate the XML by hand. I use QuickRss to automatically generate the RSS news feed for my personal web site. The RSS feed is located at http://andy.greyledge.net/news.rss QuickRss is released under the GNU Public License, and is available for download at http://andy.greyledge.net/QuickRss/index.php This is a sample of RSS output generated using QuickRss: <?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN"
"http://my.netscape.com/publish/formats/rss-0.91.dtd">
<rss version="0.91">
<channel>
<title>Andy Chase - What's New</title>
<language>en</language>
<copyright>2003</copyright>
<description>Web Developer, Tech Writer, Banjo Player.</description>
<link>http://andy.greyledge.net</link>
<item>
<title>"Read" Section Refactored</title>
<link>http://andy.greyledge.net/portfolio/technical_writing.php
</link>
<description>Following the addition of a tech. writing section
to the portfolio, the "Read" section has been removed.
The same content can now be found at
http://andy.greyledge.net/portfolio/technical_writing.php.
The existing URL, http://andy.greyledge.net/read.php will
redirect all future requests with HTTP status 301, so
well-behaved search engine spiders should be dropping it
from public use before too long.</description>
</item>
<item>
<title>Portfolio Updated</title>
<link>http://andy.greyledge.net/hire.php</link>
<description>PDF and XHTML versions of the portfolio have been
updated to include a Technical Writing section, which will
soon be replacing the separate "Read" section of the web site;
having two separate but closely related sections that serve
the same purpose doesn't make much sense..</description>
</item>
<item>
<title>New Music: "Oh, Susanna"</title>
<link>http://andy.greyledge.net/listen.php</link>
<description>"Oh Susanna" is now available in Ogg Vorbis format
for free download.</description>
</item>
<item>
<title>RSS Feed Now Available</title>
<link>http://andy.greyledge.net/news.rss</link>
<description>An RSS newsfeed containing information about
recent site updates is now available at
http://andy.greyledge.net/news.rss.</description>
</item>
<item>
<title>QuickRss 0.1 Released</title>
<link>http://andy.greyledge.net/QuickRss</link>
<description>QuickRss is a PHP class for building RSS 0.91
files as objects (which means you don't have to deal with
any XML tags yourself.)</description>
</item>
</channel>
</rss>VOOT is a simple ('vanilla') PHP class for creating web pages with templates. It supports user-defined HTTP headers, and it is capable of processing PHP contained in rendered templates. This class was written with simplicity and flexibility in mind; templates can take the form of any text-based file, and you can define as many content placeholders as you like in each template. To indicate a placeholder in a template, you just surround a key word with percentage signs. VOOT is currently used to generate its own information and download page at http://andy.greyledge.net/voot/index.php, as well as my site news page at http://andy.greyledge.net/news.php. The first step to using VOOT is to come up with a template. A simple HTML template might look like this: <!-- template.html -->
<html>
<head>
<title>%HEAD_TITLE%</title>
</head>
<body>
<h1>%PAGE_TITLE%</h1>
<div>
%CONTENT%
</div>
</body>
</html>Three placeholders were defined in the template by surrounding key words with the percent sign: HEAD_TITLE, PAGE_TITLE, and CONTENT. We'll need to keep that in mind when we write the script we want to use our template in: <?php /* example.php */
/* Step 1: Include the VOOT class definition: */
require_once("Voot.class.php");
/* Step 2: Instantiate a new Voot object with our template: */
$myVoot = new Voot("template.html");
/* Step 3: Set the values for the placeholders in the template: */
$myVoot->setElement("HEAD_TITLE", "Templates are Handy");
$myVoot->setElement("PAGE_TITLE", "Create pages with VOOT!");
$myVoot->setElement("CONTENT", "<p>Why maintain multiple static pages
when you can use a single template instead?</p>");
/* Step 4: Render the page: */
$myVoot->render();
?>When viewed in a browser, the above script would look like this: ![]() The rendered template as it appears in a browser.
The HTML source of the rendered template looks like this: <!-- template.html -->
<html>
<head>
<title>Templates are Handy</title>
</head>
<body>
<h1>Create pages with VOOT!</h1>
<div>
<p>Why maintain multiple static pages
when you can use a single template instead?</p>
</div>
</body>
</html>This is a very basic example; VOOT also has additional functionality for sending user-defined HTTP headers ahead of the rendered template, saving the rendered template to disk, and executing PHP code embedded in templates. VOOT is released under the GNU General Public License, and is available for download at http://andy.greyledge.net/voot/index.php. At Valley Presbyterian Hospital I was responsible for ongoing maintenance of the Intranet as well as the development of new applications. ![]() The Valley Presbyterian Hospital Intranet home page.
The Intranet home page features a basic news system, with news items stored in a PostgreSQL database. Primary navigation links are located at the top of the page; links on the left side of the page change contextually depending on which section of the Intranet the user is visiting. All navigation buttons are highlighted with DHTML upon mouseover to aid user navigation. ![]() The VPH Patient Education Handouts screen
One of the major uses of the hospital intranet is the organization of the many forms and documents used by the Nursing Staff. Documents are stored Adobe Acrobat PDF format and cataloged for keyword searches by the ht://Dig search engine. Documents are also browseable by category. The Patient Education Handouts section organizes documents by language, allowing easy access to multiple versions of the same information sheet. Separate links are provided for printing or viewing the documents; 'View' will open the PDF file in a browser window, and 'Print' silently prints the document using the ActivePDF PDFPrint browser plugin; The document goes directly to the printer without opening a new window or requiring the user to click a Print button. ![]() The Valley Presbyterian Hospital intranet Risk Management section.
In addition to providing important safety information for employees, the Risk Management section of the intranet provides access to some third-party services. I was responsible for working with IS Staff and vendors to integrate these features into the intranet: MSDS Database. Employees can search for and print MSDS (Material Safety Data Sheets) from PROSAR. Occurrence Reporting. Using the WebEnvision component of the RiskEnvision system, employees can anonymously report safety-related incidents. The most complex project I developed at the hospital was a PHP/PostgreSQL system for tracking skill competencies for the nursing staff, to replace the paper system that was in use at the time. For each nursing position in each department there's a list of skills, or "Orientation Tool", that the employee must demonstrate they're capable of performing. As new employees show they can perform their duties, the appropriate skills on each Orientation Tool are digitally signed by a preceptor. Once all of the skills on an Orientation Tool are complete, a nurse from the Education department signs the tool, and finally a Nurse Manager signs the tool to declare that employee officially competent to perform all of the duties required by their job description. Since some of the same skills may belong to more than one Orientation Tool, and since each employee may be assigned multiple Orientation Tools that might have overlapping skills, the application keeps track of skills separately from Orientation Tools; in this way the employee only needs to demonstrate that they can administer an IV line once, and that competency will automatically show up as completed for that employee in any other positions that require the employee to administer an IV. The application has several secure menus for the different steps of the process (Nursing staff, Preceptors, Educators, and Nurse Managers) as well as a tool for defining new skills, creating new Orientation Tools, and linking skills to Orientation Tools. In addition to the core system for tracking and storing all of this information, there are a number of scripts that generate reports for the Educators and Nurse Managers, so they can keep track of which employees have tools needing completion, or to aid in scheduling by allowing the Nurse Managers to search for all employees who are competent in a specific position. ![]() The "Ort Tools Status Overview" screen allows Educators and Nurse Managers to see at a glance which Orientation tools have been assigned to which employees, and which ones have been completed. The lettered links at the top of the page make it possible to quickly jump to any given employee.
![]() Once an Orientation tool is complete, a report is automatically e-mailed to the Nursing Administration office. Comprehensive information about the satisfactory completion of each skill on the tool is displayed.
FLWFinder was a PQA (Palm Query Application, also known as "Web Clipping Application") for looking up the addresses of Frank Lloyd Wright-designed buildings from any PalmOS handheld with an internet connection. The backend consisted of a set of PHP scripts which in turn accessed a MySQL database. Users could search for the addresses of nearby Wright buildings in the United States by city, state, or zip code. When available, directions, hours, and admission fees were also provided for Wright structures open to the public. Additionally, there was a screen allowing user submissions of buildings not in the database. Because I released FLWFinder as a completely free piece of software that did nothing but positively promote the legacy of Wright's architecture, I didn't think anything of using the initials FLW or the name Frank Lloyd Wright in the name or content of the project. Nevertheless, shortly after its release, I was contacted by the Frank Lloyd Wright foundation and asked to immediately take it offline.
![]() The main screen of FLWFinder as it appeared on a 160x160 PalmOS handheld LCD screen.
NoteThe terms FLW and Frank Lloyd Wright are registered trademarks of the Frank Lloyd Wright foundation. This web page was generated from a DocBook XML source document using Saxon. [Printer-friendly Version] |