Changeset 2507
- Timestamp:
- 07/24/10 21:46:34 (13 years ago)
- Location:
- plugins/construction
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/construction/_define.php
r2472 r2507 17 17 /* Description*/ "Put your blog in construction", 18 18 /* Author */ "Osku and contributors", 19 /* Version */ '1. 0.2',19 /* Version */ '1.1', 20 20 /* Permissions */ 'admin', 21 21 /* Priority */ 2000 -
plugins/construction/_install.php
r2440 r2507 56 56 ); 57 57 58 $s->put('construction_extra_urls', 59 serialize(array()), 60 'string', 61 'Construction blog message', 62 true, 63 true 64 ); 65 58 66 $core->setVersion('construction',$new_version); 59 67 return true; -
plugins/construction/_public.php
r2440 r2507 27 27 $core->tpl->setPath($core->tpl->getPath(), dirname(__FILE__).'/default-templates'); 28 28 $all_allowed_ip = unserialize($core->blog->settings->construction->construction_allowed_ip); 29 $extra_urls = unserialize($core->blog->settings->construction->construction_extra_urls); 29 30 if (!in_array(http::realIP(),$all_allowed_ip)) 30 31 { … … 34 35 foreach ($core->url->getTypes() as $k=>$v) 35 36 { 36 if ( $k != 'contactme')37 if (($k != 'contactme') && !in_array($k,$extra_urls)) 37 38 { 38 39 $core->url->register($k,$v['url'],$v['representation'],array('urlConstruction','p503')); … … 53 54 public static function default503($args,$type,$e) 54 55 { 55 if ($e->getCode() == 503) {56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 }56 //if ($e->getCode() == 503) { 57 $_ctx =& $GLOBALS['_ctx']; 58 $core =& $GLOBALS['core']; 59 60 header('Content-Type: text/html; charset=UTF-8'); 61 http::head(503,'Service Unavailable'); 62 $core->url->type = '503'; 63 $_ctx->current_tpl = '503.html'; 64 $_ctx->content_type = 'text/html'; 65 66 echo $core->tpl->getData($_ctx->current_tpl); 67 68 # --BEHAVIOR-- publicAfterDocument 69 $core->callBehavior('publicAfterDocument',$core); 70 exit; 71 //} 71 72 } 72 73 -
plugins/construction/index.php
r2472 r2507 31 31 $allowed_ip[] = trim($ip); 32 32 } 33 $urls = explode(",",$_POST['construction_extra_urls']); 34 foreach ($urls as $url) { 35 $extra_urls[] = trim($url); 36 } 33 37 $s->put('construction_allowed_ip',serialize($allowed_ip),'string','Construction blog allowed ip'); 34 38 $s->put('construction_title',$_POST['construction_title'],'string','Construction blog title'); 35 39 $s->put('construction_message',$_POST['construction_message'],'string','Construction blog message'); 40 $s->put('construction_extra_urls',serialize($extra_urls),'string','Construction extra allowed URLs'); 36 41 37 42 $core->blog->triggerBlog(); … … 77 82 '</p> 78 83 <p class="form-note">'.sprintf(__('Your IP is <strong>%s</strong> - the allowed IP can view the blog normally.'),$myip).'</p> 84 <p class="area"><label for="construction_extra_urls">'.__('Extra allowed URL types:').'</label>'. 85 form::field('construction_extra_urls',20,255,html::escapeHTML(implode(',',unserialize($s->construction_extra_urls))),'maximal'). 86 '</p> 79 87 </fieldset> 80 88 <fieldset> -
plugins/construction/locales/fr/main.po
r2442 r2507 1 # Language: Français2 # Module: construction - 1.03 # Date: 2010-07-04 17:01:144 # Translated with translater 1.4.15 1 6 2 msgid "" 7 3 msgstr "" 8 4 "Content-Type: text/plain; charset=UTF-8\n" 9 "Project-Id-Version: construction 1. 0\n"5 "Project-Id-Version: construction 1.1\n" 10 6 "POT-Creation-Date: \n" 11 "PO-Revision-Date: 2010-07- 04T17:01:14+00:00\n"12 "Last-Translator: osku\n"7 "PO-Revision-Date: 2010-07-24T19:35:41+00:00\n" 8 "Last-Translator: Osku\n" 13 9 "Language-Team: \n" 14 10 "MIME-Version: 1.0\n" 15 11 "Content-Transfer-Encoding: 8bit\n" 16 12 17 #: _admin.php:2318 #: index.php:5519 13 msgid "Construction" 20 14 msgstr "Construction" 21 15 22 #: _install.php:4323 16 msgid "Work in progress" 24 17 msgstr "Travaux en cours" 25 18 26 #: _install.php:5127 19 msgid "<p>The blog is currently under construction.</p>" 28 20 msgstr "<p>Le blog est actuellement en construction.</p>" 29 21 30 #: index.php:6331 22 msgid "Configuration successfully updated." 32 23 msgstr "Configuration mise à jour avec succès." 33 24 34 #: index.php:6535 25 msgid "construction" 36 26 msgstr "construction" 37 27 38 #: index.php:7039 28 msgid "Configuration" 40 29 msgstr "Configuration" 41 30 42 #: index.php:7343 31 msgid "Plugin activation" 44 32 msgstr "Activation de l'extension" 45 33 46 #: index.php:7547 34 msgid "Allowed IP:" 48 msgstr "IP autorisées "35 msgstr "IP autorisées :" 49 36 50 #: index.php:7851 37 msgid "Your IP is <strong>%s</strong> - the allowed IP can view the blog normally." 52 38 msgstr "Votre IP est <strong>%s</strong> - les IP autorisées peuvent visualiser le blog normalement." 53 39 54 #: index.php:81 40 msgid "Extra allowed URL types:" 41 msgstr "Autres types d'URL autorisées :" 42 55 43 msgid "Presentation" 56 msgstr "Présen sation"44 msgstr "Présentation" 57 45 58 #: index.php:8259 46 msgid "Title:" 60 47 msgstr "Titre :" 61 48 62 #: index.php:8563 49 msgid "Informations:" 64 msgstr "Information s:"50 msgstr "Information :" 65 51 66 #: index.php:9167 52 msgid "save" 68 53 msgstr "enregistrer"
Note: See TracChangeset
for help on using the changeset viewer.