Index: /extensions/SmartAlbums/language/en_UK/plugin.lang.php =================================================================== --- /extensions/SmartAlbums/language/en_UK/plugin.lang.php (revision 16125) +++ /extensions/SmartAlbums/language/en_UK/plugin.lang.php (revision 16126) @@ -57,4 +57,5 @@ $lang['Update albums on file upload'] = 'Update albums on file upload'; $lang['(can cause slowdowns)'] = '(can cause slowdowns)'; +$lang['Filters'] = 'Filters'; ?> Index: /extensions/SmartAlbums/language/fr_FR/plugin.lang.php =================================================================== --- /extensions/SmartAlbums/language/fr_FR/plugin.lang.php (revision 16125) +++ /extensions/SmartAlbums/language/fr_FR/plugin.lang.php (revision 16126) @@ -31,5 +31,5 @@ $lang['To order albums please go the main albums management page'] = 'Pour trier les SmartAlbums veuillez vous rendre sur la page principale de gestion des albums'; $lang['Don\'t show this message again'] = 'Ne plus afficher ce message'; -$lang['All SmartAlbums'] = 'AlTous les SmartAlbums'; +$lang['All SmartAlbums'] = 'Tous les SmartAlbums'; $lang['No tag selected'] = 'Aucun tag sélectionné'; $lang['Date string is malformed'] = 'Date incorrecte'; @@ -56,4 +56,5 @@ $lang['Update albums on file upload'] = 'Mettre à jour les albums après la mise en ligne d\'un fichier'; $lang['(can cause slowdowns)'] = '(peut causer des ralentissements)'; +$lang['Filters'] = 'Filtres'; ?> Index: /extensions/SmartAlbums/main.inc.php =================================================================== --- /extensions/SmartAlbums/main.inc.php (revision 16125) +++ /extensions/SmartAlbums/main.inc.php (revision 16126) @@ -17,4 +17,5 @@ add_event_handler('invalidate_user_cache', 'smart_make_all_associations'); + include_once(SMART_PATH.'include/functions.inc.php'); @@ -26,4 +27,9 @@ else if (script_basename() == 'admin') { + add_event_handler('init', 'smart_init'); +} + +function smart_init() +{ global $conf; @@ -31,35 +37,36 @@ $conf['SmartAlbums'] = unserialize($conf['SmartAlbums']); - add_event_handler('loc_begin_cat_list', 'smart_cat_list'); include_once(SMART_PATH.'include/cat_list.php'); + add_event_handler('loc_begin_cat_list', 'smart_cat_list'); + add_event_handler('loc_begin_admin_page', 'smart_add_admin_album_tab'); add_event_handler('get_admin_plugin_menu_links', 'smart_admin_menu'); - function smart_admin_menu($menu) - { - array_push($menu, array( - 'NAME' => 'SmartAlbums', - 'URL' => SMART_ADMIN, - )); - return $menu; - } - - add_event_handler('loc_begin_admin_page', 'smart_add_admin_album_tab'); - function smart_add_admin_album_tab() - { - global $page, $template; - if ($page['page'] != 'album') return; - - $template->set_prefilter('tabsheet', 'smart_add_admin_album_tab_prefilter'); - } - function smart_add_admin_album_tab_prefilter($content) - { - $search = '{/foreach}'; - $add = ' -