Skip to content

Commit

Permalink
update 2.8
Browse files Browse the repository at this point in the history
更新说明:此次更新增加了新的文件,所以更新请删除旧版主题,在重新上传启用,最好不要覆盖安装。

1.适配https站点,主要是对多说头像https加密优化(在主题的设置开关里面开启,默认关闭)(由于embedssl.js内
使用了cds.php和表情图片的相对路径,有问题可以反馈)
2.把多说表情本地化,之前一直是用的外链,主题体积大主要是由于`背景图片内置了25张`,表情一共246张小图,图片均经过压缩,不会太占速度。
3.增加后台多说博主认证ID填写,避免了修改代码麻烦
4.增加了后台pjax-send 和pjax-complete 事件直接填写
(如果不熟悉pjax,可以不填写)
  • Loading branch information
ihewro committed Nov 17, 2016
1 parent a748e65 commit 4aae3a3
Show file tree
Hide file tree
Showing 258 changed files with 2,722 additions and 13 deletions.
2 changes: 1 addition & 1 deletion assets/css/duoshuo-disqus.min.css

Large diffs are not rendered by default.

File renamed without changes.
2,509 changes: 2,509 additions & 0 deletions assets/js/develope/embedssl.js

Large diffs are not rendered by default.

File renamed without changes.
152 changes: 152 additions & 0 deletions assets/js/embedssl.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/script.js
Expand Up @@ -92,5 +92,5 @@ lue();
}
};

