blog->settings->addNameSpace( ConstCategoriesPage::NS); if ( $ns->get(ConstCategoriesPage::PLUGIN_IS_ACTIVE) === null) { try { $ns->put( ConstCategoriesPage::PLUGIN_IS_ACTIVE, false, 'boolean'); # Url de base $p_url = 'plugin.php?p='.ConstCategoriesPage::PARAM; http::redirect($p_url); } catch (Exception $e) { $core->error->add($e->getMessage()); } } $active = $ns->get( ConstCategoriesPage::PLUGIN_IS_ACTIVE); $msg = ''; if (!empty($_POST['saveconfig'])) { try { $active = (empty($_POST['active'])) ? false : true; $ns->put( ConstCategoriesPage::PLUGIN_IS_ACTIVE, $active,'boolean'); $core->blog->triggerBlog(); $msg = dcPage::success( __('Configuration successfully updated.'), true, false, false); } catch (Exception $e) { $core->error->add($e->getMessage()); } } $page_title = __('Categories Page'); echo ' '. $page_title.' ' . dcPage::breadcrumb( array( html::escapeHTML($core->blog->name) => '', ''.$page_title.'' => '' )).$msg. '

'. __('Plugin config').'

'. $core->formNonce(). '

'; } }