Changeset 10104 for extensions/floPure


Ignore:
Timestamp:
04/06/11 14:11:30 (9 years ago)
Author:
flop25
Message:

no more tpl file : use of prefilter

Location:
extensions/floPure/Pure_autumn
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/floPure/Pure_autumn/theme.css

    r6859 r10104  
    6161} 
    6262 
     63.thumbnails .wrap2 A { 
     64        padding:8px; 
     65} 
    6366/*--------menu--------------*/ 
    6467#table_content, .table_menu, #table_mbLinks, #table_mbCategories, #table_mbTags, #table_mbSpecials, #table_mbMenu, #table_mbIdentification { 
  • extensions/floPure/Pure_autumn/themeconf.inc.php

    r9716 r10104  
    1414  'icon_dir'      => 'themes/Pure_default/icon', 
    1515  'mime_icon_dir' => 'themes/Pure_default/icon/mimetypes/', 
     16  'local_head' => 'local_head.tpl', 
    1617); 
     18/** mainpage_categories.tpl **/ 
     19add_event_handler('loc_end_index_category_thumbnails', 'Pure_autumn_cat'); 
     20function Pure_autumn_cat($tpl_thumbnails_var) 
     21{ 
     22    global $template; 
     23    $template->set_prefilter('index_category_thumbnails', 'Pure_autumn_prefilter_cat'); 
     24                return $tpl_thumbnails_var; 
     25} 
     26function Pure_autumn_prefilter_cat($content, &$smarty) 
     27{ 
     28  $search = '#<li>[\r\t\n]*<div class="thumbnailCategory">#'; 
     29   
     30  $replacement = '<li class="{cycle values="cat_1,cat_2,cat_3,cat_4"}" > 
     31        <div class="thumbnailCategory">'; 
    1732 
     33  return preg_replace($search, $replacement, $content); 
     34} 
     35 
     36/** thumbnails.tpl **/ 
     37add_event_handler('loc_end_index_thumbnails', 'Pure_autumn_thumbnails'); 
     38function Pure_autumn_thumbnails($tpl_thumbnails_var) 
     39{ 
     40    global $template; 
     41    $template->set_prefilter('index_thumbnails', 'Pure_autumn_prefilter_thumbnails'); 
     42    $template->set_prefilter('stuffs', 'Pure_autumn_prefilter_thumbnails'); 
     43                return $tpl_thumbnails_var; 
     44} 
     45 
     46function Pure_autumn_prefilter_thumbnails($content, &$smarty) 
     47{ 
     48  $search = '#<li>[\r\t\n]*<span class="wrap1">#'; 
     49   
     50  $replacement = '<li class="thumb_{"1"|mt_rand:5}"  > 
     51        <span class="wrap1">'; 
     52 
     53  return preg_replace($search, $replacement, $content); 
     54} 
    1855?> 
Note: See TracChangeset for help on using the changeset viewer.