Changeset 2094 for branches/branch-1_7/include
- Timestamp:
- Sep 19, 2007, 5:06:16 AM (17 years ago)
- Location:
- branches/branch-1_7/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/branch-1_7/include/category_cats.inc.php
r2078 r2094 224 224 ), 225 225 'DESCRIPTION' => 226 trigger_event('render_category_literal_description', 227 trigger_event('render_category_description', 226 trigger_event('render_category_literal_description', 227 trigger_event('render_category_description', 228 228 @$category['comment'])), 229 229 'NAME' => $name, 230 230 ) 231 231 ); 232 232 233 233 //plugins need to add/modify sth in this loop ? 234 234 trigger_action('loc_index_category_thumbnail', … … 315 315 316 316 $template->assign_var_from_handle('CATEGORIES', 'thumbnails'); 317 unset( $template->_tpldata['thumbnails.'] );//maybe write a func for that317 $template->delete_block_vars('thumbnails', true); // category_default reuse them 318 318 } 319 319 trigger_action('loc_end_index_category_thumbnails', $categories); -
branches/branch-1_7/include/template.php
r2057 r2094 297 297 298 298 /** 299 * Block-level variable deletion. Deletes the last block iteration. 300 * if all is true - all blocks are removed 301 * return true if a deletion occured 302 */ 303 function delete_block_vars($blockname, $all=false) 304 { 305 $blocks = explode('.', $blockname); 306 $blockcount = count($blocks); 307 $str = '$this->_tpldata'; 308 for ($i = 0; $i < $blockcount; $i++) 309 { 310 $str .= '[\'' . $blocks[$i] . '.\']'; 311 eval('$lastiteration = isset('.$str.') ? sizeof('.$str.')-1:-1;'); 312 if ($lastiteration==-1) 313 { 314 return false; 315 } 316 if ($i==$blockcount-1) 317 { 318 break; 319 } 320 $str .= '[' . $lastiteration . ']'; 321 } 322 323 if ($all==true or $lastiteration==0) 324 { 325 $str ='unset('.$str.');'; 326 } 327 else 328 { 329 $str ='unset('.$str.'['.$lastiteration.']);'; 330 } 331 eval($str); 332 return true; 333 } 334 335 /** 299 336 * Root-level variable assignment. Adds to current assignments, overriding 300 337 * any existing variable assignment with the same name.
Note: See TracChangeset
for help on using the changeset viewer.