PHP
  Home arrow PHP arrow Page 4 - Building a Site Engine with PHP, Part 4
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Building a Site Engine with PHP, Part 4
By: James Murray
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 24
    2004-07-12


    Table of Contents:
  • Building a Site Engine with PHP, Part 4
  • You’ve been Tagged
  • Give it a Little Class:
  • The Final Words

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Building a Site Engine with PHP, Part 4 - The Final Words
    ( Page 4 of 4 )

    It’s not hard to create your own tags; all you have to do is send them to the array of tags. Here’s a small example, if you wanted tags that will show the date and time -- all you’d have to do is put in the following code, after you’ve declared the template class.

    $template->tags['date']=date("l F, j Y");

    $template->tags['time']=date("g:i:sa");

    Then anywhere you have the tag that looks like <!date>, it will show the date like this: Thursday June, 10 2004, and the <!time> tag will show the time like this: 2:17:04pm. On top of that a tag can show anything -- a tag can be an include, a string, even an image. For example, if you do this $template->tags['test']="foo"; the tag <!test> will show the word “Foo”. It’s pretty cool if you ask me.

    To add columns to your layout, all you have to do is add them to the template file named column4, column5 and so on.

    Well that’s about it for this article. In the fifth and final article I’ll show you what you need to do to add plug-ins , modules, and blocks to the engine.



     
     
    >>> More PHP Articles          >>> More By James Murray
     

       

    PHP ARTICLES

    - Using Directory Iterators to Build Loader Ap...
    - Using the spl_autoload() Functions to Build ...
    - Working Out of the Object Context to Build L...
    - Using the _autoload() Magic Function to Buil...
    - The Destruct Magic Function in PHP 5
    - The Autoload Magic Function in PHP 5
    - Developing a Recursive Loading Class for Loa...
    - The Sleep and Wakeup Magic Functions in PHP 5
    - Using the Clone Magic Function in PHP 5
    - Including Files Recursively with Loader Appl...
    - The Call Magic Function in PHP 5
    - Designing a Captcha System with PHP and MySQL
    - Using Static Methods to Build Loader Apps in...
    - The Isset and Unset Magic Functions in PHP 5
    - Advanced PHP Form Input Validation to Check ...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
    Stay green...Green IT