Ignore:
Timestamp:
Jul 23, 2012, 6:16:34 PM (12 years ago)
Author:
mistic100
Message:

add option to block permissions recalculation

Location:
extensions/SmartAlbums
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • extensions/SmartAlbums/admin/config.php

    r16104 r16939  
    66{
    77  $conf['SmartAlbums']['update_on_upload'] = isset($_POST['update_on_upload']);
     8  $conf['SmartAlbums']['smart_is_forbidden'] = isset($_POST['smart_is_forbidden']);
    89 
    910  conf_update_param('SmartAlbums', serialize($conf['SmartAlbums']));
     
    1112}
    1213
    13 $template->assign(array(
    14   'update_on_upload' => $conf['SmartAlbums']['update_on_upload'],
    15 ));
     14$template->assign($conf['SmartAlbums']);
    1615
    1716$template->set_filename('SmartAlbums_content', dirname(__FILE__).'/template/config.tpl');
  • extensions/SmartAlbums/admin/template/config.tpl

    r16104 r16939  
     1{html_head}{literal}
     2<style type="text/css">
     3.showInfo {
     4  position:static;
     5  display:inline-block;
     6  padding:1px 6px !important;
     7  width:auto;
     8  font-size:0.8em;
     9  line-height:1.2em;
     10}
     11</style>
     12{/literal}{/html_head}
     13
     14{footer_script require="jquery"}
     15jQuery(".showInfo").tipTip({ldelim}
     16    delay: 0,
     17    fadeIn: 200,
     18    fadeOut: 200,
     19    maxWidth: '300px',
     20    defaultPosition:"right"
     21  });
     22{/footer_script}
     23
    124<div class="titrePage">
    225        <h2>SmartAlbums</h2>
    326</div>
    427
    5 <form method="post" action="" class="properties" ENCTYPE="multipart/form-data">
    6         <fieldset>
    7                 <legend>{'Configuration'|@translate}</legend>     
     28<form method="post" action="" class="properties">
     29        <fieldset id="commentsConf">
    830                <ul>                   
    931                        <li>
    1032        <label>
    11           <span class="property">{'Update albums on file upload'|@translate}</span>
    1233          <input type="checkbox" name="update_on_upload" value="true" {if $update_on_upload}checked="checked"{/if}/>
    13           {'(can cause slowdowns)'|@translate}
     34          <b>{'Update albums on file upload'|@translate}</b>
     35          <a class="showInfo" title="{'can cause slowdowns'|@translate}">i</a>
     36        </label>
     37                        </li>
     38      <li>
     39        <label>
     40          <input type="checkbox" name="smart_is_forbidden" value="true" {if $smart_is_forbidden}checked="checked"{/if}/>
     41          <b>{'Exclude SmartAlbums from permissions management'|@translate}</b>
     42          <a class="showInfo" title="{'SmartAlbums are considered private for everyone, and a user can see it\'s content only if available in another album he has access to.'|@translate}">i</a>
    1443        </label>
    1544                        </li>
     
    1746        </fieldset>
    1847               
    19         <p><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit" /></p>
     48        <p class="formButtons"><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit" /></p>
    2049</form>
  • extensions/SmartAlbums/language/ca_ES/plugin.lang.php

    r14751 r16939  
    2424$lang['%d photos associated to album %s'] = '%d imatges associades a l\'àlbum %s';
    2525$lang['%d photos'] = '%d imatges';
    26 $lang['(can cause slowdowns on admin pages)'] = '(Pot causar retards en les pàgines d\'administració)';
     26$lang['can cause slowdowns on admin pages'] = 'Pot causar retards en les pàgines d\'administració';
    2727$lang['Add a SmartAlbum'] = 'Afegir un SmartAlbum';
    2828$lang['Add filters here'] = 'Afegir filtres aquí';
  • extensions/SmartAlbums/language/cs_CZ/plugin.lang.php

    r16924 r16939  
    2929$lang['Don\'t show this message again'] = 'Ne/zobrazovat příště tuto zprávu';
    3030
    31 $lang['(can cause slowdowns)'] = '(může způsobovat zpomalení)';
     31$lang['can cause slowdowns'] = 'může způsobovat zpomalení';
    3232$lang['Above'] = 'Nad';
    3333$lang['Author is empty'] = 'Autor je prázdný';
  • extensions/SmartAlbums/language/de_DE/plugin.lang.php

    r16924 r16939  
    2929$lang['Don\'t show this message again'] = 'Diese Nachricht nicht mehr anzeigen';
    3030
    31 $lang['(can cause slowdowns)'] = 'Kann das System verlangsamen';
     31$lang['can cause slowdowns'] = 'Kann das System verlangsamen';
    3232$lang['Above'] = 'Darüber';
    3333$lang['Author is empty'] = 'Autor ist leer';
  • extensions/SmartAlbums/language/el_GR/plugin.lang.php

    r16924 r16939  
    4848$lang['This album is a SmartAlbum'] = 'Αυτό το άλμπουμ είναι ένα SmartAlbum';
    4949$lang['Update albums on file upload'] = 'Ενημέρωση λευκώματος με ανέβασμα αρχείου';
    50 $lang['(can cause slowdowns)'] = '(Μπορεί να προκαλέσει επιβράδυνση)';
     50$lang['can cause slowdowns'] = 'Μπορεί να προκαλέσει επιβράδυνση';
    5151$lang['Above'] = 'Πάνω από';
    5252$lang['Author is empty'] = 'ο Δημιουργός είναι άδειο';
  • extensions/SmartAlbums/language/en_UK/plugin.lang.php

    r16924 r16939  
    5252$lang['Regenerate photos list of this SmartAlbum'] = 'Regenerate photos list of this SmartAlbum';
    5353$lang['Update albums on file upload'] = 'Update albums on file upload';
    54 $lang['(can cause slowdowns)'] = '(can cause slowdowns)';
     54$lang['can cause slowdowns'] = 'can cause slowdowns';
    5555$lang['Filters'] = 'Filters';
     56$lang['Exclude SmartAlbums from permissions management'] = 'Exclude SmartAlbums from permissions management';
     57$lang['SmartAlbums are considered private for everyone, and a user can see it\'s content only if available in another album he has access to.'] = 'SmartAlbums are considered private for everyone, and a user can see it\'s content only if available in another album he has access to.';
    5658
    5759?>
  • extensions/SmartAlbums/language/es_ES/plugin.lang.php

    r16924 r16939  
    2929$lang['Don\'t show this message again'] = 'No volver a mostrar este mensaje';
    3030
    31 $lang['(can cause slowdowns)'] = '(puede hacer que vaya lento)';
     31$lang['can cause slowdowns'] = 'puede hacer que vaya lento';
    3232$lang['Above'] = 'Encima';
    3333$lang['Author is empty'] = 'El campo autor está vacio';
  • extensions/SmartAlbums/language/fr_FR/plugin.lang.php

    r16924 r16939  
    5151$lang['Regenerate photos list of this SmartAlbum'] = 'Régénérer les photos de ce SmartAlbum';
    5252$lang['Update albums on file upload'] = 'Mettre à jour les albums après la mise en ligne d\'un fichier';
    53 $lang['(can cause slowdowns)'] = '(peut causer des ralentissements)';
     53$lang['can cause slowdowns'] = 'peut causer des ralentissements';
    5454$lang['Filters'] = 'Filtres';
     55$lang['Exclude SmartAlbums from permissions management'] = 'Exlure les SmartAlbums de la gestion des droits d\'accès';
     56$lang['SmartAlbums are considered private for everyone, and a user can see it\'s content only if available in another album he has access to.'] = 'Les SmartAlbums sont considérés comme privés pour tout le monde, et un utilisateur ne peut voir leur contenu que si disponible dans un autre album auquel il a accès.';
    5557
    5658?>
  • extensions/SmartAlbums/language/hu_HU/plugin.lang.php

    r16924 r16939  
    2424$lang['%d photos associated to album %s'] = '%d kép társítva a(z) %s albumhoz';
    2525$lang['%d photos'] = '%d kép';
    26 $lang['(can cause slowdowns)'] = '(lassulást okozhat)';
     26$lang['can cause slowdowns'] = 'lassulást okozhat';
    2727$lang['Above'] = 'Felett';
    2828$lang['Add filters here'] = 'Adjon hozzá szűrőt!';
  • extensions/SmartAlbums/language/it_IT/plugin.lang.php

    r16924 r16939  
    5050$lang['Regenerate photos list of this SmartAlbum'] = 'Rigenerare le foto di questo SmartAlbum';
    5151$lang['Update albums on file upload'] = 'Aggiornare gli album dopo il caricamento di un file';
    52 $lang['(can cause slowdowns)'] = '(può causare rallentamenti)';
     52$lang['can cause slowdowns'] = 'può causare rallentamenti';
    5353$lang['Filters'] = 'Filtri';
    5454
  • extensions/SmartAlbums/language/lv_LV/plugin.lang.php

    r16924 r16939  
    2929$lang['Don\'t show this message again'] = 'Nerādīt šo ziņojumu atkārtoti';
    3030
    31 $lang['(can cause slowdowns)'] = '(var izraisīt lēnu lejuplādi)';
     31$lang['can cause slowdowns'] = 'var izraisīt lēnu lejuplādi';
    3232$lang['Above'] = 'Virs';
    3333$lang['Author is empty'] = 'Lauks Autors ir tukšs';
  • extensions/SmartAlbums/language/nl_NL/plugin.lang.php

    r16924 r16939  
    2929$lang['Don\'t show this message again'] = 'Toon dit bericht niet meer opnieuw';
    3030
    31 $lang['(can cause slowdowns)'] = '(kan vertraging veroorzaken)';
     31$lang['can cause slowdowns'] = 'kan vertraging veroorzaken';
    3232$lang['Above'] = 'Boven';
    3333$lang['Author is empty'] = 'Auteur is leeg';
  • extensions/SmartAlbums/language/pl_PL/plugin.lang.php

    r16924 r16939  
    4848$lang['This album is a SmartAlbum'] = 'Ten album jest SmartAlbumem';
    4949$lang['Update albums on file upload'] = 'Aktualizuj albumy podczas upload\'u plików';
    50 $lang['(can cause slowdowns)'] = '(może powodować spowolnienia';
     50$lang['can cause slowdowns'] = 'może powodować spowolnienia';
    5151$lang['Above'] = 'Powyżej';
    5252$lang['Author is empty'] = 'Brak Autora';
  • extensions/SmartAlbums/language/pt_PT/plugin.lang.php

    r16924 r16939  
    4848$lang['This album is a SmartAlbum'] = 'Este album é um album Smart';
    4949$lang['Update albums on file upload'] = 'Actualizar albuns ao fazer o upload de ficheiros';
    50 $lang['(can cause slowdowns)'] = '(pode causar lentidão)';
     50$lang['can cause slowdowns'] = 'pode causar lentidão';
    5151$lang['Above'] = 'Acima';
    5252$lang['Author is empty'] = 'O autor esta vazio ';
  • extensions/SmartAlbums/language/ru_RU/plugin.lang.php

    r16924 r16939  
    4848$lang['This album is a SmartAlbum'] = 'Этот альбом - Умный Альбом';
    4949$lang['Update albums on file upload'] = 'Обновить альбомы при загрузке файлов';
    50 $lang['(can cause slowdowns)'] = '(может привести к замедлению работы)';
     50$lang['can cause slowdowns'] = 'может привести к замедлению работы';
    5151$lang['Above'] = 'Above';
    5252$lang['Author is empty'] = 'Автор не указан';
  • extensions/SmartAlbums/language/sk_SK/plugin.lang.php

    r16924 r16939  
    4848$lang['This album is a SmartAlbum'] = 'Tento album je SmartAlbum';
    4949$lang['Update albums on file upload'] = 'Aktualizovať albumy pri nahratí súboru';
    50 $lang['(can cause slowdowns)'] = '(m&ocirc;&#382;e sp&ocirc;sobi&#357; spomalenie)';
     50$lang['can cause slowdowns'] = 'm&ocirc;&#382;e sp&ocirc;sobi&#357; spomalenie';
    5151$lang['Above'] = 'Vy&#353;&#353;ie uveden&eacute;';
    5252$lang['Author is empty'] = 'N&aacute;zov autora je pr&aacute;zdny';
  • extensions/SmartAlbums/language/tr_TR/plugin.lang.php

    r16924 r16939  
    2525$lang['%d photos'] = '%d fotoğraf';
    2626$lang['%d photo'] = '%d fotoğraf';
    27 $lang['(can cause slowdowns)'] = '(yavaşlamaya sebep olur)';
     27$lang['can cause slowdowns'] = 'yavaşlamaya sebep olur';
    2828$lang['Above'] = 'Yukarıdaki';
    2929$lang['Add filters here'] = 'Buraya filtre ekle';
  • extensions/SmartAlbums/language/uk_UA/plugin.lang.php

    r13263 r16939  
    2424$lang['%d photos'] = '%d фотографій';
    2525$lang['%d photos associated to album %s'] = '%s фотографії, пов\'язані з альбомом %s';
    26 $lang['(can cause slowdowns on admin pages)'] = '(може привести до уповільнення роботи на сторінках адміністратора)';
     26$lang['can cause slowdowns on admin pages'] = 'може привести до уповільнення роботи на сторінках адміністратора';
    2727$lang['Add a SmartAlbum'] = 'Додати смарт-альбом';
    2828$lang['Add filters here'] = 'Додати фільтр тут';
  • extensions/SmartAlbums/language/vi_VN/plugin.lang.php

    r16924 r16939  
    2929$lang['Don\'t show this message again'] = 'Không hiển thị thông báo này nữa';
    3030
    31 $lang['(can cause slowdowns)'] = '(có thể làm chậm Piwwigo)';
     31$lang['can cause slowdowns'] = 'có thể làm chậm Piwwigo';
    3232$lang['Above'] = 'Bên trên';
    3333$lang['Author is empty'] = 'Không có thông tin Tác giả';
  • extensions/SmartAlbums/main.inc.php

    r16938 r16939  
    1717
    1818add_event_handler('invalidate_user_cache', 'smart_make_all_associations');
     19add_event_handler('init', 'smart_init');
    1920
    2021include_once(SMART_PATH.'include/functions.inc.php');
    21 
    22 if (script_basename() == 'index')
    23 {
    24   add_event_handler('loc_end_section_init', 'smart_init_page_items');
    25   include_once(SMART_PATH.'include/page_items.php');
    26 }
    27 else if (script_basename() == 'admin')
    28 {
    29   add_event_handler('init', 'smart_init');
    30 }
    3122
    3223function smart_init()
     
    3627  load_language('plugin.lang', SMART_PATH);
    3728  $conf['SmartAlbums'] = unserialize($conf['SmartAlbums']);
     29 
     30  if ( script_basename() == 'index' and $conf['SmartAlbums']['smart_is_forbidden'] )
     31  {
     32    add_event_handler('loc_end_section_init', 'smart_init_page_items');
     33    include_once(SMART_PATH.'include/page_items.php');
     34  }
     35  else if (script_basename() == 'admin')
     36  {
     37    include_once(SMART_PATH.'include/cat_list.php');
    3838   
    39   include_once(SMART_PATH.'include/cat_list.php');
    40  
    41  
    42   add_event_handler('loc_begin_cat_list', 'smart_cat_list');
    43   add_event_handler('tabsheet_before_select','smart_tab', 50, 2);
    44   add_event_handler('get_admin_plugin_menu_links', 'smart_admin_menu');
     39    add_event_handler('loc_begin_cat_list', 'smart_cat_list');
     40    add_event_handler('tabsheet_before_select','smart_tab', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
     41    add_event_handler('get_admin_plugin_menu_links', 'smart_admin_menu');
     42  }
    4543}
    4644
  • extensions/SmartAlbums/maintain.inc.php

    r16654 r16939  
    88    'update_on_upload' => false,
    99    'show_list_messages' => true,
     10    'smart_is_forbidden' => true,
    1011    )));
    1112
     
    3738    conf_update_param('SmartAlbums', smart_default_config);
    3839  }
     40  else
     41  {
     42    $new_conf = unserialize($conf['SmartAlbums']);
     43    // new param in 2.0.2
     44    if (!isset($new_conf['smart_is_forbidden']))
     45    {
     46      $new_conf['smart_is_forbidden'] = true;
     47      conf_update_param('SmartAlbums', smart_default_config);
     48    }
     49  }
    3950 
    40   /* some filters renamed in 1.2 */
     51  // some filters renamed in 2.0
    4152  $name_changes = array(
    4253    'the' => 'the_post',
Note: See TracChangeset for help on using the changeset viewer.