GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 14-Jul-2004, 22:59
Div's Avatar
Div Div is offline
Moderator
 
Join Date: May 2002
Posts: 996
Div has a spectacular aura aboutDiv has a spectacular aura about
Exclamation

Need suggestions on a template system


I am in somewhat desperate need for a php based template system. I have had good luck Templatepower but it seems to have broken on my current webhost. I can't really figure out why...so I am looking to try out some other options (not Smarty).

I am looking for a simple system...my alternative will be to just use php includes.
__________________
Web Hosting Tips | Career Advice
  #2  
Old 15-Jul-2004, 10:26
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
I have tried many ideas to create my own PHP template system. I am still refining it, still haven't plugged in the "conditional" template functionality to it so I still have much to do to be able to share the PHP class with you.

However, I can tell you what it uses to get the job done... You just prepare your HTML templates and store them in a convenient place (like a database table). In your templates, you just assign $variable names where you want your dynamic data to appear.

In your scripts, you just gather the dynamic data into variables or into an array (say $TPL_VARS['variable']) and pass it to a function that simply extract()s $TPL_VARS and eval()s the template string...

VERY simple idea, not original of course but it get's the job done very well.
 
 

Recent GIDBlogProblems with the Navy (Chiefs) by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
hashing help saiz66 C++ Forum 1 06-Jul-2004 07:16
how do you seo a content management system JUNK KED Search Engine Optimization Forum 4 07-Jun-2004 23:50
How do I detect flash version on my computer system? rhino1616 Graphics Forum 2 23-Oct-2003 10:14
i = system ("cd c:\text"); :( kyle C Programming Language 1 25-Aug-2003 12:43
Link to our site suggestions / ideas jrobbio Advertising & Affiliates Forum 2 02-Apr-2003 03:37

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 07:40.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.