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

Diectory setup

 
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
astroboy
Smarty n00b


Joined: 22 Jul 2003
Posts: 4

PostPosted: Tue Jul 22, 2003 8:12 pm    Post subject: Diectory setup Reply with quote

In the example setup given in installation chapter of the Smarty Guide, the Smarty lib files are outside the document root, but the template, config and cache directories are in the doc root. I'd like to keep everything out of doc root if possible. Is there any foreseeable problems with doing this?
Back to top
View user's profile Send private message
messju
Administrator


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

PostPosted: Tue Jul 22, 2003 10:07 pm    Post subject: Reply with quote

no there aren't any problems to expect. it's good to keep all unnecessary stuff outside of the docroot.

i think it's below the docroot in the examples for simplicity so relative paths to index.php work as expected with default-settings.

it's overall a good idea to configure smarty to have absolute paths to plugins, templates and templates_c and to only expose index.php and the like to the web.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Tue Jul 22, 2003 10:57 pm    Post subject: Reply with quote

The only forseeable problem is if you use a wysiwyg HTML editor. When editing a template (outside of your webroot) that has a relative link to an image file (inside of your webroot) your editor will complain or simply not show you the image.

There are many workarounds, including several listed on this site. The simplest thing is to copy your webs imagedir to a place relative to your template dir for development purposes.

The best thing is probably to maintain several environments with your development environment being less stringent than the production environment.

Otherwise, as messju says (and as you obviously know), it is best to keep the minimum required in your webroot.
Back to top
View user's profile Send private message
astroboy
Smarty n00b


Joined: 22 Jul 2003
Posts: 4

PostPosted: Tue Jul 22, 2003 11:10 pm    Post subject: Reply with quote

Hey, thanks guys
Back to top
View user's profile Send private message
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