Changeset 21057 for extensions/adult_content
- Timestamp:
- Feb 27, 2013, 8:37:57 PM (12 years ago)
- Location:
- extensions/adult_content
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/adult_content/admin/admin.php
r21047 r21057 16 16 $newconf_plugin=array(); 17 17 $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;19 18 $newconf_plugin['manage_what'] = (isset($_POST['manage_what'])) ? $_POST['manage_what'] : 'both'; 20 19 $query = ' … … 33 32 $check='checked="checked"'; 34 33 if ($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 46 43 $template->set_filename('plugin_admin_content', $ad_c->plugin_path.'admin/admin.tpl'); 47 44 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); -
extensions/adult_content/admin/admin.tpl
r12646 r21057 11 11 <br /> 12 12 <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 />17 13 <span class="property">{'ad_c_manage_what'|@translate}</span> 18 14 <select name="manage_what" style="min-width:150px;"> … … 22 18 </select> 23 19 <br /> 20 <br /> 24 21 <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 /> 25 25 </form> 26 26 </fieldset> -
extensions/adult_content/class.inc.php
r21047 r21057 118 118 } 119 119 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 }160 120 function placer_identification($menu_ref_arr) 161 121 { … … 324 284 'path' => PHPWG_PLUGINS_PATH . AC_NAME . '/stuffs_module/', 325 285 'name' => l10n('ac_text'), 326 'description' => l10n(' ac_stuffs_description'),286 'description' => l10n('Disclaimer for the guest, with the ability to choose its age'), 327 287 ) 328 288 ); -
extensions/adult_content/language/cs_CZ/plugin.lang.php
r14461 r21057 38 38 $lang['ac_def'] = 'Chcete změnit svůj stav?'; 39 39 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)';43 40 $lang['ad_c_linktolang'] = 'Jděte do jazykového souboru Adult Content (nutno mít povolený LocalFiles Editor)'; 44 41 $lang['ad_c_manage_both'] = 'erotický a pornografický obsah'; -
extensions/adult_content/language/da_DK/plugin.lang.php
r18412 r21057 26 26 $lang['ac_user_text_16'] = 'Du er 16 eller 17 år gammel'; 27 27 $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';31 28 $lang['ad_c_linktolang'] = 'Gå til Adult Contents sprogfil (kræver at LocalFiles Editor er aktiveret)'; 32 29 $lang['ad_c_manage_both'] = 'erotisk og pornografisk indhold'; -
extensions/adult_content/language/de_DE/plugin.lang.php
r16491 r21057 41 41 $lang['ac_user_text_16'] = 'Sie sind 16 oder 17 Jahre alt'; 42 42 $lang['ac_user_text_18'] = 'Sie sind älter als 18 Jahre'; 43 $lang['ad_c_block_on_index_error'] = 'Zur Zeit nicht verfügbar';44 43 $lang['ad_c_menublock_for_guest'] = 'Erlaube unregistrierten Benutzern das Alter auszuwählen?'; 45 44 $lang['ad_c_send'] = 'Änderungen speichern'; … … 51 50 Jede Person, die trotz eingehender Warnung, ihre Zustimmung zum betreten dieser Seite gibt, befreit diese Seite von allen Konsequenzen daraus.</ p> 52 51 <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)';55 52 $lang['ad_c_linktolang'] = 'Gehen Sie auf die Sprach-Datei von nicht jugendfreien Inhalten (Benötigen LocalFiles Editor aktiviert)'; 56 53 $lang['ad_c_manage_both'] = 'erotische und pornografische Inhalte'; -
extensions/adult_content/language/el_GR/plugin.lang.php
r16329 r21057 53 53 $lang['ac_user_text_16'] = 'Είστε 16 ή 17 ετών'; 54 54 $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)';58 55 $lang['ad_c_howitworks'] = 'Η αρχή αυτού του πρόσθετου είναι να βοηθήσει στη διαχείριση του περιεχομένου για ενήλικες (μπορεί επίσης να προσαρμοστεί για βίαιο περιεχόμενο). Για να γίνει αυτό, το πρόσθετο διαχειρίζεται τους επισκέπτες και / ή τους χρήστες που θέλετε, σύμφωνα με τον ορισμό σας των παραμέτρων του πρόσθετου.<br /> 59 56 <br /> -
extensions/adult_content/language/en_UK/plugin.lang.php
r14365 r21057 39 39 40 40 $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';44 41 $lang['ad_c_manage_what'] = 'Select the type of content the plugin should manage :'; 45 42 $lang['ad_c_manage_eroticonly'] = 'erotic content only'; … … 125 122 "; 126 123 $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'; 127 128 ?> -
extensions/adult_content/language/es_ES/plugin.lang.php
r17362 r21057 38 38 $lang['ac_def'] = 'Usted quiere cambiar su estatuto ?'; 39 39 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)';43 40 $lang['ad_c_linktolang'] = 'Ir al archivo de lenguaje del Contenido para Adultos (se necesita tener habilitado el Editor LocalFiles)'; 44 41 $lang['ad_c_manage_both'] = 'contenido erótico y pornográfico'; -
extensions/adult_content/language/fr_FR/plugin.lang.php
r21047 r21057 39 39 40 40 $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';44 41 45 42 $lang['ad_c_manage_what'] = 'Le plugin gère le contenu'; … … 84 81 $lang['ad_c_linktolang']="Lien vers le fichier langue d'Adult Content (Nécessite localFiles Editor)"; 85 82 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'; 87 86 ?> -
extensions/adult_content/language/hu_HU/plugin.lang.php
r14630 r21057 38 38 $lang['ac_def'] = 'Szeretné megváltoztatni a státuszát ?'; 39 39 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';42 40 $lang['ad_c_linktolang'] = 'Adult Content nyelvi fájl megnyitása (a LocalFiles Editort aktiválni kell)'; 43 41 $lang['ad_c_manage_both'] = 'erotikus és pornográf tartalmat'; … … 48 46 $lang['ad_c_msg_admin_1'] = 'A bővítmény beállítások mentése sikeres'; 49 47 $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)';51 48 ?> -
extensions/adult_content/language/it_IT/plugin.lang.php
r21056 r21057 39 39 40 40 $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';44 41 $lang['ad_c_send'] = 'Salvare le modifiche'; 45 42 $lang['ad_c_msg_admin_1'] = 'Configurazione del plugin aggiornata correttamente!'; -
extensions/adult_content/language/lv_LV/plugin.lang.php
r17850 r21057 74 74 $lang['ad_c_manage_pornonly'] = 'tikai pornogrāfiska rakstura saturs'; 75 75 $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';79 76 ?> -
extensions/adult_content/language/pl_PL/plugin.lang.php
r20698 r21057 43 43 $lang['ac_user_text_16'] = 'Masz 16 lub 17 lat'; 44 44 $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';47 45 $lang['ad_c_linktolang'] = 'Idź do pliku language tego pluginu (wymagany LocalFiles Editor)'; 48 46 $lang['ad_c_manage_both'] = 'zawartość erotyczna i pornograficzna'; -
extensions/adult_content/language/tr_TR/plugin.lang.php
r20028 r21057 43 43 $lang['ac_user_text_16'] = 'Yaşınız 16 veya 17 dir'; 44 44 $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)';48 45 $lang['ad_c_linktolang'] = 'Adult Content eklentisi dil dosyasına gidiniz (LocalFiles düzenleyicisinin etkin olması gerekir)'; 49 46 $lang['ad_c_manage_both'] = 'erotik ve pornografik içerik'; -
extensions/adult_content/language/uk_UA/plugin.lang.php
r14673 r21057 33 33 $lang['ac_user_text_16'] = 'Вам 16 або 17 років'; 34 34 $lang['ac_user_text_18'] = 'Вам більш ніж 18 років'; 35 $lang['ad_c_block_on_index_error'] = 'Не доступний зараз';36 35 $lang['ad_c_linktolang'] = 'Перейти до мовного файлу із вмістом для дорослих (необхідно ввімкнути LocalFiles Editor)'; 37 36 $lang['ad_c_manage_both'] = 'еротичний і порнографічний вміст'; … … 58 57 $lang['ac_text'] = 'Ця галерея містить зображення, для зрілих осіб та\або дорослих.'; 59 58 $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)';62 59 $lang['ad_c_manage_what'] = 'Виберіть тип вмісту, яким плаґін повинен керувати:'; 63 60 $lang['ad_c_menublock_for_guest'] = 'Дозволити незареєстрованим користувачам вибирати свій вік?'; -
extensions/adult_content/main.inc.php
r21047 r21057 31 31 //block on index 32 32 33 /*34 global $conf;35 add_event_handler('loc_begin_index', array(&$adult_content, 'set_block_on_index'));36 */37 33 add_event_handler('get_stuffs_modules', array(&$adult_content, 'ac_stuffs_module')); 38 34 -
extensions/adult_content/maintain.inc.php
r21047 r21057 48 48 49 49 /////////////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'); 51 51 $q = ' 52 52 INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) 53 53 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");'; 55 55 pwg_query($q); 56 56 … … 124 124 if ( $exist == 0 ) 125 125 { 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'); 127 127 $q = ' 128 128 INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) 129 129 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");'; 131 131 pwg_query($q); 132 132 } … … 140 140 $nbr=count($cf); 141 141 142 if ($nbr!= 3)142 if ($nbr!=2) 143 143 { 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'); 145 145 $q = ' 146 146 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" 148 148 WHERE param IN (\'ad_c_plugin\');'; 149 149 pwg_query($q); -
extensions/adult_content/stuffs_module/config.inc.php
r21047 r21057 6 6 $display_options['on_picture'] = false; 7 7 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>'); 9 9 10 10 ?>
Note: See TracChangeset
for help on using the changeset viewer.