Changeset 16126


Ignore:
Timestamp:
06/28/12 16:57:47 (7 years ago)
Author:
mistic100
Message:

deals with template compilation and loading order

Location:
extensions/SmartAlbums
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/SmartAlbums/language/en_UK/plugin.lang.php

    r16104 r16126  
    5757$lang['Update albums on file upload'] = 'Update albums on file upload'; 
    5858$lang['(can cause slowdowns)'] = '(can cause slowdowns)'; 
     59$lang['Filters'] = 'Filters'; 
    5960 
    6061?> 
  • extensions/SmartAlbums/language/fr_FR/plugin.lang.php

    r16104 r16126  
    3131$lang['To order albums please go the main albums <a href="%s">management page</a>'] = 'Pour trier les SmartAlbums veuillez vous rendre sur la page principale de <a href="%s">gestion des albums</a>'; 
    3232$lang['Don\'t show this message again'] = 'Ne plus afficher ce message'; 
    33 $lang['All SmartAlbums'] = 'AlTous les  SmartAlbums'; 
     33$lang['All SmartAlbums'] = 'Tous les  SmartAlbums'; 
    3434$lang['No tag selected'] = 'Aucun tag sélectionné'; 
    3535$lang['Date string is malformed'] = 'Date incorrecte'; 
     
    5656$lang['Update albums on file upload'] = 'Mettre à jour les albums après la mise en ligne d\'un fichier'; 
    5757$lang['(can cause slowdowns)'] = '(peut causer des ralentissements)'; 
     58$lang['Filters'] = 'Filtres'; 
    5859 
    5960?> 
  • extensions/SmartAlbums/main.inc.php

    r16104 r16126  
    1717 
    1818add_event_handler('invalidate_user_cache', 'smart_make_all_associations'); 
     19 
    1920include_once(SMART_PATH.'include/functions.inc.php'); 
    2021 
     
    2627else if (script_basename() == 'admin') 
    2728{ 
     29  add_event_handler('init', 'smart_init'); 
     30} 
     31 
     32function smart_init() 
     33{ 
    2834  global $conf; 
    2935   
     
    3137  $conf['SmartAlbums'] = unserialize($conf['SmartAlbums']); 
    3238     
    33   add_event_handler('loc_begin_cat_list', 'smart_cat_list'); 
    3439  include_once(SMART_PATH.'include/cat_list.php'); 
    3540   
     41  add_event_handler('loc_begin_cat_list', 'smart_cat_list'); 
     42  add_event_handler('loc_begin_admin_page', 'smart_add_admin_album_tab'); 
    3643  add_event_handler('get_admin_plugin_menu_links', 'smart_admin_menu'); 
    37   function smart_admin_menu($menu)  
    38   { 
    39     array_push($menu, array( 
    40         'NAME' => 'SmartAlbums', 
    41         'URL' => SMART_ADMIN, 
    42       )); 
    43     return $menu; 
    44   } 
    45      
    46   add_event_handler('loc_begin_admin_page', 'smart_add_admin_album_tab'); 
    47   function smart_add_admin_album_tab() 
    48   { 
    49     global $page, $template; 
    50     if ($page['page'] != 'album') return; 
    51      
    52     $template->set_prefilter('tabsheet', 'smart_add_admin_album_tab_prefilter'); 
    53   } 
    54   function smart_add_admin_album_tab_prefilter($content) 
    55   { 
    56     $search = '{/foreach}'; 
    57     $add = ' 
    58   <li class="{if false}selected_tab{else}normal_tab{/if}"> 
    59     <a href="'.SMART_ADMIN.'-album&amp;cat_id='.$_GET['cat_id'].'"><span>SmartAlbum</span></a> 
    60   </li>'; 
    61     return str_replace($search, $search.$add, $content); 
    62   } 
    6344} 
    6445 
     46function smart_admin_menu($menu)  
     47{ 
     48  array_push($menu, array( 
     49      'NAME' => 'SmartAlbums', 
     50      'URL' => SMART_ADMIN, 
     51    )); 
     52  return $menu; 
     53} 
     54 
     55function smart_add_admin_album_tab() 
     56{ 
     57  global $page, $template; 
     58  if ($page['page'] != 'album') return; 
     59   
     60  $template->assign('SMART_CAT_ID', $_GET['cat_id']); 
     61  $template->set_prefilter('tabsheet', 'smart_add_admin_album_tab_prefilter'); 
     62} 
     63function smart_add_admin_album_tab_prefilter($content) 
     64{ 
     65  $search = '{/foreach}'; 
     66  $add = ' 
     67<li class="{if false}selected_tab{else}normal_tab{/if}"> 
     68  <a href="'.SMART_ADMIN.'-album&amp;cat_id={$SMART_CAT_ID}"><span>SmartAlbum</span></a> 
     69</li>'; 
     70  return str_replace($search, $search.$add, $content); 
     71} 
    6572?> 
Note: See TracChangeset for help on using the changeset viewer.