}
 if (is_bool($c->comments)) {
     $c->comments = (object) array('allow' => $c->comments, 'moderation' => $c->comment_moderation);
 }
 if ($c->html_parser === false) {
     $c->html_parser = 'HTML';
 }
 if (!is_object($c->html_parser)) {
     $c->html_parser = (object) array('type' => array('HTML' => 'HTML'), 'active' => $c->html_parser);
 }
 $menus = Get::state_menu(null, false);
 if (!isset($menus['navigation'])) {
     $menus['navigation'] = $menus;
     File::serialize($menus)->saveTo(STATE . DS . 'menu.txt', 0600);
 }
 if ($tag = Get::state_tag(null, false)) {
     if (isset($tag[0]['id'])) {
         $tags = array();
         foreach ($tag as $t) {
             $tags[$t['id']] = array('name' => $t['name'], 'slug' => $t['slug'], 'description' => $t['description'], 'scope' => 'article');
         }
         File::serialize($tags)->saveTo(STATE . DS . 'tag.txt', 0600);
     }
 }
 if (is_string($c->author)) {
     $c->author = (object) array('name' => $c->author, 'email' => $c->author_email, 'url' => $c->author_profile_url);
     if ($c->page_type === 'manager') {
         Notify::info('<strong>1.2.0</strong> &mdash; In your <a href="' . $c->url . '/' . $c->manager->slug . '/shield">shield</a> files, change all <code>$c->author</code> data to <code>$c->author->name</code>, <code>$c->author_email</code> data to <code>$c->author->email</code> and <code>$c->author_profile_url</code> data to <code>$c->author->url</code>. Then go to the <a href="' . $c->url . '/' . $c->manager->slug . '/config">configuration manager page</a> to kill this message by pressing the <strong>Update</strong> button.');
     }
 }
 Config::set(Mecha::A($c));
Exemple #2
0
<?php

// Get tag(s) ...
$tags = Get::state_tag(null, array(), false);
/**
 * Tag Manager
 * -----------
 */
Route::accept($config->manager->slug . '/tag', function () use($config, $speak, $tags) {
    Config::set(array('page_title' => $speak->tags . $config->title_separator . $config->manager->title, 'cargo' => 'cargo.tag.php'));
    Shield::lot(array('segment' => 'tag', 'files' => !empty($tags) ? Mecha::O($tags) : false))->attach('manager');
});
/**
 * Tag Repairer/Igniter
 * --------------------
 */
Route::accept(array($config->manager->slug . '/tag/ignite', $config->manager->slug . '/tag/repair/id:(:any)'), function ($id = false) use($config, $speak, $tags) {
    if ($id === false) {
        Weapon::add('SHIPMENT_REGION_BOTTOM', function () {
            echo '<script>(function($){$.slug(\'name\',\'slug\',\'-\')})(DASHBOARD.$);</script>';
        }, 11);
        $data = array('id' => max(array_keys($tags)) + 1, 'name' => "", 'slug' => "", 'description' => "", 'scope' => "");
        $title = Config::speak('manager.title_new_', $speak->tag) . $config->title_separator . $config->manager->title;
    } else {
        if (!isset($tags[$id])) {
            Shield::abort();
            // Field not found!
        }
        $data = $tags[$id];
        $data['id'] = $id;
        $title = $speak->editing . ': ' . $data['name'] . $config->title_separator . $config->manager->title;
Exemple #3
0
$hooks = array($files, $segment);
?>
<div class="main-action-group">
  <?php 
Weapon::fire('main_action_before', $hooks);
?>
  <?php 
echo Jot::btn('begin:plus-square', Config::speak('manager.title_new_', $speak->tag), $config->manager->slug . '/tag/ignite');
?>
  <?php 
Weapon::fire('main_action_after', $hooks);
?>
</div>
<?php 
echo $messages;
$files_all = Get::state_tag(null, array());
ksort($files_all);
if ($files_all) {
    ?>
<table class="table-bordered table-full-width">
  <thead>
    <tr>
      <th class="th-collapse"><?php 
    echo $speak->id;
    ?>
</th>
      <th><?php 
    echo $speak->name;
    ?>
</th>
      <th><?php