diff --git a/core/core.php b/core/core.php index bc6fb0c8..d6458375 100755 --- a/core/core.php +++ b/core/core.php @@ -164,7 +164,6 @@ class common { 'theme' => '', 'admin' => '', 'blacklist' => '', - 'translate' => '', 'locale' => '' ]; @@ -219,7 +218,7 @@ class common { } // Auto traduction - if ( $this->getData(['translate','active'])) { + if ( $this->getData(['config','translate','active'])) { // Lire la langue du navigateur $lan = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); @@ -2137,7 +2136,7 @@ class core extends common { // Librairie googtrans ajouté dynamiquement if ( substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2) !== 'fr' - AND $this->getData(['translate','active']) === true + AND $this->getData(['config','translate','active']) === true AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')) { $this->addOutput([ 'vendor' => array_merge($this->output['vendor'], ['i18n']) @@ -2278,8 +2277,8 @@ class layout extends common { echo $this->core->output['content']; if ( substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2) !== 'fr' - AND $this->getData(['translate','showCredits']) === true - AND $this->getData(['translate','active']) === true ) + AND $this->getData(['config','translate','showCredits']) === true + AND $this->getData(['config','translate','active']) === true ) { echo '
'; } diff --git a/core/module/install/ressource/defaultdata.php b/core/module/install/ressource/defaultdata.php index 532d921e..a34deaf9 100755 --- a/core/module/install/ressource/defaultdata.php +++ b/core/module/install/ressource/defaultdata.php @@ -41,7 +41,11 @@ class init extends common { 'attempt' => 3, 'log' => false, 'captcha' => true - ] + ], + 'translate' => [ + 'active' => false, + 'showCredits' => false + ], ], 'core' => [ 'dataVersion' => 10306, @@ -80,10 +84,6 @@ class init extends common { 'hideMenuChildren' =>false ] ], - 'translate' => [ - 'active' => false, - 'showCredits' => false - ], 'module' => [], 'user' => [], 'theme' => [ @@ -651,7 +651,13 @@ class init extends common { 'blog' => [ 'config' => [ 'feeds' => true, - 'feedsLabel' => "Syndication RSS" + 'feedsLabel' => "Syndication RSS", + "editConsent" => "all", + "commentMaxlength" => "500", + "commentApproved" => false, + "commentClose" => false, + "commentNotification" => false, + "commentGroupNotification" => 1 ], 'posts' => [ 'mon-premier-article' => [ @@ -661,7 +667,8 @@ class init extends common { 'author' => 'Rémi', 'content' => 'Article bien rédigé et très pertinent, bravo !', 'createdOn' => 1421748000, - 'userId' => '' + 'userId' => '', + 'approval' => true ] ], 'content' => 'Et eodem impetu Domitianum praecipitem per scalas itidem funibus constrinxerunt, eosque coniunctos per ampla spatia civitatis acri raptavere discursu. iamque artuum et membrorum divulsa conpage superscandentes corpora mortuorum ad ultimam truncata deformitatem velut exsaturati mox abiecerunt in flumen.
Ex his quidam aeternitati se commendari posse per statuas aestimantes eas ardenter adfectant quasi plus praemii de figmentis aereis sensu carentibus adepturi, quam ex conscientia honeste recteque factorum, easque auro curant inbracteari, quod Acilio Glabrioni delatum est primo, cum consiliis armisque regem superasset Antiochum. quam autem sit pulchrum exigua haec spernentem et minima ad ascensus verae gloriae tendere longos et arduos, ut memorat vates Ascraeus, Censorius Cato monstravit. qui interrogatus quam ob rem inter multos... statuam non haberet malo inquit ambigere bonos quam ob rem id non meruerim, quam quod est gravius cur inpetraverim mussitare.
Latius iam disseminata licentia onerosus bonis omnibus Caesar nullum post haec adhibens modum orientis latera cuncta vexabat nec honoratis parcens nec urbium primatibus nec plebeiis.
', diff --git a/core/module/translate/translate.php b/core/module/translate/translate.php index 447cedf5..c4717b8c 100755 --- a/core/module/translate/translate.php +++ b/core/module/translate/translate.php @@ -25,7 +25,7 @@ class translate extends common { public function index() { // Soumission du formulaire if($this->isPost()) { - $this->setData(['translate', [ + $this->setData(['config','translate', [ 'active' => $this->getInput('translateActive', helper::FILTER_BOOLEAN), 'showCredits' => $this->getInput('translateActive', helper::FILTER_BOOLEAN) ? $this->getInput('translateCredits', helper::FILTER_BOOLEAN) : false, ]]); diff --git a/core/module/translate/view/index/index.php b/core/module/translate/view/index/index.php index cf8e2377..fd40a573 100755 --- a/core/module/translate/view/index/index.php +++ b/core/module/translate/view/index/index.php @@ -19,13 +19,13 @@