/home
/deb107568
/domains
/chasingreels.nl
/public_html
/kirby
/vendor
/getkirby
/toolkit
/lib
/str.php
header::download(array(
'name' => $name ? $name : 'text.txt',
'size' => static::length($string),
'mime' => 'text/plain',
));
die($string);
}
/**
* Checks if a string starts with the passed needle
*
* @param string $string
* @param string $needle
* @return boolean
*/
public static function startsWith($string, $needle) {
return $needle === '' || strpos($string, $needle) === 0;
}
/**
* Checks if a string ends with the passed needle
*
* @param string $string
* @param string $needle
* @return boolean
*/
public static function endsWith($string, $needle) {
return $needle === '' || static::substr($string, -static::length($needle)) === $needle;
}
/**
* Get a character pool with various possible combinations
*
* @param string $type
* @param boolean $array
* @return string
*/
/home
/deb107568
/domains
/chasingreels.nl
/public_html
/kirby
/vendor
/getkirby
/toolkit
/lib
/str.php
header::download(array(
'name' => $name ? $name : 'text.txt',
'size' => static::length($string),
'mime' => 'text/plain',
));
die($string);
}
/**
* Checks if a string starts with the passed needle
*
* @param string $string
* @param string $needle
* @return boolean
*/
public static function startsWith($string, $needle) {
return $needle === '' || strpos($string, $needle) === 0;
}
/**
* Checks if a string ends with the passed needle
*
* @param string $string
* @param string $needle
* @return boolean
*/
public static function endsWith($string, $needle) {
return $needle === '' || static::substr($string, -static::length($needle)) === $needle;
}
/**
* Get a character pool with various possible combinations
*
* @param string $type
* @param boolean $array
* @return string
*/
/home
/deb107568
/domains
/chasingreels.nl
/public_html
/site
/plugins
/imageset
/lib
/plugin.php
public function license() {
$key = kirby()->option('imageset.license');
$type = 'trial';
/**
* Hey there,
*
* if you have digged deep into Kirby’s source code,
* than you’ve probably stumbled across a similiar
* message, asking you to be honest when using the
* software. I ask you the same, if your intention is to
* use ImageSet. Writing this plugin took a lot of time
* and it hopefully saves you a lot of headaches.
*
* Anyway, have a nice day!
*
* Fabian
*/
if (str::startsWith($key, 'IMGST1') && str::length($key) === 39) {
$type = 'ImageSet 1';
} else {
$key = null;
}
return new Obj(array(
'key' => $key,
'type' => $type,
));
}
}
/home
/deb107568
/domains
/chasingreels.nl
/public_html
/site
/plugins
/imageset
/imageset.php
}
}
// Register Snippet for ImageSet output. Can be overriden by
// placing a file called `imageset.php` within your snippets
// directory.
$kirby->set('snippet', 'imageset', __DIR__ . DS . 'snippets' . DS . 'imageset.php');
// Register image tag, if neither disabled in config nor
// overriden by a user-defined function.
if($kirby->option('imageset.tags.image') !== false && !file_exists($kirby->roots()->tags() . DS . 'image.php')) {
require_once __DIR__ . DS . 'tags' . DS . 'image.php';
}
// Register style consolidator if enabled in options
if($kirby->option('imageset.styles.consolidate')) {
$kirby->set('component', 'response', __NAMESPACE__ . '\\Component\\StylesConsolidatorResponse');
}
if(plugin::instance()->license()->type === 'trial') {
$kirby->set('widget', 'imageset', __DIR__ . DS . 'widgets' . DS . 'imageset');
}
/home
/deb107568
/domains
/chasingreels.nl
/public_html
/kirby
/kirby.php
* Loads a single plugin
*
* @param string $name
* @param string $mode
* @return mixed
*/
public function plugin($name, $mode = 'dir') {
if(isset($this->plugins[$name])) return $this->plugins[$name];
if($mode == 'dir') {
$file = $this->roots->plugins() . DS . $name . DS . $name . '.php';
} else {
$file = $this->roots->plugins() . DS . $name . '.php';
}
// make the kirby variable available in plugin files
$kirby = $this;
if(file_exists($file)) return $this->plugins[$name] = include_once($file);
return false;
}
/**
* Load all default extensions
*/
public function extensions() {
// load all kirby tags and field methods
include_once(__DIR__ . DS . 'extensions' . DS . 'tags.php');
include_once(__DIR__ . DS . 'extensions' . DS . 'methods.php');
// install additional kirby tags
kirbytext::install($this->roots->tags());
}
/**
/home
/deb107568
/domains
/chasingreels.nl
/public_html
/kirby
/kirby.php
*
* @return array
*/
public function plugins() {
// check for a cached plugins array
if(!is_null($this->plugins)) return $this->plugins;
// get the plugins root
$root = $this->roots->plugins();
// start the plugin registry
$this->plugins = array();
// check for an existing plugins dir
if(!is_dir($root)) return $this->plugins;
foreach(array_diff(scandir($root), array('.', '..')) as $file) {
if(is_dir($root . DS . $file)) {
$this->plugin($file, 'dir');
} else if(f::extension($file) == 'php') {
$this->plugin(f::name($file), 'file');
}
}
return $this->plugins;
}
/**
* Loads a single plugin
*
* @param string $name
* @param string $mode
* @return mixed
*/
public function plugin($name, $mode = 'dir') {
if(isset($this->plugins[$name])) return $this->plugins[$name];
/home
/deb107568
/domains
/chasingreels.nl
/public_html
/kirby
/kirby.php
// start the error handler
new ErrorHandling($this);
// force secure connections if enabled
if($this->option('ssl') and !r::secure()) {
// rebuild the current url with https
go(url::build(array('scheme' => 'https')));
}
// set the timezone for all date functions
date_default_timezone_set($this->options['timezone']);
// load all extensions
$this->extensions();
// load all models
$this->models();
// load all plugins
$this->plugins();
// start the router
$this->router = new Router($this->routes());
$this->route = $this->router->run($this->path());
// check for a valid route
if(is_null($this->route)) {
header::status('500');
header::type('json');
die(json_encode(array(
'status' => 'error',
'message' => 'Invalid route or request method'
)));
}
// call the router action with all arguments from the pattern
$response = call($this->route->action(), $this->route->arguments());
// load all language variables
// this can only be loaded once the router action has been called
/home
/deb107568
/domains
/chasingreels.nl
/public_html
/index.php
<?php
error_reporting(-1);
ini_set('display_errors', 'On');
define('DS', DIRECTORY_SEPARATOR);
// load kirby
require(__DIR__ . DS . 'kirby' . DS . 'bootstrap.php');
// check for a custom site.php
if(file_exists(__DIR__ . DS . 'site.php')) {
require(__DIR__ . DS . 'site.php');
} else {
$kirby = kirby();
}
// render
echo $kirby->launch();