Template engine etc |
| |||
Hi, is been a few days now and i snooped around the code. My girlfriend is a few days not here, so i have much more time for coding ;) So now to the thread title.. As i said i looked around in the code and my feature request is a more that code and html are separeted from each other. I don't know how the project members thing about adding a template engine like (the evil ^^) Smarty engine as an example. Because they got a own template system running. I try to code in a template engine after i did more cleaning and adding small feature. Hope i can get it running. Greetings
|
| |||
seperating code from presentation would be a great idea. This is how it works in phpBB and I find it makes things a lot easier when making new themes and editing existing to suit a website
|
| |||
try to use raintpl (google for it) it is easy clean engine and I thing you will succeed on that Adil
|
| |||
[quote=adil]try to use raintpl (google for it) it is easy clean engine and I thing you will succeed on that Adil [/quote] Hi, yeah i know RainTPL i found it great at the first place but they're many feature missing and its buggy. I always tried to avoid Smarty but its good and well its popular. The thing is with the sourcecode of JCow its messy.. i thing ;) So the next days i will try first to clean the whole sourcecode and then try to add more small things for it. After i did that and figure it out how JCow works i will give it a try and implent Smarty. Wish me luck =) Greetings
|
| |||
[quote=eeji]seperating code from presentation would be a great idea. This is how it works in phpBB and I find it makes things a lot easier when making new themes and editing existing to suit a website [/quote] Yeah you're right, with a php and html code seperating the whole theme designing will grow much more. As you see now they're not many, in fact almost to none custom themes. I thing must people are more into HTML coding and don't know about PHP coding at all. What is more pleasing for theme design? Example 1 a snippet from the network statistics: <strong>'.$stats['members'].'</strong> '.t('Members').'<br/> Example 2 how i thing it should be: As you see in example 2 we first use Smarty and got an {$lang_members} "what is that?" you maybe ask yourself. Well.. "why do always a database query for one segment of a text?" Store it in an extra file for different languages example: "jcow_en.php" store the values they're almost like the install language file and assign this array or value to Smarty.
|