Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit 011e15f

Browse files
committed
Merge pull request #153 from jolestar/jb-development
add new comment provider: weibo. > Isolated. New comment provider. Low risk. Merging.
2 parents 4334c61 + cfb2d57 commit 011e15f

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

_config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ JB :
9393
num_posts: 5
9494
width: 580
9595
colorscheme: light
96+
weibo :
97+
appkey : 123
98+
ralateuid : 123
9699

97100
# Settings for analytics helper
98101
# Set 'provider' to the analytics provider you want to use.

_includes/JB/comments

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
{% include JB/comments-providers/intensedebate %}
1010
{% when "facebook" %}
1111
{% include JB/comments-providers/facebook %}
12+
{% when "weibo" %}
13+
{% include JB/comments-providers/weibo %}
1214
{% when "custom" %}
1315
{% include custom/comments %}
1416
{% endcase %}
1517

16-
{% endif %}
18+
{% endif %}

_includes/JB/comments-providers/weibo

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<script type="text/javascript">
2+
(function(){
3+
var pageUrl = encodeURIComponent("{{site.production_url}}{{page.permalink}}");
4+
var url = "http://widget.weibo.com/distribution/comments.php?width=0&url="+pageUrl+"&ralateuid={{ site.JB.commets.weibo.ralateuid}}&appkey={{ site.JB.comments.weibo.appkey }}&dpc=1";
5+
document.write('<iframe id="WBCommentFrame" src="' + url + '" scrolling="no" frameborder="0" style="width:100%"></iframe>');
6+
})();
7+
</script>
8+
<script src="http://tjs.sjs.sinajs.cn/open/widget/js/widget/comment.js" type="text/javascript" charset="utf-8"></script>
9+
<script type="text/javascript">
10+
window.WBComment.init({
11+
"id": "WBCommentFrame"
12+
});
13+
</script>

0 commit comments

Comments
 (0)