コード例 #1
0
ファイル: functions.php プロジェクト: javanprettycool/jblog
function themeConfig($form)
{
    $logoUrl = new Typecho_Widget_Helper_Form_Element_Text('logoUrl', NULL, NULL, _t('站点LOGO地址'), _t('在这里填入一个图片URL地址, 以在网站标题前加上一个LOGO'));
    $form->addInput($logoUrl);
    $sidebarBlock = new Typecho_Widget_Helper_Form_Element_Checkbox('sidebarBlock', array('ShowRecentPosts' => _t('显示最新文章'), 'ShowRecentComments' => _t('显示最近回复'), 'ShowCategory' => _t('显示分类'), 'ShowArchive' => _t('显示归档'), 'ShowOther' => _t('显示其它杂项')), array('ShowRecentPosts', 'ShowRecentComments', 'ShowCategory', 'ShowArchive', 'ShowOther'), _t('侧边栏显示'));
    $form->addInput($sidebarBlock->multiMode());
}
コード例 #2
0
function themeConfig($form)
{
    $slogan = new Typecho_Widget_Helper_Form_Element_Text('slogan', NULL, NULL, _t('首页图片标语文字'), _t('在这里文字,用于在首页中图片的文字显示'));
    $form->addInput($slogan);
    $billboard = new Typecho_Widget_Helper_Form_Element_Text('billboard', NULL, NULL, _t('首页图片路径'), _t('首页大图片的路径'));
    $form->addInput($billboard);
    $navpng = new Typecho_Widget_Helper_Form_Element_Text('navpng', NULL, NULL, _t('导航图片路径'), _t('首页导航图片的路径'));
    $form->addInput($navpng);
    $dynamicpng = new Typecho_Widget_Helper_Form_Element_Text('dynamicpng', NULL, NULL, _t('动态banner图片路径'), _t('动态banner图片路径'));
    $form->addInput($dynamicpng);
    // $advertisepng = new Typecho_Widget_Helper_Form_Element_Text('advertisepng', NULL, NULL, _t('广告主banner图片路径'), _t('广告主banner图片路径'));
    // $form->addInput($advertisepng);
    // $devpng = new Typecho_Widget_Helper_Form_Element_Text('devpng', NULL, NULL, _t('开发者banner图片路径'), _t('开发者banner图片路径'));
    // $form->addInput($devpng);
    // $webpng = new Typecho_Widget_Helper_Form_Element_Text('webpng', NULL, NULL, _t('网站主banner图片路径'), _t('网站主banner图片路径'));
    // $form->addInput($webpng);
    // $aboutpng = new Typecho_Widget_Helper_Form_Element_Text('aboutpng', NULL, NULL, _t('关于banner图片路径'), _t('关于banner图片路径'));
    // $form->addInput($aboutpng);
    $siteIcon = new Typecho_Widget_Helper_Form_Element_Text('siteIcon', NULL, NULL, _t('标题栏和书签栏Icon'), _t('在这里填入一个图片URL地址, 作为标题栏和书签栏Icon, 默认不显示'));
    $form->addInput($siteIcon);
    $miibeian = new Typecho_Widget_Helper_Form_Element_Text('miibeian', NULL, _t('粤ICP备14072384号-2'), _t('备案号'), _t('在这里填入天朝备案号,不显示则留空'));
    $form->addInput($miibeian);
    // $banner = new Typecho_Widget_Helper_Form_Element_File('banner', )
    $sidebarBlock = new Typecho_Widget_Helper_Form_Element_Checkbox('sidebarBlock', array('ShowSearch' => _t('显示搜索框'), 'ShowRecentPosts' => _t('显示最新文章'), 'ShowRecentComments' => _t('显示最近回复'), 'ShowTags' => _t('显示标签'), 'ShowArchive' => _t('显示归档'), 'ShowOther' => _t('显示其它杂项')), array('ShowRecentPosts', 'ShowRecentComments', 'ShowFriend', 'ShowOther'), _t('侧边栏显示'));
    $form->addInput($sidebarBlock->multiMode());
    $misc = new Typecho_Widget_Helper_Form_Element_Checkbox('misc', array('ShowLogin' => _t('前台显示登录入口'), 'ShowLoadTime' => _t('页脚显示加载耗时')), array('ShowLogin'), _t('杂项'));
    $form->addInput($misc->multiMode());
}
コード例 #3
0
ファイル: Plugin.php プロジェクト: duxiangfei/plugins
 /**
  * 获取插件配置面板
  * 
  * @access public
  * @param Typecho_Widget_Helper_Form $form 配置面板
  * @return void
  */
 public static function config(Typecho_Widget_Helper_Form $form)
 {
     /** Access Key */
     $accessKey = new Typecho_Widget_Helper_Form_Element_Text('aKey', NULL, '', _t('Access Key'), _t('<a href="http://developer.baidu.com/bae/ref/key/" target="_blank">获取Access Key</a> 运行在BAE环境下时可不填'));
     $form->addInput($accessKey);
     /** Secret Key */
     $secretKey = new Typecho_Widget_Helper_Form_Element_Text('sKey', NULL, '', _t('Secret Key'), _t('<a href="http://developer.baidu.com/bae/ref/key/" target="_blank">获取Secure Key</a> 运行在BAE环境下时可不填'));
     $form->addInput($secretKey);
     /** 要发送邮件的队列 */
     $queueName = new Typecho_Widget_Helper_Form_Element_Text('queue', NULL, '', _t('消息队列名称'), _t('必填,<a href="http://developer.baidu.com/bae/bms/list/" target="_blank">获取消息队列名称</a>'));
     $form->addInput($queueName);
     /** 作者接收邮箱 */
     $ownMail = new Typecho_Widget_Helper_Form_Element_Text('ownMail', NULL, '', _t('接收邮箱'), _t('接收邮件用的信箱,如为空则使用博客创建者个人设置中的邮箱!'));
     $form->addInput($ownMail);
     /** 提醒设置 */
     $status = new Typecho_Widget_Helper_Form_Element_Checkbox('status', array('approved' => '提醒已通过评论', 'waiting' => '提醒待审核评论', 'spam' => '提醒垃圾评论'), array('approved', 'waiting'), _t('提醒设置'));
     $form->addInput($status);
     /** 其他设置 */
     $goal = new Typecho_Widget_Helper_Form_Element_Checkbox('goal', array('to_me' => '有评论及回复时,发邮件通知博主。', 'to_other' => '评论被回复时,发邮件通知评论者。'), array('to_me', 'to_other'), _t('其他设置'), _t('暂时没有日志功能。'));
     $form->addInput($goal->multiMode());
     /** 个性标题 */
     $ownSub = new Typecho_Widget_Helper_Form_Element_Text('ownSub', null, "[{site}]:《{title}》一文有新的评论", _t('邮件标题'));
     $form->addInput($ownSub);
     $guestSub = new Typecho_Widget_Helper_Form_Element_Text('guestSub', null, "[{site}]:您在《{title}》一文的评论有了回复", _t('回复评论者邮件标题'));
     $form->addInput($guestSub);
 }