console.log('\n %c theme Leaf v2.7 %c by友人C<ihewro.com> 2016/10/19 \n\n','color:#444;background:#eee;padding:5px 0;border-top-left-radius:5px;border-bottom-left-radius:5px;', 'color:#eee;background:#444;padding:5px 0;border-top-right-radius:5px;border-bottom-right-radius:5px;');
console.log('\n %c theme Leaf v2.8 %c by友人C<ihewro.com> 2016/11/17 \n\n','color:#444;background:#eee;padding:5px 0;border-top-left-radius:5px;border-bottom-left-radius:5px;', 'color:#eee;background:#444;padding:5px 0;border-top-right-radius:5px;border-bottom-right-radius:5px;');
/*希望使用本主题能够保留本行注释QWQ*/
23 changes: 23 additions & 0 deletions cds.php
@@ -0,0 +1,23 @@
<?php
error_reporting(0);
if(isset($_GET['url']) && isset($_SERVER['HTTP_REFERER'])){
$url = urldecode($_GET['url']);
$referer = parse_url($_SERVER['HTTP_REFERER']);
if(preg_match("/^http/",$url)){//防盗链验证
$opts = array('http'=>array(
'method'=>'GET',
'timeout'=>10
));
$result = file_get_contents($url,FALSE,stream_context_create($opts));
if($result){
header("Cache-Control:public;maxage=604800");//设置缓存时间
echo $result;
}else{
header("HTTP/1.1 404 Not Found");
}
}else{
header("HTTP/1.1 400 Bad Request");
}
}else{
header("HTTP/1.1 403 Forbidden");
}
6 changes: 6 additions & 0 deletions comments.php
@@ -1,6 +1,12 @@
<?php if ($this->options->duoshuosn){ ?><div id="comments">
<?php if($this->allow("comment")): ?>
<!-- Duoshuo Comment BEGIN -->
<?php if ($this->options->duoshuosn){ ?>
<style>
#ds-thread #ds-reset a.ds-user-name[data-user-id='574993']:after{content:"博主";color:#fff;margin-left:6px;font-size:12px;border-radius:3px;background:#7f919e;padding:2px 3px;display:inline-block;font-weight:300}
</style>
<?php };?>

<div class="ds-thread" data-thread-key="<?php echo $this->cid;?>"
data-title="<?php echo $this->title;?>" data-author-key="<?php echo $this->authorId;?>" data-url=""></div>
<script type="text/javascript">
Expand Down
Binary file added duoshuo/alu/不出所料.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added duoshuo/alu/不出所料@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added duoshuo/alu/不说话.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added duoshuo/alu/不说话@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added duoshuo/alu/不高兴.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added duoshuo/alu/不高兴@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added duoshuo/alu/中刀.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added duoshuo/alu/中刀@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added duoshuo/alu/中指.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added duoshuo/alu/中指@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added duoshuo/alu/中枪.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added duoshuo/alu/中枪@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added duoshuo/alu/亲亲.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added duoshuo/alu/亲亲@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added duoshuo/alu/便便.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added duoshuo/alu/便便@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added duoshuo/alu/傻笑.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added duoshuo/alu/傻笑@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added duoshuo/alu/内伤.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added duoshuo/alu/内伤@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added duoshuo/alu/击掌.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added duoshuo/alu/击掌@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added duoshuo/alu/口水.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added duoshuo/alu/口水@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added duoshuo/alu/吐.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added duoshuo/alu/吐@2x.png
Binary file added duoshuo/alu/吐舌.png
Binary file added duoshuo/alu/吐舌@2x.png
Binary file added duoshuo/alu/吐血倒地.png
Binary file added duoshuo/alu/吐血倒地@2x.png
Binary file added duoshuo/alu/呲牙.png
Binary file added duoshuo/alu/呲牙@2x.png
Binary file added duoshuo/alu/咽气.png
Binary file added duoshuo/alu/咽气@2x.png
Binary file added duoshuo/alu/哭泣.png
Binary file added duoshuo/alu/哭泣@2x.png
Binary file added duoshuo/alu/喜极而泣.png
Binary file added duoshuo/alu/喜极而泣@2x.png
Binary file added duoshuo/alu/喷水.png
Binary file added duoshuo/alu/喷水@2x.png
Binary file added duoshuo/alu/喷血.png
Binary file added duoshuo/alu/喷血@2x.png
Binary file added duoshuo/alu/坐等.png
Binary file added duoshuo/alu/坐等@2x.png
Binary file added duoshuo/alu/大囧.png
Binary file added duoshuo/alu/大囧@2x.png
Binary file added duoshuo/alu/害羞.png
Binary file added duoshuo/alu/害羞@2x.png
Binary file added duoshuo/alu/小怒.png
Binary file added duoshuo/alu/小怒@2x.png
Binary file added duoshuo/alu/小眼睛.png
Binary file added duoshuo/alu/小眼睛@2x.png
Binary file added duoshuo/alu/尴尬.png
Binary file added duoshuo/alu/尴尬@2x.png
Binary file added duoshuo/alu/得意.png
Binary file added duoshuo/alu/得意@2x.png
Binary file added duoshuo/alu/惊喜.png
Binary file added duoshuo/alu/惊喜@2x.png
Binary file added duoshuo/alu/想一想.png
Binary file added duoshuo/alu/想一想@2x.png
Binary file added duoshuo/alu/愤怒.png
Binary file added duoshuo/alu/愤怒@2x.png
Binary file added duoshuo/alu/扇耳光.png
Binary file added duoshuo/alu/扇耳光@2x.png
Binary file added duoshuo/alu/投降.png
Binary file added duoshuo/alu/投降@2x.png
Binary file added duoshuo/alu/抠鼻.png
Binary file added duoshuo/alu/抠鼻@2x.png
Binary file added duoshuo/alu/抽烟.png
Binary file added duoshuo/alu/抽烟@2x.png
Binary file added duoshuo/alu/无奈.png
Binary file added duoshuo/alu/无奈@2x.png
Binary file added duoshuo/alu/无所谓.png
Binary file added duoshuo/alu/无所谓@2x.png
Binary file added duoshuo/alu/无语.png
Binary file added duoshuo/alu/无语@2x.png
Binary file added duoshuo/alu/暗地观察.png
Binary file added duoshuo/alu/暗地观察@2x.png
Binary file added duoshuo/alu/期待.png
Binary file added duoshuo/alu/期待@2x.png
Binary file added duoshuo/alu/欢呼.png
Binary file added duoshuo/alu/欢呼@2x.png
Binary file added duoshuo/alu/汗.png
Binary file added duoshuo/alu/汗@2x.png
Binary file added duoshuo/alu/深思.png
Binary file added duoshuo/alu/深思@2x.png
Binary file added duoshuo/alu/狂汗.png
Binary file added duoshuo/alu/狂汗@2x.png
Binary file added duoshuo/alu/献花.png
Binary file added duoshuo/alu/献花@2x.png
Binary file added duoshuo/alu/献黄瓜.png
Binary file added duoshuo/alu/献黄瓜@2x.png
Binary file added duoshuo/alu/皱眉.png
Binary file added duoshuo/alu/皱眉@2x.png
Binary file added duoshuo/alu/看不见.png
Binary file added duoshuo/alu/看不见@2x.png
Binary file added duoshuo/alu/看热闹.png
Binary file added duoshuo/alu/看热闹@2x.png
Binary file added duoshuo/alu/肿包.png
Binary file added duoshuo/alu/肿包@2x.png
Binary file added duoshuo/alu/脸红.png
Binary file added duoshuo/alu/脸红@2x.png
Binary file added duoshuo/alu/蜡烛.png
Binary file added duoshuo/alu/蜡烛@2x.png
Binary file added duoshuo/alu/装大款.png
Binary file added duoshuo/alu/装大款@2x.png
Binary file added duoshuo/alu/观察.png
Binary file added duoshuo/alu/观察@2x.png
Binary file added duoshuo/alu/赞一个.png
Binary file added duoshuo/alu/赞一个@2x.png
Binary file added duoshuo/alu/邪恶.png
Binary file added duoshuo/alu/邪恶@2x.png
Binary file added duoshuo/alu/锁眉.png
Binary file added duoshuo/alu/锁眉@2x.png
Binary file added duoshuo/alu/长草.png
Binary file added duoshuo/alu/长草@2x.png
Binary file added duoshuo/alu/阴暗.png
Binary file added duoshuo/alu/阴暗@2x.png
Binary file added duoshuo/alu/高兴.png
Binary file added duoshuo/alu/高兴@2x.png
Binary file added duoshuo/alu/黑线.png
Binary file added duoshuo/alu/黑线@2x.png
Binary file added duoshuo/alu/鼓掌.png
Binary file added duoshuo/alu/鼓掌@2x.png
Binary file added duoshuo/newpaopao/OK.png
Binary file added duoshuo/newpaopao/OK@2x.png
Binary file added duoshuo/newpaopao/haha.png
Binary file added duoshuo/newpaopao/haha@2x.png
Binary file added duoshuo/newpaopao/what.png
Binary file added duoshuo/newpaopao/what@2x.png
Binary file added duoshuo/newpaopao/不高兴.png
Binary file added duoshuo/newpaopao/不高兴@2x.png
Binary file added duoshuo/newpaopao/乖.png
Binary file added duoshuo/newpaopao/乖@2x.png
Binary file added duoshuo/newpaopao/你懂的.png
Binary file added duoshuo/newpaopao/你懂的@2x.png
Binary file added duoshuo/newpaopao/便便.png
Binary file added duoshuo/newpaopao/便便@2x.png
Binary file added duoshuo/newpaopao/勉强.png
Binary file added duoshuo/newpaopao/勉强@2x.png
Binary file added duoshuo/newpaopao/吐.png
Binary file added duoshuo/newpaopao/吐@2x.png
Binary file added duoshuo/newpaopao/吐舌.png
Binary file added duoshuo/newpaopao/吐舌@2x.png
Binary file added duoshuo/newpaopao/呀咩爹.png
Binary file added duoshuo/newpaopao/呀咩爹@2x.png
Binary file added duoshuo/newpaopao/呵呵.png
Binary file added duoshuo/newpaopao/呵呵@2x.png
Binary file added duoshuo/newpaopao/哈哈.png
Binary file added duoshuo/newpaopao/哈哈@2x.png
Binary file added duoshuo/newpaopao/啊.png
Binary file added duoshuo/newpaopao/啊@2x.png
Binary file added duoshuo/newpaopao/喷.png
Binary file added duoshuo/newpaopao/喷@2x.png
Binary file added duoshuo/newpaopao/大拇指.png
Binary file added duoshuo/newpaopao/大拇指@2x.png
Binary file added duoshuo/newpaopao/太开心.png
Binary file added duoshuo/newpaopao/太开心@2x.png
Binary file added duoshuo/newpaopao/太阳.png
Binary file added duoshuo/newpaopao/太阳@2x.png
Binary file added duoshuo/newpaopao/委屈.png
Binary file added duoshuo/newpaopao/委屈@2x.png
Binary file added duoshuo/newpaopao/小乖.png
Binary file added duoshuo/newpaopao/小乖@2x.png
Binary file added duoshuo/newpaopao/小红脸.png
Binary file added duoshuo/newpaopao/小红脸@2x.png
Binary file added duoshuo/newpaopao/彩虹.png
Binary file added duoshuo/newpaopao/彩虹@2x.png
Binary file added duoshuo/newpaopao/心碎.png
Binary file added duoshuo/newpaopao/心碎@2x.png
Binary file added duoshuo/newpaopao/怒.png
Binary file added duoshuo/newpaopao/怒@2x.png
Binary file added duoshuo/newpaopao/惊哭.png
Binary file added duoshuo/newpaopao/惊哭@2x.png
Binary file added duoshuo/newpaopao/惊讶.png
Binary file added duoshuo/newpaopao/惊讶@2x.png
Binary file added duoshuo/newpaopao/懒得理.png
Binary file added duoshuo/newpaopao/懒得理@2x.png
Binary file added duoshuo/newpaopao/手纸.png
Binary file added duoshuo/newpaopao/手纸@2x.png
Binary file added duoshuo/newpaopao/挖鼻.png
Binary file added duoshuo/newpaopao/挖鼻@2x.png
Binary file added duoshuo/newpaopao/捂嘴笑.png
Binary file added duoshuo/newpaopao/捂嘴笑@2x.png
Binary file added duoshuo/newpaopao/星星月亮.png
Binary file added duoshuo/newpaopao/星星月亮@2x.png
Binary file added duoshuo/newpaopao/汗.png
Binary file added duoshuo/newpaopao/汗@2x.png
Binary file added duoshuo/newpaopao/沙发.png
Binary file added duoshuo/newpaopao/沙发@2x.png
Binary file added duoshuo/newpaopao/泪.png
Binary file added duoshuo/newpaopao/泪@2x.png
Binary file added duoshuo/newpaopao/滑稽.png
Binary file added duoshuo/newpaopao/滑稽@2x.png
Binary file added duoshuo/newpaopao/灯泡.png
Binary file added duoshuo/newpaopao/灯泡@2x.png
Binary file added duoshuo/newpaopao/爱心.png
Binary file added duoshuo/newpaopao/爱心@2x.png
Binary file added duoshuo/newpaopao/犀利.png
Binary file added duoshuo/newpaopao/犀利@2x.png
Binary file added duoshuo/newpaopao/狂汗.png
Binary file added duoshuo/newpaopao/狂汗@2x.png
Binary file added duoshuo/newpaopao/玫瑰.png
Binary file added duoshuo/newpaopao/玫瑰@2x.png
Binary file added duoshuo/newpaopao/疑问.png
Binary file added duoshuo/newpaopao/疑问@2x.png
Binary file added duoshuo/newpaopao/真棒.png
Binary file added duoshuo/newpaopao/真棒@2x.png
Binary file added duoshuo/newpaopao/睡觉.png
Binary file added duoshuo/newpaopao/睡觉@2x.png
Binary file added duoshuo/newpaopao/礼物.png
Binary file added duoshuo/newpaopao/礼物@2x.png
Binary file added duoshuo/newpaopao/笑尿.png
Binary file added duoshuo/newpaopao/笑尿@2x.png
Binary file added duoshuo/newpaopao/笑眼.png
Binary file added duoshuo/newpaopao/笑眼@2x.png
Binary file added duoshuo/newpaopao/红领巾.png
Binary file added duoshuo/newpaopao/红领巾@2x.png
Binary file added duoshuo/newpaopao/胜利.png
Binary file added duoshuo/newpaopao/胜利@2x.png
Binary file added duoshuo/newpaopao/花心.png
Binary file added duoshuo/newpaopao/花心@2x.png
Binary file added duoshuo/newpaopao/茶杯.png
Binary file added duoshuo/newpaopao/茶杯@2x.png
Binary file added duoshuo/newpaopao/药丸.png
Binary file added duoshuo/newpaopao/药丸@2x.png
Binary file added duoshuo/newpaopao/蛋糕.png
Binary file added duoshuo/newpaopao/蛋糕@2x.png
Binary file added duoshuo/newpaopao/蜡烛.png
Binary file added duoshuo/newpaopao/蜡烛@2x.png
Binary file added duoshuo/newpaopao/鄙视.png
Binary file added duoshuo/newpaopao/鄙视@2x.png
Binary file added duoshuo/newpaopao/酷.png
Binary file added duoshuo/newpaopao/酷@2x.png
Binary file added duoshuo/newpaopao/酸爽.png
Binary file added duoshuo/newpaopao/酸爽@2x.png
Binary file added duoshuo/newpaopao/钱币.png
Binary file added duoshuo/newpaopao/钱币@2x.png
Binary file added duoshuo/newpaopao/阴险.png
Binary file added duoshuo/newpaopao/阴险@2x.png
Binary file added duoshuo/newpaopao/音乐.png
Binary file added duoshuo/newpaopao/音乐@2x.png
Binary file added duoshuo/newpaopao/香蕉.png
Binary file added duoshuo/newpaopao/香蕉@2x.png
Binary file added duoshuo/newpaopao/黑线.png
Binary file added duoshuo/newpaopao/黑线@2x.png
25 changes: 20 additions & 5 deletions functions.php
Expand Up @@ -2,11 +2,14 @@
if (!defined('__TYPECHO_ROOT_DIR__')) exit;

function themeConfig($form) {
define("Leaf_Version", "2.8");
echo '<p style="font-size:16px;text-align:center;">感谢您使用Leaf主题 :<font color="#38b48b">Leaf</font><font color="#F40"> '.Leaf_Version.'</font> ![<a href="http://www.ihewro.com/archives/378" target="_blank">帮助与反馈</a>]</p>';
//首页设置开关
$indexsetup = new Typecho_Widget_Helper_Form_Element_Checkbox('indexsetup',
array('IndexImage' => _t('启用首页图片摇动效果'),
'Indexrandombackground' => _t('启用首页随机显示背景图片')),
array('IndexImage', 'Indexrandombackground'), _t('首页设置开关'));
'Indexrandombackground' => _t('启用首页随机显示背景图片'),
'webssl' => _t('多说启用https数据加密(为https站点设置,有问题<a href="http://www.ihewro.com/archives/378">反馈</a>)')),
array('IndexImage', 'Indexrandombackground'), _t('全站设置开关'));

