Changeset 1460
- Timestamp:
- 09/15/09 14:00:16 (4 years ago)
- Location:
- plugins/disclaimer
- Files:
-
- 2 added
- 6 edited
-
README.txt (modified) (1 diff)
-
_admin.php (modified) (3 diffs)
-
_define.php (modified) (1 diff)
-
_public.php (modified) (2 diffs)
-
_uninstall.php (added)
-
locales/fr/main.lang.php (modified) (1 diff)
-
locales/fr/main.po (modified) (2 diffs)
-
release.txt (added)
Legend:
- Unmodified
- Added
- Removed
-
plugins/disclaimer/README.txt
r1331 r1460 62 62 (sauf si l'attribue encode_html est actif dans les templates) 63 63 64 6) Liste des robots autorisés à indexer les pages du site 65 Liste séparés par un point-virgule des robots d'indexation. 66 Cela permet au robot utilisant ce user-agent de ne pas être bloquer par 67 le disclaimer. 68 69 7) Désactiver l'autorisation d'indexation par les moteurs de recherches 70 Permet de désactiver la fonction de recherche de user-agent et de rediriger 71 tout les user-agent vers le disclaimer. 64 72 65 73 V. Templates: -
plugins/disclaimer/_admin.php
r1393 r1460 30 30 $blog_settings->put('disclaimer_title',$_POST['disclaimer_title']); 31 31 $blog_settings->put('disclaimer_text',$_POST['disclaimer_text']); 32 $blog_settings->put('disclaimer_bots_unactive',abs((integer) $_POST['disclaimer_bots_unactive'])); 33 $blog_settings->put('disclaimer_bots_agents',$_POST['disclaimer_bots_agents']); 32 34 } 33 35 catch (Exception $e) { … … 40 42 public static function adminBlogPreferencesForm($core,$blog_settings) 41 43 { 44 $bots = $blog_settings->disclaimer_bots_agents; 45 if (!$bots) 46 { 47 $bots = 48 'bot;Scooter;Slurp;Voila;WiseNut;Fast;Index;Teoma;'. 49 'Mirago;search;find;loader;archive;Spider;Crawler'; 50 } 51 42 52 echo 43 53 '<fieldset><legend>'.__('Disclaimer').'</legend>'. … … 60 70 '<p class="area"><label for="disclaimer_text">'.__('Disclaimer:').'</label>'. 61 71 form::textarea('disclaimer_text',60,5,html::escapeHTML($blog_settings->disclaimer_text)).'</p>'. 72 '<p><label>'.__('List of robots allowed to index the site pages:'). 73 form::field('disclaimer_bots_agents',120,255,html::escapeHTML($bots)). 74 '</label></p>'. 75 '<p><label class="classic">'. 76 form::checkbox('disclaimer_bots_unactive','1',$blog_settings->disclaimer_bots_unactive). 77 __('Disable the authorization of indexing by search engines').'</label></p>'. 62 78 '</fieldset>'; 63 79 } -
plugins/disclaimer/_define.php
r1393 r1460 17 17 /* Description*/ "Add a disclaimer to your blog entrance", 18 18 /* Author */ "JC Denis", 19 /* Version */ '0. 2',19 /* Version */ '0.3', 20 20 /* Permissions */ 'admin' 21 21 ); 22 /* date */ #20090 81622 /* date */ #20090916 23 23 ?> -
plugins/disclaimer/_public.php
r1393 r1460 33 33 class urlDisclaimer extends dcUrlHandlers 34 34 { 35 public static $default_bots_agents = array( 36 'bot','Scooter','Slurp','Voila','WiseNut','Fast','Index','Teoma', 37 'Mirago','search','find','loader','archive','Spider','Crawler' 38 ); 39 35 40 # Remove public callbacks (and serve disclaimer css) 36 41 public static function overwriteCallbacks($args) … … 54 59 { 55 60 global $core,$_ctx; 61 62 # Test user-agent to see if it is a bot 63 if (!$core->blog->settings->disclaimer_bots_unactive) 64 { 65 $bots_agents = $core->blog->settings->diclaimer_bots_agents; 66 $bots_agents = !$bots_agents ? 67 self::$default_bots_agents : explode(';',$bots_agents); 68 69 $is_bot = false; 70 foreach($bots_agents as $bot) { 71 72 if(stristr($_SERVER['HTTP_USER_AGENT'],$bot)) $is_bot = true; 73 } 74 75 if ($is_bot) return; 76 } 56 77 57 78 # Set default-templates path for disclaimer files -
plugins/disclaimer/locales/fr/main.lang.php
r1331 r1460 1 1 <?php 2 2 // Language: français 3 // Module: disclaimer - 0. 14 // Date: 2009-0 7-13 16:49:495 // Author: JC Denis, http://blog.jcdenis.com3 // Module: disclaimer - 0.3 4 // Date: 2009-09-15 11:59:19 5 // Author: , jcdenis@gdwd.com 6 6 // Translated with dcTranslater - 0.2.4 7 7 8 #_public.php:1 88 #_public.php:19 9 9 $GLOBALS['__l10n']['Disclaimer'] = 'Avertissement'; 10 10 11 #_admin.php: 4911 #_admin.php:58 12 12 $GLOBALS['__l10n']['Enable disclaimer'] = 'Activer l\'extension'; 13 13 14 #_admin.php: 5214 #_admin.php:65 15 15 $GLOBALS['__l10n']['Remember user'] = 'Se souvenir de l\'utilisateur'; 16 16 17 #_admin.php:54 18 $GLOBALS['__l10n']['URL prefix:'] = 'Préfixe du lien :'; 19 20 #_admin.php:57 17 #_admin.php:66 21 18 $GLOBALS['__l10n']['Link output:'] = 'Lien de sortie :'; 22 19 23 #_admin.php: 6420 #_admin.php:70 24 21 $GLOBALS['__l10n']['Disclaimer:'] = 'Avertissement :'; 25 22 26 #_public.php:19 23 #_admin.php:72 24 $GLOBALS['__l10n']['List of robots allowed to index the site pages:'] = 'Liste des robots autorisés à indexer les pages du site :'; 25 26 #_admin.php:77 27 $GLOBALS['__l10n']['Disable the authorization of indexing by search engines'] = 'Désactiver l\'autorisation d\'indexation par les moteurs de recherches'; 28 29 #_public.php:20 27 30 $GLOBALS['__l10n']['Accept terms of uses'] = 'Accepter les conditions d\'utilisation'; 28 31 29 #_public.php:2 032 #_public.php:21 30 33 $GLOBALS['__l10n']['I agree'] = 'J\'accepte'; 31 34 32 #_public.php:2 135 #_public.php:22 33 36 $GLOBALS['__l10n']['I disagree'] = 'Je refuse'; 34 37 -
plugins/disclaimer/locales/fr/main.po
r1331 r1460 1 1 # Language: français 2 # Module: disclaimer - 0. 13 # Date: 2009-0 7-13 16:49:494 # Author: JC Denis, http://blog.jcdenis.com2 # Module: disclaimer - 0.3 3 # Date: 2009-09-15 11:59:19 4 # Author: , jcdenis@gdwd.com 5 5 # Translated with dcTranslater - 0.2.4 6 6 … … 8 8 msgstr "Content-Type: text/plain; charset=UTF-8\n" 9 9 10 #: _public.php:1 810 #: _public.php:19 11 11 msgid "Disclaimer" 12 12 msgstr "Avertissement" 13 13 14 #: _admin.php: 4914 #: _admin.php:58 15 15 msgid "Enable disclaimer" 16 16 msgstr "Activer l'extension" 17 17 18 #: _admin.php: 5218 #: _admin.php:65 19 19 msgid "Remember user" 20 20 msgstr "Se souvenir de l'utilisateur" 21 21 22 #: _admin.php:54 23 msgid "URL prefix:" 24 msgstr "Préfixe du lien :" 25 26 #: _admin.php:57 22 #: _admin.php:66 27 23 msgid "Link output:" 28 24 msgstr "Lien de sortie :" 29 25 30 #: _admin.php: 6426 #: _admin.php:70 31 27 msgid "Disclaimer:" 32 28 msgstr "Avertissement :" 33 29 34 #: _public.php:19 30 #: _admin.php:72 31 msgid "List of robots allowed to index the site pages:" 32 msgstr "Liste des robots autorisés à indexer les pages du site :" 33 34 #: _admin.php:77 35 msgid "Disable the authorization of indexing by search engines" 36 msgstr "Désactiver l'autorisation d'indexation par les moteurs de recherches" 37 38 #: _public.php:20 35 39 msgid "Accept terms of uses" 36 40 msgstr "Accepter les conditions d'utilisation" 37 41 38 #: _public.php:2 042 #: _public.php:21 39 43 msgid "I agree" 40 44 msgstr "J'accepte" 41 45 42 #: _public.php:2 146 #: _public.php:22 43 47 msgid "I disagree" 44 48 msgstr "Je refuse"
Note: See TracChangeset
for help on using the changeset viewer.