Changeset 8401


Ignore:
Timestamp:
12/30/10 20:47:17 (9 years ago)
Author:
rvelices
Message:

index.tpl and thumbnails change: category description above thumbs and enclosing ul moved to index.tpl
fix some combine_xxx

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/template.class.php

    r8378 r8401  
    429429          $css = array_merge($css, $files); 
    430430      } 
    431        
     431 
    432432      $content = array(); 
    433433      foreach( $css as $file_ver ) 
     
    598598      if (count($this->scriptLoader->inline_scripts)) 
    599599      { 
    600         $content[]= '<script type="text/javascript">//<![CDATA[  
     600        $content[]= '<script type="text/javascript">//<![CDATA[ 
    601601'; 
    602602        $content = array_merge($content, $this->scriptLoader->inline_scripts); 
     
    979979      } 
    980980    } 
     981 
    981982    foreach( array_keys($todo) as $id ) 
    982983    { 
     
    10201021    return $results; 
    10211022  } 
    1022    
     1023 
    10231024  // checks that if B depends on A, then B->load_mode >= A->load_mode in order to respect execution order 
    10241025  private static function check_load_dep($scripts) 
     
    10421043            $changed = true; 
    10431044          } 
    1044           if ($load==2 && $scripts[$precedent]->load_mode==2 && ($script->is_remote() or !$conf['template_combine_files']) ) 
     1045          if ($load==2 && $scripts[$precedent]->load_mode==2 && ($scripts[$precedent]->is_remote() or !$conf['template_combine_files']) ) 
    10451046          {// we are async -> a predecessor cannot be async unlesss it can be merged; otherwise script execution order is not guaranteed 
    10461047            $scripts[$precedent]->load_mode = 1; 
     
    11591160    global $conf; 
    11601161    $key = array(); 
    1161     if ($is_css)  
     1162    if ($is_css) 
    11621163      $key[] = get_absolute_root_url(false);//because we modify bg url 
    11631164    for ($i=0; $i<count($this->files); $i++) 
     
    11711172    $file = base_convert(crc32($key),10,36); 
    11721173    $file = self::OUT_SUB_DIR . $file . '.' . $this->type; 
    1173      
     1174 
    11741175    $exists = file_exists( PHPWG_ROOT_PATH . $file ); 
    11751176    if ($exists) 
     
    12211222    return $js; 
    12221223  } 
    1223    
     1224 
    12241225  private static function process_css($file) 
    12251226  { 
     
    12271228    require_once(PHPWG_ROOT_PATH.'include/cssmin.class.php'); 
    12281229    $css = CssMin::minify($css, array('emulate-css3-variables'=>false)); 
    1229                 $css = trigger_event('combined_css_postfilter', $css); 
     1230    $css = trigger_event('combined_css_postfilter', $css); 
    12301231    return $css; 
    12311232  } 
    1232    
     1233 
    12331234  private static function process_css_rec($file) 
    12341235  { 
     
    12441245          $relative = dirname($file) . "/$match[1]"; 
    12451246          $search[] = $match[0]; 
    1246           $replace[] = 'url('.embellish_url(get_absolute_root_url(false)).$relative.')'; 
     1247          $replace[] = 'url('.embellish_url(get_absolute_root_url(false).$relative).')'; 
    12471248        } 
    12481249      } 
  • trunk/index.php

    r6363 r8401  
    2727include(PHPWG_ROOT_PATH.'include/section_init.inc.php'); 
    2828 
     29// Check Access and exit when user status is not ok 
     30check_status(ACCESS_GUEST); 
     31 
     32if (!isset($page['start'])) 
     33{ 
     34  $page['start'] = 0; 
     35} 
     36 
     37// access authorization check 
     38if (isset($page['category'])) 
     39{ 
     40  check_restrictions($page['category']['id']); 
     41} 
     42 
    2943trigger_action('loc_begin_index'); 
    30  
    31 // +-----------------------------------------------------------------------+ 
    32 // | Check Access and exit when user status is not ok                      | 
    33 // +-----------------------------------------------------------------------+ 
    34 check_status(ACCESS_GUEST); 
    3544 
    3645//---------------------------------------------- change of image display order 
     
    5362} 
    5463//-------------------------------------------------------------- initialization 
    55 // detection of the start picture to display 
    56 if (!isset($page['start'])) 
    57 { 
    58   $page['start'] = 0; 
    59 } 
    60  
    61 // access authorization check 
    62 if (isset($page['category'])) 
    63 { 
    64   check_restrictions($page['category']['id']); 
    65 } 
    6664 
    6765$page['navigation_bar'] = array(); 
     
    256254 
    257255// category comment 
    258 if (isset($page['comment']) and $page['comment'] != '') 
     256if ($page['start']==0 and !isset($page['chronology_field']) and !empty($page['comment']) ) 
    259257{ 
    260258  $template->assign('CONTENT_DESCRIPTION', $page['comment'] ); 
  • trunk/themes/default/template/index.tpl

    r8091 r8401  
    44<div class="titrePage"> 
    55        <ul class="categoryActions"> 
    6                 {if !empty($image_orders) } 
     6                {if !empty($image_orders)} 
    77                <li> 
    88                {'Sort order'|@translate}: 
    99                <select onchange="document.location = this.options[this.selectedIndex].value;"> 
    10                         {foreach from=$image_orders item=image_order } 
     10                        {foreach from=$image_orders item=image_order} 
    1111                        <option value="{$image_order.URL}"{if $image_order.SELECTED} selected="selected"{/if}>{$image_order.DISPLAY}</option> 
    1212                        {/foreach} 
     
    7676{/if} 
    7777 
    78 {if isset($chronology.TITLE) } 
     78{if isset($chronology.TITLE)} 
    7979<h2>{$chronology.TITLE}</h2> 
    8080{/if} 
    8181 
    82 </div> <!-- titrePage --> 
     82</div><!-- titrePage --> 
    8383 
    8484{if !empty($PLUGIN_INDEX_CONTENT_BEGIN)}{$PLUGIN_INDEX_CONTENT_BEGIN}{/if} 
    8585 
    86 {if !empty($category_search_results) } 
     86{if !empty($category_search_results)} 
    8787<div style="font-size:16px;margin:10px 16px">{'Album results for'|@translate} <strong>{$QUERY_SEARCH}</strong> : 
    88   <em><strong> 
    89   {foreach from=$category_search_results item=res name=res_loop} 
    90   {if !$smarty.foreach.res_loop.first} &mdash; {/if} 
    91   {$res} 
    92   {/foreach} 
    93   </strong></em> 
     88        <em><strong> 
     89        {foreach from=$category_search_results item=res name=res_loop} 
     90        {if !$smarty.foreach.res_loop.first} &mdash; {/if} 
     91        {$res} 
     92        {/foreach} 
     93        </strong></em> 
    9494</div> 
    9595{/if} 
    9696 
    97 {if !empty($tag_search_results) } 
     97{if !empty($tag_search_results)} 
    9898<div style="font-size:16px;margin:10px 16px">{'Tag results for'|@translate} <strong>{$QUERY_SEARCH}</strong> : 
    99   <em><strong> 
    100   {foreach from=$tag_search_results item=res name=res_loop} 
    101   {if !$smarty.foreach.res_loop.first} &mdash; {/if} 
    102   {$res} 
    103   {/foreach} 
    104   </strong></em> 
     99        <em><strong> 
     100        {foreach from=$tag_search_results item=res name=res_loop} 
     101        {if !$smarty.foreach.res_loop.first} &mdash; {/if} 
     102        {$res} 
     103        {/foreach} 
     104        </strong></em> 
    105105</div> 
    106106{/if} 
    107107 
    108 {if isset($FILE_CHRONOLOGY_VIEW) } 
     108{if isset($FILE_CHRONOLOGY_VIEW)} 
    109109{include file=$FILE_CHRONOLOGY_VIEW} 
    110110{/if} 
    111111 
    112 {if !empty($CATEGORIES) }{$CATEGORIES}{/if} 
    113 {if !empty($THUMBNAILS) }{$THUMBNAILS}{/if} 
    114  
    115 {if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if} 
    116  
    117 {if !empty($CONTENT_DESCRIPTION) } 
     112{if !empty($CONTENT_DESCRIPTION)} 
    118113<div class="additional_info"> 
    119   {$CONTENT_DESCRIPTION} 
     114        {$CONTENT_DESCRIPTION} 
    120115</div> 
    121116{/if} 
    122117 
    123 {if !empty($PLUGIN_INDEX_CONTENT_END) }{$PLUGIN_INDEX_CONTENT_END}{/if} 
    124 </div> <!-- content --> 
     118{if !empty($CATEGORIES)}{$CATEGORIES}{/if} 
     119{if !empty($THUMBNAILS)} 
     120<ul class="thumbnails" id="thumbnails"> 
     121{$THUMBNAILS} 
     122</ul> 
     123{/if} 
    125124 
     125{if !empty($navbar)}{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if} 
     126 
     127{if !empty($PLUGIN_INDEX_CONTENT_END)}{$PLUGIN_INDEX_CONTENT_END}{/if} 
     128</div><!-- content --> 
    126129{if !empty($PLUGIN_INDEX_CONTENT_AFTER)}{$PLUGIN_INDEX_CONTENT_AFTER}{/if} 
  • trunk/themes/default/template/thumbnails.tpl

    r8362 r8401  
    11 
    22{if !empty($thumbnails)} 
    3 <ul class="thumbnails"> 
    43{foreach from=$thumbnails item=thumbnail} 
    54        <li> 
     
    3231        </li> 
    3332{/foreach} 
    34 </ul> 
    3533{/if} 
    36  
    37  
Note: See TracChangeset for help on using the changeset viewer.