View Single Post
Old 02-08-2008, 06:14 PM   #8 (permalink)
ReSpawN
The Frequenter
 
ReSpawN's Avatar
 
Join Date: Nov 2007
Location: Netherlands
Posts: 460
Thanks: 49
ReSpawN is on a distinguished road
Default

Project suReality
  • MySQL Class [100%]
  • Email Handeling Class [50%]
  • Session & User Management [0%]
  • Module Management [0%]
  • Template Class [30%]
TlcAndres replied to my question about where to start with a Cache Class. First off, what is that supposed to be?

Second, I am currently developing my own template class but so far it's going pretty crappy. I've used a class with functions calling up a document where the layout is defined, and which includes an other file as well.

PHP Code:
       function constructFooter() {
                global 
$systemCore$config$db$pageStart;
                if (
file_exists('templates/'.$systemCore['system']['template'].'/general.footer.php')) {
                    require_once(
'templates/'.$systemCore['system']['template'].'/general.footer.php');
                } else {
                    echo 
'Could not retrieve general.footer.php';
                }
            } 
As you can see, I have to globalise some of the functions my system uses in order to make it work propperly. Is this the best way or can somebody please give me an example to use?
__________________
"Life is a bitch, take that bitch on a ride"
Send a message via MSN to ReSpawN
ReSpawN is offline  
Reply With Quote