コード例 #4
0
function themeConfig($form)
{
    $logoUrl = new Typecho_Widget_Helper_Form_Element_Text('logoUrl', NULL, NULL, _t('站点 LOGO 地址'), _t('在这里填入一个图片 URL 地址,以将导航中的“首页”二字替换成你的 Logo。最好是正方形图片。'));
    $form->addInput($logoUrl);
    $displayOptions = new Typecho_Widget_Helper_Form_Element_Checkbox('displayOptions', array('disableLoginEntry' => _t('隐藏登录入口')), array('disableLoginEntry'), _t('展示项目'));
    $form->addInput($displayOptions->multiMode());
}
コード例 #5
0
ファイル: functions.php プロジェクト: computercomity/typecho
function themeConfig($form)
{
    $cooperators = new Typecho_Widget_Helper_Form_Element_Textarea('cooperators', NULL, NULL, '合作伙伴', "需要使用 JSON 格式输入, 只限 3 个");
    $form->addInput($cooperators);
    $sidebarBlock = new Typecho_Widget_Helper_Form_Element_Checkbox('sidebarBlock', array('ShowRecentPosts' => _t('显示最新文章'), 'ShowRecentComments' => _t('显示最近回复'), 'ShowCategory' => _t('显示分类'), 'ShowArchive' => _t('显示归档'), 'ShowOther' => _t('显示其它杂项')), array('ShowRecentPosts', 'ShowRecentComments', 'ShowCategory', 'ShowArchive', 'ShowOther'), _t('侧边栏显示'));
    $form->addInput($sidebarBlock->multiMode());
}
コード例 #6
0
 /**
  * 获取插件配置面板
  *
  * @access public
  * @param Typecho_Widget_Helper_Form $form 配置面板
  * @return void
  */
 public static function config(Typecho_Widget_Helper_Form $form)
 {
     $mode = new Typecho_Widget_Helper_Form_Element_Radio('mode', array('smtp' => 'smtp', 'mail' => 'mail()', 'sendmail' => 'sendmail()'), 'smtp', '发信方式');
     $form->addInput($mode);
     $host = new Typecho_Widget_Helper_Form_Element_Text('host', NULL, 'smtp.', _t('SMTP地址'), _t('请填写 SMTP 服务器地址'));
     $form->addInput($host->addRule('required', _t('必须填写一个SMTP服务器地址')));
     $port = new Typecho_Widget_Helper_Form_Element_Text('port', NULL, '25', _t('SMTP端口'), _t('SMTP服务端口,一般为25。'));
     $port->input->setAttribute('class', 'mini');
     $form->addInput($port->addRule('required', _t('必须填写SMTP服务端口'))->addRule('isInteger', _t('端口号必须是纯数字')));
     $user = new Typecho_Widget_Helper_Form_Element_Text('user', NULL, NULL, _t('SMTP用户'), _t('SMTP服务验证用户名,一般为邮箱名如:youname@domain.com'));
     $form->addInput($user->addRule('required', _t('SMTP服务验证用户名')));
     $pass = new Typecho_Widget_Helper_Form_Element_Password('pass', NULL, NULL, _t('SMTP密码'));
     $form->addInput($pass->addRule('required', _t('SMTP服务验证密码')));
     $validate = new Typecho_Widget_Helper_Form_Element_Checkbox('validate', array('validate' => '服务器需要验证', 'ssl' => 'ssl加密'), array('validate'), 'SMTP验证');
     $form->addInput($validate);
     $mail = new Typecho_Widget_Helper_Form_Element_Text('mail', NULL, NULL, _t('接收邮箱'), _t('接收邮件用的信箱,如为空则使用文章作者个人设置中的邮箱!'));
     $form->addInput($mail->addRule('email', _t('请填写正确的邮箱!')));
     $status = new Typecho_Widget_Helper_Form_Element_Checkbox('status', array('approved' => '提醒已通过评论', 'waiting' => '提醒待审核评论', 'spam' => '提醒垃圾评论'), array('approved', 'waiting'), '提醒设置', _t('该选项仅针对博主,访客只发送已通过的评论。'));
     $form->addInput($status);
     $other = new Typecho_Widget_Helper_Form_Element_Checkbox('other', array('to_owner' => '有评论及回复时,发邮件通知博主。', 'to_guest' => '评论被回复时,发邮件通知评论者。', 'to_me' => '自己回复自己的评论时,发邮件通知。(同时针对博主和访客)', 'to_log' => '记录邮件发送日志。'), array('to_owner', 'to_guest', 'to_me'), '其他设置', _t('如果选上"记录邮件发送日志"选项,则会在./CommentToMail/log/mail_log.txt 文件中记录发送信息。<br />
                 关键性错误日志将自动记录到./CommentToMail/log/error_log.txt文件中。<br />
                 '));
     $form->addInput($other->multiMode());
     $titleForOwner = new Typecho_Widget_Helper_Form_Element_Text('titleForOwner', null, "[{site}]:《{title}》有新的评论", _t('博主接收邮件标题'));
     $form->addInput($titleForOwner);
     $titleForGuest = new Typecho_Widget_Helper_Form_Element_Text('titleForGuest', null, "[{site}]:您在《{title}》的评论有了回复", _t('访客接收邮件标题'));
     $form->addInput($titleForGuest);
 }
コード例 #7
0
ファイル: functions.php プロジェクト: CDog34/2Simple
function themeConfig($form)
{
    $headImg = new Typecho_Widget_Helper_Form_Element_Text('headImg', NULL, NULL, _t('首页大图地址'), _t('在这里填入一个图片URL地址, 推荐使用:<a href="https://tat.pics/" target="_blank">TAT 塔塔图床</a>'));
    $form->addInput($headImg);
    $footerHtml = new Typecho_Widget_Helper_Form_Element_Textarea('footerHtml', NULL, NULL, _t('底部Footer附加内容'), _t('在这里填入Html代码,包括但不限于跟踪代码'));
    $form->addInput($footerHtml);
    $sidebarBlock = new Typecho_Widget_Helper_Form_Element_Checkbox('sidebarBlock', array('ShowRecentPosts' => _t('显示最新文章'), 'ShowCategory' => _t('显示分类')), array('ShowRecentPosts', 'ShowCategory'), _t('侧边栏显示'));
    $form->addInput($sidebarBlock->multiMode());
}
コード例 #8
0
ファイル: functions.php プロジェクト: hongweipeng/cool_blog
function themeConfig($form)
{
    $logoUrl = new Typecho_Widget_Helper_Form_Element_Text('logoUrl', NULL, NULL, _t('站点LOGO地址'), _t('在这里填入一个图片URL地址, 以在网站标题前加上一个LOGO'));
    $form->addInput($logoUrl);
    $sidebarBlock = new Typecho_Widget_Helper_Form_Element_Checkbox('sidebarBlock', array('ShowSearch' => _t('显示搜索框'), 'ShowCategory' => _t('显示分类'), 'ShowRecentPosts' => _t('显示最新文章'), 'ShowRecentComments' => _t('显示最近回复'), 'ShowArchive' => _t('显示归档'), 'ShowTags' => _t('显示标签')), array('ShowSearch', 'ShowCategory', 'ShowRecentPosts', 'ShowRecentComments', 'ShowArchive', 'ShowTags'), _t('侧边栏显示'));
    $form->addInput($sidebarBlock->multiMode());
    $css = new Typecho_Widget_Helper_Form_Element_Radio('css', array('red' => _t('红色系'), 'green' => _t('绿色系'), 'blue' => _t('蓝色系'), 'purple' => _t('紫色'), 'black' => _t('黑色')), 'green', _t('配色选择'));
    $form->addInput($css->multiMode());
}
コード例 #9
0
function themeConfig($form)
{
    $logoUrl = new Typecho_Widget_Helper_Form_Element_Text('logoUrl', NULL, NULL, _t('站点LOGO地址'), _t('在这里填入一个图片URL地址, 以在网站标题前加上一个LOGO'));
    $form->addInput($logoUrl);
    $weiboAccount = new Typecho_Widget_Helper_Form_Element_Text('weiboAccount', NULL, NULL, _t('新浪微博UID'), _t('在这里填入一个新浪微博帐号, 然后即可在侧栏显示新浪微博'));
    $form->addInput($weiboAccount);
    $sidebarBlock = new Typecho_Widget_Helper_Form_Element_Checkbox('sidebarBlock', array('ShowRecentPosts' => _t('显示最新文章'), 'ShowRelatedPosts' => _t('显示相关文章'), 'ShowRecentComments' => _t('显示最近回复'), 'ShowTags' => _t('显示标签'), 'ShowCategory' => _t('显示分类'), 'ShowArchive' => _t('显示归档'), 'ShowLinks' => _t('显示友情链接(需要友情链接插件)'), 'ShowOther' => _t('显示其它杂项')), array('ShowRelatedPosts', 'ShowRecentComments', 'ShowTags', 'ShowArchive', 'ShowOther'), _t('侧边栏显示'));
    $form->addInput($sidebarBlock->multiMode());
}
コード例 #10
0
ファイル: functions.php プロジェクト: KoMiles/typecho_navy
function themeConfig($form)
{
    $navy_gravatar = new Typecho_Widget_Helper_Form_Element_Text('navy_gravatar', NULL, '*****@*****.**', _t('底部头像'), _t(''));
    $navy_gravatar->input->setAttribute('class', 'w-100 mono');
    $form->addInput($navy_gravatar->addRule('email', '请填写一个邮箱地址'));
    $navy_tips = new Typecho_Widget_Helper_Form_Element_Text('navy_tips', NULL, '一个高端大气上档次的网站', _t('头像提示'), _t(''));
    $form->addInput($navy_tips);
    $sidebarBlock = new Typecho_Widget_Helper_Form_Element_Checkbox('sidebarBlock', array('ShowRecentPosts' => _t('显示最新文章'), 'ShowCategory' => _t('显示分类'), 'ShowArchive' => _t('显示归档'), 'ShowRecentComments' => _t('显示最新回复'), 'ShowOther' => _t('显示其它杂项')), array('ShowRecentPosts', 'ShowCategory'), _t('侧边栏显示'));
    $form->addInput($sidebarBlock->multiMode());
}
コード例 #11
0
ファイル: functions.php プロジェクト: redislet/Trapecho
function themeConfig($form)
{
    $logoUrl = new Typecho_Widget_Helper_Form_Element_Text('logoUrl', NULL, NULL, _t('站点LOGO地址'), _t('在这里填入一个图片URL地址, 以在网站标题前加上一个LOGO'));
    $form->addInput($logoUrl);
    $weiboShow = new Typecho_Widget_Helper_Form_Element_Textarea('weiboShow', NULL, NULL, _t('微博秀'), _t('将从新浪<a href="http://weibo.com/tool/weiboshow" target="_blank">微博秀小工具</a>获取的代码填在这里, 即可显示微博秀. (也可填入其他微博的代码)'));
    $form->addInput($weiboShow);
    $sidebarBlock = new Typecho_Widget_Helper_Form_Element_Checkbox('sidebarBlock', array('ShowRecentPosts' => _t('显示最新文章'), 'ShowRelatedPosts' => _t('显示相关文章'), 'ShowRecentComments' => _t('显示最近回复'), 'ShowTags' => _t('显示标签'), 'ShowCategory' => _t('显示分类'), 'ShowArchive' => _t('显示归档'), 'ShowLinks' => _t('显示友情链接(需要友情链接插件)'), 'ShowOther' => _t('显示其它杂项')), array('ShowRelatedPosts', 'ShowRecentComments', 'ShowTags', 'ShowArchive', 'ShowOther'), _t('侧边栏显示'));
    $form->addInput($sidebarBlock->multiMode());
    $codePrettify = new Typecho_Widget_Helper_Form_Element_Checkbox('codePrettify', array('EnablePrettify' => _t('启用')), array('EnablePrettify'), _t('Google Code Prettify'));
    $form->addInput($codePrettify->multiMode());
}
コード例 #12
0
function themeConfig($form)
{
    $slogan = new Typecho_Widget_Helper_Form_Element_Text('slogan', NULL, NULL, _t('首页图片标语文字'), _t('在这里文字,用于在首页中图片的文字显示'));
    $form->addInput($slogan);
    $siteIcon = new Typecho_Widget_Helper_Form_Element_Text('siteIcon', NULL, NULL, _t('标题栏和书签栏Icon'), _t('在这里填入一个图片URL地址, 作为标题栏和书签栏Icon, 默认不显示'));
    $form->addInput($siteIcon);
    $miibeian = new Typecho_Widget_Helper_Form_Element_Text('miibeian', NULL, _t('粤ICP备14072384号-2'), _t('备案号'), _t('在这里填入天朝备案号,不显示则留空'));
    $form->addInput($miibeian);
    $misc = new Typecho_Widget_Helper_Form_Element_Checkbox('misc', array('ShowLogin' => _t('前台显示登录入口'), 'ShowLoadTime' => _t('页脚显示加载耗时')), array('ShowLogin'), _t('杂项'));
    $form->addInput($misc->multiMode());
}
コード例 #13
0
ファイル: functions.php プロジェクト: hongweipeng/cool_blog
function themeConfig($form)
{
    $logoUrl = new Typecho_Widget_Helper_Form_Element_Text('logoUrl', NULL, NULL, _t('管理员头像'), _t('在这里填入一个图片URL地址, 以在网站首页显示管理员头像'));
    $form->addInput($logoUrl);
    $myname = new Typecho_Widget_Helper_Form_Element_Text('myname', NULL, NULL, _t('我的昵称'), _t('显示在左侧导航顶部的博主昵称'));
    $form->addInput($myname);
    $mydesc = new Typecho_Widget_Helper_Form_Element_Text('mydesc', NULL, NULL, _t('自我介绍'), _t('填写一下博主的自我介绍'));
    $form->addInput($mydesc);
    $sidebarBlock = new Typecho_Widget_Helper_Form_Element_Checkbox('sidebarBlock', array('ShowRecentPosts' => _t('显示最新文章'), 'ShowRecentComments' => _t('显示最近回复'), 'ShowCategory' => _t('显示分类'), 'ShowArchive' => _t('显示归档'), 'ShowOther' => _t('显示其它杂项')), array('ShowRecentPosts', 'ShowRecentComments', 'ShowCategory', 'ShowArchive', 'ShowOther'), _t('侧边栏显示'));
    $form->addInput($sidebarBlock->multiMode());
}
コード例 #14
0
ファイル: functions.php プロジェクト: wujunze/wujunze.com
function themeConfig($form)
{
    echo '<p style="font-size:16px;text-align:center;">感谢您使用TE响应式主题 :<font color="#4A89DC"> Themia</font><font color="#F40"> ' . Themia_Version . '</font> ![<a href="http://qqdie.com/archives/with-the-help-of-themia-subject-to-update-the-manual" target="_blank">更新与帮助</a>]</p>';
    $SmiliesSetting = new Typecho_Widget_Helper_Form_Element_Checkbox('SmiliesSetting', array('Showimg' => _t('缩略图固定')), array('Showimg'), _t('缩略图设置'), _t('文章没有图片时会随机调用缩略图,开启此项可将没有图片的文章缩略图固定为一张'));
    $form->addInput($SmiliesSetting->multiMode());
    //网站LOGO
    $logoUrl = new Typecho_Widget_Helper_Form_Element_Text('logoUrl', NULL, NULL, _t('博主头像地址'), _t('logo头像地址,不填写默认内置头像,这个建议用正方形的图片√'));
    $form->addInput($logoUrl);
    //背景
    $bgUrl = new Typecho_Widget_Helper_Form_Element_Text('bgUrl', NULL, NULL, _t('背景图地址'), _t('背景图地址,不填写默认为内置的图片,这个建议用高清大图√'));
    $form->addInput($bgUrl);
    $weibo = new Typecho_Widget_Helper_Form_Element_Text('weibo', NULL, 'http://weibo.com/jinzeboke', _t('新浪微博地址'), _t('填写你的新浪微博主页地址到菜单目录中'));
    $form->addInput($weibo);
    $Categories = new Typecho_Widget_Helper_Form_Element_Text('Categories', NULL, NULL, _t('Categories分类归档地址'), _t('新建独立页面,选择模板Categories,这里填入独立页面的完整地址'));
    $form->addInput($Categories);
    $Archive = new Typecho_Widget_Helper_Form_Element_Text('Archive', NULL, NULL, _t('Archive时间归档地址'), _t('新建独立页面,选择模板Archive,这里填入独立页面的完整地址'));
    $form->addInput($Archive);
    $links = new Typecho_Widget_Helper_Form_Element_Text('links', NULL, NULL, _t('links友情链接地址'), _t('新建独立页面,写上朋友的链接,作为友情链接页面,然后把页面地址填入这里'));
    $form->addInput($links);
    $about = new Typecho_Widget_Helper_Form_Element_Text('about', NULL, NULL, _t('about链接地址'), _t('新建独立页面,写上关于自己的属性,然后把页面地址填入这里'));
    $form->addInput($about);
    $css = new Typecho_Widget_Helper_Form_Element_Radio('css', array('1' => _t('1.在大屏幕显示宽的SideBar,在中屏幕显示窄的SideBar,在小屏幕显示抽屉SideBar(宽)'), '2' => _t('2.在大屏幕和中屏幕显示窄的SideBar,在小屏幕显示抽屉SideBar(窄)'), '3' => _t('3.在所有屏幕显示抽屉SideBar(宽)'), '4' => _t('4.在所有屏幕显示抽屉SideBar(窄)')), '1', _t('sidebar风格'), _t('这里的风格指的是网站整体风格,文章风格可通过自定义字段字段名ys和字段值来控制,实现对单独的一篇文章的风格重定义(字段值就是上边对应的数字,如风格3,就在文章字段名填入ys,字段值填入3即可),文章封面效果也是用自定义字段,字段名fm,字段值就是封面的图片地址,启动封面效果的文章风格会变更为3(优先级高)√'));
    $form->addInput($css->multiMode());
    $tf = new Typecho_Widget_Helper_Form_Element_Radio('tf', array('open' => _t('启用居中风格,使用默认方式截取缩略内容'), 'more' => _t('启用居中风格,并强制使用more语法截取缩略内容'), 'close' => _t('不启用')), 'close', _t('文章标题居中风格'), _t('默认不启用,启用后文章缩略图会关闭显示,并且文章标题,分类等信息居中'));
    $form->addInput($tf);
    //工具开关
    $sidebarBlock = new Typecho_Widget_Helper_Form_Element_Checkbox('sidebarBlock', array('kp' => _t('文章中加入跨屏浏览二维码,支付宝打赏,及文章版权声明'), 'bjq' => _t('文章内容增强,加入最后编辑时间'), 'Showfull' => _t('手机浏览器强制全屏,仅限于uc和QQ浏览器'), 'Showcolor' => _t('手机谷歌浏览器状态栏颜色渲染为白色'), 'kiana' => _t('kiana封印解除'), 'simg' => _t('全局不显示文章缩略图')), array('Showcolor', 'bjq'), _t('工具开关'));
    $form->addInput($sidebarBlock->multiMode());
    $jsq = new Typecho_Widget_Helper_Form_Element_Radio('jsq', array('0' => _t('不显示文章浏览次数'), '1' => _t('非插件实现'), '2' => _t('绛木子TePostViews插件')), '0', _t('文章阅读次数显示方案(后一项需要自行安装对应插件)'), _t("在工具开关中,打开文章浏览次数,然后选择这里的方案,两款方案最终效果都一样<br>在不清除cookie或者cookie未过期的情况下不会重复计数<br>提示:非插件的方案和Hanny的Stat插件使用的是同一个数据,所以如果你曾经用的是Star插件,可以直接选择第一项,同时禁用Star插件,以免重复计数【不禁用的话,访问一次,计数器会加2】"));
    $form->addInput($jsq);
    $cdl = new Typecho_Widget_Helper_Form_Element_Radio('cdl', array('0' => _t('English'), '1' => _t('日本語【渣翻译】
'), '2' => _t('中文')), '0', _t('界面语言设置'), _t("尽管英文逼格比较高,但是中文有中文的好处。此处默认是英文,因为我比较屌,所以有日文选项"));
    $form->addInput($cdl);
    $bqg = new Typecho_Widget_Helper_Form_Element_Radio('bqg', array('1' => _t('不开启版权狗'), '2' => _t('开启版权声明')), '1', _t('版权声明'), _t("复制文章内容时,会出现版权声明提示,并且复制的内容自带版权声明。"));
    $form->addInput($bqg);
    //文章首行缩进
    $page_suo = new Typecho_Widget_Helper_Form_Element_Radio('page_suo', array('display' => _t('post和page页面启用'), 'display1' => _t('仅post页面启用'), 'display2' => _t('仅page页面启用'), 'close' => _t('禁用')), 'close', _t('文章首行缩进'), _t('开启后,所有文章内容将自动缩进2em(两个中文汉字宽度)'));
    $form->addInput($page_suo);
    //建站时间
    $time = new Typecho_Widget_Helper_Form_Element_Text('time', NULL, '2015/06/06', _t('博客成立时间'), _t('此功能是摆设,事件需要在模板kz.js中修改'));
    $form->addInput($time);
    //统计代码
    $tongji = new Typecho_Widget_Helper_Form_Element_Textarea('tongji', NULL, '', _t('底部声明什么的'), _t('填入备案链接或者统计代码或者版权什么的'));
    $form->addInput($tongji);
    $sticky_1 = new Typecho_Widget_Helper_Form_Element_Text('sticky_1', NULL, NULL, '置顶主题ID', '填写对应主题的 id 即可使某些分类的文章在置顶首页显示(例如 1)。');
    $sticky_1->input->setAttribute('class', 'mini');
    $form->addInput($sticky_1->addRule('isInteger', '请填入数字'));
    $sticky_2 = new Typecho_Widget_Helper_Form_Element_Text('sticky_2', NULL, NULL, '置顶主题ID', '填写对应主题的 id 即可使某些分类的文章在置顶首页显示(例如 1)。');
    $sticky_2->input->setAttribute('class', 'mini');
    $form->addInput($sticky_2->addRule('isInteger', '请填入数字'));
    $sticky_3 = new Typecho_Widget_Helper_Form_Element_Text('sticky_3', NULL, NULL, '置顶主题ID', '填写对应主题的 id 即可使某些分类的文章在置顶首页显示(例如 1)。');
    $sticky_3->input->setAttribute('class', 'mini');
    $form->addInput($sticky_3->addRule('isInteger', '请填入数字'));
}
コード例 #15
0
ファイル: functions.php プロジェクト: wang-song/terse
function themeConfig($form)
{
    $siteIcon = new Typecho_Widget_Helper_Form_Element_Text('siteIcon', NULL, _t('http://demo.sc.chinaz.com/Files/pic/icons/5712/5.png'), _t('网站Icon'), _t('在这里填入一个图片URL地址, 作为网站Icon, 默认不显示'));
    $form->addInput($siteIcon);
    $siteAvatar = new Typecho_Widget_Helper_Form_Element_Text('siteAvatar', NULL, _t('https://avatars3.githubusercontent.com/u/3849072?v=3&s=460'), _t('头像'), _t('在首页显示你的头像'));
    $form->addInput($siteAvatar);
    $cnzzCode = new Typecho_Widget_Helper_Form_Element_Text('cnzzCode', NULL, _t(''), _t('统计代码'), _t('输入统计代码,没有则留空'));
    $form->addInput($cnzzCode);
    $duoshuoName = new Typecho_Widget_Helper_Form_Element_Text('duoshuoName', NULL, _t('blog-biezhi'), _t('多说评论'), _t('输入你的多说短名称'));
    $form->addInput($duoshuoName);
    $extPlugin = new Typecho_Widget_Helper_Form_Element_Checkbox('extPlugin', array('UseFancybox' => _t('启用FancyBox')), array('UseFancybox'), _t('扩展项'));
    $form->addInput($extPlugin->multiMode());
}
コード例 #16
0
ファイル: Plugin.php プロジェクト: duxiangfei/plugins
 /**
  * 获取插件配置面板
  * 
  * @access public
  * @param Typecho_Widget_Helper_Form $form 配置面板
  * @return void
  */
 public static function config(Typecho_Widget_Helper_Form $form)
 {
     $vispost = new Typecho_Widget_Helper_Form_Element_Checkbox('vispost', self::visposts(), array(), _t('公开文章列表→'), _t('<span style="position:relative;left:330px;bottom:80px;">[勾选切换]</span>'));
     $form->addInput($vispost->multiMode()->setAttribute('style', 'float:left;width:300px;'));
     $subpost = new Typecho_Widget_Helper_Form_Element_Checkbox('subpost', self::subposts(), array(), _t('←会员文章列表'), _t(''));
     $form->addInput($subpost->multiMode()->setAttribute('style', 'float:right;width:300px;'));
     $submsgp = new Typecho_Widget_Helper_Form_Element_Textarea('submsgp', NULL, '<div class="sub2view"><i class="icon-lock"></i>本文仅对注册会员开放阅读。</div>', _t('会员文章隐藏提示'), _t('未登录访客看到的会员文章显示,可使用html鼓励注册'));
     $form->addInput($submsgp->setAttribute('style', 'clear:both;'));
     $submsga1 = new Typecho_Widget_Helper_Form_Element_Textarea('submsga1', NULL, '<div class="sub2view"><i class="icon-lock"></i>此处内容需要登录才能查看。</div>', _t('会员内容隐藏提示'), _t('公开文章中用[sub][/sub]隐藏的会员内容对访客的提示'));
     $form->addInput($submsga1);
     $submsga2 = new Typecho_Widget_Helper_Form_Element_Textarea('submsga2', NULL, '<p>您已登录,可以阅读以下内容:</p><div class="sub2view"><i class="icon-lock-open"></i>{content}</div>', _t('会员内容可见效果'), _t('已登录会员看到隐藏内容显示效果(勿删改{content}标签)'));
     $form->addInput($submsga2);
 }
コード例 #17
0
function themeConfig($form)
{
    $abouturl = new Typecho_Widget_Helper_Form_Element_Text('abouturl', NULL, NULL, _t('导航栏关于我们连接'), _t('在这里填写右侧导航栏关于我们自定义页面'));
    $form->addInput($abouturl);
    $youlian = new Typecho_Widget_Helper_Form_Element_Text('youlian', NULL, NULL, _t('导航栏友情连接'), _t('在这里填写右侧导航栏友情连接自定义页面'));
    $form->addInput($youlian);
    $siteIcon = new Typecho_Widget_Helper_Form_Element_Text('siteIcon', NULL, NULL, _t('标题栏和书签栏Icon'), _t('在这里填入一个图片URL地址, 作为标题栏和书签栏Icon, 默认不显示'));
    $form->addInput($siteIcon);
    $miibeian = new Typecho_Widget_Helper_Form_Element_Text('miibeian', NULL, _t('ICP合备74110号'), _t('备案号'), _t('在这里填入天朝备案号,不显示则留空'));
    $form->addInput($miibeian);
    $misc = new Typecho_Widget_Helper_Form_Element_Checkbox('misc', array('ShowLogin' => _t('前台显示登录入口'), 'ShowLoadTime' => _t('页脚显示加载耗时')), array('ShowLogin'), _t('杂项'));
    $form->addInput($misc->multiMode());
}
コード例 #18
0
function themeConfig($form)
{
    $slogan = new Typecho_Widget_Helper_Form_Element_Text('slogan', NULL, NULL, _t('首页图片标语文字'), _t('在这里文字,用于在首页中图片的文字显示'));
    $form->addInput($slogan);
    $siteIcon = new Typecho_Widget_Helper_Form_Element_Text('siteIcon', NULL, NULL, _t('标题栏和书签栏Icon'), _t('在这里填入一个图片URL地址, 作为标题栏和书签栏Icon, 默认不显示'));
    $form->addInput($siteIcon);
    $miibeian = new Typecho_Widget_Helper_Form_Element_Text('miibeian', NULL, _t('粤ICP备14072384号-2'), _t('备案号'), _t('在这里填入天朝备案号,不显示则留空'));
    $form->addInput($miibeian);
    $sidebarBlock = new Typecho_Widget_Helper_Form_Element_Checkbox('sidebarBlock', array('ShowSearch' => _t('显示搜索框'), 'ShowRecentPosts' => _t('显示最新文章'), 'ShowRecentComments' => _t('显示最近回复'), 'ShowTags' => _t('显示标签'), 'ShowArchive' => _t('显示归档'), 'ShowOther' => _t('显示其它杂项')), array('ShowRecentPosts', 'ShowRecentComments', 'ShowFriend', 'ShowOther'), _t('侧边栏显示'));
    $form->addInput($sidebarBlock->multiMode());
    $misc = new Typecho_Widget_Helper_Form_Element_Checkbox('misc', array('ShowLogin' => _t('前台显示登录入口'), 'ShowLoadTime' => _t('页脚显示加载耗时')), array('ShowLogin'), _t('杂项'));
    $form->addInput($misc->multiMode());
}
コード例 #19
0
function themeConfig($form)
{
    $next_name = new Typecho_Widget_Helper_Form_Element_Text('next_name', NULL, '', _t('侧边栏显示的昵称'), _t('显示在头像下方'));
    $next_name->input->setAttribute('class', 'w-100 mono');
    $form->addInput($next_name);
    $next_gravatar = new Typecho_Widget_Helper_Form_Element_Text('next_gravatar', NULL, '', _t('侧边栏头像'), _t(''));
    $next_gravatar->input->setAttribute('class', 'w-100 mono');
    $form->addInput($next_gravatar->addRule('email', '请填写一个邮箱地址'));
    $next_tips = new Typecho_Widget_Helper_Form_Element_Text('next_tips', NULL, '一个高端大气上档次的网站', _t('站点描述'), _t('显示在昵称下方'));
    $form->addInput($next_tips);
    $search_form = new Typecho_Widget_Helper_Form_Element_Checkbox('search_form', array('ShowSearch' => _t('显示搜索框'), 'ShowFeed' => _t('显示RSS订阅')), array('ShowSearch', 'ShowFeed'), _t('其他设置'));
    $form->addInput($search_form->multiMode());
}
コード例 #20
0
ファイル: functions.php プロジェクト: hongweipeng/cool_blog
function themeConfig($form)
{
    $bgImg = new Typecho_Widget_Helper_Form_Element_Text('bgImg', NULL, NULL, _t('首页背景图片地址'), _t('在这里填入一个图片URL地址, 作为首页背景图片, 默认使用images下的rainbow.png'));
    $form->addInput($bgImg);
    $headIcon = new Typecho_Widget_Helper_Form_Element_Text('headIcon', NULL, NULL, _t('首页头像地址'), _t('在这里填入一个图片URL地址, 作为首页头像, 默认使用images下的head.png'));
    $form->addInput($headIcon);
    $siteIcon = new Typecho_Widget_Helper_Form_Element_Text('siteIcon', NULL, NULL, _t('标题栏和书签栏Icon'), _t('在这里填入一个图片URL地址, 作为标题栏和书签栏Icon, 默认不显示'));
    $form->addInput($siteIcon);
    $labelColor = new Typecho_Widget_Helper_Form_Element_Select('labelColor', array('red' => _t('红色'), 'green' => _t('绿色'), 'blue' => _t('蓝色'), 'purple' => _t('紫色'), 'orange' => _t('橙色'), 'teal' => _t('青色'), 'grey' => _t('灰色')), 'red', _t('标签颜色'), _t('包括标签的颜色和每篇文章中的圆形日期的颜色'));
    $form->addInput($labelColor);
    $navbarMeta = new Typecho_Widget_Helper_Form_Element_Checkbox('navbarMeta', array('ShowSearch' => _t('显示搜索框'), 'ShowRSS' => _t('显示RSS订阅'), 'ShowEmail' => _t('显示电子邮箱')), array('ShowSearch', 'ShowRSS', 'ShowEmail'), _t('导航栏显示'));
    $form->addInput($navbarMeta->multimode());
    $sidebarBlock = new Typecho_Widget_Helper_Form_Element_Checkbox('sidebarBlock', array('ShowRecentPosts' => _t('显示最新文章'), 'ShowRecentComments' => _t('显示最近回复'), 'ShowFriend' => _t('显示友情链接(确保正确启用了Links插件)'), 'ShowCategory' => _t('显示分类'), 'ShowArchive' => _t('显示归档'), 'ShowOther' => _t('显示其它杂项')), array('ShowRecentPosts', 'ShowRecentComments', 'ShowFriend', 'ShowOther'), _t('侧边栏显示'));
    $form->addInput($sidebarBlock->multiMode());
}
コード例 #21
0
ファイル: General.php プロジェクト: menmenweiwei/blog
 /**
  * 输出表单结构
  *
  * @access public
  * @return Typecho_Widget_Helper_Form
  */
 public function form()
 {
     /** 构建表格 */
     $form = new Typecho_Widget_Helper_Form(Typecho_Common::url('/action/options-general', $this->options->index), Typecho_Widget_Helper_Form::POST_METHOD);
     /** 站点名称 */
     $title = new Typecho_Widget_Helper_Form_Element_Text('title', NULL, $this->options->title, _t('站点名称'), _t('站点的名称将显示在网页的标题处.'));
     $form->addInput($title);
     /** 站点描述 */
     $description = new Typecho_Widget_Helper_Form_Element_Textarea('description', NULL, $this->options->description, _t('站点描述'), _t('站点描述将显示在网页代码的头部.'));
     $form->addInput($description);
     /** 关键词 */
     $keywords = new Typecho_Widget_Helper_Form_Element_Text('keywords', NULL, $this->options->keywords, _t('关键词'), _t('请以半角逗号 "," 分割多个关键字.'));
     $form->addInput($keywords);
     /** 注册 */
     $allowRegister = new Typecho_Widget_Helper_Form_Element_Radio('allowRegister', array('0' => _t('不允许'), '1' => _t('允许')), $this->options->allowRegister, _t('是否允许注册'), _t('允许访问者注册到你的网站, 默认的注册用户不享有任何写入权限.'));
     $form->addInput($allowRegister);
     /** 时区 */
     $timezoneList = array("0" => _t('格林威治(子午线)标准时间 (GMT)'), "3600" => _t('中欧标准时间 阿姆斯特丹,荷兰,法国 (GMT +1)'), "7200" => _t('东欧标准时间 布加勒斯特,塞浦路斯,希腊 (GMT +2)'), "10800" => _t('莫斯科时间 伊拉克,埃塞俄比亚,马达加斯加 (GMT +3)'), "14400" => _t('第比利斯时间 阿曼,毛里塔尼亚,留尼汪岛 (GMT +4)'), "18000" => _t('新德里时间 巴基斯坦,马尔代夫 (GMT +5)'), "21600" => _t('科伦坡时间 孟加拉 (GMT +6)'), "25200" => _t('曼谷雅加达 柬埔寨,苏门答腊,老挝 (GMT +7)'), "28800" => _t('北京时间 香港,新加坡,越南 (GMT +8)'), "32400" => _t('东京平壤时间 西伊里安,摩鹿加群岛 (GMT +9)'), "36000" => _t('悉尼关岛时间 塔斯马尼亚岛,新几内亚 (GMT +10)'), "39600" => _t('所罗门群岛 库页岛 (GMT +11)'), "43200" => _t('惠灵顿时间 新西兰,斐济群岛 (GMT +12)'), "-3600" => _t('佛德尔群岛 亚速尔群岛,葡属几内亚 (GMT -1)'), "-7200" => _t('大西洋中部时间 格陵兰 (GMT -2)'), "-10800" => _t('布宜诺斯艾利斯 乌拉圭,法属圭亚那 (GMT -3)'), "-14400" => _t('智利巴西 委内瑞拉,玻利维亚 (GMT -4)'), "-18000" => _t('纽约渥太华 古巴,哥伦比亚,牙买加 (GMT -5)'), "-21600" => _t('墨西哥城时间 洪都拉斯,危地马拉,哥斯达黎加 (GMT -6)'), "-25200" => _t('美国丹佛时间 (GMT -7)'), "-28800" => _t('美国旧金山时间 (GMT -8)'), "-32400" => _t('阿拉斯加时间 (GMT -9)'), "-36000" => _t('夏威夷群岛 (GMT -10)'), "-39600" => _t('东萨摩亚群岛 (GMT -11)'), "-43200" => _t('艾尼威托克岛 (GMT -12)'));
     $timezone = new Typecho_Widget_Helper_Form_Element_Select('timezone', $timezoneList, $this->options->timezone, _t('时区'));
     $form->addInput($timezone);
     /** 扩展名 */
     $attachmentTypesOptionsResult = NULL != trim($this->options->attachmentTypes) ? array_map('trim', explode(',', $this->options->attachmentTypes)) : array();
     $attachmentTypesOptionsValue = array();
     if (in_array('@image@', $attachmentTypesOptionsResult)) {
         $attachmentTypesOptionsValue[] = '@image@';
     }
     if (in_array('@media@', $attachmentTypesOptionsResult)) {
         $attachmentTypesOptionsValue[] = '@media@';
     }
     if (in_array('@doc@', $attachmentTypesOptionsResult)) {
         $attachmentTypesOptionsValue[] = '@doc@';
     }
     $attachmentTypesOther = array_diff($attachmentTypesOptionsResult, $attachmentTypesOptionsValue);
     $attachmentTypesOtherValue = '';
     if (!empty($attachmentTypesOther)) {
         $attachmentTypesOptionsValue[] = '@other@';
         $attachmentTypesOtherValue = implode(',', $attachmentTypesOther);
     }
     $attachmentTypesOptions = array('@image@' => _t('图片文件') . ' <code>(gif jpg png tiff bmp)</code>', '@media@' => _t('多媒体文件') . ' <code>(mp3 wmv wma rmvb rm avi flv)</code>', '@doc@' => _t('常用档案文件') . ' <code>(txt doc docx xls xlsx ppt pptx zip rar pdf)</code>', '@other@' => _t('其他格式 %s', ' <input type="text" class="w-50 text-s mono" name="attachmentTypesOther" value="' . htmlspecialchars($attachmentTypesOtherValue) . '" />'));
     $attachmentTypes = new Typecho_Widget_Helper_Form_Element_Checkbox('attachmentTypes', $attachmentTypesOptions, $attachmentTypesOptionsValue, _t('允许上传的文件类型'), _t('用逗号 "," 将后缀名隔开, 例如: <code>cpp, h, mak</code>'));
     $form->addInput($attachmentTypes->multiMode());
     /** 提交按钮 */
     $submit = new Typecho_Widget_Helper_Form_Element_Submit('submit', NULL, _t('保存设置'));
     $submit->input->setAttribute('class', 'primary');
     $form->addItem($submit);
     return $form;
 }
コード例 #22
0
ファイル: Plugin.php プロジェクト: uglmee/kikiku.com
 /**
  * 获取插件配置面板
  *
  * @access public
  * @param Typecho_Widget_Helper_Form $form 配置面板
  * @return void
  */
 public static function config(Typecho_Widget_Helper_Form $form)
 {
     $sect = new Typecho_Widget_Helper_Form_Element_Select('sect', array('Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', 'RDark'), 0, _t('代码样式'));
     $form->addInput($sect);
     $CodeType = new Typecho_Widget_Helper_Form_Element_Radio('CodeType', array('Code1' => '[code=php123]代码[/code]', 'Code2' => '&lt;code lang=php&gt;代码&lt;/code&gt;', 'Code3' => '&lt;code lang=php line=123&gt;代码&lt;/code&gt;'), 'Code1', '标签格式');
     $form->addInput($CodeType->multiMode());
     $showzh = new Typecho_Widget_Helper_Form_Element_Radio('showzh', array('true' => '显示中文提示,如“viewSource”=>“查看代码”。', 'false' => '使用默认的英文提示。'), 'true', '提示语言');
     $form->addInput($showzh->multiMode());
     $collapse = new Typecho_Widget_Helper_Form_Element_Radio('collapse', array('true' => '打开网页时折叠代码。', 'false' => '代码一直展开。'), 'true', '代码折叠');
     $form->addInput($collapse->multiMode());
     $gutter = new Typecho_Widget_Helper_Form_Element_Radio('gutter', array('true' => '显示行号。', 'false' => '隐藏行号。'), 'true', '行号显示');
     $form->addInput($gutter->multiMode());
     $auto_links = new Typecho_Widget_Helper_Form_Element_Radio('auto_links', array('true' => '代码中有网址时自动添加超链接。', 'false' => '不使用超链接。'), 'false', '自动链接');
     $form->addInput($auto_links->multiMode());
     $filters = new Typecho_Widget_Helper_Form_Element_Checkbox('filters', array('AS3' => 'AS3', 'Bash' => 'Bash', 'ColdFusion' => 'ColdFusion', 'Cpp' => 'Cpp,C,C++', 'CSharp' => 'CSharp,C#', 'Css' => 'Css', 'Delphi' => 'Delphi', 'Diff' => 'Diff', 'Erlang' => 'Erlang', 'Groovy' => 'Groovy', 'Java' => 'Java', 'JavaFX' => 'JavaFX', 'JScript' => 'JScript', 'Perl' => 'Perl', 'Php' => 'Php', 'Plain' => 'Plain', 'PowerShell' => 'PowerShell', 'Python' => 'Python', 'Ruby' => 'Ruby', 'Scala' => 'Scala', 'Sql' => 'Sql', 'Vb' => 'Vb', 'Xml' => 'Xml'), array('Php', 'JScript', 'Python', 'Cpp', 'Vb', 'CSS', 'Xml'), '语言支持', _t('选取需要支持的语言,勿多选,选得多载入的js文件越多,对速度有一定的影响'));
     $form->addInput($filters->multiMode());
 }
コード例 #23
0
ファイル: Plugin.php プロジェクト: luobenyu/plugins
 /**
  * 获取插件配置面板
  * 
  * @access public
  * @param Typecho_Widget_Helper_Form $form 配置面板
  * @return void
  */
 public static function config(Typecho_Widget_Helper_Form $form)
 {
     $version = new Typecho_Widget_Helper_Form_Element_Radio('version', array('MTTextile' => 'MTTextile - includes Brad Choates\' extensions.', 'Textile' => 'Textile for the Textile purist.'), 'MTTextile', 'Textile Flavor');
     $form->addInput($version->multiMode());
     $filters = new Typecho_Widget_Helper_Form_Element_Checkbox('filters', array('SmartyPants' => 'Apply SmartyPants (provides em and en dashes, and other typographic niceities)', 'EducateQuotes' => 'Apply Texturize (applies curly quotes)'), array('SmartyPants', 'EducateQuotes'), 'Text Filters');
     $form->addInput($filters->multiMode());
     $headerOffset = new Typecho_Widget_Helper_Form_Element_Select('headerOffset', array('0 (.h1 = .h1)', '1 (.h1 = .h2)', '2 (.h1 = .h3)', '3 (.h1 = .h4)', '4 (.h1 = .h5)', '5 (.h1 = .h6)'), 0, 'Header Offset');
     $form->addInput($headerOffset);
     $parsing = new Typecho_Widget_Helper_Form_Element_Checkbox('parsing', array('ClearLines' => 'Strip extra spaces from the end of each line.', 'PreserveSpaces' => 'Change double-spaces to the HTML entity for an em-space (&8195;).'), NULL, 'Parsing Options');
     $form->addInput($parsing->multiMode());
     $inputEncoding = new Typecho_Widget_Helper_Form_Element_Text('inputEncoding', NULL, Helper::options()->charset, _t('Input Character Encoding'));
     $inputEncoding->input->setAttribute('class', 'mini');
     $form->addInput($inputEncoding);
     $encoding = new Typecho_Widget_Helper_Form_Element_Text('encoding', NULL, Helper::options()->charset, _t('Output Character Encoding'));
     $encoding->input->setAttribute('class', 'mini');
     $form->addInput($encoding);
 }
コード例 #24
0
function themeConfig($form)
{
    $siteUrl = Helper::options()->siteUrl;
    $next_name = new Typecho_Widget_Helper_Form_Element_Text('next_name', NULL, '', _t('侧边栏显示的昵称'), _t('显示在头像下方'));
    $next_name->input->setAttribute('class', 'w-100 mono');
    $form->addInput($next_name);
    $next_gravatar = new Typecho_Widget_Helper_Form_Element_Text('next_gravatar', NULL, '', _t('侧边栏头像'), _t('填写Gravatar头像的邮箱地址'));
    $next_gravatar->input->setAttribute('class', 'w-100 mono');
    $form->addInput($next_gravatar->addRule('email', '请填写一个邮箱地址'));
    $next_tips = new Typecho_Widget_Helper_Form_Element_Text('next_tips', NULL, '一个高端大气上档次的网站', _t('站点描述'), _t('将显示在侧边栏的昵称下方'));
    $form->addInput($next_tips);
    $next_cdn = new Typecho_Widget_Helper_Form_Element_Text('next_cdn', NULL, $siteUrl, _t('cdn镜像地址'), _t('静态文件cdn镜像加速地址,加速js和css,如七牛,又拍云等<br>格式参考:' . $siteUrl . '<br>不用请留空或者保持默认'));
    $form->addInput($next_cdn);
    $sidebar = new Typecho_Widget_Helper_Form_Element_Radio('sidebar', array(_t('始终自动弹出'), _t('文章中有目录时弹出'), _t('不自动弹出')), 1, _t('侧边栏自动弹出设置'));
    $form->addInput($sidebar);
    $search_form = new Typecho_Widget_Helper_Form_Element_Checkbox('search_form', array('ShowSearch' => _t('显示搜索框'), 'ShowFeed' => _t('显示RSS订阅')), array('ShowSearch', 'ShowFeed'), _t('其他设置'));
    $form->addInput($search_form->multiMode());
}
コード例 #25
0
function themeConfig($form)
{
    $siteUrl = Helper::options()->siteUrl;
    $next_name = new Typecho_Widget_Helper_Form_Element_Text('next_name', NULL, '', _t('侧边栏显示的昵称'));
    $next_name->input->setAttribute('class', 'w-100 mono');
    $form->addInput($next_name);
    $next_gravatar = new Typecho_Widget_Helper_Form_Element_Text('next_gravatar', NULL, '', _t('侧边栏头像'), _t('填写Gravatar头像的邮箱地址'));
    $next_gravatar->input->setAttribute('class', 'w-100 mono');
    $form->addInput($next_gravatar->addRule('email', '请填写一个邮箱地址'));
    $next_tips = new Typecho_Widget_Helper_Form_Element_Text('next_tips', NULL, '一个高端大气上档次的网站', _t('站点描述'), _t('将显示在侧边栏的昵称下方'));
    $form->addInput($next_tips);
    $next_cdn = new Typecho_Widget_Helper_Form_Element_Text('next_cdn', NULL, $siteUrl, _t('cdn镜像地址'), _t('静态文件cdn镜像加速地址,加速js和css,如七牛,又拍云等<br>格式参考:' . $siteUrl . '<br>不用请留空或者保持默认'));
    $form->addInput($next_cdn);
    $sidebarFlinks = new Typecho_Widget_Helper_Form_Element_Radio('sidebarFlinks', array('show' => _t('显示'), 'hide' => _t('不显示')), 'hide', _t('侧边栏友链设置'), _t('安装了 Hanny 的Links插件才可显示'));
    $form->addInput($sidebarFlinks);
    $sidebarNav = new Typecho_Widget_Helper_Form_Element_Checkbox('sidebarNav', array('main' => _t('首页'), 'archive' => _t('归档'), 'categories' => _t('分类'), 'tags' => _t('标签'), 'search' => _t('搜索')), array('main', 'archive', 'tags', 'search'), _t('侧边导航栏设置'));
    $form->addInput($sidebarNav->multiMode());
    $sidebarOthers = new Typecho_Widget_Helper_Form_Element_Checkbox('sidebarOthers', array('ShowFeed' => _t('显示RSS订阅')), array('ShowFeed'), _t('其他设置'));
    $form->addInput($sidebarOthers->multiMode());
}
コード例 #26
0
function themeConfig($form)
{
    $slogan = new Typecho_Widget_Helper_Form_Element_Text('slogan', NULL, NULL, _t('首页图片标语文字'), _t('在这里文字,用于在首页中图片的文字显示'));
    $form->addInput($slogan);
    $siteIcon = new Typecho_Widget_Helper_Form_Element_Text('siteIcon', NULL, NULL, _t('标题栏和书签栏Icon'), _t('在这里填入一个图片URL地址, 作为标题栏和书签栏Icon, 默认不显示'));
    $form->addInput($siteIcon);
    $miibeian = new Typecho_Widget_Helper_Form_Element_Text('miibeian', NULL, _t('粤ICP备14072384号-2'), _t('备案号'), _t('在这里填入天朝备案号,不显示则留空'));
    $form->addInput($miibeian);
    $cnzzCode = new Typecho_Widget_Helper_Form_Element_Text('cnzzCode', NULL, _t(''), _t('统计代码'), _t('输入统计代码,没有则留空'));
    $form->addInput($cnzzCode);
    $githubName = new Typecho_Widget_Helper_Form_Element_Text('githubName', NULL, _t('biezhi'), _t('github账号'), _t('输入github用户名,没有则留空'));
    $form->addInput($githubName);
    $weibolink = new Typecho_Widget_Helper_Form_Element_Text('weibolink', NULL, _t('http://weibo.com/u/5238733773'), _t('微博链接'), _t('输入微博链接地址'));
    $form->addInput($weibolink);
    $qqgroup = new Typecho_Widget_Helper_Form_Element_Text('qqgroup', NULL, _t(''), _t('QQ群代码'), _t('输入QQ群代码'));
    $form->addInput($qqgroup);
    $sidebarBlock = new Typecho_Widget_Helper_Form_Element_Checkbox('sidebarBlock', array('ShowSearch' => _t('显示搜索框'), 'ShowRecentPosts' => _t('显示最新文章'), 'ShowRecentComments' => _t('显示最近回复'), 'ShowTags' => _t('显示标签'), 'ShowArchive' => _t('显示归档'), 'ShowOther' => _t('显示其它杂项')), array('ShowRecentPosts', 'ShowRecentComments', 'ShowFriend', 'ShowOther'), _t('侧边栏显示'));
    $form->addInput($sidebarBlock->multiMode());
    $misc = new Typecho_Widget_Helper_Form_Element_Checkbox('misc', array('ShowLogin' => _t('前台显示登录入口'), 'ShowLoadTime' => _t('页脚显示加载耗时')), array('ShowLogin'), _t('杂项'));
    $form->addInput($misc->multiMode());
}
コード例 #27
0
ファイル: functions.php プロジェクト: aim16/typecho27
function themeConfig($form)
{
    $logoUrl = new Typecho_Widget_Helper_Form_Element_Text('logoUrl', NULL, 'http://www.dotedu.me/usr/themes/materialize/img/logo.png', _t('站点LOGO地址'), _t('在这里填入一个图片URL地址, 以在网站标题前加上一个LOGO'));
    $form->addInput($logoUrl);
    $bannerUrl = new Typecho_Widget_Helper_Form_Element_Text('bannerUrl', NULL, 'http://www.dotedu.me/usr/themes/materialize/img/transparent.jpg', _t('顶部大图'), _t('在这里填入一个图片URL地址, 以显示网站默认大图'));
    $form->addInput($bannerUrl);
    $siteIcon = new Typecho_Widget_Helper_Form_Element_Text('siteIcon', NULL, NULL, _t('标题栏和书签栏Icon'), _t('在这里填入一个图片URL地址, 作为标题栏和书签栏Icon, 默认不显示'));
    $form->addInput($siteIcon);
    $colorstyle = array_map('basename', glob(dirname(__FILE__) . '/css/color/*.css'));
    $colorThemeOptions = array_combine($colorstyle, $colorstyle);
    $colorTheme = new Typecho_Widget_Helper_Form_Element_Select('colorTheme', $colorThemeOptions, 'default', _t('主题配色'));
    $form->addInput($colorTheme);
    $layoutMode = new Typecho_Widget_Helper_Form_Element_Radio('layoutMode', array(0 => _t('GRID'), 1 => _t('单栏'), 2 => _t('双栏-左侧边栏'), 3 => _t('双栏-右侧边栏'), 4 => _t('三栏')), 3, _t('页面布局'), _t('选择对应的主题风格'));
    $form->addInput($layoutMode->addRule('enum', _t('必须选择一个模式'), array(0, 1, 2, 3, 4)));
    $sidebarBlock = new Typecho_Widget_Helper_Form_Element_Checkbox('sidebarBlock', array('ShowRecentPosts' => _t('显示最新文章'), 'ShowRecentComments' => _t('显示最近回复'), 'ShowCategory' => _t('显示分类'), 'ShowArchive' => _t('显示归档'), 'ShowLinks' => _t('友情链接'), 'ShowOther' => _t('显示其它杂项')), array('ShowRecentPosts', 'ShowRecentComments', 'ShowCategory', 'ShowArchive', 'ShowLinks', 'ShowOther'), _t('侧边栏显示'));
    $form->addInput($sidebarBlock->multiMode());
    $misc = new Typecho_Widget_Helper_Form_Element_Checkbox('misc', array('ShowLogin' => _t('前台显示登录入口'), 'ShowLoadTime' => _t('页脚显示加载耗时')), array('ShowLogin'), _t('杂项'));
    $form->addInput($misc->multiMode());
    $codeThemeToggle = new Typecho_Widget_Helper_Form_Element_Radio('codeThemeToggle', array(0 => _t('关闭'), 1 => _t('开启')), 0, _t('代码高亮'), _t('开启/关闭代码高亮功能'));
    $form->addInput($codeThemeToggle->addRule('enum', _t('必须选择一个模式'), array(0, 1)));
    $miibeian = new Typecho_Widget_Helper_Form_Element_Text('miibeian', NULL, _t('粤ICP备00000000号'), _t('备案号'), _t('在这里填入天朝备案号,不显示则留空'));
    $form->addInput($miibeian);
}
コード例 #28
0
ファイル: Plugin.php プロジェクト: Rming/CommentMailPlus
 /**
  * 获取插件配置面板
  *
  * @access public
  * @param Typecho_Widget_Helper_Form $form 配置面板
  * @return void
  */
 public static function config(Typecho_Widget_Helper_Form $form)
 {
     $mail = new Typecho_Widget_Helper_Form_Element_Text('mail', NULL, NULL, _t('接收邮箱'), _t('接收邮件用的信箱,如为空则使用文章作者个人设置中的邮箱!'));
     $form->addInput($mail->addRule('email', _t('请填写正确的邮箱!')));
     $status = new Typecho_Widget_Helper_Form_Element_Checkbox('status', array('approved' => '提醒已通过评论', 'waiting' => '提醒待审核评论', 'spam' => '提醒垃圾评论'), array('approved', 'waiting'), '提醒设置', _t('该选项仅针对博主,访客只发送已通过的评论。'));
     $form->addInput($status);
     $other = new Typecho_Widget_Helper_Form_Element_Checkbox('other', array('to_owner' => '有评论及回复时,发邮件通知博主。', 'to_guest' => '评论被回复时,发邮件通知评论者。', 'to_me' => '自己回复自己的评论时,发邮件通知。(同时针对博主和访客)', 'to_log' => '记录邮件发送日志。'), array('to_owner', 'to_guest'), '其他设置', _t('如果选上"记录邮件发送日志"选项,则会在./CommentMailPlus/mail_log.php 文件中记录发送信息。<br />
                 关键性错误日志将自动记录到./CommentMailPlus/error_log.php文件中。<br />
                 '));
     $form->addInput($other->multiMode());
     $key = new Typecho_Widget_Helper_Form_Element_Text('key', NULL, 'key-', _t('Mailgun API 密钥'), _t('请填写在<a href="https://mailgun.com/">Mailgun</a>申请的密钥'));
     $form->addInput($key->addRule('required', _t('密钥不能为空')));
     $domain = new Typecho_Widget_Helper_Form_Element_Text('domain', NULL, 'samples.mailgun.org', _t('Mailgun域名'), _t('请填写您的邮件域名'));
     $form->addInput($domain->addRule('required', _t('邮件域名不能为空')));
     $mailAddress = new Typecho_Widget_Helper_Form_Element_Text('mailAddress', NULL, '*****@*****.**', _t('发件人邮箱'));
     $form->addInput($mailAddress->addRule('required', _t('发件人邮箱不能为空')));
     $senderName = new Typecho_Widget_Helper_Form_Element_Text('senderName', NULL, '评论提醒', _t('发件人显示名'));
     $form->addInput($senderName);
     $titleForOwner = new Typecho_Widget_Helper_Form_Element_Text('titleForOwner', null, "[{site}]:《{title}》有新的评论", _t('博主接收邮件标题'));
     $form->addInput($titleForOwner);
     $titleForGuest = new Typecho_Widget_Helper_Form_Element_Text('titleForGuest', null, "[{site}]:您在《{title}》的评论有了回复", _t('访客接收邮件标题'));
     $form->addInput($titleForGuest);
 }
コード例 #29
0
ファイル: functions.php プロジェクト: happmaoo/easylife
function themeConfig($form)
{
    $sidebarBlock = new Typecho_Widget_Helper_Form_Element_Checkbox('sidebarBlock', array('ShowCategory' => _t('显示分类'), 'ShowTags' => _t('显示Tags'), 'ShowArchive' => _t('显示归档'), 'ShowOther' => _t('显示其它杂项')), array('ShowCategory', 'ShowTags', 'ShowArchive', 'ShowOther'), _t('侧边栏显示'));
    $form->addInput($sidebarBlock->multiMode());
    $ac = new Typecho_Widget_Helper_Form_Element_Textarea('ac', NULL, "Codeinto,发现代码的乐趣。", _t('站点公告'), _t('支持HTML代码。'));
    $form->addInput($ac);
    //-------------------------- ads -----------------------------------------
    $ad_txt_1 = <<<EOF
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- contentPage -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-9592953235994353"
     data-ad-slot="5589186549"
     data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
EOF;
    $ad_1 = new Typecho_Widget_Helper_Form_Element_Textarea('ad_1', NULL, $ad_txt_1, _t('ad_1'), _t('调用方法:echo ($this->options->ad_1) 下同'));
    $form->addInput($ad_1);
    $ad_txt_2 = <<<EOF
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- contentPage -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-9592953235994353"
     data-ad-slot="5589186549"
     data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
EOF;
    $ad_2 = new Typecho_Widget_Helper_Form_Element_Textarea('ad_2', NULL, $ad_txt_1, _t('ad_2'), _t(''));
    $form->addInput($ad_2);
}
コード例 #30
0
ファイル: Plugin.php プロジェクト: wujunze/wujunze.com
 /**
  * 获取插件配置面板
  *
  * @access public
  * @param Typecho_Widget_Helper_Form $form 配置面板
  * @return void
  */
 public static function config(Typecho_Widget_Helper_Form $form)
 {
     $mode = new Typecho_Widget_Helper_Form_Element_Radio('mode', array('smtp' => 'smtp', 'mail' => 'mail()', 'sendmail' => 'sendmail()'), 'smtp', '发信方式');
     $form->addInput($mode);
     $host = new Typecho_Widget_Helper_Form_Element_Text('host', NULL, 'smtp.', _t('SMTP地址'), _t('请填写 SMTP 服务器地址'));
     $form->addInput($host->addRule('required', _t('必须填写一个SMTP服务器地址')));
     $port = new Typecho_Widget_Helper_Form_Element_Text('port', NULL, '25', _t('SMTP端口'), _t('SMTP服务端口,一般为25。'));
     $port->input->setAttribute('class', 'mini');
     $form->addInput($port->addRule('required', _t('必须填写SMTP服务端口'))->addRule('isInteger', _t('端口号必须是纯数字')));
     $user = new Typecho_Widget_Helper_Form_Element_Text('user', NULL, NULL, _t('SMTP用户'), _t('SMTP服务验证用户名,一般为邮箱名如:youname@domain.com'));
     $form->addInput($user->addRule('required', _t('SMTP服务验证用户名')));
     $pass = new Typecho_Widget_Helper_Form_Element_Password('pass', NULL, NULL, _t('SMTP密码'));
     $form->addInput($pass->addRule('required', _t('SMTP服务验证密码')));
     $validate = new Typecho_Widget_Helper_Form_Element_Checkbox('validate', array('validate' => '服务器需要验证', 'ssl' => 'ssl加密'), array('validate'), 'SMTP验证');
     $form->addInput($validate);
     $fromName = new Typecho_Widget_Helper_Form_Element_Text('fromName', NULL, NULL, _t('发件人名称'), _t('发件人名称,留空则使用博客标题'));
     $form->addInput($fromName);
     $mail = new Typecho_Widget_Helper_Form_Element_Text('mail', NULL, NULL, _t('接收邮件的地址'), _t('接收邮件的地址,如为空则使用文章作者个人设置中的邮件地址!'));
     $form->addInput($mail->addRule('email', _t('请填写正确的邮件地址!')));
     $contactme = new Typecho_Widget_Helper_Form_Element_Text('contactme', NULL, NULL, _t('模板中“联系我”的邮件地址'), _t('联系我用的邮件地址,如为空则使用文章作者个人设置中的邮件地址!'));
     $form->addInput($contactme->addRule('email', _t('请填写正确的邮件地址!')));
     $status = new Typecho_Widget_Helper_Form_Element_Checkbox('status', array('approved' => '提醒已通过评论', 'waiting' => '提醒待审核评论', 'spam' => '提醒垃圾评论'), array('approved', 'waiting'), '提醒设置', _t('该选项仅针对博主,访客只发送已通过的评论。'));
     $form->addInput($status);
     $other = new Typecho_Widget_Helper_Form_Element_Checkbox('other', array('to_owner' => '有评论及回复时,发邮件通知博主。', 'to_guest' => '评论被回复时,发邮件通知评论者。', 'to_me' => '自己回复自己的评论时,发邮件通知。(同时针对博主和访客)', 'to_log' => '记录邮件发送日志。'), array('to_owner', 'to_guest'), '其他设置', _t('选中该选项插件会在log/mailer_log.txt 文件中记录发送日志。'));
     $form->addInput($other->multiMode());
     $titleForOwner = new Typecho_Widget_Helper_Form_Element_Text('titleForOwner', null, "[{title}] 一文有新的评论", _t('博主接收邮件标题'));
     $form->addInput($titleForOwner->addRule('required', _t('博主接收邮件标题 不能为空')));
     $titleForGuest = new Typecho_Widget_Helper_Form_Element_Text('titleForGuest', null, "您在 [{title}] 的评论有了回复", _t('访客接收邮件标题'));
     $form->addInput($titleForGuest->addRule('required', _t('访客接收邮件标题 不能为空')));
 }