1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-04 20:27:40 +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,79 +1,82 @@
<?php
/**
* Sandbox plugin
*
* @package Monstra
* @subpackage Plugins
* @author Romanenko Sergey / Awilum
* @copyright 2012 Romanenko Sergey / Awilum
* @version 1.0.0
*
*/
// Register plugin
Plugin::register( __FILE__,
__('Sandbox', 'sandbox'),
__('Sandbox plugin for Monstra', 'sandbox'),
'1.0.0',
'Awilum',
'http://monstra.org/',
'sandbox');
// Load Sandbox Admin for Editor and Admin
if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor'))) {
Plugin::admin('sandbox');
}
/**
* Sandbox class
*/
class Sandbox extends Frontend
{
/**
* Sandbox plugin
*
* @package Monstra
* @subpackage Plugins
* @author Romanenko Sergey / Awilum
* @copyright 2012 Romanenko Sergey / Awilum
* @version 1.0.0
*
* Sandbox main function
*/
// Register plugin
Plugin::register( __FILE__,
__('Sandbox', 'sandbox'),
__('Sandbox plugin for Monstra', 'sandbox'),
'1.0.0',
'Awilum',
'http://monstra.org/',
'sandbox');
// Load Sandbox Admin for Editor and Admin
if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor'))) {
Plugin::admin('sandbox');
public static function main()
{
// Do something...
}
/**
* Set Sandbox title
*/
public static function title()
{
return 'Sandbox title';
}
/**
* Sandbox class
* Set Sandbox keywords
*/
class Sandbox extends Frontend {
/**
* Sandbox main function
*/
public static function main(){
// Do something...
}
/**
* Set Sandbox title
*/
public static function title(){
return 'Sandbox title';
}
/**
* Set Sandbox keywords
*/
public static function keywords(){
return 'Sandbox keywords';
}
/**
* Set Sandbox description
*/
public static function description(){
return 'Sandbox description';
}
/**
* Set Sandbox content
*/
public static function content(){
return 'Sandbox content';
}
/**
* Set Sandbox template
*/
public static function template() {
return 'index';
}
public static function keywords()
{
return 'Sandbox keywords';
}
/**
* Set Sandbox description
*/
public static function description()
{
return 'Sandbox description';
}
/**
* Set Sandbox content
*/
public static function content()
{
return 'Sandbox content';
}
/**
* Set Sandbox template
*/
public static function template()
{
return 'index';
}
}