Help: Smarty Templates/Boss needs answer tommorow :/

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
NewfieBilko
Forum Contributor
Posts: 189
Joined: Sun Jun 06, 2004 6:45 pm
Location: Newfoundland
Contact:

Post by NewfieBilko »

im on a windows machine! no chmond!!! :)
User avatar
NewfieBilko
Forum Contributor
Posts: 189
Joined: Sun Jun 06, 2004 6:45 pm
Location: Newfoundland
Contact:

Post by NewfieBilko »

sorry- by the way though, when i do fix the permissions, your telling me that every file form the /templates/ will now update the files in the /templates_c/ with all the old HTML formating?
User avatar
launchcode
Forum Contributor
Posts: 401
Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:

Post by launchcode »

Is your web host on Unix or Windows though? It doesn't matter what you develop on, only where the final files reside :)

Change the cache level to 0 and see what happens. All that means is that Smarty each time will use the file in the template directory and then compile it, rather than compiling it to the template_c (cache) directory.
User avatar
NewfieBilko
Forum Contributor
Posts: 189
Joined: Sun Jun 06, 2004 6:45 pm
Location: Newfoundland
Contact:

Post by NewfieBilko »

Here is a very good example of my problem:

Image
User avatar
NewfieBilko
Forum Contributor
Posts: 189
Joined: Sun Jun 06, 2004 6:45 pm
Location: Newfoundland
Contact:

Post by NewfieBilko »

Hmmm, i see, intestesting.. That cache variable is in what file again?




Ummm, <span style='color:blue' title='I&#39;m naughty, are you naughty?'>smurf</span>, now that i think of it your right it is linux box holy <span style='color:blue' title='I&#39;m naughty, are you naughty?'>smurf</span>. I gottta check my server. Its red hat...
User avatar
NewfieBilko
Forum Contributor
Posts: 189
Joined: Sun Jun 06, 2004 6:45 pm
Location: Newfoundland
Contact:

Post by NewfieBilko »

I would edit the folders permissions through my win box over network thinking it was like ftp and changes permissions...
User avatar
NewfieBilko
Forum Contributor
Posts: 189
Joined: Sun Jun 06, 2004 6:45 pm
Location: Newfoundland
Contact:

Post by NewfieBilko »

ok, so seems your fairly confident on the permissions thing.. This gives me something to work on tommorow. Anyway, I love programming. And appericate help.. My boss is gonna wonder if we should use this smarty system, as a control for databases of many many clients. He likes that he can move through the lists of users and see information on the users. When i look into the code though, I see its mentioned as a news script, and thats what it acts like , an admin news script for people posting news. What other features can I get out of this system , does it have scalabliity to expand for mnay useses? such as forums, whole websites? any thoughts are thx
User avatar
launchcode
Forum Contributor
Posts: 401
Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:

Post by launchcode »

In the time it took you to make that screen shot, you could have changed the permissions on the template_c folder and fixed it ;)

But hey... you're obviously having fun!

Smarty is a TEMPLATE system - not a news script. Really really go here and read the Crash Course guide: http://smarty.php.net/
User avatar
NewfieBilko
Forum Contributor
Posts: 189
Joined: Sun Jun 06, 2004 6:45 pm
Location: Newfoundland
Contact:

Post by NewfieBilko »

yea cool i wanted to make sure if anyeone has any more thoughts.. yea, templating is great, i understand the logic..i will read this, thank you.. Yea so i got this job setting this system up and learning php, i know asp, vb.net , learning this is going ok, but im sure to be looking for a good forum like this, and im sure to be donating $$$$$$$$$$$$$
User avatar
NewfieBilko
Forum Contributor
Posts: 189
Joined: Sun Jun 06, 2004 6:45 pm
Location: Newfoundland
Contact:

Post by NewfieBilko »

i already did it though my windows machine.. Only think to do now is go on the linux box, make sure its 777 there. I guess setting through windows network doesn't give smarty permision?
User avatar
launchcode
Forum Contributor
Posts: 401
Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:

Post by launchcode »

Windows has no notion of permissions :) This change needs to be made on the Linux box, that I guarantee you.
All the best with this - time to get some sleep :)
User avatar
NewfieBilko
Forum Contributor
Posts: 189
Joined: Sun Jun 06, 2004 6:45 pm
Location: Newfoundland
Contact:

Post by NewfieBilko »

yea tru i need to hit the sack.

btw,
when my templates re-compile themselves and make the new cache files, i will loose all my updating and work i've done on the /templates_c/ files, over-writen by the compile

-easily backed up , but should it just like that , all because of permissions
User avatar
launchcode
Forum Contributor
Posts: 401
Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:

Post by launchcode »

Yeah of course you'll loose changes made in the template_c directory - because you shouldn't be making any changes there in the first place! :)
User avatar
NewfieBilko
Forum Contributor
Posts: 189
Joined: Sun Jun 06, 2004 6:45 pm
Location: Newfoundland
Contact:

Post by NewfieBilko »

hahah yea totally.. Hopefully when i get into work now this morning, that will be the problem.. Permissions.
User avatar
NewfieBilko
Forum Contributor
Posts: 189
Joined: Sun Jun 06, 2004 6:45 pm
Location: Newfoundland
Contact:

Post by NewfieBilko »

damn, i can't find the variable $cache= 'tpl_cache_level' . You say its in config.inc.php, but i do not have this file.. what else would it be called?
Post Reply