mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-08-04 20:27:40 +02:00
7
engine/boot/actions.php
Normal file
7
engine/boot/actions.php
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set meta generator
|
||||||
|
*/
|
||||||
|
Action::add('theme_meta', 'setMetaGenerator');
|
||||||
|
function setMetaGenerator() { echo '<meta name="generator" content="Powered by Monstra '.Core::VERSION.'" />'; }
|
93
engine/boot/defines.php
Normal file
93
engine/boot/defines.php
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
<?php defined('MONSTRA_ACCESS') or die('No direct script access.');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Monstra CMS Defines
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The filesystem path to the site 'themes' folder
|
||||||
|
*/
|
||||||
|
define('THEMES_SITE', ROOT . DS . 'public' . DS . 'themes');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The filesystem path to the admin 'themes' folder
|
||||||
|
*/
|
||||||
|
define('THEMES_ADMIN', ROOT . DS . 'admin' . DS . 'themes');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The filesystem path to the 'plugins' folder
|
||||||
|
*/
|
||||||
|
define('PLUGINS', ROOT . DS . 'plugins');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The filesystem path to the 'box' folder which is contained within
|
||||||
|
* the 'plugins' folder
|
||||||
|
*/
|
||||||
|
define('PLUGINS_BOX', PLUGINS . DS . 'box');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The filesystem path to the 'storage' folder
|
||||||
|
*/
|
||||||
|
define('STORAGE', ROOT . DS . 'storage');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The filesystem path to the 'xmldb' folder
|
||||||
|
*/
|
||||||
|
define('XMLDB', STORAGE . DS . 'database');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The filesystem path to the 'cache' folder
|
||||||
|
*/
|
||||||
|
define('CACHE', ROOT . DS . 'tmp' . DS . 'cache');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The filesystem path to the 'minify' folder
|
||||||
|
*/
|
||||||
|
define('MINIFY', ROOT . DS . 'tmp' . DS . 'minify');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The filesystem path to the 'logs' folder
|
||||||
|
*/
|
||||||
|
define('LOGS', ROOT . DS . 'tmp' . DS . 'logs');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The filesystem path to the 'assets' folder
|
||||||
|
*/
|
||||||
|
define('ASSETS', ROOT . DS . 'public' . DS . 'assets');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The filesystem path to the 'uploads' folder
|
||||||
|
*/
|
||||||
|
define('UPLOADS', ROOT . DS . 'public' . DS . 'uploads');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set password salt
|
||||||
|
*/
|
||||||
|
define('MONSTRA_PASSWORD_SALT', 'YOUR_SALT_HERE');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set date format
|
||||||
|
*/
|
||||||
|
define('MONSTRA_DATE_FORMAT', 'Y-m-d / H:i:s');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set eval php
|
||||||
|
*/
|
||||||
|
define('MONSTRA_EVAL_PHP', false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check Monstra CMS version
|
||||||
|
*/
|
||||||
|
define('CHECK_MONSTRA_VERSION', true);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set gzip output
|
||||||
|
*/
|
||||||
|
define('MONSTRA_GZIP', false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Monstra database settings
|
||||||
|
*/
|
||||||
|
//define('MONSTRA_DB_DSN', 'mysql:dbname=monstra;host=localhost;port=3306');
|
||||||
|
//define('MONSTRA_DB_USER', 'root');
|
||||||
|
//define('MONSTRA_DB_PASSWORD', 'password');
|
21
engine/boot/filters.php
Normal file
21
engine/boot/filters.php
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Evaluate a string as PHP code
|
||||||
|
*/
|
||||||
|
if (MONSTRA_EVAL_PHP) Filter::add('content', 'evalPHP');
|
||||||
|
function obEval($mathes)
|
||||||
|
{
|
||||||
|
ob_start();
|
||||||
|
eval($mathes[1]);
|
||||||
|
$mathes = ob_get_contents();
|
||||||
|
ob_end_clean();
|
||||||
|
|
||||||
|
return $mathes;
|
||||||
|
}
|
||||||
|
function evalPHP($str) { return preg_replace_callback('/\[php\](.*?)\[\/php\]/ms','obEval', $str); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add shortcode parser filter
|
||||||
|
*/
|
||||||
|
Filter::add('content', 'Shortcode::parse', 11);
|
7
engine/boot/shortcodes.php
Normal file
7
engine/boot/shortcodes.php
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add new shortcode {siteurl}
|
||||||
|
*/
|
||||||
|
Shortcode::add('siteurl', 'returnSiteUrl');
|
||||||
|
function returnSiteUrl() { return Option::get('siteurl'); }
|
Reference in New Issue
Block a user