Example #1
0
<html dir="<?php 
echo $config->language_direction;
?>
" class="page-<?php 
echo $config->page_type;
?>
">
  <head>
    <?php 
Weapon::fire('SHIPMENT_REGION_TOP');
?>
    <?php 
Weapon::fire('shell_before');
?>
    <?php 
echo Asset::stylesheet(array($config->protocol . ICON_LIBRARY_PATH, 'assets/shell/atom.css', 'assets/shell/layout.css'));
?>
    <?php 
Weapon::fire('shell_after');
?>
  </head>
  <body>
    <?php 
Weapon::fire('cargo_before');
?>
    <div class="blog-wrapper">
      <header class="blog-header">
        <?php 
if ($config->url_current == $config->url) {
    ?>
        <h1 class="blog-title"><?php 
Example #2
0
     }
     unset($constant);
     $cargo = array('segment' => $segment, 'language' => $config->language, 'languages' => Config::get('DASHBOARD.languages', array()), 'html_parser' => Config::get('html_parser'), 'file_extension_allow' => implode(',', File::$config['file_extension_allow']), 'url' => array('protocol' => $config->url_protocol, 'base' => $config->url_base, 'host' => $config->url_host, 'url' => $config->url_url, 'path' => $config->url_path, 'current' => $config->url_current, 'query' => $config->url_query));
     $output = O_BEGIN . '<script>var ' . rtrim($constant_js, ',') . ';';
     foreach ($cargo as $k => $v) {
         $output .= 'DASHBOARD.' . $k . '=' . json_encode($v) . ';';
     }
     $output .= 'DASHBOARD.url.hash=window.location.hash;';
     echo $output . '</script>' . O_END;
 }, 20);
 Weapon::add('shell_after', function () use($config) {
     if (!Asset::loaded($config->protocol . ICON_LIBRARY_PATH)) {
         echo Asset::stylesheet($config->protocol . ICON_LIBRARY_PATH);
     }
     $path = __DIR__ . DS . 'assets' . DS . 'shell' . DS;
     echo Asset::stylesheet(array($path . 'row.css', $path . 'upload.css', $path . 'tab.css', $path . 'toggle.css', $path . 'modal.css', $path . 'tooltip.css', $path . 'sortable.css', $path . 'accordion.css', $path . 'layout.css', SHIELD . DS . $config->shield . DS . 'assets' . DS . 'shell' . DS . 'manager.css'), "", 'shell/manager.min.css');
 }, 10);
 Weapon::add('cargo_after', function () use($config, $speak) {
     if (Config::get('widget_manager_bar_id', 0) <= 1) {
         echo Widget::manager('BAR');
         // include once ...
     }
 }, 20);
 Weapon::add('SHIPMENT_REGION_BOTTOM', function () use($config) {
     Session::kill('recent_item_update');
     $path = __DIR__ . DS . 'assets' . DS . 'sword' . DS;
     echo Asset::javascript(array($path . 'ajax.js', $path . 'row.js', $path . 'slug.js', $path . 'upload.js', $path . 'tab.js', $path . 'toggle.js', $path . 'modal.js', $path . 'tooltip.js', $path . 'sortable.js', $path . 'accordion.js', SHIELD . DS . $config->shield . DS . 'assets' . DS . 'sword' . DS . 'manager.js'), "", 'sword/manager.min.js');
 }, 1);
 /**
  * Footer Link(s)
  * --------------
Example #3
0
    $html .= Cell::link(Filter::colon('feed:url', $config->url . '/feed/rss'), 'alternate', 'application/rss+xml', array('title' => $speak->feeds . $config->title_separator . $config->title), 2) . O_END;
    echo Filter::apply('meta', $html, 3);
}
Weapon::add('meta', 'do_meta_1', 10);
Weapon::add('meta', 'do_meta_2', 20);
Weapon::add('meta', 'do_meta_3', 30);
Weapon::add('SHIPMENT_REGION_TOP', function () {
    Weapon::fire('meta');
}, 10);
/**
 * Inject Widget's CSS and JavaScript
 * ----------------------------------
 */
if ($config->widget_include_css) {
    Weapon::add('shell_before', function () {
        echo Asset::stylesheet(SHIELD . DS . 'widgets.css', "", 'shell/widgets.min.css');
    });
}
if ($config->widget_include_js) {
    Weapon::add('SHIPMENT_REGION_BOTTOM', function () {
        echo Asset::javascript(SHIELD . DS . 'widgets.js', "", 'sword/widgets.min.js');
    });
}
/**
 * Loading Plugin(s)
 * -----------------
 */
