Running two different Smarties on a single page
Ivo Jansch <[email protected]> Fri, 09 Sep 2005 16:21:13 +0200
| Newsgroups | gmane.comp.php.smarty.devel |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all, we've been trying to integrate the Serendipity (s9y)weblog into one of our CMS systems. This went quite smooth, as s9y has an 'embed' feature for embedding it into applications. There was one particularly annoying thing though, that made us hack the software quite a bit. It was related to Smarty, so I'm posting it here to see if there is a nice solution. Our CMS system uses Smarty. The latest release uses 2.6.something, but the release where s9y needed to be integrated in used a slightly older version (2.4.something I believe). s9y itself uses 2.6 though. 2.6 and 2.4 are not compatible, so in fact for rendering a page in the CMS, both 2.4 and 2.6 are used. I had to tweak a bit: first I had to rename the Smarty class to Smarty2 to avoid class name conflicts. This was easypeasy. But then we got into major troubles due to the paths. The SMARTY_CORE_DIR and SMARTY_DIR defines were not correct, because there can only be one define. I ended up replacing every SMARTY_DIR and SMARTY_CORE_DIR occurance with a different define. Is there a cleaner way around this? Maybe if just member variables would be used instead of global defines, it would be easier to instantiate multiple different smarties. Any ideas? Greetings, Ivo - -- Ivo Jansch <[email protected]> ibuildings.nl BV - information technology http://www.ibuildings.nl -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDIZpY95NUnGFZm9cRAvOfAJ9lzUR6N3ean6/nxa3RTaXC5hE2+gCgn6Jg UiOcpaIhoS3ir/JP23upvxY= =Nk3q -----END PGP SIGNATURE----- -- Smarty Development Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php