Forum rules
Please read our Guide to Making Ozzu Tutorials if you would like to submit your own tutorials.
TUTORIAL: Fully Functional Simple Template Engine (Cont'd)
Introduction
This tutorial extends on the previous tutorial of the Fully Functional Simple Template Engine. There would be some functions edited and I would finally provide you with the caching capabilities here.
Before I start on this, let me confess... the caching class I'm about to unleash is not written by me... I found it somewhere here on OZZU and assumed it was ok for me to use... since it works just like I need it to, I didn't find any need to recode myself another one, even though I could (I promise... I really can
This tutorial is not, by any means, the last tutorial based on this Fully Functional Simple Template Engine... when I make enough edits to the class to fill up a big page with edits and if it teaches you with something... then I'll post another one here... but it could be the last
Added
Let's start by adding some more functions here: The function is called include_file.
<?php
<span style="color: #FF0000">function include_file($file)</span>
<span style="color: #FF0000">{</span>
<span style="color: #FF0000">}</span>
?>
<span style="color: #FF0000">function include_file($file)</span>
<span style="color: #FF0000">{</span>
<span style="color: #FF0000">}</span>
?>
- <?php
- <span style="color: #FF0000">function include_file($file)</span>
- <span style="color: #FF0000">{</span>
- <span style="color: #FF0000">}</span>
- ?>
The reason for it being is that sometimes you want to put in a filename to be set to a variable, but you don't want to actually include the contents of it into the template... so I made a simple solution here... for every file that you DON'T want to include into the file, just add a '*' in front of it... the '*' is perfect because it isn't allowed in the filename to be set when you create a file and it lets us create this functionality
<?php
function include_file($file)
{
<span style="color: #FF0000"> // Taking the first character from the filename</span>
<span style="color: #FF0000"> $find = substr($file, 0, 1);</span>
<span style="color: #FF0000"> // Checking if * exists in $filename</span>
<span style="color: #FF0000"> if($find != '*')</span>
<span style="color: #FF0000"> {</span>
<span style="color: #FF0000"> return true;</span>
<span style="color: #FF0000"> }</span>
<span style="color: #FF0000"> return false;</span>
}
?>
function include_file($file)
{
<span style="color: #FF0000"> // Taking the first character from the filename</span>
<span style="color: #FF0000"> $find = substr($file, 0, 1);</span>
<span style="color: #FF0000"> // Checking if * exists in $filename</span>
<span style="color: #FF0000"> if($find != '*')</span>
<span style="color: #FF0000"> {</span>
<span style="color: #FF0000"> return true;</span>
<span style="color: #FF0000"> }</span>
<span style="color: #FF0000"> return false;</span>
}
?>
- <?php
- function include_file($file)
- {
- <span style="color: #FF0000"> // Taking the first character from the filename</span>
- <span style="color: #FF0000"> $find = substr($file, 0, 1);</span>
- <span style="color: #FF0000"> // Checking if * exists in $filename</span>
- <span style="color: #FF0000"> if($find != '*')</span>
- <span style="color: #FF0000"> {</span>
- <span style="color: #FF0000"> return true;</span>
- <span style="color: #FF0000"> }</span>
- <span style="color: #FF0000"> return false;</span>
- }
- ?>
<?php
function include_file($file)
{
// Checking if * exists in $filename
if(strpos($file, '*') != false)
{
return true;
}
return false;
}
?>
function include_file($file)
{
// Checking if * exists in $filename
if(strpos($file, '*') != false)
{
return true;
}
return false;
}
?>
- <?php
- function include_file($file)
- {
- // Checking if * exists in $filename
- if(strpos($file, '*') != false)
- {
- return true;
- }
- return false;
- }
- ?>
The next function is what I named to be unclude_file. It generally does what the above function does, but it also removes the asterisk for sanitation.
<?php
<span style="color: #FF0000">function unclude_file($file, $perform = false)</span>
<span style="color: #FF0000">{</span>
<span style="color: #FF0000"> // Checking if the file was passed as an un-includeable</span>
<span style="color: #FF0000"> if($this->include_file($file) === false)</span>
<span style="color: #FF0000"> {</span>
<span style="color: #FF0000"> // Checking if we should actually remove the first character (It being the '*')</span>
<span style="color: #FF0000"> if($perform == true)</span>
<span style="color: #FF0000"> {</span>
<span style="color: #FF0000"> // Counting the number of letters $file consists of</span>
<span style="color: #FF0000"> $ltrs = strlen($file);</span>
<span style="color: #FF0000"> // Returning the trimmed $file</span>
<span style="color: #FF0000"> return substr($file, 1, $ltrs);</span>
<span style="color: #FF0000"> }</span>
<span style="color: #FF0000"> return true;</span>
<span style="color: #FF0000"> }</span>
<span style="color: #FF0000"> return false;</span>
<span style="color: #FF0000">}</span>
?>
<span style="color: #FF0000">function unclude_file($file, $perform = false)</span>
<span style="color: #FF0000">{</span>
<span style="color: #FF0000"> // Checking if the file was passed as an un-includeable</span>
<span style="color: #FF0000"> if($this->include_file($file) === false)</span>
<span style="color: #FF0000"> {</span>
<span style="color: #FF0000"> // Checking if we should actually remove the first character (It being the '*')</span>
<span style="color: #FF0000"> if($perform == true)</span>
<span style="color: #FF0000"> {</span>
<span style="color: #FF0000"> // Counting the number of letters $file consists of</span>
<span style="color: #FF0000"> $ltrs = strlen($file);</span>
<span style="color: #FF0000"> // Returning the trimmed $file</span>
<span style="color: #FF0000"> return substr($file, 1, $ltrs);</span>
<span style="color: #FF0000"> }</span>
<span style="color: #FF0000"> return true;</span>
<span style="color: #FF0000"> }</span>
<span style="color: #FF0000"> return false;</span>
<span style="color: #FF0000">}</span>
?>
- <?php
- <span style="color: #FF0000">function unclude_file($file, $perform = false)</span>
- <span style="color: #FF0000">{</span>
- <span style="color: #FF0000"> // Checking if the file was passed as an un-includeable</span>
- <span style="color: #FF0000"> if($this->include_file($file) === false)</span>
- <span style="color: #FF0000"> {</span>
- <span style="color: #FF0000"> // Checking if we should actually remove the first character (It being the '*')</span>
- <span style="color: #FF0000"> if($perform == true)</span>
- <span style="color: #FF0000"> {</span>
- <span style="color: #FF0000"> // Counting the number of letters $file consists of</span>
- <span style="color: #FF0000"> $ltrs = strlen($file);</span>
- <span style="color: #FF0000"> // Returning the trimmed $file</span>
- <span style="color: #FF0000"> return substr($file, 1, $ltrs);</span>
- <span style="color: #FF0000"> }</span>
- <span style="color: #FF0000"> return true;</span>
- <span style="color: #FF0000"> }</span>
- <span style="color: #FF0000"> return false;</span>
- <span style="color: #FF0000">}</span>
- ?>
Also, I add a variable to the whole class called include_files. It holds true if you want the files that are passed into the variable def. to be included into the template (As in their contents) or not included into the templates (Only the file names would be included... not the source).
<?php
class tpl {
// Various variables used throughout the class
public $vari, $template, $page, <span style="color: #0000FF">$vstart, $vend,</span> <span style="color: #FF0000">$include_files</span>;
}
?>
class tpl {
// Various variables used throughout the class
public $vari, $template, $page, <span style="color: #0000FF">$vstart, $vend,</span> <span style="color: #FF0000">$include_files</span>;
}
?>
- <?php
- class tpl {
- // Various variables used throughout the class
- public $vari, $template, $page, <span style="color: #0000FF">$vstart, $vend,</span> <span style="color: #FF0000">$include_files</span>;
- }
- ?>
Edited
Right, I said I edited some functions, so let's get on it
The first function I edited was the svariable to accommodate the include_file() function and the unclude_file() function. Here it is in it's full glory
<?php
function svariable($return = false)
{
// Converting set variables to the text defined in the parent PHP file
foreach($this->vari as $key => $value)
{
// Checking if the value is a file and if it exists if it is a file
if(is_file($value) && file_exists($value))
{
<span style="color: #FF0000"> if($this->include_files === true && ($this->include_file($value) === true))</span>
<span style="color: #FF0000"> {</span>
// Getting the contents of the file
$value = file_get_contents($value);
// Replacing the KEY variable with the contents of the file
$this->text = str_replace($this->vstart . $key . $this->vend, $value, $this->text);
<span style="color: #FF0000"> }</span>
<span style="color: #FF0000"> else</span>
<span style="color: #FF0000"> {</span>
<span style="color: #FF0000"> // Replacing the KEY variable with the value</span>
<span style="color: #FF0000"> $this->text = str_replace($this->vstart . $key . $this->vend, $value,$this->text);</span>
}
}
else
{
<span style="color: #FF0000"> if($this->unclude_file($value) === true)</span>
<span style="color: #FF0000"> {</span>
<span style="color: #FF0000"> $value = $this->unclude_file($value, true);</span>
<span style="color: #FF0000"> }</span>
// Replacing the KEY variable with the value
$this->text = str_replace($this->vstart . $key . $this->vend, $value,$this->text);
}
}
// Checking if we need to return the result
if($return)
{
return $this->text;
}
}
?>
function svariable($return = false)
{
// Converting set variables to the text defined in the parent PHP file
foreach($this->vari as $key => $value)
{
// Checking if the value is a file and if it exists if it is a file
if(is_file($value) && file_exists($value))
{
<span style="color: #FF0000"> if($this->include_files === true && ($this->include_file($value) === true))</span>
<span style="color: #FF0000"> {</span>
// Getting the contents of the file
$value = file_get_contents($value);
// Replacing the KEY variable with the contents of the file
$this->text = str_replace($this->vstart . $key . $this->vend, $value, $this->text);
<span style="color: #FF0000"> }</span>
<span style="color: #FF0000"> else</span>
<span style="color: #FF0000"> {</span>
<span style="color: #FF0000"> // Replacing the KEY variable with the value</span>
<span style="color: #FF0000"> $this->text = str_replace($this->vstart . $key . $this->vend, $value,$this->text);</span>
}
}
else
{
<span style="color: #FF0000"> if($this->unclude_file($value) === true)</span>
<span style="color: #FF0000"> {</span>
<span style="color: #FF0000"> $value = $this->unclude_file($value, true);</span>
<span style="color: #FF0000"> }</span>
// Replacing the KEY variable with the value
$this->text = str_replace($this->vstart . $key . $this->vend, $value,$this->text);
}
}
// Checking if we need to return the result
if($return)
{
return $this->text;
}
}
?>
- <?php
- function svariable($return = false)
- {
- // Converting set variables to the text defined in the parent PHP file
- foreach($this->vari as $key => $value)
- {
- // Checking if the value is a file and if it exists if it is a file
- if(is_file($value) && file_exists($value))
- {
- <span style="color: #FF0000"> if($this->include_files === true && ($this->include_file($value) === true))</span>
- <span style="color: #FF0000"> {</span>
- // Getting the contents of the file
- $value = file_get_contents($value);
- // Replacing the KEY variable with the contents of the file
- $this->text = str_replace($this->vstart . $key . $this->vend, $value, $this->text);
- <span style="color: #FF0000"> }</span>
- <span style="color: #FF0000"> else</span>
- <span style="color: #FF0000"> {</span>
- <span style="color: #FF0000"> // Replacing the KEY variable with the value</span>
- <span style="color: #FF0000"> $this->text = str_replace($this->vstart . $key . $this->vend, $value,$this->text);</span>
- }
- }
- else
- {
- <span style="color: #FF0000"> if($this->unclude_file($value) === true)</span>
- <span style="color: #FF0000"> {</span>
- <span style="color: #FF0000"> $value = $this->unclude_file($value, true);</span>
- <span style="color: #FF0000"> }</span>
- // Replacing the KEY variable with the value
- $this->text = str_replace($this->vstart . $key . $this->vend, $value,$this->text);
- }
- }
- // Checking if we need to return the result
- if($return)
- {
- return $this->text;
- }
- }
- ?>
The cache
Alright, since I took this class from someone on this forum, I'll just post the whole entire class here (Without coloring it red... I have to color every line separately... ).
What it does though, is creates a file with the variables NOT replaced... it includes all the files first and then caches it. The id (or the name it would be saved on) is the file name... so if you are using a template more then once on different PHP files... don't cache it
<?php
class fcache {
var $name = NULL; // private members only >= PHP 5
var $value = array();
var $ttl;
function __construct($name, $ttl = 3600) { // Default $ttl is 3600 (60 minutes until expiry)
$this->name = $name;
$this->ttl = $ttl;
}
function check() {
$cached = false;
$file_name = './cache/' . $this->name . ".cache";
if(file_exists($file_name))
{
$modified = filemtime($file_name);
if(time() - $this->ttl < $modified)
{
$fp = fopen($file_name, "rt");
if($fp)
{
$temp_value = fread($fp, filesize($file_name));
fclose($fp);
$this->value = unserialize($temp_value);
$cached = true;
}
}
else
{
$this->del_value($this->name);
$this->set_value($this->name, $this->value);
$this->save();
}
}
return $cached;
}
function save() {
$file_name = './cache/' . $this->name . ".cache";
$fp = fopen($file_name, "wt");
if($fp)
{
fwrite($fp, serialize($this->value));
fclose($fp);
}
}
function set_value($key, $value) {
$this->value[$key] = $value;
}
function get_value($key) {
if(isset($this->value[$key]))
{
return $this->value[$key];
}
else
{
return null;
}
}
function del_value($key)
{
$file_name = './cache/' . $this->name . ".cache";
if(file_exists($file_name))
{
unset($this->value[$key]);
return unlink($file_name);
}
return false;
}
}
?>
class fcache {
var $name = NULL; // private members only >= PHP 5
var $value = array();
var $ttl;
function __construct($name, $ttl = 3600) { // Default $ttl is 3600 (60 minutes until expiry)
$this->name = $name;
$this->ttl = $ttl;
}
function check() {
$cached = false;
$file_name = './cache/' . $this->name . ".cache";
if(file_exists($file_name))
{
$modified = filemtime($file_name);
if(time() - $this->ttl < $modified)
{
$fp = fopen($file_name, "rt");
if($fp)
{
$temp_value = fread($fp, filesize($file_name));
fclose($fp);
$this->value = unserialize($temp_value);
$cached = true;
}
}
else
{
$this->del_value($this->name);
$this->set_value($this->name, $this->value);
$this->save();
}
}
return $cached;
}
function save() {
$file_name = './cache/' . $this->name . ".cache";
$fp = fopen($file_name, "wt");
if($fp)
{
fwrite($fp, serialize($this->value));
fclose($fp);
}
}
function set_value($key, $value) {
$this->value[$key] = $value;
}
function get_value($key) {
if(isset($this->value[$key]))
{
return $this->value[$key];
}
else
{
return null;
}
}
function del_value($key)
{
$file_name = './cache/' . $this->name . ".cache";
if(file_exists($file_name))
{
unset($this->value[$key]);
return unlink($file_name);
}
return false;
}
}
?>
- <?php
- class fcache {
- var $name = NULL; // private members only >= PHP 5
- var $value = array();
- var $ttl;
- function __construct($name, $ttl = 3600) { // Default $ttl is 3600 (60 minutes until expiry)
- $this->name = $name;
- $this->ttl = $ttl;
- }
- function check() {
- $cached = false;
- $file_name = './cache/' . $this->name . ".cache";
- if(file_exists($file_name))
- {
- $modified = filemtime($file_name);
- if(time() - $this->ttl < $modified)
- {
- $fp = fopen($file_name, "rt");
- if($fp)
- {
- $temp_value = fread($fp, filesize($file_name));
- fclose($fp);
- $this->value = unserialize($temp_value);
- $cached = true;
- }
- }
- else
- {
- $this->del_value($this->name);
- $this->set_value($this->name, $this->value);
- $this->save();
- }
- }
- return $cached;
- }
- function save() {
- $file_name = './cache/' . $this->name . ".cache";
- $fp = fopen($file_name, "wt");
- if($fp)
- {
- fwrite($fp, serialize($this->value));
- fclose($fp);
- }
- }
- function set_value($key, $value) {
- $this->value[$key] = $value;
- }
- function get_value($key) {
- if(isset($this->value[$key]))
- {
- return $this->value[$key];
- }
- else
- {
- return null;
- }
- }
- function del_value($key)
- {
- $file_name = './cache/' . $this->name . ".cache";
- if(file_exists($file_name))
- {
- unset($this->value[$key]);
- return unlink($file_name);
- }
- return false;
- }
- }
- ?>
Now we have to put that into our gentemp.
<?php
function gentemp(<span style="color: #FF0000">$cache = false, </span>$return = false)
{
// Converting simple function variables to function
$this->sfvariable();
<span style="color: #FF0000"> // Checking if the page needs to be cached... if so, cache it.</span>
<span style="color: #FF0000"> if($cache)</span>
<span style="color: #FF0000"> {</span>
<span style="color: #FF0000"> // Setting the cache class object</span>
<span style="color: #FF0000"> $cache = new fcache($this->page);</span>
<span style="color: #FF0000"> // Checking if the cache is available for the current page</span>
<span style="color: #FF0000"> if($cache->check())</span>
<span style="color: #FF0000"> {</span>
<span style="color: #FF0000"> // Retrieving the cached contents of the page</span>
<span style="color: #FF0000"> $this->text = $cache->get_value($this->page);</span>
<span style="color: #FF0000"> }</span>
<span style="color: #FF0000"> else</span>
<span style="color: #FF0000"> {</span>
<span style="color: #FF0000"> // Setting the cache with the contents of the current page</span>
<span style="color: #FF0000"> $cache->set_value($cache->name, $this->text);</span>
<span style="color: #FF0000"> // Saving the cache</span>
<span style="color: #FF0000"> $cache->save();</span>
<span style="color: #FF0000"> // Retrieving the cached contents of the page</span>
<span style="color: #FF0000"> $this->text = $cache->get_value($this->page);</span>
<span style="color: #FF0000"> }</span>
<span style="color: #FF0000"> }</span>
// Converting simple variables to variables
$this->svariable();
// Checking if we need to echo or return the page
if($return)
{
// Returning the page
return $this->text;
}
else
{
// Echoing the page
echo $this->text;
}
}
?>
function gentemp(<span style="color: #FF0000">$cache = false, </span>$return = false)
{
// Converting simple function variables to function
$this->sfvariable();
<span style="color: #FF0000"> // Checking if the page needs to be cached... if so, cache it.</span>
<span style="color: #FF0000"> if($cache)</span>
<span style="color: #FF0000"> {</span>
<span style="color: #FF0000"> // Setting the cache class object</span>
<span style="color: #FF0000"> $cache = new fcache($this->page);</span>
<span style="color: #FF0000"> // Checking if the cache is available for the current page</span>
<span style="color: #FF0000"> if($cache->check())</span>
<span style="color: #FF0000"> {</span>
<span style="color: #FF0000"> // Retrieving the cached contents of the page</span>
<span style="color: #FF0000"> $this->text = $cache->get_value($this->page);</span>
<span style="color: #FF0000"> }</span>
<span style="color: #FF0000"> else</span>
<span style="color: #FF0000"> {</span>
<span style="color: #FF0000"> // Setting the cache with the contents of the current page</span>
<span style="color: #FF0000"> $cache->set_value($cache->name, $this->text);</span>
<span style="color: #FF0000"> // Saving the cache</span>
<span style="color: #FF0000"> $cache->save();</span>
<span style="color: #FF0000"> // Retrieving the cached contents of the page</span>
<span style="color: #FF0000"> $this->text = $cache->get_value($this->page);</span>
<span style="color: #FF0000"> }</span>
<span style="color: #FF0000"> }</span>
// Converting simple variables to variables
$this->svariable();
// Checking if we need to echo or return the page
if($return)
{
// Returning the page
return $this->text;
}
else
{
// Echoing the page
echo $this->text;
}
}
?>
- <?php
- function gentemp(<span style="color: #FF0000">$cache = false, </span>$return = false)
- {
- // Converting simple function variables to function
- $this->sfvariable();
- <span style="color: #FF0000"> // Checking if the page needs to be cached... if so, cache it.</span>
- <span style="color: #FF0000"> if($cache)</span>
- <span style="color: #FF0000"> {</span>
- <span style="color: #FF0000"> // Setting the cache class object</span>
- <span style="color: #FF0000"> $cache = new fcache($this->page);</span>
- <span style="color: #FF0000"> // Checking if the cache is available for the current page</span>
- <span style="color: #FF0000"> if($cache->check())</span>
- <span style="color: #FF0000"> {</span>
- <span style="color: #FF0000"> // Retrieving the cached contents of the page</span>
- <span style="color: #FF0000"> $this->text = $cache->get_value($this->page);</span>
- <span style="color: #FF0000"> }</span>
- <span style="color: #FF0000"> else</span>
- <span style="color: #FF0000"> {</span>
- <span style="color: #FF0000"> // Setting the cache with the contents of the current page</span>
- <span style="color: #FF0000"> $cache->set_value($cache->name, $this->text);</span>
- <span style="color: #FF0000"> // Saving the cache</span>
- <span style="color: #FF0000"> $cache->save();</span>
- <span style="color: #FF0000"> // Retrieving the cached contents of the page</span>
- <span style="color: #FF0000"> $this->text = $cache->get_value($this->page);</span>
- <span style="color: #FF0000"> }</span>
- <span style="color: #FF0000"> }</span>
- // Converting simple variables to variables
- $this->svariable();
- // Checking if we need to echo or return the page
- if($return)
- {
- // Returning the page
- return $this->text;
- }
- else
- {
- // Echoing the page
- echo $this->text;
- }
- }
- ?>
Example usage
Now, an example use of this whole thing would be on the first part of this tutorial (???) or below
process.php
<?php
require('includes/globals.php');
$db->connect();
$db->last_sql = $db->build_query(array('*', 'forum_a'));
$result = $db->last_sql_data(false, 'SQL Results Data', true);
$db->close();
$tpl->template = 'default';
$tpl->page = 'index';
$tpl->start();
include('includes/global_vars.php');
$tpl->vari = array_merge($tpl->vari, array(
'SQL_QUERY' => $result,
'MEMBER_STUFF' => ((isset($_SESSION['uid'])) ? 'members.html' : 'non_members.html'),
'USERNAME' => $username,
'LAST_VISIT' => date(MM/DD/YYYY hh:mm:ss, $last_visit)
'NOW_DATE' => date(MM/DD/YYYY hh:mm:ss)
));
$tpl->gentemp(true);
?>
require('includes/globals.php');
$db->connect();
$db->last_sql = $db->build_query(array('*', 'forum_a'));
$result = $db->last_sql_data(false, 'SQL Results Data', true);
$db->close();
$tpl->template = 'default';
$tpl->page = 'index';
$tpl->start();
include('includes/global_vars.php');
$tpl->vari = array_merge($tpl->vari, array(
'SQL_QUERY' => $result,
'MEMBER_STUFF' => ((isset($_SESSION['uid'])) ? 'members.html' : 'non_members.html'),
'USERNAME' => $username,
'LAST_VISIT' => date(MM/DD/YYYY hh:mm:ss, $last_visit)
'NOW_DATE' => date(MM/DD/YYYY hh:mm:ss)
));
$tpl->gentemp(true);
?>
- <?php
- require('includes/globals.php');
- $db->connect();
- $db->last_sql = $db->build_query(array('*', 'forum_a'));
- $result = $db->last_sql_data(false, 'SQL Results Data', true);
- $db->close();
- $tpl->template = 'default';
- $tpl->page = 'index';
- $tpl->start();
- include('includes/global_vars.php');
- $tpl->vari = array_merge($tpl->vari, array(
- 'SQL_QUERY' => $result,
- 'MEMBER_STUFF' => ((isset($_SESSION['uid'])) ? 'members.html' : 'non_members.html'),
- 'USERNAME' => $username,
- 'LAST_VISIT' => date(MM/DD/YYYY hh:mm:ss, $last_visit)
- 'NOW_DATE' => date(MM/DD/YYYY hh:mm:ss)
- ));
- $tpl->gentemp(true);
- ?>
That true in the gentemp( in the piece of code above tells the code to cache it as well.
And the template file could look like
<!-- INCLUDE header.html -->
<div id="content">
<h6 id="header">Welcome {USERNAME} your last visit was {LAST_VISIT} from today ({NOW)DATE})</h6>
<p>{MEMBER_STUFF}</p>
<p>{SQL_QUERY}</p>
</div>
<!-- INCLUDE footer.html -->
<div id="content">
<h6 id="header">Welcome {USERNAME} your last visit was {LAST_VISIT} from today ({NOW)DATE})</h6>
<p>{MEMBER_STUFF}</p>
<p>{SQL_QUERY}</p>
</div>
<!-- INCLUDE footer.html -->
- <!-- INCLUDE header.html -->
- <div id="content">
- <h6 id="header">Welcome {USERNAME} your last visit was {LAST_VISIT} from today ({NOW)DATE})</h6>
- <p>{MEMBER_STUFF}</p>
- <p>{SQL_QUERY}</p>
- </div>
- <!-- INCLUDE footer.html -->
Hope that made sense
Conclusion
Well, this is it for now. Hope you enjoyed it and would find a good use for it
Attachments:
Learn PHP | I got 10 PHP tutorials! Check them out!
Dreamtale - Farewell
Just a note... I've giving up on web development and that stuff... Just lost all interest in it.
Dreamtale - Farewell
Just a note... I've giving up on web development and that stuff... Just lost all interest in it.
- Anonymous
- Bot


