Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

running smarty with microweb from cd

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Installation and Setup
View previous topic :: View next topic  
Author Message
triggsley
Smarty Rookie


Joined: 24 Sep 2003
Posts: 8

PostPosted: Thu Feb 12, 2004 12:23 pm    Post subject: running smarty with microweb from cd Reply with quote

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
View user's profile Send private message Send e-mail
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Thu Feb 12, 2004 12:38 pm    Post subject: Reply with quote

make sure smarty finds the correct compiled templates in templates_c and turn $smarty->compile_check=false. that should do.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
triggsley
Smarty Rookie


Joined: 24 Sep 2003
Posts: 8

PostPosted: Thu Feb 12, 2004 12:48 pm    Post subject: therefore ? Reply with quote

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
View user's profile Send private message Send e-mail
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Thu Feb 12, 2004 1:14 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
triggsley
Smarty Rookie


Joined: 24 Sep 2003
Posts: 8

PostPosted: Thu Feb 12, 2004 3:19 pm    Post subject: very good Reply with quote

it works a treat, last minute panic, now resolved as you suggested

many thanks
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Installation and Setup 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
Protected by Anti-Spam ACP