Changeset 10106


Ignore:
Timestamp:
Apr 6, 2011, 2:15:22 PM (13 years ago)
Author:
flop25
Message:

less files
prefilter for index.tpl
attempt to prefilter pwg stuff blocks

Location:
extensions/floPure/Pure_default
Files:
1 added
7 deleted
2 edited

Legend:

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

    r9716 r10106  
    2828        margin-right:10%;
    2929}
     30.thumbnails SPAN, .thumbnails .wrap2 A, .thumbnails LABEL, .thumbnailCategory DIV.illustration {
     31    width: auto;
     32}
     33.description  {
     34    padding-left: 10px;
     35}
     36.illustration IMG {
     37        max-height:128px;
     38}
    3039
    3140/*--------menu--------------*/
  • extensions/floPure/Pure_default/themeconf.inc.php

    r5907 r10106  
    11<?php
     2/*
     3Theme Name: Pure_default
     4Version: auto
     5Description:
     6Theme URI: http://piwigo.org/ext/extension_view.php?eid=384
     7Author: flop25
     8Author URI: http://www.planete-flop.fr
     9*/
    210$themeconf = array(
    311  'name'         => 'Pure_default',
     
    816  'activable' => false,
    917);
     18/** index.tpl **/
     19add_event_handler('loc_end_index', 'Pure_default_index');
     20add_event_handler('loc_end_index', 'Pure_default_index_stuff');
     21function Pure_default_index()
     22{
     23    global $template;
     24    $template->set_prefilter('index', 'Pure_default_prefilter_index');
     25    //$template->set_prefilter('stuffs', 'Pure_default_prefilter_index_stuff');
     26                //return $tpl_thumbnails_var;
     27}
     28function Pure_default_index_stuff()
     29{
     30    global $template;
     31    //$template->set_prefilter('index', 'Pure_default_prefilter_index');
     32    $template->set_prefilter('stuffs', 'Pure_default_prefilter_index_stuff');
     33                //return $tpl_thumbnails_var;
     34}
     35function Pure_default_prefilter_index($content, &$smarty)
     36{
     37  $search = '#<div id="content" class="content">#'; 
     38  $replacement = '<div id="content" class="content">
     39  <table id="table_content" border="0" cellspacing="0" cellpadding="0">
     40    <tr>
     41      <td id="section_up_left">&nbsp;</td>
     42      <td id="section_up">&nbsp;</td>
     43      <td id="section_up_right">&nbsp;</td>
     44    </tr>
     45    <tr>
     46      <td id="section_left">&nbsp;</td>
     47      <td id="section_in">
     48';
     49  $content = preg_replace($search, $replacement, $content);
     50       
     51  $search = '#\{if \!empty\(\$PLUGIN_INDEX_CONTENT_END\)\}\{\$PLUGIN_INDEX_CONTENT_END\}\{/if\}#'; 
     52  $replacement = '{if !empty($PLUGIN_INDEX_CONTENT_END)}{$PLUGIN_INDEX_CONTENT_END}{/if}
     53      </td>
     54          <td id="section_right">&nbsp;</td>
     55    </tr>
     56    <tr>
     57      <td id="section_bottom_left">&nbsp;</td>
     58      <td id="section_bottom" >&nbsp;</td>
     59      <td id="section_bottom_right" >&nbsp;</td>
     60    </tr>
     61  </table>
     62';
     63  return preg_replace($search, $replacement, $content);
     64}
     65function Pure_default_prefilter_index_stuff($content, &$smarty)
     66{
     67 
     68        $search = '#<div class="content stuffs_block">#'; 
     69  $replacement = '<div class="content stuffs_block">
     70  <table id="table_content" border="0" cellspacing="0" cellpadding="0">
     71    <tr>
     72      <td id="section_up_left">&nbsp;</td>
     73      <td id="section_up">&nbsp;</td>
     74      <td id="section_up_right">&nbsp;</td>
     75    </tr>
     76    <tr>
     77      <td id="section_left">&nbsp;</td>
     78      <td id="section_in">
     79';
     80  $content = preg_replace($search, $replacement, $content);
     81       
     82  $search = '#\{if \$block\.end_line\}
     83  </div>
     84  \{\/if\}
     85\{/foreach\}
     86</div>#'; 
     87  $replacement = '{if $block.end_line}
     88  </div>
     89  {/if}
     90{/foreach}
     91      </td>
     92          <td id="section_right">&nbsp;</td>
     93    </tr>
     94    <tr>
     95      <td id="section_bottom_left">&nbsp;</td>
     96      <td id="section_bottom" >&nbsp;</td>
     97      <td id="section_bottom_right" >&nbsp;</td>
     98    </tr>
     99  </table>
     100</div>';
     101  return preg_replace($search, $replacement, $content);
     102       
     103        //echo($content);
     104        //return 'blabmabhmijokpiuyftdfghijkougyffguio';
     105}
    10106
    11107?>
Note: See TracChangeset for help on using the changeset viewer.