Ignore:
Timestamp:
07/10/11 14:36:01 (9 years ago)
Author:
flop25
Message:

adding language files (translation needed)
prefilter for navigation_bar.tpl

Location:
extensions/stripped_black_bloc
Files:
8 added
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/stripped_black_bloc/template/navigation_bar.tpl

    r11679 r11696  
    11<div class="navigationBar"> 
    2         <span class="nav_bulle">Page {$navbar.CURRENT_PAGE} / {$navbar.pages|@count}</span> 
     2        <span class="nav_bulle">{'Page'|@translate} {$navbar.CURRENT_PAGE} / {$navbar.pages|@count}</span> 
    33  {if isset($navbar.URL_FIRST)} 
    44  <a href="{$navbar.URL_FIRST}" rel="first" class="first nav_bulle">{'First'|@translate}</a> 
  • extensions/stripped_black_bloc/themeconf.inc.php

    r11680 r11696  
    2020  'local_head' => 'local_head.tpl', 
    2121); 
     22 
     23load_language('theme.lang', PHPWG_THEMES_PATH.'stripped_black_bloc/'); 
     24 
     25 
    2226add_event_handler('loc_end_index_category_thumbnails', 'MY'); 
    2327add_event_handler('loc_end_index_thumbnails', 'MY'); 
     
    4044        remove_event_handler('loc_begin_index', 'modify_nb_thumbnail_page'); 
    4145} 
     46 
     47/************************************ index.tpl ************************************/ 
     48add_event_handler('loc_end_index', 'stripped_black_bloc_index'); 
     49function stripped_black_bloc_index() 
     50{ 
     51    global $template; 
     52    $template->set_prefilter('index', 'stripped_black_bloc_prefilter_index'); 
     53} 
     54function stripped_black_bloc_prefilter_index($content, &$smarty) 
     55{ 
     56  $search = '#\{if \!empty\(\$navbar\) \}[\s]*\{include file=\'navigation_bar\.tpl\'\|@get_extent:\'navbar\'\}[\s]*\{/if\}#';   
     57  $replacement = ''; 
     58  $content = preg_replace($search, $replacement, $content); 
     59 
     60  $search = '#<\!-- subContent -->#';   
     61  $replacement = '<\!-- subContent --> 
     62        {if !empty($navbar) } 
     63                {include file=\'navigation_bar.tpl\'|@get_extent:\'navbar\'} 
     64        {/if}'; 
     65  return preg_replace($search, $replacement, $content); 
     66} 
     67 
    4268?> 
Note: See TracChangeset for help on using the changeset viewer.