Modules

From: Date: Wed, 12 Dec 2001 01:08:51 +0000
Subject: Modules
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-2263@lists.php.net to get a copy of this message
I like the idea of modularity so anyone can write modules to extend Smarty. This is my initial thoughts: An example for a multiple language support module. The code to use a specific module. ------------------------------ $smarty->load_module("language"); Directory structure for Smarty modules -------------------------------------- smarty modules language etc // language.ini sql // language.sql lib // Smarty.language.php, language.func.php, language.mod.php, language.class.php Not all these files needs to be present, they all have a different purpose. language.ini exists if the module needs any startup settings language.sql exists if the module needs any database tables Smarty.language.php exists if the Smarty class itself should be extended with some functionality ex. $smarty->set_language(); language.func.php exists if the module uses any custom functions ex. prefilters, postfilters and so on... language.mod.php exists if the module uses any new modifiers language.class.php exists if the module is a class itself All modules should reside in the modules directory and follow this structure. Is there anyone working on making Smarty modular yet? (I can do it if not...) Any ideas? Comments? /Andreas

« previous php.smarty.general (#2263) next »