Heal Your Church WebSite

Teaching, rebuking, correcting & training in righteous web design.

phpHtmllib – check it out

Here’s a nice not-so-little library I ran across this morning … for those of you using the PHP programming language to drive your church web sites, this might provide an organized and efficient way to deliver your compelling dynamic content … or at least keep your scripts a bit neat and clean. I especially like the “widgets“:

About the phpHtmlLib:

phpHtmllib is a set of PHP classes and library functions to help facilitate building, debugging, and rendering of XML, HTML, XHTML WAP/WML Documents, and SVG (Scalable Vector Graphics) images as well as complex html ‘widgets’. It provides a mechanism to output perfectly indented/readable XML/HTML/XHTML/WML/SVG source, and a programmatic API to generating XML/HTML/XHTML/WML/SVG on the fly.

Background :

The author’s original idea was to create a class based methodology for rendering HTML to avoid in-line HTML in his PHP scripts. PHP’s OOP support with classes seemed like a logical of implementing this mechanism, since HTML does seem to lend itself well to OOP.

Features :

  • PHP classes and functions to build XML/HTML/XHTML/WML/SVG tags.
  • Every XML/HTML/XHTML/WML/SVG tag is a PHP class. Common, standardized API for building tags, their attributes, and adding content to the tag (object).
  • Renders nicely indented XML/HTML/XHTML/WML/SVG source code, for easy reading/debugging. To see this in action, view source on this page.
  • Powerful “Debugging” capability – The lib renders a viewable version of source code in color-coded output. This also includes links in the source code view on certain tag’s attribute values. For example, click the “DEBUG this page” link to view the debug feature built into the classes. NOTICE this is NOT just a header directive for Content-Type: text/plain. ALSO: There are clickable links on the <LINK> href attribute, as well as <img> src attribute. This can be helpful for debugging pages.
  • Render an entire document in HTML 4.0 or XHTML 1.0 (STRICT, TRANSITIONAL, or FRAMESET) compatible source, by setting 1 flag.
  • Render an entire properly formatted XML/WML/SVG document
  • Notifies the programmer, which HTML tags are deprecated by the W3C.
  • Utility/library functions that help build some of the more common tag objects.
  • Power ‘Widget’ system for building complex HTML/XHTML ‘widgets’ into easy to use php classes.

Comments are closed.