Changeset 10450


Ignore:
Timestamp:
Apr 17, 2011, 7:05:26 PM (9 years ago)
Author:
flop25
Message:

prefilter for index.tpl

Location:
extensions/floOS/OS_default
Files:
2 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/floOS/OS_default/themeconf.inc.php

    r10053 r10450  
    1818        'Exclude'                       => array('theNBMPage','thePicturePage','thePopuphelpPage',),    # Excluded pages
    1919);
     20/*********************************menu on every pages ************************************/
    2021// thx to Vdigital and his plugin spreadmenus
    2122if ( !function_exists( 'add_menu_on_public_pages' ) ) {
     
    4647        }
    4748}
     49/************************************ index.tpl ************************************/
     50add_event_handler('loc_end_index', 'OS_default_index');
     51function OS_default_index()
     52{
     53    global $template;
     54    $template->set_prefilter('index', 'OS_default_prefilter_index');
     55}
     56function OS_default_prefilter_index($content, &$smarty)
     57{
     58  $search = '#<div id="content" class="content">#'; 
     59  $replacement = '<div id="content" class="content">
     60  <table id="table_content" border="0" cellspacing="0" cellpadding="0">
     61    <tr>
     62      <td id="section_up_left">&nbsp;</td>
     63      <td id="section_up">
     64';
     65  $content = preg_replace($search, $replacement, $content);
    4866
     67  $search = '#</div>\{\* <\!-- titrePage --> \*\}#'; 
     68  $replacement = '';
     69  $content = preg_replace($search, $replacement, $content);
     70       
     71  $search = '#<h2>\{\$TITLE\}</h2>#'; 
     72  $replacement = '<h2>{$TITLE}</h2>
     73        </div>{* <!-- titrePage --> *} 
     74          </td>
     75      <td id="section_up_right">&nbsp;</td>
     76    </tr>
     77    <tr>
     78      <td id="section_left">&nbsp;</td>
     79      <td id="section_in">';
     80  $content = preg_replace($search, $replacement, $content);
     81       
     82  $search = '#\{if \!empty\(\$PLUGIN_INDEX_CONTENT_END\)\}\{\$PLUGIN_INDEX_CONTENT_END\}\{/if\}#'; 
     83  $replacement = '{if !empty($PLUGIN_INDEX_CONTENT_END)}{$PLUGIN_INDEX_CONTENT_END}{/if}
     84      </td>
     85          <td id="section_right">&nbsp;</td>
     86    </tr>
     87    <tr>
     88      <td id="section_bottom_left">&nbsp;</td>
     89      <td id="section_bottom" >&nbsp;</td>
     90      <td id="section_bottom_right" >&nbsp;</td>
     91    </tr>
     92  </table>
     93';
     94  return preg_replace($search, $replacement, $content);
     95}
    4996?>
Note: See TracChangeset for help on using the changeset viewer.