.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Programming (http://forums.bots-united.com/forumdisplay.php?f=25)
-   -   Stab at Smarty Template Class (PHP) (http://forums.bots-united.com/showthread.php?t=5349)

Ancient 05-06-2006 00:55

Stab at Smarty Template Class (PHP)
 
I took a stab at smarty template class, its pretty simple and easy.

in tpl file must have {$variable} have to have $ seems quite weird.

So far all I got is the template somewhat working; CSS Styles don't work at all and can't have it in the tpl file or it will go nuts and will say, unable to read var from "filename.php".

I haven't yet intergrated MySQL, and I don't think css would work because of mysql.

http://www.cfe-clan.com/smarty-temp/
is what I got so far.

http://server3.cfe-clan.com/smarty-temp.zip
1 MB (extracted)

Maybe someone can help me with the CSS Styles to work in Templates? I am not that experienced in PHP and hopefully someone will help rescue me from this disaster.

I'm currently working on a CS Site for some selected maps and waypoints, and stuff. :) it's been hell so far.

jeefo 06-06-2006 19:20

Re: Stab at Smarty Template Class (PHP)
 
You're probably forget add
PHP Code:

<link href="style.css" rel="stylesheet" type="text/css"

To the head tag of main page :) or it's point to wrong filename, or file that not lie in this directory.

[edit]
Not dl this stuff, since i can't now :), but style.css is in templates directory, so you probably must change
"style.css", to "templates/style.css"
[/edit]

Ancient 06-06-2006 19:29

Re: Stab at Smarty Template Class (PHP)
 
Code:

<link rel="stylesheet" type="text/css" href="style.css">
Is in the overall_header.tpl in templates folder.

jeefo 06-06-2006 19:31

Re: Stab at Smarty Template Class (PHP)
 
[edit]
Not dl this stuff, since i can't now , but style.css is in templates directory, so you probably must change
"style.css", to "templates/style.css"
[/edit]

:D

Ancient 06-06-2006 21:05

Re: Stab at Smarty Template Class (PHP)
 
Nice :) Damn I should've thought of that.

Hmm styles workin now. :)


All times are GMT +2. The time now is 10:35.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.