微博分享自动 at 官微

This commit is contained in:
alsotang 2014-09-21 12:14:55 +08:00
parent 01fe89c572
commit e85090d1e5
2 changed files with 2 additions and 1 deletions

View File

@ -88,6 +88,7 @@ var config = {
//weibo app key
weibo_key: 10000000,
weibo_id: 'your_weibo_id',
// admin 可删除话题,编辑标签,设某人为达人
admins: { user_login_name: true },

View File

@ -134,7 +134,7 @@
<div class="action">
<span class='span-success' id='share_weibo_btn'
onclick="((function(s,d,e,r,l,p,t,z,c){var f='http://v.t.sina.com.cn/share/share.php?appkey=<%= config.weibo_key %>',u=z||d.location,p=['&url=',e(u),'&title=',e(t||d.title),'&source=',e(r),'&sourceUrl=',e(l),'&content=',c||'gb2312','&pic=',e(p||'')].join('');function a(){if(!window.open([f,p].join(''),'mb',['toolbar=0,status=0,resizable=1,width=440,height=430,left=',(s.width-440)/2,',top=',(s.height-430)/2].join('')))u.href=[f,p].join('');};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else a();})(screen,document,encodeURIComponent,'','','','分享来自<%= config.name %>的话题:<%= topic.title %>','',''));"
onclick="((function(s,d,e,r,l,p,t,z,c){var f='http://v.t.sina.com.cn/share/share.php?appkey=<%= config.weibo_key %>',u=z||d.location,p=['&url=',e(u),'&title=',e(t||d.title),'&source=',e(r),'&sourceUrl=',e(l),'&content=',c||'gb2312','&pic=',e(p||'')].join('');function a(){if(!window.open([f,p].join(''),'mb',['toolbar=0,status=0,resizable=1,width=440,height=430,left=',(s.width-440)/2,',top=',(s.height-430)/2].join('')))u.href=[f,p].join('');};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else a();})(screen,document,encodeURIComponent,'','','','@<%= config.weibo_id %> 分享来自<%= config.name %>的话题:<%= topic.title %>','',''));"
>分享到微博</span>
<% if (typeof(current_user) !== 'undefined') { %>
<% if (!topic.in_collection) { %>