header = array('Tinyfader_Plugin', 'headerScript');
Typecho_Plugin::factory('Widget_Archive')->beforeRender = array('Tinyfader_Plugin', 'appendBox');
}
/**
* 禁用插件方法,如果禁用失败,直接抛出异常
*
* @static
* @access public
* @return void
* @throws Typecho_Plugin_Exception
*/
public static function deactivate(){}
/**
* 获取插件配置面板
*
* @access public
* @param Typecho_Widget_Helper_Form $form 配置面板
* @return void
*/
public static function config(Typecho_Widget_Helper_Form $form)
{
$index_only = new Typecho_Widget_Helper_Form_Element_Radio(
'index_only', array(0 => '所有页', 1 => '只有首页'), 1,
'图片自动插入', '不用改模板, 会自动插入.');
$form->addInput($index_only);
$content_id = new Typecho_Widget_Helper_Form_Element_Text(
'content_id', NULL, 'content',
'搜索目标 id', '图片框会自动插入此 id 之前.
(若前台不显示, 请查找 index.php 中已存在的 id 填入.)');
$content_id->input->setAttribute('class', 'mini');
$form->addInput($content_id);
$nav_width = new Typecho_Widget_Helper_Form_Element_Text(
'nav_width', NULL, 153,
'导航宽度(px)', '右侧导航可配合模板自行设定宽度, 宽度设 0 不显示.
最好同时在 tinyfader.css 调整 #slidebox 的 margin.
');
$nav_width->input->setAttribute('class', 'mini');
$form->addInput($nav_width->addRule('isInteger', _t('请填入一个数字')));
$typecho_intro = new Typecho_Widget_Helper_Form_Element_Radio(
'typecho_intro', array(0 => '不显示', 1 => '显示'), 1,
'Typecho intro', '这是个 html 內容, 你可以选择不显示或改写其内容.
其內容在 Plugin.php appendBox() 函数中.');
$form->addInput($typecho_intro);
echo "