Changeset 164
- Timestamp:
- 06/11/08 08:00:05 (4 months ago)
- Location:
- ez_publish/myutils/trunk
- Files:
-
- 3 modified
-
autoloads/eztemplateautoload.php (modified) (1 diff)
-
autoloads/myutils_operators.php (modified) (4 diffs)
-
design/standard/templates/node/view/rss.tpl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ez_publish/myutils/trunk/autoloads/eztemplateautoload.php
r154 r164 32 32 $eZTemplateOperatorArray[] = array( 'script' => 'extension/myutils/autoloads/myutils_operators.php', 33 33 'class' => 'myutilsOperators', 34 'operator_names' => array( 'is_debug_enabled', 34 'operator_names' => array( 'gmdate', 35 'is_debug_enabled', 35 36 'path_to_path_array', 36 37 'php_tidy', -
ez_publish/myutils/trunk/autoloads/myutils_operators.php
r157 r164 40 40 { 41 41 /* Opérateurs */ 42 $this->Operators = array( 'is_debug_enabled', 42 $this->Operators = array( 'gmdate', 43 'is_debug_enabled', 43 44 'path_to_path_array', 44 45 'php_tidy', … … 63 64 function namedParameterList() 64 65 { 65 return array( 'is_debug_enabled' => array( 66 return array( 'gmdate' => array( 67 'format' => array( 'type' => 'string', 'required' => true, 'default' => '' ), 68 'timestamp' => array( 'type' => 'integer', 'required' => true, 'default' => time() ) 69 ), 70 71 'is_debug_enabled' => array( 66 72 ), 67 73 … … 100 106 switch ( $operatorName ) 101 107 { 102 case 'is_debug_enabled': 108 case 'gmdate': 109 $operatorValue = $this->gmDate( $namedParameters['format'], 110 $namedParameters['timestamp'] ); 111 break; 112 113 case 'is_debug_enabled': 103 114 $operatorValue = $this->isDebugEnabled(); 104 115 break; 105 116 106 117 case 'path_to_path_array': 107 118 $operatorValue = $this->path2PathArray( $namedParameters['path'] ); … … 137 148 * 138 149 * ###################################################################### */ 150 151 /** 152 * Fonction gmdate dans eZ (pour les flux RSS par exemple). 153 * 154 * @author Guillaume Kulakowski <guillaume_AT_llaumgui_DOT_com> 155 * @since 1.1 156 * 157 * @param string format 158 * @param integer timestamp 159 * @return string 160 */ 161 function gmDate( $format, $timestamp) 162 { 163 return gmdate( $format, $timestamp); 164 } 165 166 139 167 140 168 /** -
ez_publish/myutils/trunk/design/standard/templates/node/view/rss.tpl
r160 r164 1 1 2 2 <item> 3 <pubDate>{ $node.object.published||datetime( 'custom', '%D, %d %M %Y %H:%i:%s')} GMT</pubDate>3 <pubDate>{gmdate( 'D, d M Y H:i:s', $node.object.published )} GMT</pubDate> 4 4 <title>{$node.name|wash()}</title> 5 5 <link>{$node.url_alias|ezurl('no','full')}</link>
