mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-08-05 04:37:51 +02:00
Monstra Library: basic core improvments
This commit is contained in:
@@ -1,43 +1,42 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Editor plugin
|
||||
*
|
||||
* @package Monstra
|
||||
* @subpackage Plugins
|
||||
* @author Romanenko Sergey / Awilum
|
||||
* @copyright 2012 Romanenko Sergey / Awilum
|
||||
* @version 1.0.0
|
||||
*
|
||||
*/
|
||||
|
||||
// Register plugin
|
||||
Plugin::register( __FILE__,
|
||||
__('Editor', 'editor'),
|
||||
__('Editor plugin', 'editor'),
|
||||
'1.0.0',
|
||||
'Awilum',
|
||||
'http://monstra.org/',
|
||||
null,
|
||||
'box');
|
||||
|
||||
// Add action
|
||||
Action::add('admin_editor', 'Editor::render', 10, array());
|
||||
|
||||
/**
|
||||
* Editor class
|
||||
*/
|
||||
class Editor
|
||||
{
|
||||
/**
|
||||
* Editor plugin
|
||||
*
|
||||
* @package Monstra
|
||||
* @subpackage Plugins
|
||||
* @author Romanenko Sergey / Awilum
|
||||
* @copyright 2012 Romanenko Sergey / Awilum
|
||||
* @version 1.0.0
|
||||
* Render editor
|
||||
*
|
||||
* @param string $val editor data
|
||||
*/
|
||||
public static function render($val = null)
|
||||
{
|
||||
echo ('<div id="editor_panel"></div><div><textarea id="editor_area" name="editor" style="width:100%; height:320px;">'.$val.'</textarea></div>');
|
||||
}
|
||||
|
||||
|
||||
// Register plugin
|
||||
Plugin::register( __FILE__,
|
||||
__('Editor', 'editor'),
|
||||
__('Editor plugin', 'editor'),
|
||||
'1.0.0',
|
||||
'Awilum',
|
||||
'http://monstra.org/',
|
||||
null,
|
||||
'box');
|
||||
|
||||
// Add action
|
||||
Action::add('admin_editor', 'Editor::render', 10, array());
|
||||
|
||||
|
||||
/**
|
||||
* Editor class
|
||||
*/
|
||||
class Editor {
|
||||
|
||||
/**
|
||||
* Render editor
|
||||
*
|
||||
* @param string $val editor data
|
||||
*/
|
||||
public static function render($val = null) {
|
||||
echo ('<div id="editor_panel"></div><div><textarea id="editor_area" name="editor" style="width:100%; height:320px;">'.$val.'</textarea></div>');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -8,4 +8,4 @@
|
||||
<plugin_version>1.0.0</plugin_version>
|
||||
<plugin_author>Awilum</plugin_author>
|
||||
<plugin_author_uri>http://monstra.org/</plugin_author_uri>
|
||||
</root>
|
||||
</root>
|
||||
|
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'Editor' => array(
|
||||
'Editor' => 'Editor',
|
||||
'Editor plugin' => 'Editor Plugin',
|
||||
)
|
||||
);
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'Editor' => array(
|
||||
'Editor' => 'Editor',
|
||||
'Editor plugin' => 'Editor Plugin',
|
||||
)
|
||||
);
|
||||
|
@@ -3,6 +3,6 @@
|
||||
return array(
|
||||
'Editor' => array(
|
||||
'Editor' => 'Editor',
|
||||
'Editor plugin' => 'Editor plugin',
|
||||
'Editor plugin' => 'Editor plugin',
|
||||
)
|
||||
);
|
||||
);
|
||||
|
@@ -3,6 +3,6 @@
|
||||
return array(
|
||||
'Editor' => array(
|
||||
'Editor' => 'Editor',
|
||||
'Editor plugin' => 'Editor plugin',
|
||||
'Editor plugin' => 'Editor plugin',
|
||||
)
|
||||
);
|
||||
);
|
||||
|
@@ -3,6 +3,6 @@
|
||||
return array(
|
||||
'Editor' => array(
|
||||
'Editor' => 'Redaktorius',
|
||||
'Editor plugin' => 'Redaktoriaus papildinys',
|
||||
'Editor plugin' => 'Redaktoriaus papildinys',
|
||||
)
|
||||
);
|
||||
);
|
||||
|
@@ -5,4 +5,4 @@
|
||||
'Editor' => 'Editor',
|
||||
'Editor plugin' => 'Plugin do editor',
|
||||
)
|
||||
);
|
||||
);
|
||||
|
@@ -3,6 +3,6 @@
|
||||
return array(
|
||||
'Editor' => array(
|
||||
'Editor' => 'Редактор',
|
||||
'Editor plugin' => 'Редактор плагин',
|
||||
'Editor plugin' => 'Редактор плагин',
|
||||
)
|
||||
);
|
||||
);
|
||||
|
@@ -3,6 +3,6 @@
|
||||
return array(
|
||||
'Editor' => array(
|
||||
'Editor' => 'Редактор',
|
||||
'Editor plugin' => 'Редактор плагіну',
|
||||
'Editor plugin' => 'Редактор плагіну',
|
||||
)
|
||||
);
|
||||
);
|
||||
|
Reference in New Issue
Block a user