Re: [SMARTY-DEV] modifier.date_format.php

From: Date: Wed, 27 Aug 2003 15:48:17 +0000
Subject: Re: [SMARTY-DEV] modifier.date_format.php
References: 1 2 3 4 5 6 7  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1812@lists.php.net to get a copy of this message
On Wed, Aug 27, 2003 at 11:03:28AM +0100, Mark Rogers wrote: > Not sure when this changed, but in modifier.date_format.php we now have: > > require_once $smarty->_get_plugin_filepath('shared','make_timestamp'); > > .. where once we had: > > require_once $this->_get_plugin_filepath('shared','make_timestamp'); > > Presumably the way the plugins are included has changed, but surely this now > requires that the smarty object is called $smarty? no, it doesn't . the $smarty mentioned in modifier.date_format.php is the 2nd parameter to smarty_core_load_plugins($params, &$smarty) in libs/core/core.load_plugins.php . you still can call your smarty-object as you like and use multiple ones. a portable way (and the proposed way at the moment, AFAIK) for including other plugin-files is this: function smarty_function_html_foo($params, &$smarty) { require_once $smarty->_get_plugin_filepath('shared','escape_special_chars'); ... but unfortunately this does not work with modifiers for obvious reasons. hence the change in modifier.date_format.php . greetings messju > I occassionally have more than one smarty object (although so far there is > always one called $smarty and they always share the same plugin paths, so > this won't break anything for me that I know of) but it seems less than > ideal. > > Sorry if I missed something. > > Mark Rogers, > More Solutions Ltd > > -- > Smarty Development Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.smarty.dev (#1812) next »