protected function execute(InputInterface $input, OutputInterface $output) { if (!$this->isInstalled()) { throw new RuntimeException('Invalid Kirby installation'); } // bootstrap the core $this->bootstrap(); $output->writeln("<info>Core:\t\t" . kirby::version() . "</info>"); $output->writeln("<info>Toolkit:\t" . toolkit::version() . "</info>"); // also check for the panel version, if it is installed if (is_dir($this->dir() . '/panel')) { if (!is_file($this->dir() . '/panel/app/bootstrap.php')) { throw new RuntimeException('The panel does not seem to be correctly installed'); } // bootstrap the panel require $this->dir() . '/panel/app/bootstrap.php'; $output->writeln("<info>Panel:\t\t" . panel::version() . "</info>"); } }
<div class="section"> <h2 class="hgroup hgroup-single-line hgroup-compressed cf"> <span class="hgroup-title"> <?php _l('metatags.info'); ?> </span> </h2> <div class="text"> <p> <?php _l('metatags.version.toolkit'); ?> : <?php echo toolkit::version(); ?> <br /> <?php _l('metatags.version.kirby'); ?> : <?php echo kirby::version(); ?> <br /> <?php _l('metatags.version.panel'); ?> : <?php echo panel::version(); ?>
echo $page->tinyurl(); ?> " id="page_shorturl" class="form-control disabled" id="basic-url" aria-describedby="basic-addon3"> <span class="input-group-btn"> <button class="btn btn-default btn-clipboard" data-clipboard-target="#page_shorturl" type="button"> <i class="fa fa-clipboard"></i></button> </span> </div> </div> <div class="col-md-3 col-xs-4"> <?php if ($user = $site->user() and $user->hasPanelAccess()) { ?> <?php // New Admin URLs in 2.2 $version = str_replace(".", "", toolkit::version()); $adminUrl = "/panel/pages/{$page->uri()}/edit"; if ($version < 220) { $adminUrl = "/panel/#/pages/show/{$page->uri()}/p:1"; } ?> <a href="<?php echo $adminUrl; ?> " class="btn btn-warning" target="blank"> <i class="fa fa-pencil"></i> Edit </a> <?php } ?>
public function requirements() { if (!version_compare(PHP_VERSION, static::$requires['php'], '>=')) { throw new Exception('Your PHP version is too old. Please upgrade to ' . static::$requires['php'] . ' or newer.'); } if (!detect::mbstring()) { throw new Exception('The mbstring extension must be installed'); } if (!version_compare(toolkit::version(), static::$requires['toolkit'], '>=')) { throw new Exception('Your Toolkit version is too old. Please upgrade to ' . static::$requires['toolkit'] . ' or newer.'); } if (!version_compare(kirby::version(), static::$requires['kirby'], '>=')) { throw new Exception('Your Kirby version is too old. Please upgrade to ' . static::$requires['kirby'] . ' or newer.'); } }
public function javascriptValidator() { if (toolkit::load_javascript_once('configuration.php') and toolkit::load_javascript_once('jquery.js') and toolkit::load_javascript_once('validator.js')) { return true; } else { return false; } }