$form->addInput($indexsetup->multiMode());

Expand Down Expand Up @@ -36,9 +39,15 @@ function themeConfig($form) {
$form->addInput($parallaxeffect);

//配置多说
$duoshuosn = new Typecho_Widget_Helper_Form_Element_Text('duoshuosn',NULL, 'hewro','配置多说short_name', '填写你的多说评论的short_name,使博客的评论系统可用,不填则不启用多说,包括不加载多说js与css<br><font color="#F40">注意:</font>这里的多说css都是主题内置好的,所以多说自定义css里的css最好清空,否则会有不美观的现象发生.<br>博主认证必须修改aseets/css/duoshuo.min.css的博主ID');
$duoshuosn = new Typecho_Widget_Helper_Form_Element_Text('duoshuosn',NULL, 'hewro','配置多说short_name', '填写你的多说评论的short_name,使博客的评论系统可用,不填则不启用多说,包括不加载多说js与css<br><font color="#F40">注意:</font>这里的多说css都是主题内置好的,所以多说自定义css里的css最好清空,否则会有不美观的现象发生.');
$duoshuosn->input->setAttribute('class', 'mini');
$form->addInput($duoshuosn);

//配置多说博主标志
$duoshuoid = new Typecho_Widget_Helper_Form_Element_Text('duoshuoid',NULL, '574993','配置多说博主标志的user-id', '<font color="#F40">注意:</font>配置多说博主标志的user-id,<a target="_blank" href="http://duoshuo.com/settings/avatar/">点击这个地址</a> 点击你的名字,出现的网页的最后数字就是你的ID');
$duoshuoid->input->setAttribute('class', 'mini');
$form->addInput($duoshuoid);

//多说风格切换

$duoshuoStyleswitch = new Typecho_Widget_Helper_Form_Element_Radio('duoshuoStyleswitch',
Expand Down Expand Up @@ -83,9 +92,15 @@ function themeConfig($form) {
$form->addInput($links);

//播放器音乐
$musiclist = new Typecho_Widget_Helper_Form_Element_Textarea('musiclist', NULL,'{title:"晚安;)",artist:"性人盒",mp3:"http://7xlk7n.com1.z0.glb.clouddn.com/wanan.mp3",cover:"http://p4.music.126.net/nz1ZXXSYg85COLFURrJodw==/7975857349674458.jpg",},
{title:"远山",artist:"末小皮",mp3:"http://7xlk7n.com1.z0.glb.clouddn.com/%E8%BF%9C%E5%B1%B1.mp3",cover:"http://p3.music.126.net/BceFKRe6K1aMsnu1QTFBYw==/8978611952438381.jpg",},', _t('音乐播放器的音乐列表'), _t('根据已给的格式填入你的HTML代码'));
$musiclist = new Typecho_Widget_Helper_Form_Element_Textarea('musiclist', NULL,'{title:"晚安;)",artist:"性人盒",mp3:"//o9o5ixzu2.qnssl.com/wanan.mp3",cover:"//o9o5ixzu2.qnssl.com/7975857349674458.jpg",},
{title:"远山",artist:"末小皮",mp3:"//o9o5ixzu2.qnssl.com/%E8%BF%9C%E5%B1%B1.mp3",cover:"//o9o5ixzu2.qnssl.com/8978611952438381.jpg",},', _t('音乐播放器的音乐列表'), _t('根据已给的格式填入你的HTML代码'));
$form->addInput($musiclist);
//pjax-send
$pjaxSendAction = new Typecho_Widget_Helper_Form_Element_Textarea('pjaxSendAction', NULL, NULL, _t('PJAX:SEND Action'), _t('启用 PJAX 选项后, 你的第三方插件可能会在 PJAX 中失效。在这种情况下, 你可能需要重新注册事件或做其他处理。<br>在这里写入你需要进行处理的 JS 代码。并确保正确,否则可能会导致后续 JS 代码无法执行。<br>这些 JS 代码会在 PJAX 发送网络请求(PJAX 触发事件 pjax:send)的时候执行。'));
$form->addInput($pjaxSendAction);
//pjax-complete
$pjaxCompleteAction = new Typecho_Widget_Helper_Form_Element_Textarea('pjaxCompleteAction', NULL, NULL, _t('PJAX:COMPLETE Action'), _t('启用 PJAX 选项后, 你的第三方插件可能会在 PJAX 中失效。在这种情况下, 你可能需要重新注册事件或做其他处理。<br>在这里写入你需要进行处理的 JS 代码。并确保正确,否则可能会导致后续 JS 代码无法执行。<br>这些 JS 代码会在 PJAX 完成页面加载并替换(PJAX 触发事件 pjax:complete)的时候执行。<br>绝大多数的处理可能应该在这里执行。你需要根据实际情况判断。'));
$form->addInput($pjaxCompleteAction);

}/*后台设置结束*/

Expand Down
4 changes: 2 additions & 2 deletions header.php
Expand Up @@ -21,12 +21,12 @@
), '', ' - '); ?><?php $this->options->title(); ?></title>
<?php if (!is_pjax()) { ?>
<!-- 使用url函数转换相关路径 -->
<script src="http://libs.baidu.com/jquery/2.1.4/jquery.min.js"></script>
<script src="//cdn.bootcss.com/jquery/2.2.1/jquery.min.js" type="text/javascript"></script>
<script>
// Fallback to loading jQuery from a local path if the CDN is unavailable
(window.jQuery || document.write('<script src="<?php $this->options->themeUrl('assets/js/jquery.min.js'); ?>"><\/script>'));
</script>
<link rel="stylesheet" href="http://cdn.bootcss.com/font-awesome/4.6.3/css/font-awesome.min.css">
<link rel="stylesheet" href="//cdn.bootcss.com/font-awesome/4.6.3/css/font-awesome.min.css">
<?php if ($this->options->duoshuosn){ ?>
<?php if ( $this->options->duoshuoStyleswitch =='0' ) : ?>
<link rel="stylesheet" href="<?php $this->options->themeUrl('assets/css/duoshuo-disqus.min.css'); ?>">
Expand Down
2 changes: 1 addition & 1 deletion index.php
Expand Up @@ -4,7 +4,7 @@
*
* @package Leaf
* @author ihewro
* @version 2.7
* @version 2.8
* @link http://www.ihewro.com
*/

Expand Down
10 changes: 7 additions & 3 deletions menu.php
Expand Up @@ -99,17 +99,21 @@ function bgChange(){
}).on('pjax:send',
function() {
NProgress.start();

<?php $this->options->pjaxSendAction(); ?>
}).on('pjax:complete',
function() {
NProgress.done();
setupContents();//灯箱组件
lue();//文字超过div显示省略号
reHighlightCodeBlock();//代码高亮
//repogithub();
<?php if ($this->options->duoshuosn){ ?>
if ($('.ds-thread').length > 0) { if (typeof DUOSHUO !== 'undefined') DUOSHUO.EmbedThread('.ds-thread'); else $.getScript("<?php $this->options->themeUrl('assets/js/embedhw4.min.js') ?>"); }
<?php if (!empty($this->options->indexsetup) && in_array('webssl', $this->options->indexsetup)) : ?>
if ($('.ds-thread').length > 0) { if (typeof DUOSHUO !== 'undefined') DUOSHUO.EmbedThread('.ds-thread'); else $.getScript("<?php $this->options->themeUrl('assets/js/embedssl.min.js') ?>"); }
<?php else : ?>
if ($('.ds-thread').length > 0) { if (typeof DUOSHUO !== 'undefined') DUOSHUO.EmbedThread('.ds-thread'); else $.getScript("<?php $this->options->themeUrl('assets/js/embed.min.js') ?>"); }
<?php endif ;?>
<?php };?>
<?php $this->options->pjaxCompleteAction(); ?>
});

</script>
Expand Down

0 comments on commit 4aae3a3

Please sign in to comment.