Re: AW: Smarty Compilation and directories
| From: | Bertrand DUNOGIER | Date: | Wed, 02 Jan 2002 15:52:26 +0000 |
| Subject: | Re: AW: Smarty Compilation and directories | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-2467@lists.php.net to get a copy of this message | ||
Hello Werner,
first, thanks a lot, (thanks to Hans-Peter Oeri, too :p): it works.
I just had to add
if (!defined('SMARTY_DIR')) {
define('SMARTY_DIR', '/path/to/smarty/');
}
before
require_once SMARTY_DIR.'Smarty.class.php';
This is logical, since SMARTY_DIR is defined in Smarty.class.php...
i'm happy :)
Bertrand
WS> This is what I got from Hans-Peter Oeri to solve this problem.
WS> Werner Schweizer
WS> | As there might be some more interested in a single dir smarty, I quickly
WS> | subclassed it to achieve that very goal.
WS> |
WS> | Just include SmartySingleDir.class.php instead of Smarty.class.php and
WS> | change references to class Smarty to class SmartySingleDir (not too many
WS> | instances, if your code is well formed *grin*)
WS> |
WS> | IMPORTANT: I only did a quick check... It may or may not work, blow up
WS> | your keyboard or cancel your bank account. Use it at your own risk.
WS> |
WS> | I will gladly fix bugs in this subclass upon information about them ;)
WS> |
WS> | Don't conform!
WS> | IkKampfCaspar75