What I've don't thus far is write a class DefineTemplate() which is as such:
Code: Select all
function ParseFile($file_name)
{
$this->read = str_replace("|screenshot|" , "Pantheon" , $this->read);
$this->read = str_replace("|filesize|" , "Pantheon" , $this->read);
$this->read = str_replace("|filename|" , "Pantheon" , $this->read);
$this->read = str_replace("|screenshot|" , "Pantheon" , $this->read);
$this->read = str_replace("|screenshot|" , "Pantheon" , $this->read);
}Basically, adding a key and a value will create a definition for you. The only problem is, some of these values will be SQL queries (some of them will have to be mysql arrays themselves).
What method do you folks think I should use to create a good templating system?