1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-05 12:48:00 +02:00

Monstra Library: basic core improvments

This commit is contained in:
Awilum
2013-01-04 21:08:04 +02:00
parent 7437cc6abb
commit ef12b7492e
289 changed files with 16265 additions and 17155 deletions

View File

@@ -1,7 +0,0 @@
<?php
/**
* Set meta generator
*/
Action::add('theme_meta', 'setMetaGenerator');
function setMetaGenerator() { echo '<meta name="generator" content="Powered by Monstra '.Core::VERSION.'" />'; }

View File

@@ -1,117 +0,0 @@
<?php defined('MONSTRA_ACCESS') or die('No direct script access.');
/**
* Monstra CMS Defines
*/
/**
* The filesystem path to the 'monstra' folder
*/
define('MONSTRA', ROOT . DS . 'monstra');
/**
* 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 'helpers' folder which is contained within
* the 'monstra' folder
*/
define('HELPERS', MONSTRA . DS . 'helpers');
/**
* The filesystem path to the 'engine' folder which is contained within
* the 'monstra' folder
*/
define('ENGINE', MONSTRA . DS . 'engine');
/**
* The filesystem path to the 'boot' folder which is contained within
* the 'monstra' folder
*/
define('BOOT', MONSTRA . DS . 'boot');
/**
* 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');

View File

@@ -1,21 +0,0 @@
<?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);

View File

@@ -1,8 +0,0 @@
<?php
/**
* Add new shortcode {siteurl}
*/
Shortcode::add('siteurl', 'returnSiteUrl');
function returnSiteUrl() { return Option::get('siteurl'); }