TemplatePower Forum Forum Index TemplatePower Forum
Ask your question about TemplatePower here!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Sessions, Cookies whith TemplatePower

 
Post new topic   Reply to topic    TemplatePower Forum Forum Index -> Coding Help
View previous topic :: View next topic  
Author Message
Mohem



Joined: 13 Jun 2006
Posts: 1

PostPosted: Tue Jun 13, 2006 7:12 am    Post subject: Sessions, Cookies whith TemplatePower Reply with quote

hi..

Can i use Sessions AND Cookies whith TemplatePower?

and how ?

thank you.
Back to top
View user's profile Send private message
darth oinker



Joined: 13 Mar 2006
Posts: 3
Location: United States

PostPosted: Thu Jul 20, 2006 8:08 am    Post subject: Re: Sessions, Cookies whith TemplatePower Reply with quote

Mohem wrote:
hi..

Can i use Sessions AND Cookies whith TemplatePower?

and how ?

thank you.



yes and, the same way you use cookies and session values any other way

for my own script i store the path to the template file in a session variable and do

Code:
$boo = new templatepower($_SESSION[skinpath]."/templatefile.tpl");


of course the session variable is determined after it has been determined if the user is a guest or a logged in user

wouldn't bother with storing the name of the template file in the cookie as it's a bad idea, who's to say if the user comes back that that template will still be there?

mostly i have to recommend that you remember to keep it simple - the php that is, really leave the html for the template files, remember that you can have HTML in those template files that doesn't actually show up and use the php to make it show...

a very good example of this is valid/invalid output...and this actually gives me an idea for my own software...

i can go into this in more extent if anyone is interested, the beautiful thing about TemplatePower is that you can easily create a multi-lingual website very easily with hardly any programming knowledge needed
_________________
Darth Oinker
http://www.simplyundeniable.com - HP fanfiction site
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    TemplatePower Forum Forum Index -> Coding Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group