|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
triggsley Smarty Rookie
Joined: 24 Sep 2003 Posts: 8
|
Posted: Thu Feb 12, 2004 12:23 pm Post subject: running smarty with microweb from cd |
|
|
Hi all
I'm trying to run smarty from a cd using miroweb, i cant see this being a problem, but i'm having difficulty getting smarty no to write out to the templates_c directory, as you cant write files to a cd once finalized, also i want to be able to give the disc to a client.
Any help would be much appriciated, its probally a simple solution
many thanks
trigg |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Thu Feb 12, 2004 12:38 pm Post subject: |
|
|
make sure smarty finds the correct compiled templates in templates_c and turn $smarty->compile_check=false. that should do. |
|
Back to top |
|
triggsley Smarty Rookie
Joined: 24 Sep 2003 Posts: 8
|
Posted: Thu Feb 12, 2004 12:48 pm Post subject: therefore ? |
|
|
so if i empty out the tmeplate_c dir before writing to cd and i use this in my template
Code: | $smarty->compile_check=false |
this should not try to write anything to the template_c dir?
I've tried this and i still get lots of folders in the template_c dir.
Do i need to go through the site loading various templates and once i've been through the site use all the folders as is in the template_c dir then write to cd.?????? |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Thu Feb 12, 2004 1:14 pm Post subject: |
|
|
smarty needs the files in templates_c to operate.
if it cannot find them there, then it tries to create them.
you can turn $smarty->use_sub_dirs=false. then you have still have many files, but all in one folder (namely templates_c).
you need to compile each templates at least once (more than once only if you use different compile_ids). instead of browsing through your site and hoping you hit each templates at least once, you can write a little php-script that scans through your template-folder with readdir() and calls $smarty->fetch($template) for each template found. that should write (aka compile) all the necessary files to templates_c. |
|
Back to top |
|
triggsley Smarty Rookie
Joined: 24 Sep 2003 Posts: 8
|
Posted: Thu Feb 12, 2004 3:19 pm Post subject: very good |
|
|
it works a treat, last minute panic, now resolved as you suggested
many thanks |
|
Back to top |
|
|
|
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
|