WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDESPHP CLASSESCODE SEARCHARTICLES SEARCHPHP FORUMSPHP MANUALPHP FUNCTIONS LISTWEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Join us on FaceBook
Submit a code Example / Snippet Submit Your Code
Poker Tournaments Poker Tournaments
Poker Guide for Developers Poker Guide for Developers
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Resources
Web Development Content
Internet Security Software
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
פרייסז - הכח לקנות עובר לידיים שלך
Texas Holdem Poker Evangelists

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : XTemplate, a template class for PHP
Categories : PHP Classes, HTML and PHP, PHP Update Picture
barnabas debreceni
Date : Jun 14th 2000
Grade : 2 of 5 (graded 4 times)
Viewed : 11130
File : xtemplate-0.2.4.zip
Images : No Images for this code example.
Search : More code by barnabas debreceni
Action : Grade This Code Example
Tools : My Examples List

Submit your own code examples  Submit your own code examples 
 

template engine for php, allows to store your html code apart from your php code.
(tested with php 3.0.11)

features:
        -simple variable interpolation ( {STUFF} )
        -array variable interpolation                
         for eg. {ROW.ID} {ROW.NAME} {ROW.WHATEVER}, you assign an array to the variable ROW once
        -global PHP variables available without making assigns
         for eg. {PHP.HTTP_HOST} {PHP.PHP_SELF} or any variable: {PHP.session_id}
        -assign using arrays
        for eg. $xtpl->assign(array(STUFF=>"kewlstuff",ROW=>$row));
        -default nullstring for unassigned variables and unparsed blocks,
         custom nullstring for every variable or block
        -dynamic blocks:
                -multiple level dynamic blocks (nested blocks)
                -autoreset feature (do not reset subblocks when reparsing parent block)
                -recursive parse to parse all subblocks of a block
        -file(template) include: {FILE "another.template.xtpl"}, the included templates can
         also contain includes recursively.. uses fopen so you can include http:// and ftp:// files too
        -very simple and powerful syntax, you'll love it :)

the code is very short and very optimized, according to my speed tests it's the
fastest template engine around which can do nested blocks and variables..

the basic syntax is from FastTemplate and QuickTemplate (http://phpclasses.upperdesign.com/browse.html/package/49),
but the entire class was written by me from scratch in one day, without a line from other
template engines. THIS IS NOT A REWRITE OF OTHER ENGINES!
the algorithm used makes this code amazing fast, you can do a bunch of
nested dynamic blocks and everything you want, because it doesn't use recursive calls
to build up the block tree.

contains 7 examples (which covers all features i think),
i tried to write them so even newbies should understand easily.

docs and some functions i didn't need (clearing variables, etc) are still missing, but they'll come.

current version is 0.2.4, tested it more & more.

licensed LGPL.



Automatic generation of HTML code for a table. OO interface. Can define colspan, rowspan, table style, cell style, and data style. Simple, but effective.
Categories : PHP, PHP Classes, HTML, HTML and PHP
Football News Aggregator
Categories : PHP, Object Oriented, PHP Classes, Rich Site Summary (RSS), HTML and PHP
A script to generate a report from a valid mysql connection. The user has to supply which fields he wants to display in table. All properties are changable.
Categories : PHP, PHP Classes, Databases, MySQL, HTML and PHP
Class to build a select tag in html, useful to build select boxes from a data base
Categories : PHP, HTML and PHP, PHP Classes
How To Create a PDF Using PHP
Categories : PHP, PDF, PHP Classes, HTML and PHP
Simple class to build tables with style sheets
Categories : HTML and PHP, PHP Classes, PHP
Customizable Calendar Class
Categories : HTML and PHP, Date Time, PHP, PHP Classes, Calendar
phpFormGenerator for Dynamic Form Generation from MySQL
Categories : PHP, PHP Classes, MySQL, Databases, HTML and PHP
PHP3: Formmail. Just a cgi formmail, but than in PHP. It is easy to use!
Categories : HTML and PHP, Email, PHP, Perl, HTML and PHP
Vote-Poll script that has a wrapper class that allows the user to create multiple polls on the same page with little trouble.
Categories : PHP, PHP Classes, HTML and PHP
class formHTML build your HTML Forms from PHP
Categories : PHP, PHP Classes, HTML and PHP, HTML
A simple class with some HTML output functions that would come in handy for consistent page layout etc.
Categories : PHP, PHP Classes, HTML and PHP, HTML, Navigation
A class for sending email; it has support for To:, Cc:, Bcc: and Reply-To: headers. It requires that you have sendmail installed.
Categories : Email, PHP Classes, PHP
Multiple Select box, Select multiple Items from Menu.List box
Categories : PHP, HTML and PHP, Beginner Guides
This script contains 2 functions: 1 to create html select object based on your own customer date format entry- "M d Y h:i.... etc". The second function processes the select object on submit back to unix time.
Categories : PHP, Calendar, Date Time, HTML and PHP