Weapon::fire('plugins_before');
foreach ($plugins = Plugin::load() as $k => $v) {
    $__ = PLUGIN . DS . $k . DS;
    if (!($language = File::exist($__ . 'languages' . DS . $config->language . DS . 'speak.txt'))) {
<?php

$brush = Request::get('brush', $x === 'php' ? 'php' : 'generic');
$brush = Text::parse($brush, '->text');
if (is_numeric($brush) && $brush <= 0) {
    $brush = false;
}
$_ = File::D(__DIR__) . DS . 'assets' . DS;
echo '<!DOCTYPE html>' . NL;
echo '<html dir="ltr">' . NL;
echo TAB . '<head>' . NL;
echo str_repeat(TAB, 2) . '<meta charset="' . $config->charset . '">' . NL;
echo str_repeat(TAB, 2) . '<title>' . File::B($snippet) . '</title>' . NL;
echo str_repeat(TAB, 2) . '<link href="' . Filter::colon('favicon:url', $config->url . '/favicon.ico') . '" rel="shortcut icon" type="image/x-icon">' . NL;
echo str_repeat(TAB, 2) . Asset::stylesheet(array($_ . 'shell' . DS . 'page.min.css', $_ . 'shell' . DS . 'brush.min.css'));
echo TAB . '</head>' . NL;
echo TAB . '<body>' . NL;
echo str_repeat(TAB, 2) . '<pre><code' . ($brush !== false ? ' data-language="' . $brush . '"' : "") . '>';
echo Filter::colon('snippet:content_raw', Text::parse($content, '->encoded_html'), $snippet);
echo '</code></pre>' . NL;
echo str_repeat(TAB, 2) . '<div>' . NL;
echo str_repeat(TAB, 3) . '<strong><a href="' . $config->url . '" title="' . $speak->home . '">' . $config->title . '</a></strong>' . NL;
echo str_repeat(TAB, 3) . '<a href="?raw=1" target="_blank">' . $speak->plugin_snippet_share_title_raw . '</a>' . NL;
echo str_repeat(TAB, 3) . '<a href="?file=1">' . $speak->download . '</a>' . NL;
echo str_repeat(TAB, 2) . '</div>' . NL;
echo str_repeat(TAB, 2) . Asset::javascript(array($_ . 'sword' . DS . 'brush.min.js', $_ . 'sword' . DS . 'brush.line.min.js'));
if ($brush !== false) {
    echo str_repeat(TAB, 2) . Asset::javascript($_ . 'sword' . DS . 'brush' . DS . 'generic.min.js');
    if ($brush !== 'generic' && ($f = File::exist($_ . 'sword' . DS . 'brush' . DS . $brush . '.min.js'))) {
        echo str_repeat(TAB, 2) . Asset::javascript($f);
    }
 function do_response_reply_css()
 {
     echo Asset::stylesheet(File::D(__DIR__) . DS . 'assets' . DS . 'shell' . DS . 'do.css');
 }
">
  <head>
  <?php 
Weapon::fire('SHIPMENT_REGION_TOP');
?>
  <?php 
Weapon::fire('shell_before');
?>
  <?php 
$root_1 = PLUGIN . DS . 'manager' . DS . 'assets' . DS . 'shell' . DS;
?>
  <?php 
$root_2 = File::D(__DIR__) . DS . 'assets' . DS . 'shell' . DS;
?>
  <?php 
echo Asset::stylesheet(array($root_1 . 'row.css', $root_1 . 'upload.css', $root_1 . 'tab.css', $root_1 . 'toggle.css', $root_1 . 'modal.css', $root_1 . 'tooltip.css', $root_1 . 'sortable.css', $root_1 . 'accordion.css', $root_1 . 'layout.css', $root_2 . 'atom.css', $root_2 . 'layout.css'), "", 'shell/dashboard.min.css');
?>
  <?php 
Weapon::fire('shell_after');
?>
  </head>
  <body>
  <?php 
Weapon::fire('cargo_before');
?>
  <div class="board cl cf">
    <aside class="board-left cl cf">
      <?php 
echo Widget::manager('MENU');
?>
    </aside>
Example #7
0
 * Backend Asset(s)
 * ----------------
 *
 * Inject the required asset(s) for manager.
 *
 */
Weapon::add('meta', function () use($config) {
    echo O_BEGIN . '<script>!function(a){var b=a.className;a.className=/(^|\\s)no-js(\\s|$)/.test(b)?b.replace(/(^|\\s)no-js(\\s|$)/,"$1js$2"):b+" js"}(document.documentElement);</script>' . O_END;
    if (!Asset::loaded($config->protocol . JS_LIBRARY_PATH)) {
        echo Asset::javascript($config->protocol . JS_LIBRARY_PATH);
    }
}, 20);
Weapon::add('shell_after', function () use($config) {
    echo Asset::stylesheet(array('manager/assets/shell/editor.css', 'manager/assets/shell/row.css', 'manager/assets/shell/check.css', 'manager/assets/shell/upload.css', 'manager/assets/shell/tab.css', 'manager/assets/shell/modal.css', 'manager/assets/shell/tooltip.css', 'manager/assets/shell/sortable.css', 'manager/assets/shell/accordion.css', 'manager/assets/shell/layout.css', 'assets/shell/manager.css', 'shell/manager.css'), "", 'shell/manager.min.css');
    if (!Asset::loaded($config->protocol . ICON_LIBRARY_PATH)) {
        echo Asset::stylesheet($config->protocol . ICON_LIBRARY_PATH);
    }
}, 10);
Weapon::add('cargo_after', function () use($config, $speak) {
    if (Widget::$id['manager_bar'] <= 1) {
        echo O_BEGIN . Widget::manager('BAR') . O_END;
        // include once ...
    }
}, 20);
Weapon::add('SHIPMENT_REGION_BOTTOM', function () use($config, $speak, $uri_end) {
    echo Asset::javascript(array('manager/assets/sword/dashboard.js', 'manager/assets/sword/dashboard.task.extend.js', 'manager/assets/sword/dashboard.task.file.js', 'manager/assets/sword/dashboard.task.query.js', 'manager/assets/sword/dashboard.task.session.js', 'manager/assets/sword/dashboard.task.slug.js'), "", 'sword/dashboard.min.js');
    $constant = get_defined_constants(true);
    $constant_js = "";
    foreach ($constant['user'] as $k => $v) {
        $constant_js .= $k . '=' . json_encode($v) . ',';
    }
Example #8
0
 * --------------------------------
 */
$e = explode(',', FONT_EXT . ',' . IMAGE_EXT . ',' . MEDIA_EXT . ',' . PACKAGE_EXT . ',' . SCRIPT_EXT);
File::configure('file_extension_allow', array_unique($e));
/**
 * Set Default Time Zone
 * ---------------------
 */
date_default_timezone_set($config->timezone);
/**
 * Inject Widget's CSS and JavaScript
 * ----------------------------------
 */
if ($config->widget_include_css) {
    Weapon::add('shell_before', function () {
        echo Asset::stylesheet('cabinet/shields/widgets.css', "", 'shell/widgets.min.css');
    });
}
if ($config->widget_include_js) {
    Weapon::add('SHIPMENT_REGION_BOTTOM', function () {
        echo Asset::javascript('cabinet/shields/widgets.js', "", 'sword/widgets.min.js');
    });
}
/**
 * Loading Plugin(s)
 * -----------------
 */
$plugins = Plugin::load();
for ($i = 0, $count = count($plugins); $i < $count; ++$i) {
    if ($plugins[$i]) {
        $plugins[$i] = PLUGIN . DS . $plugins[$i];
Example #9
0
Weapon::add('shield_before', function () use($editor_config) {
    // Manage editor button(s)
    $editor = Config::speak('MTE');
    foreach ($editor->buttons as $k => $v) {
        if (!Text::check($k)->in(array('yes', 'no', 'ok', 'cancel', 'open', 'close'))) {
            if (!isset($editor_config['buttons'][$k])) {
                $editor->buttons->{$k} = false;
            }
        }
    }
    // Merge language data to the `DASHBOARD`
    Config::merge('DASHBOARD.languages.MTE', $editor);
}, 1);
// Inject editor's CSS
Weapon::add('shell_after', function () use($editor_config) {
    echo Asset::stylesheet(__DIR__ . DS . 'assets' . DS . 'shell' . DS . 'editor.css', "", 'shell/editor.min.css');
}, 2);
// Inject editor's JavaScript
Weapon::add('SHIPMENT_REGION_BOTTOM', function () use($config, $speak) {
    echo '<script>(function($){$(\'.MTE\').attr(\'data-MTE-config\',\'{"toolbar":true,"shortcut":true}\')})(DASHBOARD.$);</script>';
    $path = __DIR__ . DS . 'assets' . DS . 'sword' . DS;
    $editor = Config::get('MTE', 'HTE');
    echo Asset::javascript(array($path . 'editor.min.js', $path . 'hte.min.js'));
    echo '<script>var MTE=' . $editor . ';</script>';
    echo Asset::javascript($path . 'run.js', "", 'sword/run.min.js');
}, 2);
/**
 * Plugin Updater
 * --------------
 */
Route::accept($config->manager->slug . '/plugin/' . File::B(__DIR__) . '/update', function () use($config, $speak) {