Skip to content

Commit

Permalink
因为多说插件关闭,因此改为使用搜狐畅言插件
Browse files Browse the repository at this point in the history
  • Loading branch information
BookFrank committed Nov 29, 2017
1 parent c934f36 commit 508723c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 21 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Rise Blog,中文名为修行日志,是一款使用PHP开发的支持Markdown
2. 支持静态化
3. 响应式页面
4. blog文件夹嵌套
5. 多说评论
5. 搜狐畅言评论插件
6. 多主题切换

## 四. 环境要求 ##
Expand Down
2 changes: 1 addition & 1 deletion app/Config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

'description' => "RiseBlog-修行日志,简单易用支持静态化的Markdown博客系统。",
'version' => 2.2,
'duoshuo' => 'stylite',
'changyan' => 'cytl8eXAI', // 对应的搜狐畅言APP_ID

'author' => [
'name' => 'BookFrank',
Expand Down
31 changes: 12 additions & 19 deletions app/View/default/block/comments.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
{% if confObj.duoshuo %}
{% if confObj.changyan %}
<div id="comments" class="comments-area">
<div id="respond" class="comment-respond">
<!-- 多说评论框 start -->
<div class="ds-thread" data-thread-key="{{ blog.blogId }}" data-title="{{ blog.title }}" data-url="{{ site.url }}{{ blog.siteURL }}"></div>
<!-- 多说评论框 end -->
<!-- 多说公共JS代码 start (一个网页只需插入一次) -->
<script type="text/javascript">
var duoshuoQuery = {short_name:"{{ confObj.duoshuo }}"};
(function() {
var ds = document.createElement('script');
ds.type = 'text/javascript';ds.async = true;
ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
ds.charset = 'UTF-8';
(document.getElementsByTagName('head')[0]
|| document.getElementsByTagName('body')[0]).appendChild(ds);
})();
</script>
<!-- 多说公共JS代码 end -->
</div><!-- #respond -->
</div><!-- .comments-area -->
<!--PC和WAP自适应版-->
<div id="SOHUCS" sid="{{ blog.blogId }}" ></div>
<script type="text/javascript">
(function(){
var appid = "{{ confObj.changyan }}";
var conf = 'prod_1fb21904f797de208dd3e1bee418b76e';
var width = window.innerWidth || document.documentElement.clientWidth;
if (width < 960) {
window.document.write('<script id="changyan_mobile_js" charset="utf-8" type="text/javascript" src="http://changyan.sohu.com/upload/mobile/wap-js/changyan_mobile.js?client_id=' + appid + '&conf=' + conf + '"><\/script>'); } else { var loadJs=function(d,a){var c=document.getElementsByTagName("head")[0]||document.head||document.documentElement;var b=document.createElement("script");b.setAttribute("type","text/javascript");b.setAttribute("charset","UTF-8");b.setAttribute("src",d);if(typeof a==="function"){if(window.attachEvent){b.onreadystatechange=function(){var e=b.readyState;if(e==="loaded"||e==="complete"){b.onreadystatechange=null;a()}}}else{b.onload=a}}c.appendChild(b)};loadJs("http://changyan.sohu.com/upload/changyan.js",function(){window.changyan.api.config({appid:appid,conf:conf})}); } })(); </script>
</div>
</div>
{% endif %}

0 comments on commit 508723c

Please sign in to comment.