Ignore:
Timestamp:
Feb 27, 2013, 8:37:57 PM (12 years ago)
Author:
flop25
Message:

removed the option for PWG stuffs
added an explicative texte
added new lang key for the PWG Stuff module

Location:
extensions/adult_content
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • extensions/adult_content/admin/admin.php

    r21047 r21057  
    1616  $newconf_plugin=array();
    1717        $newconf_plugin['menublock_for_guest'] = (isset($_POST['menublock_for_guest'])) ? true : false;
    18         $newconf_plugin['block_on_index'] = (isset($_POST['block_on_index'])) ? true : false;
    1918        $newconf_plugin['manage_what'] = (isset($_POST['manage_what'])) ? $_POST['manage_what'] : 'both';
    2019        $query = '
     
    3332$check='checked="checked"';
    3433if ($conf_ad_c['menublock_for_guest']=='true') { $menublock=$check; } else { $menublock=NULL; }
    35 if ($conf_ad_c['block_on_index']=='true') { $index=$check; } else { $index=NULL; }
    36 $disabled='disabled="disabled"';
    37         $template->assign(
    38                 array(
    39                   'AD_C_manage_what' => $conf_ad_c['manage_what'],
    40                   'AD_C_menublock_for_guest' => $menublock,
    41                   'AD_C_block_on_index' => $index,
    42                   'AD_C_block_on_index_disabled' => $disabled,
    43                   'AD_C_LANG' => $user['language'],
    44                 )
    45           );
     34$template->assign(
     35  array(
     36    'AD_C_manage_what' => $conf_ad_c['manage_what'],
     37    'AD_C_menublock_for_guest' => $menublock,
     38    'AD_C_LANG' => $user['language'],
     39  )
     40  );
     41
     42
    4643$template->set_filename('plugin_admin_content', $ad_c->plugin_path.'admin/admin.tpl');
    4744$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
  • extensions/adult_content/admin/admin.tpl

    r12646 r21057  
    1111    <br />
    1212    <br />
    13     {'ad_c_block_on_index'|@translate}
    14     <input type="checkbox" name="block_on_index" value="true" {$AD_C_block_on_index} {$AD_C_block_on_index_disabled}/>
    15     {'ad_c_block_on_index_error'|@translate} <br />
    16     <br />
    1713    <span class="property">{'ad_c_manage_what'|@translate}</span>&nbsp;
    1814    <select name="manage_what" style="min-width:150px;">
     
    2218    </select>
    2319    <br />
     20    <br />
    2421    <input type="submit" name="option_ad_c" id="button" value="{'ad_c_send'|@translate}" />
     22    <br />
     23    <br />
     24    {'NEW! Check the Plugin PWG Stuffs to add the disclaimer on the index/album pages'|@translate} <br />
    2525  </form>
    2626</fieldset>
  • extensions/adult_content/class.inc.php

    r21047 r21057  
    118118  }
    119119
    120   function set_block_on_index ()
    121   {
    122         $this->loading_lang();
    123         global $page, $template, $user, $conf;
    124 
    125         if (isset($page['section']) and $page['section'] == 'categories')
    126 
    127         {
    128                 ////////////lié à quoi/////     
    129          $query = '
    130 SELECT id FROM '.GROUPS_TABLE.'
    131   WHERE name IN (\'+18\')
    132 ;';
    133      $data_18 = pwg_db_fetch_array(pwg_query($query));
    134          $query = '
    135 SELECT id FROM '.GROUPS_TABLE.'
    136   WHERE name IN (\'16-17\')
    137 ;';
    138      $data_16 = pwg_db_fetch_array(pwg_query($query));
    139          $query = '
    140 SELECT id FROM '.GROUPS_TABLE.'
    141   WHERE name IN (\'nothing\')
    142 ;';
    143      $data_no = pwg_db_fetch_array(pwg_query($query));
    144          $n_query = '
    145 SELECT COUNT(*) AS result FROM '.USER_GROUP_TABLE.'
    146   WHERE group_id IN (\''.$data_18['id'].'\',\''.$data_16['id'].'\',\''.$data_no['id'].'\') AND user_id IN (\''.$user['id'].'\')
    147 ;';
    148       $data_user = pwg_db_fetch_array(pwg_query($n_query));
    149           $is_grouped = $data_user['result'];   
    150          
    151           if ( $is_grouped == 0 and $user['username'] !== '16' and $user['username'] !== '18')
    152           {
    153                 $template->set_filename('ac_block', realpath($this->get_template('block.tpl') ) );
    154                 $begin = 'PLUGIN_INDEX_CONTENT_BEFORE';
    155                 $end = 'PLUGIN_INDEX_CONTENT_AFTER';
    156                 $template->concat($begin,       $template->parse('ac_block', true));
    157           }
    158         }
    159   }
    160120  function placer_identification($menu_ref_arr)
    161121  {
     
    324284      'path' => PHPWG_PLUGINS_PATH . AC_NAME . '/stuffs_module/',
    325285      'name' => l10n('ac_text'),
    326       'description' => l10n('ac_stuffs_description'),
     286      'description' => l10n('Disclaimer for the guest, with the ability to choose its age'),
    327287      )
    328288    );
  • extensions/adult_content/language/cs_CZ/plugin.lang.php

    r14461 r21057  
    3838$lang['ac_def'] = 'Chcete změnit svůj stav?';
    3939
    40 $lang['ad_c_block_on_index_error_2'] = 'Vyžaduje PWG_Stuffs ve verzi alespoň 2.1.l';
    41 $lang['ad_c_block_on_index_error'] = 'Momentálně není k dispozici';
    42 $lang['ad_c_block_on_index'] = 'Zobrazit leták na hlavní stránce? (Vyžaduje plugin PWG_Stuffs)';
    4340$lang['ad_c_linktolang'] = 'Jděte do jazykového souboru Adult Content (nutno mít povolený LocalFiles Editor)';
    4441$lang['ad_c_manage_both'] = 'erotický a pornografický obsah';
  • extensions/adult_content/language/da_DK/plugin.lang.php

    r18412 r21057  
    2626$lang['ac_user_text_16'] = 'Du er 16 eller 17 år gammel';
    2727$lang['ac_user_text_18'] = 'Du er 18 år eller ældre';
    28 $lang['ad_c_block_on_index'] = 'Se en brochure på hjemmesiden? (Kræver plugin\'en PWG_Stuffs)';
    29 $lang['ad_c_block_on_index_error'] = 'Ikke tilgængelig i øjeblikket';
    30 $lang['ad_c_block_on_index_error_2'] = 'Kræver som minimum PWG_Stuffs version 2.1.l';
    3128$lang['ad_c_linktolang'] = 'Gå til Adult Contents sprogfil (kræver at LocalFiles Editor er aktiveret)';
    3229$lang['ad_c_manage_both'] = 'erotisk og pornografisk indhold';
  • extensions/adult_content/language/de_DE/plugin.lang.php

    r16491 r21057  
    4141$lang['ac_user_text_16'] = 'Sie sind 16 oder 17 Jahre alt';
    4242$lang['ac_user_text_18'] = 'Sie sind älter als 18 Jahre';
    43 $lang['ad_c_block_on_index_error'] = 'Zur Zeit nicht verfügbar';
    4443$lang['ad_c_menublock_for_guest'] = 'Erlaube unregistrierten Benutzern das Alter auszuwählen?';
    4544$lang['ad_c_send'] = 'Änderungen speichern';
     
    5150Jede Person, die trotz eingehender Warnung, ihre Zustimmung zum betreten dieser Seite gibt, befreit diese Seite von allen Konsequenzen daraus.</ p>
    5251<p> Wenn ich eine dieser Zusagen nicht einhalte oder eine falsche Erklärung abgebe, kann ich eventuell die Gesetze meines Landes verletzen, und <B> übernehme damit die volle Verantwortung für mein Handeln </ B>. Ich erkläre hiermit, vollständig über die angebotenen Inhalte informiert worden zu sein und verzichte auf irgendwelche rechtlichen Schritte gegen den Provider und den Administrator dieser Webseite. Ich lese aufmerksam vorstehende Absätze und gebe elektronisch mein Einverständnis, indem ich mein entsprechendes Alter anklicke.';
    53 $lang['ad_c_block_on_index_error_2'] = 'Die minimale PWG_Stuffs Version die erforderlich ist, ist 2.1.l';
    54 $lang['ad_c_block_on_index'] = 'Sehen Sie einen Flyer auf der Homepage? (Benötigt Plugin PWG_Stuffs)';
    5552$lang['ad_c_linktolang'] = 'Gehen Sie auf die Sprach-Datei von nicht jugendfreien Inhalten (Benötigen LocalFiles Editor aktiviert)';
    5653$lang['ad_c_manage_both'] = 'erotische und pornografische Inhalte';
  • extensions/adult_content/language/el_GR/plugin.lang.php

    r16329 r21057  
    5353$lang['ac_user_text_16'] = 'Είστε 16 ή 17 ετών';
    5454$lang['ac_user_text_18'] = 'Είστε άνω των 18 ετών';
    55 $lang['ad_c_block_on_index_error_2'] = 'Το ελάχιστο που απαιτείται είναι PWG_Stuffs έκδοση 2.1.l';
    56 $lang['ad_c_block_on_index_error'] = 'Δεν διατίθεται προς το παρόν';
    57 $lang['ad_c_block_on_index'] = 'Είδατε ένα φυλλάδιο στην αρχική σελίδα; (Απαιτεί το πρόσθετο PWG_Stuffs)';
    5855$lang['ad_c_howitworks'] = 'Η αρχή αυτού του πρόσθετου είναι να βοηθήσει στη διαχείριση του περιεχομένου για ενήλικες (μπορεί επίσης να προσαρμοστεί για βίαιο περιεχόμενο). Για να γίνει αυτό, το πρόσθετο διαχειρίζεται τους επισκέπτες και / ή τους χρήστες που θέλετε, σύμφωνα με τον ορισμό σας των παραμέτρων του πρόσθετου.<br />
    5956<br />
  • extensions/adult_content/language/en_UK/plugin.lang.php

    r14365 r21057  
    3939
    4040$lang['ad_c_menublock_for_guest'] = 'Allow unregistered users to select their age?';
    41 $lang['ad_c_block_on_index'] = 'View a flyer on the homepage? (Requires plugin PWG_Stuffs)';
    42 $lang['ad_c_block_on_index_error_2'] = 'The minimum PWG_Stuffs version required is 2.1.l';
    43 $lang['ad_c_block_on_index_error'] = 'Not available for now';
    4441$lang['ad_c_manage_what'] = 'Select the type of content the plugin should manage :';
    4542$lang['ad_c_manage_eroticonly'] = 'erotic content only';
     
    125122";
    126123$lang['ad_c_linktolang']="Go to the language file of Adult Content (need LocalFiles Editor enabled)";
     124
     125$lang['NEW! Check the Plugin PWG Stuffs to add the disclaimer on the index/album pages']="NEW! Check the Plugin PWG Stuffs to add the disclaimer on the index/album pages";
     126$lang['Disclaimer for the guest, with the ability to choose its age to unlock the adult content']="Disclaimer for the guest, with the ability to choose its age";
     127$lang['No options. Just check "Allow unregistered users to select their age?" on the Adult Content administration page']='No options. Just check "Allow unregistered users to select their age?" on the Adult Content administration page';
    127128?>
  • extensions/adult_content/language/es_ES/plugin.lang.php

    r17362 r21057  
    3838$lang['ac_def'] = 'Usted quiere cambiar su estatuto ?';
    3939
    40 $lang['ad_c_block_on_index_error_2'] = 'La versión mínima de PWG_Stuffs requerida es la 2.1.l';
    41 $lang['ad_c_block_on_index_error'] = 'No disponible de momento';
    42 $lang['ad_c_block_on_index'] = 'Ver un folleto en la página principal? (Requiere el plugin PWG_Stuffs)';
    4340$lang['ad_c_linktolang'] = 'Ir al archivo de lenguaje del Contenido para Adultos (se necesita tener habilitado el Editor LocalFiles)';
    4441$lang['ad_c_manage_both'] = 'contenido erótico y pornográfico';
  • extensions/adult_content/language/fr_FR/plugin.lang.php

    r21047 r21057  
    3939
    4040$lang['ad_c_menublock_for_guest'] = 'Permettre aux visiteurs non-enregistrés de sélectionner leur âge ?';
    41 $lang['ad_c_block_on_index'] = 'Afficher un encart sur la page d\'accueil ? (Nécessite le plugin PWG Stuffs)';
    42 $lang['ad_c_block_on_index_error_2'] = 'PWG Stuffs dans une version supérieure à 2.1.l est nécessaire';
    43 $lang['ad_c_block_on_index_error'] = 'fonction non disponible pour l\'instant';
    4441
    4542$lang['ad_c_manage_what'] = 'Le plugin gère le contenu';
     
    8481$lang['ad_c_linktolang']="Lien vers le fichier langue d'Adult Content (Nécessite localFiles Editor)";
    8582
    86 $lang['ac_stuffs_description']="Charte pour le visiteur et choix de son âge"
     83$lang['NEW! Check the Plugin PWG Stuffs to add the disclaimer on the index/album pages']="Nouveau ! Utilisez le plugin PWG STuffs pour ajouter la charte sur les pages d'accueil et d'albums";
     84$lang['Disclaimer for the guest, with the ability to choose its age']="Charte pour le visiteur, avec la possibilité qu'il choisisse son âge";
     85$lang['No options. Just check "Allow unregistered users to select their age?" on the Adult Content administration page']='Pas d\'options, juste cochez "Permettre aux visiteurs non-enregistrés de sélectionner leur âge" sur la page d\'administration d\'Adult content';
    8786?>
  • extensions/adult_content/language/hu_HU/plugin.lang.php

    r14630 r21057  
    3838$lang['ac_def'] = 'Szeretné megváltoztatni a státuszát ?';
    3939
    40 $lang['ad_c_block_on_index_error_2'] = 'Legalább a PWG_Stuffs 2.1.l verziója szükséges';
    41 $lang['ad_c_block_on_index_error'] = 'Jelenleg nem érhető el';
    4240$lang['ad_c_linktolang'] = 'Adult Content nyelvi fájl megnyitása (a LocalFiles Editort aktiválni kell)';
    4341$lang['ad_c_manage_both'] = 'erotikus és pornográf tartalmat';
     
    4846$lang['ad_c_msg_admin_1'] = 'A bővítmény beállítások mentése sikeres';
    4947$lang['ad_c_send'] = 'Változások mentése';
    50 $lang['ad_c_block_on_index'] = 'Megtekinti az adatlapot a honlapon? (PWG_Stuffs bővítmény szükséges)';
    5148?>
  • extensions/adult_content/language/it_IT/plugin.lang.php

    r21056 r21057  
    3939
    4040$lang['ad_c_menublock_for_guest'] = 'Permettere ai visitatori di selezionare la loro età?';
    41 $lang['ad_c_block_on_index'] = 'Visualizzare un flyer sulla home page ? (Necessita il plugin PWG Stuffs)';
    42 $lang['ad_c_block_on_index_error_2'] = 'PWG_Stuffs versione minima necessaria è 2.1.l';
    43 $lang['ad_c_block_on_index_error'] = 'funzione non disponibile attualmente';
    4441$lang['ad_c_send'] = 'Salvare le modifiche';
    4542$lang['ad_c_msg_admin_1'] = 'Configurazione del plugin aggiornata correttamente!';
  • extensions/adult_content/language/lv_LV/plugin.lang.php

    r17850 r21057  
    7474$lang['ad_c_manage_pornonly'] = 'tikai pornogrāfiska rakstura saturs';
    7575$lang['ad_c_manage_eroticonly'] = 'tikai erotiska rakstura saturs';
    76 $lang['ad_c_block_on_index'] = 'Skatīt bukletu mājas lapā? (Nepieciešams  PWG_Stuffs spraudnis) ';
    77 $lang['ad_c_block_on_index_error_2'] = 'Minimālā pieprasītā  PWG_Stuffs versija ir 2.1';
    78 $lang['ad_c_block_on_index_error'] = 'Pagaidām nav pieejams';
    7976?>
  • extensions/adult_content/language/pl_PL/plugin.lang.php

    r20698 r21057  
    4343$lang['ac_user_text_16'] = 'Masz 16 lub 17 lat';
    4444$lang['ac_user_text_18'] = 'Masz więcej niż 18 lat';
    45 $lang['ad_c_block_on_index_error_2'] = 'Minimalna wymagana wersja PWG_Stuffs to 2.1';
    46 $lang['ad_c_block_on_index_error'] = 'Aktualnie niedostępne';
    4745$lang['ad_c_linktolang'] = 'Idź do pliku language tego pluginu (wymagany LocalFiles Editor)';
    4846$lang['ad_c_manage_both'] = 'zawartość erotyczna i pornograficzna';
  • extensions/adult_content/language/tr_TR/plugin.lang.php

    r20028 r21057  
    4343$lang['ac_user_text_16'] = 'Yaşınız 16 veya 17 dir';
    4444$lang['ac_user_text_18'] = 'Yaşınız 18 \'den büyük';
    45 $lang['ad_c_block_on_index_error_2'] = 'PWG_Stuffs ekletisi en az sürüm 2.1.l gerektirir';
    46 $lang['ad_c_block_on_index_error'] = 'Şu an için kullanılamaz';
    47 $lang['ad_c_block_on_index'] = 'Ana sayfada bir ilan görüntülensin mi? (PWG_Stuffs ekletisi gerektirir)';
    4845$lang['ad_c_linktolang'] = 'Adult Content eklentisi dil dosyasına gidiniz (LocalFiles düzenleyicisinin etkin olması gerekir)';
    4946$lang['ad_c_manage_both'] = 'erotik ve pornografik içerik';
  • extensions/adult_content/language/uk_UA/plugin.lang.php

    r14673 r21057  
    3333$lang['ac_user_text_16'] = 'Вам 16 або 17 років';
    3434$lang['ac_user_text_18'] = 'Вам більш ніж 18 років';
    35 $lang['ad_c_block_on_index_error'] = 'Не доступний зараз';
    3635$lang['ad_c_linktolang'] = 'Перейти до мовного файлу із вмістом для дорослих (необхідно ввімкнути LocalFiles Editor)';
    3736$lang['ad_c_manage_both'] = 'еротичний і порнографічний вміст';
     
    5857$lang['ac_text'] = 'Ця галерея містить зображення, для зрілих осіб та\або дорослих.';
    5958$lang['ac_user_no'] = 'ви не бажаєте активувати цей тип вмісту';
    60 $lang['ad_c_block_on_index_error_2'] = 'Мінімальна необхідна версія PWG_Stuffs 2.1.l';
    61 $lang['ad_c_block_on_index'] = 'Переглянути листівку на головній сторінці? (Потрібен плаґін PWG_Stuffs)';
    6259$lang['ad_c_manage_what'] = 'Виберіть тип вмісту, яким плаґін повинен керувати:';
    6360$lang['ad_c_menublock_for_guest'] = 'Дозволити незареєстрованим користувачам вибирати свій вік?';
  • extensions/adult_content/main.inc.php

    r21047 r21057  
    3131//block on index
    3232
    33 /*
    34 global $conf;
    35 add_event_handler('loc_begin_index', array(&$adult_content, 'set_block_on_index'));
    36 */
    3733add_event_handler('get_stuffs_modules', array(&$adult_content, 'ac_stuffs_module'));
    3834
  • extensions/adult_content/maintain.inc.php

    r21047 r21057  
    4848
    4949/////////////Config plugin
    50     $config_start=array('menublock_for_guest'=>true,'block_on_index'=>false,'manage_what'=>'both');
     50    $config_start=array('menublock_for_guest'=>true,'manage_what'=>'both');
    5151    $q = '
    5252INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment)
    5353        VALUES
    54         ("ad_c_plugin" , "'.pwg_db_real_escape_string(serialize($config_start)).'" , "Plugin adult_content : menublock_for_guest, block_on_index, manage_what");';
     54        ("ad_c_plugin" , "'.pwg_db_real_escape_string(serialize($config_start)).'" , "Plugin adult_content : menublock_for_guest, manage_what");';
    5555    pwg_query($q);
    5656
     
    124124        if ( $exist == 0 )
    125125        {
    126           $config_start=array('menublock_for_guest'=>true,'block_on_index'=>false,'manage_what'=>'both');
     126          $config_start=array('menublock_for_guest'=>true,'manage_what'=>'both');
    127127    $q = '
    128128    INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment)
    129129    VALUES
    130       ("ad_c_plugin" , "'.pwg_db_real_escape_string(serialize($config_start)).'" , "Plugin adult_content : menublock_for_guest, block_on_index, manage_what");';
     130      ("ad_c_plugin" , "'.pwg_db_real_escape_string(serialize($config_start)).'" , "Plugin adult_content : menublock_for_guest, manage_what");';
    131131    pwg_query($q);
    132132        }
     
    140140    $nbr=count($cf);
    141141       
    142           if ($nbr!=3)
     142          if ($nbr!=2)
    143143          {
    144       $config_start=array('menublock_for_guest'=>true,'block_on_index'=>false,'manage_what'=>'both');
     144      $config_start=array('menublock_for_guest'=>true,'manage_what'=>'both');
    145145      $q = '
    146146      UPDATE ' . CONFIG_TABLE . ' SET
    147       param="ad_c_plugin", value="'.pwg_db_real_escape_string(serialize($config_start)).'", comment="Plugin adult_content : menublock_for_guest, block_on_index, manage_what"
     147      param="ad_c_plugin", value="'.pwg_db_real_escape_string(serialize($config_start)).'", comment="Plugin adult_content : menublock_for_guest, manage_what"
    148148      WHERE param IN (\'ad_c_plugin\');';
    149149      pwg_query($q);
  • extensions/adult_content/stuffs_module/config.inc.php

    r21047 r21057  
    66$display_options['on_picture'] = false;
    77
    8 $template->assign('MODULE_OPTIONS', '<p>'.l10n('ac_stuffs_info_param').'</p>');
     8$template->assign('MODULE_OPTIONS', '<p>'.l10n('No options. Just check "Allow unregistered users to select their age?" on the Adult Content administration page').'</p>');
    99
    1010?>
Note: See TracChangeset for help on using the changeset viewer.