Problem with Directory Structure
It looks as though Smarty is setup to only use two directory levels, either ./ or /store for example.
We need to be able to do /store/directory however it doesn't seem to be working. Back tracking the code in various places this example seems to be the standard for parsing directories: if ($reg_globals) { if (is_readable("../globals.php")) require_once "../globals.php"; elseif (is_readable("./globals.php")) require_once "./globals.php"; } If this is the case, i think it's a serious design flaw. Has anybody had any problems with this before, and does anybody have suggestions on the most efficient fix. I back tracked the problem right into the smarty class writing of the template_c files. Thanks. |
Well this is a mess. I changed my smarty settings in smarty.php to include full path information.
define("SMARTY_DIR","/usr/local/home/site/httpdocs/Smarty-2.1.1/"); # # Smarty object for processing html templates # $smarty = new Smarty; $smarty->template_dir = "/usr/local/home/site/httpdocs/skin1"; $smarty->compile_dir = "/usr/local/home/site/httpdocs/templates_c"; $smarty->config_dir = "/usr/local/home/site/httpdocs/skin1"; $smarty->cache_dir = "/usr/local/home/site/httpdocs/cache"; $smarty->secure_dir = "/usr/local/home/site/httpdocs/skin1"; $smarty->debug_tpl="file:debug_templates.tpl"; Now I've got file references like: <a href="javascript:document.loginform.submit()"><fon t class="TableLeftElements">Log out </font>[img]/usr/local/home/site/httpdocs/skin1/images/GObouton.gif[/img] :evil: |
Just move your smarty directory as well as templates_c into your store directory, and use ./ and ../
|
I've done EXTENSIVE modifications and am using Smarty for other areas of our website including a VIP lounge and online learning locker, so that the xcart database can be used for other aspects of the site. I also created our index file in smarty so that we can have a login on the main page.
I have: index file in ./ store in ./store learning locker in ./locker assessment tool in ./locker/assessment and I can't put the assessment in ./locker because eventually we will have too many of them. What I ended up doing was creating a second smarty.php, changed all the links and setup the templates to reference ../../skin1. I then had the php files in ./locker/assessment reference this second smarty. The site is LIVE and is located at: https://www.crgleader.com/ |
All times are GMT -8. The time now is 11:16 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.