- Joined: 25 Feb 2008
- Posts: ?
- Loc: Ozzuland
- Status: Online
March 4th, 2009, 4:58 pm
The usage tutorial has being Created. Check it out to find out the usability of the class. I hope I was descriptive in it... if I wasn't, feel free to reply to the usage tutorial with any questions you may have.
Learn PHP | I got 10 PHP tutorials! Check them out!
Dreamtale - Farewell
Just a note... I've giving up on web development and that stuff... Just lost all interest in it.
Dreamtale - Farewell
Just a note... I've giving up on web development and that stuff... Just lost all interest in it.
An even simpler template class was created by Rabid Dog with a little less capabilities, and same functionality arrived at a different way.
Learn PHP | I got 10 PHP tutorials! Check them out!
Dreamtale - Farewell
Just a note... I've giving up on web development and that stuff... Just lost all interest in it.
Dreamtale - Farewell
Just a note... I've giving up on web development and that stuff... Just lost all interest in it.
Page 1 of 1
To Reply to this topic you need to LOGIN or REGISTER. It is free.
Post Information
- Total Posts in this topic: 3 posts
- Moderator: Tutorial Writers
- Users browsing this forum: No registered users and 2 guests
- You cannot post new topics in this forum
- You cannot reply to topics in this forum
- You cannot edit your posts in this forum
- You cannot delete your posts in this forum
- You cannot post attachments in this forum


