正在載入此比較的其餘部分。

Untitled diff

建立於 差異永不過期
0 刪除
507 行
0 新增
507 行
<?php #
<?php #
if (IN_serendipity !== true) {
if (IN_serendipity !== true) {
die ("Don't hack!");
die ("Don't hack!");
}
}
// Probe for a language include with constants. Still include defines later on, if some constants were missing
// Probe for a language include with constants. Still include defines later on, if some constants were missing
$probelang = dirname(__FILE__) . '/' . $serendipity['charset'] . 'lang_' . $serendipity['lang'] . '.inc.php';
$probelang = dirname(__FILE__) . '/' . $serendipity['charset'] . 'lang_' . $serendipity['lang'] . '.inc.php';
if (file_exists($probelang)) {
if (file_exists($probelang)) {
include $probelang;
include $probelang;
}
}
include dirname(__FILE__) . '/lang_en.inc.php';
include dirname(__FILE__) . '/lang_en.inc.php';
class serendipity_event_imageselectorplus extends serendipity_event
class serendipity_event_imageselectorplus extends serendipity_event
{
{
var $title = PLUGIN_EVENT_IMAGESELECTORPLUS_NAME;
var $title = PLUGIN_EVENT_IMAGESELECTORPLUS_NAME;
var $gotMilk = false;
var $gotMilk = false;
var $cache = array();
var $cache = array();
function introspect(&$propbag)
function introspect(&$propbag)
{
{
global $serendipity;
global $serendipity;
$propbag->add('name', PLUGIN_EVENT_IMAGESELECTORPLUS_NAME);
$propbag->add('name', PLUGIN_EVENT_IMAGESELECTORPLUS_NAME);
$propbag->add('description', PLUGIN_EVENT_IMAGESELECTORPLUS_DESC);
$propbag->add('description', PLUGIN_EVENT_IMAGESELECTORPLUS_DESC);
$propbag->add('stackable', false);
$propbag->add('stackable', false);
$propbag->add('author', 'Garvin Hicking, Vladimir Ajgl, Adam Charnock, Ian');
$propbag->add('author', 'Garvin Hicking, Vladimir Ajgl, Adam Charnock, Ian');
$propbag->add('version', '0.41');
$propbag->add('version', '0.41');
$propbag->add('requirements', array(
$propbag->add('requirements', array(
'serendipity' => '1.3',
'serendipity' => '1.3',
'smarty' => '2.6.7',
'smarty' => '2.6.7',
'php' => '4.1.0'
'php' => '4.1.0'
));
));
$propbag->add('groups', array('IMAGES','MARKUP'));
$propbag->add('groups', array('IMAGES','MARKUP'));
$propbag->add('event_hooks', array(
$propbag->add('event_hooks', array(
'entries_header' => true,
'entries_header' => true,
'entry_display' => true,
'entry_display' => true,
'backend_entry_presave' => true,
'backend_entry_presave' => true,
'backend_publish' => true,
'backend_publish' => true,
'backend_save' => true,
'backend_save' => true,
'frontend_image_add_unknown' => true,
'frontend_image_add_unknown' => true,
'frontend_image_add_filenameonly' => true,
'frontend_image_add_filenameonly' => true,
'frontend_image_selector_submit' => true,
'frontend_image_selector_submit' => true,
'frontend_image_selector_more' => true,
'frontend_image_selector_more' => true,
'frontend_image_selector_imagecomment' => true,
'frontend_image_selector_imagecomment' => true,
'frontend_image_selector_imagelink' => true,
'frontend_image_selector_imagelink' => true,
'frontend_image_selector_imagealign' => true,
'frontend_image_selector_imagealign' => true,
'frontend_image_selector_imagesize' => true,
'frontend_image_selector_imagesize' => true,
'frontend_image_selector_hiddenfields' => true,
'frontend_image_selector_hiddenfields' => true,
'frontend_image_selector' => true,
'frontend_image_selector' => true,
'backend_image_add' => true,
'backend_image_add' => true,
'backend_image_addHotlink' => true,
'backend_image_addHotlink' => true,
'backend_image_addform' => true,
'backend_image_addform' => true,
'css_backend' => true,
'css_backend' => true,
'css' => true,
'css' => true,
'frontend_display' => true
'frontend_display' => true
));
));
$this->markup_elements = array(
$this->markup_elements = array(
array(
array(
'name' => 'ENTRY_BODY',
'name' => 'ENTRY_BODY',
'element' => 'body',
'element' => 'body',
),
),
array(
array(
'name' => 'EXTENDED_BODY',
'name' => 'EXTENDED_BODY',
'element' => 'extended',
'element' => 'extended',
)
)
);
);
$conf_array = array('thumb_max_width', 'thumb_max_height','unzipping', 'autoresize', 'force_jhead');
$conf_array = array('thumb_max_width', 'thumb_max_height','unzipping', 'autoresize', 'force_jhead');
foreach($this->markup_elements as $element) {
foreach($this->markup_elements as $element) {
$conf_array[] = $element['name'];
$conf_array[] = $element['name'];
}
}
$propbag->add('configuration', $conf_array);
$propbag->add('configuration', $conf_array);
}
}
function introspect_config_item($name, &$propbag) {
function introspect_config_item($name, &$propbag) {
global $serendipity;
global $serendipity;
switch ($name) {
switch ($name) {
case 'force_jhead':
case 'force_jhead':
$propbag->add('type', 'boolean');
$propbag->add('type', 'boolean');
$propbag->add('name', PLUGIN_EVENT_IMAGESELECTORPLUS_JHEAD);
$propbag->add('name', PLUGIN_EVENT_IMAGESELECTORPLUS_JHEAD);
$propbag->add('description', PLUGIN_EVENT_IMAGESELECTORPLUS_JHEAD_DESC);
$propbag->add('description', PLUGIN_EVENT_IMAGESELECTORPLUS_JHEAD_DESC);
$propbag->add('default', 'false');
$propbag->add('default', 'false');
break;
break;
case 'thumb_max_width':
case 'thumb_max_width':
$propbag->add('type', 'string');
$propbag->add('type', 'string');
$propbag->add('name', PLUGIN_EVENT_IMAGESELECTORPLUS_MAXWIDTH);
$propbag->add('name', PLUGIN_EVENT_IMAGESELECTORPLUS_MAXWIDTH);
$propbag->add('description', '');
$propbag->add('description', '');
$propbag->add('default', '0');
$propbag->add('default', '0');
break;
break;
case 'thumb_max_height':
case 'thumb_max_height':
$propbag->add('type', 'string');
$propbag->add('type', 'string');
$propbag->add('name', PLUGIN_EVENT_IMAGESELECTORPLUS_MAXHEIGHT);
$propbag->add('name', PLUGIN_EVENT_IMAGESELECTORPLUS_MAXHEIGHT);