SmarTemplates Engine 2.5.0
 http://smartemplates.php4arab.info/
Supported By SourceForge.NETSupported By PHP4ARAB.info

 Copyright (C) 2002 Salah Faya ([email protected])

LICENSE POLICTY | UPDATES | HOMEPAGE | DOWNLOADS | DOCUMENTS Language

SmarTemplates Engine

ABOUT

SmarTemplates is a very fast way to process html templates from within php scripts.It gives the html designer a lot more control than any other templates-script as well as it gives the php scriptor a piece of mind, It depends on HTML-like tags instead of comments tags or square brackets, compatible with HTML and soon XHTML and XML.

It has special support for Arabic Language such as: arabic/hejri date proffesional formating and Countable quantities processing.

SmarTemplates concentrates more into giving HTML-Designer control without the need of being PHP expert by making templates codes easier to understand, more customizable and WYSIWYG-editors compatible.

HIGHLY RECOMMENDED: Subscribe to SmarTemplates private mailing list to receive important notices regarding SmarTemplates development and usage
Your email address

FEATURES

  • SmarTemplates is easy to use with any PHP Script
  • Depends on Markup-Tags in the syntax <st-tag property="value">inners</st-tag> which makes it XHTML compatible, and easy to understand
  • SmarTemplates also supports other syntax like <$variable>, and for easier formating
  • With SmarTemplates you can easily make great dynamic templates because most of ST-Tags are customizable
  • SmarTemplates allows templates to make loops, control-structures, read from MySQL database and format output using special functions
  • SmarTemplates has special support for Arabic templates needs, such as professional Arabic/Hejri dates converting and smart countable quantities representing and more.
  • SmarTemplates can automatically divide data into parts/pages

You can get to know more of SmarTemplates features reading the following fast HOWTO document:

HOWTO USE SMARTEMPLATES

If your PHP application produces HTML output, so you're certainly going to need SmarTemplates, SmarTemplates will allow you to separate the programming part and the HTML-design part. That means you can easily change the look at any time, make different interfaces, styles and faces for your application without reprogramming.

To use SmarTemplates be sure to  download the latest version, extract the files into your application folder and include it in your script:


                    include "SmarTemplates.php";

Now define your variables the way you used to, and load the template file by performing STTransFile explained in the example:


                    $A = 10;
                    $B = 'Test';
                    $template_file = 'example.html';
                    print $ST->STTransFile( $template_file, compact('A', 'B') );

Your template file can be a normal HTML file, but you can use the special ST-Tags to perfrom special output. Your example.html file can be like this:


                    <HTML>
                           <BODY BGCOLOR= '#FFFFFF'>
                                   <P>Today is <ST-ECHO FORMAT="l, d-m-Y">$current_time</ST-ECHO></P>
                                   <P>B is <$B></P>
                                   <P>
                                          <ST-IF EXPRESSION="$A=10">
                                                 
A has a 10 value
                                          </ST-IF><ST-ELSE>
                                                
A doesn't equal 10
                                          </ST-ELSE>
                                   </P>

                           </BODY>
                    </HTML>

When you run your script, the output will be:

Today is  Tuesday, 15-06-2004

B is  test

A has a 10 value


DOCUMENTATION
To know what are the available ST-TAGS and how to use them please read the ST-TAGS document  http://smartemplates.php4arab.info/document.php

BUGS
There're serveral known bugs which we're working on now, you can view information about current bugs or submit a new bug in the bugs online system  http://sourceforge.net/tracker/?atid=523939&group_id=69260&func=browse


SUPPORT
Need support?, have questions? visit the discussion forums or use the Support Request System. If you want to request a feature please visit https://sourceforge.net/tracker/admin/?atid=523942&group;_id=69260.

USING, MODIFYING AND COPYING (LICENSE POLICY)
SmarTemplates is licensed under the  GPL license GNU General Public License, http://www.gnu.org/copyleft/gpl.html.
SmarTemplates is also available under commercial non-GPL license. Please read the  LICENSE POLICY