(function(rt){
var templates=rt.templates,
attrs=function(){return rt.attrs.apply(rt,arguments)},
_=function(){return rt._.apply(rt,arguments)},
img=function(){return rt.img.apply(rt,arguments)},
imgURL=function(){return rt.imgURL.apply(rt,arguments)},
imgSize=function(){return rt.imgSize.apply(rt,arguments)},
avatar=function(){return rt.avatar.apply(rt,arguments)},
url=function(){return rt.url.apply(rt,arguments)},
mkurl=function(){return rt.mkurl.apply(rt,arguments)},
escape=function(){return rt.escape.apply(rt,arguments)},
__t=rt.templates,
emerge=function(){return rt.renderSync.apply(rt,arguments)};
__t["bidcms/index"]=function(locals){var buf=[];with(locals||{}){var interp,show_notify=page.notify&&page.notify.notify_id&&page.notify.strike||req.user&&req.user.status&&req.user.status.notify&&req.user.status.notify.strike,qt=page.query&&escape(page.query.text),qn=page.query&&page.query.total,categories={};for(var i=0;i<settings.categories.length;i++)categories[settings.categories[i].id]=settings.categories[i].name;var filter=page.filter.split(":");if(show_notify){var __val__=emerge("bidcms/notification_view");buf.push(null==__val__?"":__val__)}var __val__=emerge("bidcms/header");buf.push(null==__val__?"":__val__),buf.push("<div"),buf.push(attrs({"class":"wrapper"})),buf.push(">");var site=~page.filter.indexOf("site:")?page.filter.substr(9):null;site&&(buf.push("<div"),buf.push(attrs({id:"ctx_bar","class":"board"})),buf.push("><p>来自<a"),buf.push(attrs({href:"http://"+site+"",target:"_blank",rel:"nofollow"})),buf.push(">"+escape((interp=site)==null?"":interp)+"</a>的采集</p><form"),buf.push(attrs({id:"search_from_sites",action:page.bidcmsurl,"class":"search-item"})),buf.push("><input"),buf.push(attrs({value:""+(qt||"")+"",name:"q",placeholder:"搜索你喜欢的"})),buf.push("/><a"),buf.push(attrs({onclick:"this.getParent('form').submit();return false;","class":"go"})),buf.push("></a></form></div>"),qt&&(buf.push("<div"),buf.push(attrs({"class":"search-status"})),buf.push(">找到 "+escape((interp=qn)==null?"":interp)+" 个与<strong>"+escape((interp=qt)==null?"":interp)+"</strong>相关的结果 |<a"),buf.push(attrs({href:"index.php?con=pins&act=from&site="+encodeURIComponent(site)})),buf.push(">返回所有采集</a></div>")));if(filter[1]=="popular")buf.push("<div"),buf.push(attrs({id:"ctx_bar"})),buf.push("><div"),buf.push(attrs({"class":"p"})),buf.push(">热门"+escape((interp=filter[0]=="pin"?"采集":"画板")==null?"":interp)+"<ul"),buf.push(attrs({"class":"pin-board-switcher clearfix"})),buf.push("><li"),buf.push(attrs({"class":"first "+(filter[0]=="pin"?"selected":"")})),buf.push("><a"),buf.push(attrs({href:"index.php","class":"pin-link"})),buf.push(">采集</a></li><li"),buf.push(attrs({"class":"last "+(filter[0]=="board"?"selected":"")})),buf.push("><a"),buf.push(attrs({href:"index.php?con=boards&act=popular"})),buf.push(">画板</a></li></ul></div></div>");else if(filter[2]=="all"&&filter[1]=="category")buf.push("<div"),buf.push(attrs({id:"ctx_bar"})),buf.push("><div"),buf.push(attrs({"class":"p"})),buf.push(">最新"+escape((interp=filter[0]=="pin"?"采集":"画板")==null?"":interp)+"<ul"),buf.push(attrs({"class":"pin-board-switcher clearfix"})),buf.push("><li"),buf.push(attrs({"class":"first "+(filter[0]=="pin"?"selected":"")})),buf.push("><a"),buf.push(attrs({href:"index.php","class":"pin-link"})),buf.push(">采集</a></li><li"),buf.push(attrs({"class":"last "+(filter[0]=="board"?"selected":"")})),buf.push("><a"),buf.push(attrs({href:"index.php?con=boards&act=favorite"})),buf.push(">画板</a></li></ul></div></div>");else if(filter[1]=="category"){buf.push("<div"),buf.push(attrs({id:"ctx_bar"})),buf.push("><div"),buf.push(attrs({"class":"p"})),buf.push(">");if(qt){if(filter[2]=="videos")buf.push("<a"),buf.push(attrs({href:"index.php?act=videos"})),buf.push(">视频</a>");else{buf.push("<a"),buf.push(attrs({href:""+page.bidcmsurl.split("?")[0]+""})),buf.push(">");var __val__=categories[filter[2]];buf.push(null==__val__?"":__val__),buf.push("</a>")}buf.push("&nbsp;»&nbsp;");var __val__=qt;buf.push(null==__val__?"":__val__)}else if(filter[2]=="videos")buf.push("视频");else{var __val__=categories[filter[2]];buf.push(null==__val__?"":__val__)}buf.push("<ul"),buf.push(attrs({"class":"pin-board-switcher clearfix"})),buf.push(">");var is_fav_cate=~settings.fav_categories.indexOf(filter[2]),now_link=is_fav_cate?"index.php?type=favorite":"index.php?type=all";buf.push("<li"),buf.push(attrs({"class":"first "+(filter[0]=="pin"?"selected":"")})),buf.push("><a"),buf.push(attrs({href:now_link+'&act='+filter[2]+(qt?"&q="+qt:""),"class":"pin-link"})),buf.push(">采集</a></li><li"),buf.push(attrs({"class":"last "+(filter[0]=="board"?"selected":"")})),buf.push("><a"),buf.push(attrs({href:"index.php?con=boards&act="+filter[2]+(qt?"&q="+qt:"")+""})),buf.push(">画板</a></li></ul></div><form"),buf.push(attrs({id:"search_from_category",action:page.bidcmsurl,"class":"search-item"})),buf.push("><input"),buf.push(attrs({value:""+(qt||"")+"",name:"q",placeholder:"搜索你喜欢的"})),buf.push("/><a"),buf.push(attrs({onclick:"this.getParent('form').submit(); return false;","class":"go"})),buf.push("></a></form></div>")}page.user_info&&(buf.push("<div"),buf.push(attrs({id:"ctx_bar"})),buf.push("><ul"),buf.push(attrs({"class":"pin-board-switcher clearfix follow-switcher"})),buf.push("><li"),buf.push(attrs({"class":"first "+(filter[0]=="pin"?"selected":"")})),buf.push("><a"),buf.push(attrs({href:"index.php?con=following&act=pins","class":"pin-link"})),buf.push(">我关注的采集</a></li><li"),buf.push(attrs({"class":"last "+(filter[0]=="board"?"selected":"")})),buf.push("><a"),buf.push(attrs({href:"index.php?con=following&act=boards"})),buf.push(">我关注的画板</a></li></ul></div>"));var _topLeftHiding=Cookie.read("_tl0h"),topLeftPromotion_mixin=function(){buf.push("<a"),buf.push(attrs({href:"index.php?con=apps",target:"_blank","class":"top-left-prom"})),buf.push("><img"),buf.push(attrs({src:"static/bidcms/i/0.png",width:192,height:151})),buf.push("/><div"),buf.push(attrs({"class":"cls"})),buf.push('></div></a><script>(function(){var a=document.getElement(".top-left-prom");a.getSiblings().length||(a=a.getParent(".wfc"));var b=a.getElement(".cls");b.onclick=function(){return a.fade("out").get("tween").chain(function(){a.dispose(),app.page.$waterfall.reposition(!0)}),Cookie.write("_tl0h",1,{duration:30}),!1}})()</script>')};buf.push("<div"),buf.push(attrs({id:"waterfall"})),buf.push(">");if(page.category_query){buf.push("<div"),buf.push(attrs({id:"category_query","class":"pin wfc"})),buf.push(">"),_topLeftHiding||topLeftPromotion_mixin();if(page.category_query.length){buf.push("<div"),buf.push(attrs({"class":"subqueries"})),buf.push(">");for(var $index=0,$$l=page.category_query.length;$index<$$l;$index++){var subq=page.category_query[$index];buf.push("<a"),buf.push(attrs({href:"index.php?act=favorite&qid="+subq+"","class":""+(qt==subq?"active":"")+""})),buf.push(">");var __val__=subq;buf.push(null==__val__?"":__val__),buf.push("</a>")}buf.push("</div>")}else{buf.push("<ul>");for(g in page.category_query){buf.push("<li"),buf.push(attrs({"class":"group"})),buf.push(">");var __val__=g;buf.push(null==__val__?"":__val__),buf.push("</li><li"),buf.push(attrs({"class":"subqueries clearfix"})),buf.push(">");for(var $index=0,$$l=page.category_query[g].length;$index<$$l;$index++){var subq=page.category_query[g][$index];buf.push("<a"),buf.push(attrs({href:"index.php?act=favorite&qid="+subq+"","class":""+(qt==subq?"active":"")+""})),buf.push(">");var __val__=subq;buf.push(null==__val__?"":__val__),buf.push("</a>")}buf.push("</li>")}buf.push("</ul>")}buf.push("</div>")}else if(page.user_info){buf.push("<div"),buf.push(attrs({id:"user_info","class":"pin wfc"})),buf.push(">");var __val__=emerge("bidcms/people_profile",{user_info:page.user_info,user:req.user,suggestion_friends:page.suggestion_friends||[]});buf.push(null==__val__?"":__val__),buf.push("</div>")}else if(~page.filter.indexOf("videos")){buf.push("<div"),buf.push(attrs({"class":"pin video-category wfc"})),buf.push(">"),_topLeftHiding||topLeftPromotion_mixin();var current=~page.filter.indexOf("youku")?"youku":"videos";buf.push("<a"),buf.push(attrs({href:"index.php?act=videos","class":"all btn "+(current=="videos"?"current":"")})),buf.push(">全部视频</a><a"),buf.push(attrs({href:"index.php?act=videos&cate=youku","class":"youku btn "+(current=="youku"?"current":"")})),buf.push(">优酷精选</a></div>")}else _topLeftHiding||(buf.push("<div"),buf.push(attrs({"class":"pin wfc"})),buf.push(">"),topLeftPromotion_mixin(),buf.push("</div>"));if(page.promotions&&(page.promotions.img_promotions||page.promotions.user_promotions||page.promotions.imgtxt_promotions)){var __val__=emerge("bidcms/promotions",{promotions:page.promotions});buf.push(null==__val__?"":__val__)}var promt=page.promotions?page.promotions.promotion:!1;if(promt&&promt.promotion_item&&promt.promotion_type==2){var pin=promt.promotion_item,__val__=emerge("bidcms/pin_item",{user:pin.user,pin:pin,board:pin.board,promotion:promt});buf.push(null==__val__?"":__val__)}else if(promt&&promt.promotion_item&&promt.promotion_type==1){var __val__=emerge("bidcms/board_item",{board:promt.promotion_item,user:req.user,promotion:promt});buf.push(null==__val__?"":__val__)}if(page.pins)for(var $index=0,$$l=page.pins.length;$index<$$l;$index++){var pin=page.pins[$index],__val__=emerge("bidcms/pin_item",{user:pin.user,pin:pin,board:pin.board});buf.push(null==__val__?"":__val__)}else for(var $index=0,$$l=page.boards.length;$index<$$l;$index++){var board=page.boards[$index],__val__=emerge("bidcms/board_item",{board:board,user:req.user});buf.push(null==__val__?"":__val__)}buf.push('</div></div><script>(function(){app.initLikeButtons(),app.initAddCommentButtons(),app.initFollowButtons(),app.initThunderPinButtons(),$$(".promotion .promotion-url").addEvent("click",function(){try{_gaq.push(["_trackEvent","Promotion","Click",this.get("href")])}catch(a){}})})()</script><script>(function(){app._gaq_promotion&&app._gaq_promotion()})()</script>')}return buf.join("")},
__t["bidcms/people_pins"]=function(locals){var buf=[];with(locals||{}){var interp,__val__=emerge("bidcms/header");buf.push(null==__val__?"":__val__);var __val__=emerge("bidcms/people_layout",{req:req,user:page.user,ctx:"pins",body_tpl:"bidcms/people_pins_body",page:page});buf.push(null==__val__?"":__val__)}return buf.join("")},
__t["bidcms/chrome_callout"]=function(locals){var buf=[];with(locals||{}){var interp;buf.push("<div"),buf.push(attrs({id:"chrome_callout",style:"display: none;","class":"has-close"})),buf.push("><div"),buf.push(attrs({"class":"wrapper"})),buf.push("><div"),buf.push(attrs({"class":"intro sheet"})),buf.push("><span>安装BidCms的chrome采集工具，你可以方便地收集网络上的图片，视频及网页截图。</span><span"),buf.push(attrs({"class":"second"})),buf.push(">这是BidCms的精髓所在。</span><a"),buf.push(attrs({target:"_blank",href:"http://hbfile.b0.upaiyun.com/extensions/huaban-chrome-extension.crx","class":"install-extension btn btn18 rbtn"})),buf.push("><strong> 安装BidCmsChrome扩展</strong><span></span></a><a"),buf.push(attrs({"class":"close"})),buf.push('></a></div></div></div><script>(function(){if(!Browser.chrome||Browser.version<18){document.id("chrome_callout").dispose();return}var a=Cookie.read("_hb_chrome_extention"),b=document.id("shadow_nav");if(b&&!b.hasClass("closed"))return document.id("chrome_callout").dispose(),!1;var a=Cookie.read("_hb_chrome_extention");if(a==null){var c=function(a,b,c){var d=document.createElement("script");d.onerror=c,d.onload=b,document.head.appendChild(d),d.src=a+"/css/capture.css"};c("chrome-extension://imamemhokkdleoelohnmkimbmpfglcil",function(){Cookie.write("_hb_chrome_extention",!0,{duration:365})},function(){Cookie.write("_hb_chrome_extention",!1,{duration:365})}),document.id("chrome_callout").dispose()}else a=="false"?document.id("chrome_callout").removeClass("has-close").show():document.id("chrome_callout").dispose(),$$(".close").addEvent("click",function(){Cookie.write("_hb_chrome_extention",!0,{duration:3}),document.id("chrome_callout").hide()}),$$(".install-extension").addEvent("click",function(){return(new Element("link",{rel:"chrome-webstore-item",href:"https://chrome.google.com/webstore/detail/imamemhokkdleoelohnmkimbmpfglcil"})).inject(document.head),app.page.installNoti=new SmoothNotification({duration:!1}),this.hasClass("installed")||app.page.installing?!1:(app.page.installing=!0,app.page.installNoti.show("安装中，请稍候..."),chrome.webstore.install("https://chrome.google.com/webstore/detail/imamemhokkdleoelohnmkimbmpfglcil",function(){app.page.installNoti.hide(),Cookie.write("_hb_chrome_extention",!0,{duration:365})},function(){app.page.installNoti.show(\'安装失败，试试去 <a href="https://chrome.google.com/webstore/detail/imamemhokkdleoelohnmkimbmpfglcil" style="color: white;text-decoration: underline;">Chrome 应用商店</a>下载吧\'),app.page.installing=!1}),document.id("chrome_callout").hide(),!1)})})()</script>')}return buf.join("")},
__t["bidcms/categories_cell"]=function(locals){var buf=[];with(locals||{}){var interp,cur="all",cats={},_categories=settings.categories.concat(settings.channels);_categories.unshift({id:"all",name:"全部"});for(var i=0,l=_categories.length;i<l;i++)cats[_categories[i].id]=_categories[i];var cat_groups=[["all","home","travel_places","food_drink","pets","people","film_music_books","photography","desire","architecture","tips","funny","art","other"],["illustration","design","web_app_icon"],["taomm","modeling_hair","wedding_events","apparel","kids","diy_crafts"],["beauty","cars_motorcycles","data_presentation","digital","men","sports"],["videos","web_captures"]],keywords=typeof seo_keywords_dic=="undefined"?{}:seo_keywords_dic;page.filter&&~page.filter.indexOf("category:")&&(cur=page.filter.split(":").pop()),buf.push("<div"),buf.push(attrs({"class":"pin category wfc"})),buf.push(">");for(var i=0,l=cat_groups.length;i<l;i++){buf.push("<div"),buf.push(attrs({"class":"cats "+(i===l-1?"last":"")})),buf.push(">");for(var j=0,sl=cat_groups[i].length;j<sl;j++){var c=cats[cat_groups[i][j]],keyword=keywords[c.id]||"";buf.push("<a"),buf.push(attrs({href:"/"+(c.id==="beauty"?"favorite":"all")+"/"+c.id+"/",title:""+keyword+"","class":(cur===c.id?"selected ":" ")+c.id})),buf.push("><span>");var __val__=c.name;buf.push(escape(null==__val__?"":__val__)),buf.push("</span></a>")}buf.push("</div>")}cur=="web_captures"&&(buf.push("<a"),buf.push(attrs({href:"http://huaban.comindex.php?con=about&act=goodieschrome/","class":"chrome_crx_ad"})),buf.push(">使用BidCmsChrome扩展 你也可以采集网页截图哦</a>")),buf.push("</div>")}return buf.join("")},
__t["bidcms/pin_item"]=function(locals){var buf=[];with(locals||{}){var interp,_suffix=typeof suffix=="undefined"||!suffix?"fw192":suffix,_is_shopping=typeof is_shopping!="undefined"&&is_shopping,promt=typeof promotion=="undefined"||!promotion?null:promotion,seq=promt?"":pin.seq?pin.seq:pin.pin_id,extraCssClass=promt?"promotion":"",board_title=board.is_private==2?"待归类采集":board.title;buf.push("<div"),buf.push(attrs({"data-id":""+pin.pin_id+"","data-seq":seq,"class":"pin wfc "+(""+extraCssClass+"")})),buf.push("><div"),buf.push(attrs({"class":"hidden"})),buf.push("><a"),buf.push(attrs({href:"index.php?con=user&uid="+user.urlname})),buf.push(">"+escape((interp=user.username)==null?"":interp)+"</a>采集到<a"),buf.push(attrs({href:"index.php?con=boards&act=item&bid="+pin.board_id+""})),buf.push(">"+escape((interp=board_title)==null?"":interp)+"</a></div><div"),buf.push(attrs({"class":"actions"})),buf.push("><div"),buf.push(attrs({"class":"right"})),buf.push(">"),this.req.user&&pin.user_id===this.req.user.user_id?(buf.push("<a"),buf.push(attrs({href:"index.php?con=pins&act=edit&id="+pin.pin_id,"class":"edit btn btn11 wbtn"})),buf.push("><strong>编辑</strong><span></span></a>")):pin.liked?(buf.push("<a"),buf.push(attrs({"data-id":""+pin.pin_id+"",href:"#",onclick:"return false;","class":"unlike btn btn11 wbtn"})),buf.push("><strong><em></em>取消喜欢</strong><span></span></a>")):(buf.push("<a"),buf.push(attrs({"data-id":""+pin.pin_id+"",href:"#",onclick:"return false;","class":"like btn btn11 wbtn"})),buf.push("><strong><em></em>喜欢</strong><span></span></a>")),buf.push("<a"),buf.push(attrs({href:"#",onclick:"return false;","class":"comment clickable "+(""+(pin.comments?"disabled":"")+"")+" "+"btn"+" "+"btn11"+" "+"wbtn"})),buf.push("><strong><em></em>评论</strong><span></span></a></div>"),pin.private||(buf.push("<div"),buf.push(attrs({"class":"left"})),buf.push("><a"),buf.push(attrs({"data-id":""+pin.pin_id+"",title:"快速转采",href:"#",onclick:"return false;","class":"thunderpin btn btn11 wbtn"})),buf.push("><strong><em></em></strong><span></span></a><a"),buf.push(attrs({onclick:"app.requireLogin(function(){ app.showDialog('repin', '"+pin.pin_id+"');});return false;",href:"#","class":"repin btn btn11 wbtn"})),buf.push("><strong>转采</strong><span></span></a></div>")),buf.push("</div>");var size=imgSize(pin.file,_suffix),pinUrl="index.php?con=pins&act=item&id="+pin.pin_id,targetUrl=promt?promt.promotion_url||pinUrl:pinUrl,target=promt?promt.open_in_new_tab?"_blank":"_self":"_self";_is_shopping&&(target="_blank");var extra_css_class=[];size.h>800&&extra_css_class.push("long"),promt&&extra_css_class.push("promotion-url"),extra_css_class=extra_css_class.join(" "),buf.push("<a"),buf.push(attrs({href:""+targetUrl+"",target:""+target+"","class":"img "+(""+extra_css_class+""+(_is_shopping?"":" x")+"")})),buf.push(">");var __val__=img(pin.file,_suffix,{alt:user.username+"采集到"+board_title});buf.push(null==__val__?"":__val__),pin.media_type==1&&(buf.push("<img"),buf.push(attrs({src:"static/bidcms/img/media_video.png","class":"video-icon"})),buf.push("/>")),size.h>800&&(buf.push("<span"),buf.push(attrs({"class":"stop"})),buf.push("></span>")),buf.push("</a>"),_is_shopping&&(buf.push("<div"),buf.push(attrs({"class":"shiji-actions"})),buf.push(">"),this.req.user&&pin.user_id===this.req.user.user_id?(buf.push("<a"),buf.push(attrs({href:"index.php?con=pins&act=edit&id="+pin.pin_id,"class":"edit btn btn11 wbtn"})),buf.push("><strong>编辑</strong><span></span></a>")):pin.liked?(buf.push("<a"),buf.push(attrs({"data-id":""+pin.pin_id+"",href:"#",onclick:"return false;","class":"unlike btn btn11 wbtn"})),buf.push("><strong><em></em>取消喜欢</strong><span></span></a>")):(buf.push("<a"),buf.push(attrs({"data-id":""+pin.pin_id+"",href:"#",onclick:"return false;","class":"like btn btn11 wbtn"})),buf.push("><strong><em></em>喜欢</strong><span></span></a>")),buf.push("<a"),buf.push(attrs({onclick:"app.requireLogin(function(){ app.showDialog('repin', '"+pin.pin_id+"');});return false;",href:"#","class":"shiji-repin btn btn11 wbtn"})),buf.push("><strong><em></em></strong><span></span></a></div><div"),buf.push(attrs({"class":"like-comment-holder"})),buf.push("><div"),buf.push(attrs({style:"display: none","class":"like-comment"})),buf.push("><div"),buf.push(attrs({"class":"pointer"})),buf.push("></div><div"),buf.push(attrs({"class":"info"})),buf.push(">OK，喜欢了</div><textarea"),buf.push(attrs({placeholder:"求评论","class":"like-comment-input"})),buf.push("></textarea><a"),buf.push(attrs({"class":"like-comment-button"})),buf.push("></a><div"),buf.push(attrs({"class":"close"})),buf.push("></div></div></div>")),buf.push("<p"),buf.push(attrs({"class":"description"})),buf.push(">");var __val__=pin.raw_text.format_text(pin.text_meta);buf.push(null==__val__?"":__val__),buf.push("</p>");if(!pin.commodity){buf.push("<p"),buf.push(attrs({"class":"stats less"})),buf.push(">");if(pin.like_count){buf.push("<span"),buf.push(attrs({"class":"LikesCount"})),buf.push(">");var __val__=pin.like_count+" 喜欢&nbsp;&nbsp;";buf.push(null==__val__?"":__val__),buf.push("</span>")}if(pin.comment_count){buf.push("<span"),buf.push(attrs({"class":"CommentsCount"})),buf.push(">");var __val__=pin.comment_count+" 评论&nbsp;&nbsp;";buf.push(null==__val__?"":__val__),buf.push("</span>")}if(pin.repin_count){buf.push("<span"),buf.push(attrs({"class":"RepinsCount"})),buf.push(">");var __val__=pin.repin_count+" 转采&nbsp;&nbsp;";buf.push(null==__val__?"":__val__),buf.push("</span>")}buf.push("</p>")}if(_is_shopping&&pin.channel_tags&&pin.channel_tags.length){buf.push("<div"),buf.push(attrs({"class":"tags"})),buf.push(">");for(var $index=0,$$l=pin.channel_tags.length;$index<$$l;$index++){var t=pin.channel_tags[$index];buf.push("<a"),buf.push(attrs({href:"index.php?con=pins&act=item&id="+t})),buf.push(">"+escape((interp=t)==null?"":interp)+"</a>")}buf.push("</div>")}if(pin.commodity||_is_shopping){buf.push("<div"),buf.push(attrs({"class":"commodity"})),buf.push(">"),pin.like_count&&(buf.push("<span"),buf.push(attrs({"class":"likes "+(pin.liked?"liked":"")})),buf.push(">"+escape((interp=pin.like_count)==null?"":interp)+"</span>"));if(pin.commodity){buf.push("<a"),buf.push(attrs({href:"index.php?con=pins&act=go&id="+pin.pin_id+"",target:"_blank","class":"price jd-link"})),buf.push(">");var _css_class=pin.commodity.store?"store-"+pin.commodity.store+" icon":"icon";buf.push("<em"),buf.push(attrs({"class":""+_css_class+""})),buf.push("></em>"),pin.commodity.price?buf.push("￥"+escape((interp=Math.round(pin.commodity.price*10)/10)==null?"":interp)+""):buf.push("购买"),buf.push("</a>")}else buf.push("<a"),buf.push(attrs({href:"index.php?con=pins&act=go&id="+pin.pin_id+"",target:"_blank","class":"price jd-link"})),buf.push(">购买</a>");buf.push("</div>")}buf.push("<div"),buf.push(attrs({"class":"convo attribution clearfix"})),buf.push(">"),this.page.show_pin_source?(buf.push("<p"),buf.push(attrs({"class":"NoImage"})),buf.push("><a"),buf.push(attrs({href:"index.php?con=pins&act=go&id="+pin.pin_id+"",target:"_blank"})),buf.push(">"+escape((interp=pin.source)==null?"":interp)+"</a></p>")):(buf.push("<p>"),_is_shopping?(buf.push("<a"),buf.push(attrs({href:"/shiji/"+user.urlname,"class":"author"})),buf.push(">"+escape((interp=user.username)==null?"":interp)+"</a>&nbsp;采集自&nbsp;<a"),buf.push(attrs({href:"/shiji/from/"+pin.source+"/"})),buf.push(">"+escape((interp=typeof stores!=="undefined"&&stores[pin.source]&&stores[pin.source].name||pin.source)==null?"":interp)+"</a><a"),buf.push(attrs({title:"回复","class":"replyButton"})),buf.push("></a>")):(buf.push("<a"),buf.push(attrs({href:"index.php?con=user&uid="+escape(user.urlname),title:escape(user.username),"class":"img x"})),buf.push("><img"),buf.push(attrs({src:avatar(user,undefined)})),buf.push("/></a><a"),buf.push(attrs({href:"index.php?con=user&uid="+user.urlname,"class":"author x"})),buf.push(">"+escape((interp=user.username)==null?"":interp)+"</a>"),pin.via_user&&(buf.push("&nbsp;通过&nbsp;<a"),buf.push(attrs({href:"index.php?con=user&uid="+pin.via_user.urlname,"class":"x"})),buf.push(">"+escape((interp=pin.via_user.username)==null?"":interp)+"</a>")),buf.push("&nbsp;采集到&nbsp;<a"),buf.push(attrs({href:"index.php?con=boards&act=item&id="+pin.board_id,"class":"x"})),buf.push(">"+escape((interp=pin.board.is_private==2?"待归类采集":pin.board.title)==null?"":interp)+"</a><a"),buf.push(attrs({title:"回复","class":"replyButton"})),buf.push("></a>")),buf.push("</p>")),buf.push("</div><div"),buf.push(attrs({style:pin.comments?"":"display:none;","class":"comments muted"})),buf.push(">");if(pin.comments)for(var $index=0,$$l=pin.comments.length;$index<$$l;$index++){var comment=pin.comments[$index],__val__=emerge("bidcms/comment_item_convo",comment);buf.push(null==__val__?"":__val__)}buf.push("</div>"),au=this.req.user||{urlname:"",username:""},buf.push("<div"),buf.push(attrs({style:"display: "+(pin.comments&&!_is_shopping?"block":"none")+";","class":"write convo clearfix"})),buf.push("><a"),buf.push(attrs({href:"index.php?con=user&uid="+escape(au.urlname),title:escape(au.username),"class":"img x"})),buf.push("><img"),buf.push(attrs({src:avatar(au,undefined)})),buf.push("/></a><form"),buf.push(attrs({action:"models/setcomments.php?id="+pin.pin_id,method:"POST"})),buf.push("><textarea"),buf.push(attrs({placeholder:"添加评论或把采集@给好友","class":"GridComment"})),buf.push("></textarea><a"),buf.push(attrs({href:"#",onclick:"return false;","class":"grid_comment_button"})),buf.push("></a></form></div>"),promt&&promt.show_icon&&(buf.push("<div"),buf.push(attrs({"class":"promotion-icon"})),buf.push("></div>")),buf.push("</div>")}return buf.join("")},
__t["bidcms/reading_promotions"]=function(locals){var buf=[];with(locals||{}){var interp;if(promotions&&promotions.length>0){buf.push("<div"),buf.push(attrs({"class":"reading-promotions"})),buf.push("><h3>推荐阅读</h3>");var per_page=3,page=0,total_pages=Math.floor((promotions.length-1)/per_page)+1,current_page=Math.floor(Math.random()*total_pages+1);while(promotions.length>0){var promotions_per_page=promotions.splice(0,per_page),style="";page++,page!=current_page&&(style="display: none;"),buf.push("<ul"),buf.push(attrs({style:""+style+"","class":"page"+page+""})),buf.push(">");for(var $index=0,$$l=promotions_per_page.length;$index<$$l;$index++){var promotion=promotions_per_page[$index];buf.push("<li"),buf.push(attrs({"class":"reading-item"})),buf.push(">");var image_url="",target=promotion.open_in_new_tab?"_blank":"_self";promotion.file&&(image_url="http://"+this.settings.hbfile[promotion.file.bucket]+promotion.file.key),buf.push("<a"),buf.push(attrs({href:""+promotion.promotion_url+"",target:""+target+""})),buf.push("><img"),buf.push(attrs({src:""+image_url+"",height:"50",width:"50",alt:!0})),buf.push("/></a><h4><a"),buf.push(attrs({href:""+promotion.promotion_url+"",target:""+target+""})),buf.push(">"+escape((interp=promotion.title)==null?"":interp)+"</a></h4><div"),buf.push(attrs({"class":"subtitle"})),buf.push(">"+escape((interp=promotion.description)==null?"":interp)+"</div></li>")}buf.push("</ul>")}if(total_pages>1){buf.push("<ul"),buf.push(attrs({"class":"pager"})),buf.push(">");for(var i=1;i<=page;i++){var li_class="";i==current_page&&(li_class="current"),buf.push("<li"),buf.push(attrs({"data-page":""+i+"","class":""+li_class+""})),buf.push(">●</li>")}buf.push("</ul>")}buf.push("</div>")}buf.push('<script>(function(){var a=$$(".reading-promotions ul.pager li");a.length>0&&a.addEvent("click",function(){if(this.hasClass("current"))return;var a=$$(".reading-promotions ul.pager li.current")[0],b=a.get("data-page"),c=$$(".reading-promotions ul.page"+b)[0],d=this.get("data-page"),e=$$(".reading-promotions ul.page"+d)[0];c.hide(),a.removeClass("current"),this.addClass("current"),e.show(),app.page.$waterfall.reposition(!0)})})()</script>')}return buf.join("")},
__t["bidcms/people_profile"]=function(locals){var buf=[];with(locals||{}){var interp,req=req||app.req;buf.push("<div"),buf.push(attrs({id:"Profile"})),buf.push("><div"),buf.push(attrs({"class":"profile-basic"})),buf.push("><a"),buf.push(attrs({href:"index.php?con=user&uid="+escape(user.urlname),title:escape(user.username),"class":"img x"})),buf.push("><img"),buf.push(attrs({width:"64px",height:"64px",src:avatar(user,"sq75")})),buf.push("/></a><a"),buf.push(attrs({href:"index.php?con=user&uid="+user.urlname,"class":"userlink"})),buf.push(">"+escape((interp=user.username)==null?"":interp)+"</a><a"),buf.push(attrs({href:"index.php?con=user&act=profile","class":"settings"})),buf.push(">帐号设置</a></div><div"),buf.push(attrs({"class":"profile-stats"})),buf.push("><a"),buf.push(attrs({href:"index.php?con=user&act=pins&uid="+user.urlname})),buf.push("><strong>"+escape((interp=user_info.pin_count)==null?"":interp)+"</strong>采集</a><a"),buf.push(attrs({href:"index.php?con=user&uid="+user.urlname})),buf.push("><strong>"+escape((interp=user_info.board_count)==null?"":interp)+"</strong>画板</a><a"),buf.push(attrs({href:"index.php?con=user&act=likes&uid="+user.urlname,"class":"last"})),buf.push("><strong>"+escape((interp=user_info.follower_count)==null?"":interp)+"</strong>喜欢</a></div>"),user.status.newbietask===1&&(buf.push("<div"),buf.push(attrs({"class":"unit"})),buf.push("><div"),buf.push(attrs({id:"task_start_tip"})),buf.push(">欢迎来到BidCms网，跟着花小瓣玩转BidCms吧！<div"),buf.push(attrs({"class":"start-button"})),buf.push("></div><div"),buf.push(attrs({"class":"cls"})),buf.push("></div></div><div"),buf.push(attrs({id:"task_progress"})),buf.push("><h3>用BidCms采集你喜欢的</h3><ol><li>创建画板</li><li>把精彩图片采集到画板中</li></ol></div></div><div"),buf.push(attrs({id:"task_modules",style:"display:none"})),buf.push("><div"),buf.push(attrs({"class":"module-exit module"})),buf.push("><div"),buf.push(attrs({"class":"cancel"})),buf.push("></div><div"),buf.push(attrs({"class":"exit"})),buf.push("></div></div><div"),buf.push(attrs({"class":"module-step1-1 module"})),buf.push("><div"),buf.push(attrs({"class":"next"})),buf.push("></div><div"),buf.push(attrs({"class":"cls"})),buf.push("></div></div><div"),buf.push(attrs({"data-relative-to":"#nav_add .nav","data-offset-x":"-180","data-offset-y":"-6","class":"module-step1-2 module pos"})),buf.push("><div"),buf.push(attrs({"class":"add"})),buf.push("></div><div"),buf.push(attrs({"class":"point"})),buf.push("></div></div><div"),buf.push(attrs({"data-relative-to":"#OpenCreateBoard","data-offset-x":"-87","data-offset-y":"1","class":"module-step1-3 module pos"})),buf.push("><div"),buf.push(attrs({"class":"add"})),buf.push("></div><div"),buf.push(attrs({"class":"point"})),buf.push("></div></div><div"),buf.push(attrs({"data-relative-to":".modal .BoardSelector","data-offset-x":"200","data-offset-y":"50","class":"module-step1-4 module pos"})),buf.push("><div"),buf.push(attrs({"data-relative-to":"#CreateBoard .close","data-offset-x":"0","data-offset-y":"0","class":"fake-close pos"})),buf.push("></div></div><div"),buf.push(attrs({"class":"module-step1-5 module"})),buf.push("><div"),buf.push(attrs({"class":"next"})),buf.push("></div><div"),buf.push(attrs({"class":"cls"})),buf.push("></div></div><div"),buf.push(attrs({"class":"module-step2-1 module"})),buf.push("><div"),buf.push(attrs({"class":"text1"})),buf.push(">看到网页上不错的设计素材、优秀的摄影作品、好看的服饰、发型等美图，通过BidCms采集工具，点击一下，就可以把任意网站的图片、视频、网页等采集到画板中。点击图片还能回到原网页。</div><div"),buf.push(attrs({"class":"text2"})),buf.push(">从电脑中选择图片，上传，还能同步到第三方平台，让好友了解你的最新状态。</div><div"),buf.push(attrs({"class":"text3"})),buf.push(">点击转采按钮，即可把其他用户的美图转到自己的画板中，因为共同的兴趣，说不定还能和他们成为好友哦。</div><a"),buf.push(attrs({target:"_blank",href:"index.php?con=about&act=goodies","class":"go"})),buf.push("></a><a"),buf.push(attrs({target:"_blank",href:"index.php?con=about&act=goodies",style:"display:none","class":"go-goodies"})),buf.push("></a><div"),buf.push(attrs({"class":"cls"})),buf.push("></div></div><div"),buf.push(attrs({"class":"module-step2-2 module"})),buf.push("><div"),buf.push(attrs({"class":"next"})),buf.push("></div><div"),buf.push(attrs({"class":"cls"})),buf.push("></div></div><div"),buf.push(attrs({"class":"module-welcome module"})),buf.push("><div"),buf.push(attrs({"class":"start"})),buf.push("></div><div"),buf.push(attrs({"class":"cls"})),buf.push("></div></div></div>"));if(suggestion_friends.length>0){buf.push("<div"),buf.push(attrs({"class":"all-friends convo"})),buf.push(">已在BidCms的好友<a"),buf.push(attrs({href:"index.php?con=user&act=friends"})),buf.push(">全部</a></div>");var cnt=0;for(var $index=0,$$l=suggestion_friends.length;$index<$$l;$index++){var f=suggestion_friends[$index];if(cnt>=3)break;cnt+=1;var __val__=emerge("base/suggest_friend",{friend:f});buf.push(null==__val__?"":__val__)}}else buf.push("<div"),buf.push(attrs({"class":"profile-acts convo"})),buf.push("><div"),buf.push(attrs({"class":"links"})),buf.push("><a"),buf.push(attrs({href:"index.php?con=user&act=invites","class":"btn wbtn"})),buf.push("><strong><em></em> 在BidCms的好友</strong><span></span></a></div></div>");buf.push('</div><script>(function(){var a=[],b=[],c=$("Profile").getElement(".profile-acts"),d=$("Profile");app.initFollowUserButtons(function(a){function c(c,d){if(d){var f=a.getParent(".suggestion").get("data-id");f&&!~b.indexOf(f)&&b.push(f),e(a.getParent(".suggestion"))}else(new Button(c.removeClass("unfollow"))).setTitle("关注")}$$("a.unfollowuser").each(function(b){c(b,a.hasClass("unfollowuser"))})}),d&&d.addEvent("click:relay(.suggestion a.mute)",function(a){var c=a.target;c.get("tag")!=="a"&&(c=c.getParent("a"));var d=c.get("data-friend-username"),f=c.get("data-service-name");(new Request.JSON({url:"/friends_suggest/mute/",data:{friend_username:d,service_name:f},onSuccess:function(a){!~b.indexOf(d)&&b.push(d),e(c.getParent(".suggestion"))}})).post()});var e=function(b){b&&b.dispose(),a.length>0?f():(new Request.JSON({url:"/friends_suggest/",data:{limit:10},onSuccess:function(b){b&&b.suggestion_friends&&b.suggestion_friends.length>0&&(a=b.suggestion_friends,f())}})).get(),setTimeout(function(){app.page.$waterfall&&app.page.$waterfall.reposition(!0)},100)},f=function(){var e=a.shift();while(e){var f=d.getElement(".suggestion[data-id="+e.urlname+"]");if(~b.indexOf(e.urlname)||f){e=a.shift();continue}app.render("base/suggest_friend",{friend:e},function(a,b){Elements.from(b)[0].inject(c,"before"),a&&Browser.exec(a)}),setTimeout(function(){app.page.$waterfall&&app.page.$waterfall.reposition(!0)},100);if(d.getElements(".suggestion").length<3){e=a.shift();continue}break}}})(),function(){document.id("task_start_tip")&&Asset.javascript("/js/user_task.js")}()</script>')}return buf.join("")},
__t["bidcms/message_indicator"]=function(locals){var buf=[];with(locals||{}){var interp;buf.push("<div"),buf.push(attrs({id:"message_indicator"})),buf.push("><a"),buf.push(attrs({href:"index.php?con=message&act=mentions","class":"mentions"})),buf.push("><span"),buf.push(attrs({"class":"num"})),buf.push(">+5</span></a><a"),buf.push(attrs({href:"index.php?con=message&act=activities","class":"activities"})),buf.push("><span"),buf.push(attrs({"class":"num"})),buf.push(">+5</span></a></div>")}return buf.join("")},
__t["bidcms/pin_success"]=function(locals){var buf=[];with(locals||{}){var interp,pin=app.$pin,bindings=app.req.user.bindings,boards=app.req.user.boards,board;for(var i=0,l=boards.length;i<l;i++)if(boards[i].board_id==pin.board_id){board=boards[i];break}var board_title=board.is_private==2?"待归类采集":board.title,apiShareButtons=[];bindings.weibo&&apiShareButtons.push("weibo"),bindings.qzone&&apiShareButtons.push("qzone"),bindings.tqq&&apiShareButtons.push("tqq"),bindings.renren&&apiShareButtons.push("renren"),apiShareButtons=apiShareButtons.length<=2?apiShareButtons:apiShareButtons.slice(0,2);var jsShareButtons=["weibo","qzone","tqq","douban","renren"];jsShareButtons=jsShareButtons.filter(function(e){return!~apiShareButtons.indexOf(e)}),buf.push("<div"),buf.push(attrs({"class":"form"})),buf.push("><div"),buf.push(attrs({"class":"pin-done"})),buf.push("><h3>你已经成功采集到<a"),buf.push(attrs({href:"index.php?con=boards&act=item&id="+board.board_id,target:"_blank","class":"less"})),buf.push(">"+escape((interp=board_title)==null?"":interp)+"</a></h3><div"),buf.push(attrs({id:"pin_operations"})),buf.push("><a"),buf.push(attrs({id:"view_pin",href:"index.php?con=pins&act=item&id="+pin.pin_id})),buf.push(">查看这个采集</a>&nbsp;|<a"),buf.push(attrs({id:"close_window",href:"#"})),buf.push(">关闭窗口</a></div>");if(apiShareButtons.length>0){buf.push("<div"),buf.push(attrs({"class":"pin-share-description"})),buf.push("><p>据说这么好的东西是要分享给好友的～～～</p><textarea>"+escape((interp=pin.raw_text)==null?"":interp)+"</textarea>");var __val__=img(pin.file,"sq75",{alt:""});buf.push(null==__val__?"":__val__),buf.push("</div><div"),buf.push(attrs({"class":"pin-share-buttons"})),buf.push("><div"),buf.push(attrs({"class":"pin-api-share-buttons"})),buf.push(">"),~apiShareButtons.indexOf("weibo")&&(buf.push("<a"),buf.push(attrs({href:"#","class":"weibo share-button btn btn18 wbtn"})),buf.push("><strong><em></em> 分享至新浪微博</strong><span></span></a>")),~apiShareButtons.indexOf("qzone")&&(buf.push("<a"),buf.push(attrs({href:"#","class":"qzone share-button btn btn18 wbtn"})),buf.push("><strong><em></em> 分享至QQ空间</strong><span></span></a>")),~apiShareButtons.indexOf("tqq")&&(buf.push("<a"),buf.push(attrs({href:"#","class":"tqq share-button btn btn18 wbtn"})),buf.push("><strong><em></em> 分享至腾讯微博</strong><span></span></a>")),~apiShareButtons.indexOf("douban")&&(buf.push("<a"),buf.push(attrs({href:"#","class":"douban share-button btn btn18 wbtn"})),buf.push("><strong><em></em> 分享至豆瓣</strong><span></span></a>")),~apiShareButtons.indexOf("renren")&&(buf.push("<a"),buf.push(attrs({href:"#","class":"renren share-button btn btn18 wbtn"})),buf.push("><strong><em></em> 分享至人人</strong><span></span></a>")),buf.push("</div><div"),buf.push(attrs({"class":"pin-js-share-buttons"})),buf.push(">或:<ul>"),~jsShareButtons.indexOf("weibo")&&(buf.push("<li><a"),buf.push(attrs({href:"#",title:"分享到新浪微博","class":"weibo share-button"})),buf.push(">分享到新浪微博</a></li>")),~jsShareButtons.indexOf("qzone")&&(buf.push("<li><a"),buf.push(attrs({href:"#",title:"分享到QQ空间","class":"qzone share-button"})),buf.push(">分享到QQ空间</a></li>")),~jsShareButtons.indexOf("tqq")&&(buf.push("<li><a"),buf.push(attrs({href:"#",title:"分享到腾讯微博","class":"tqq share-button"})),buf.push(">分享到腾讯微博</a></li>")),~jsShareButtons.indexOf("douban")&&(buf.push("<li><a"),buf.push(attrs({href:"#",title:"分享到豆瓣","class":"douban share-button"})),buf.push(">分享到豆瓣</a></li>")),~jsShareButtons.indexOf("renren")&&(buf.push("<li><a"),buf.push(attrs({href:"#",title:"分享到人人","class":"renren share-button"})),buf.push(">分享到人人</a></li>")),buf.push("</ul></div></div>")}else buf.push("<div"),buf.push(attrs({"class":"pin-js-share-buttons"})),buf.push("><a"),buf.push(attrs({href:"#","class":"weibo share-button btn btn18 wbtn"})),buf.push("><strong><em></em> 分享到新浪微博</strong><span></span></a><a"),buf.push(attrs({href:"#","class":"qzone share-button btn btn18 wbtn"})),buf.push("><strong><em></em> 分享到QQ空间</strong><span></span></a><a"),buf.push(attrs({href:"#","class":"tqq share-button btn btn18 wbtn"})),buf.push("><strong><em></em> 分享到腾讯微博</strong><span></span></a><a"),buf.push(attrs({href:"#","class":"douban share-button btn btn18 wbtn"})),buf.push("><strong><em></em> 分享到豆瓣</strong><span></span></a></div>");buf.push('</div></div><script>(function(){var a={weibo:1,qzone:2,tqq:4,douban:8,renren:16},b=app.$pin,c="http://"+app.host+"/index.php?con=pins&act=item&id="+b.pin_id,d=app.imgURL(b.file,"fw554"),e=b.raw_text,f=$("PinSuccess"),g=window.close;e.length>100&&(e=e.substring(0,100)+"..."),e+=" ♥分享自@BidCms网 的画板#'+escape((interp=board_title)==null?"":interp)+'# »",f&&(g=function(){app.hideDialog()}),$("close_window").addEvent("click",function(){return g(),!1}),["weibo","qzone","tqq","douban","renren"].each(function(c){if(b.share_button/1&a[c]){var d=$$(".pin-api-share-buttons .share-button."+c);d[0]&&(new Button(d[0])).disable().setTitle("已成功分享")}}),$$(".pin-js-share-buttons .share-button").addEvent("click",function(){if(this.hasClass("disabled"))return;var a=["url="+encodeURIComponent(c)],b;if(this.hasClass("weibo")){b="weibo";var f="http://v.t.sina.com.cn/share/share.php?";a.push("&appkey=2499394483"),a.push("&pic="+encodeURIComponent(d)),a.push("&title="+encodeURIComponent(e)),a.push("&ralateUid=2493118952")}else if(this.hasClass("douban")){b="douban";var f="http://www.douban.com/recommend/?";a.push("&title="+encodeURIComponent(e)),a.push("&comment="+encodeURIComponent(e))}else if(this.hasClass("qzone")){b="qzone";var f="http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?";a.push("&title="+encodeURIComponent(e)),a.push("&pics="+encodeURIComponent(d))}else if(this.hasClass("tqq")){b="tqq";var f="http://share.v.t.qq.com/index.php?c=share&a=index&";a.push("&title="+encodeURIComponent(e)),a.push("&appkey=801088644"),a.push("&pic="+encodeURIComponent(d)),a.push("&assname=huaban20111114")}else if(this.hasClass("renren")){b="renren";var f="http://widget.renren.com/dialog/share?";a.push("&title="+encodeURIComponent(e)),a.push("&pic="+encodeURIComponent(d)),a[0]=a[0].replace("url=","resourceUrl=")}try{_gaq.push(["_trackEvent","SocialShare",b+":{js}","PinSuccess:"+app.page.pin.source])}catch(h){}a=a.join(""),function(b,c,d){function e(){window.open([f,a].join(""),"mb",["toolbar=0,status=0,resizable=1,width=620,height=450,left=",(b.width-620)/2,",top=",(b.height-450)/2].join(""))||(u.href=[f,a].join("")),g()}/Firefox/.test(navigator.userAgent)?setTimeout(e,0):e()}(screen,document,encodeURIComponent)}),$$(".pin-api-share-buttons .share-button").forEach(function(a){new Button(a,{disabledTitle:"分享中...",click:function(){this.disable();var a={},c=$$(".pin-share-description textarea")[0].value,d;this.element.hasClass("weibo")&&(a.weibo=!0,d="weibo"),this.element.hasClass("tqq")&&(a.tqq=!0,d="tqq"),this.element.hasClass("qzone")&&(a.qzone=!0,d="qzone"),this.element.hasClass("renren")&&(a.renren=!0,d="renren"),this.element.hasClass("douban")&&(a.douban=!0,d="douban"),c&&(a.description=c);try{_gaq.push(["_trackEvent","SocialShare",d+":{api}","PinSuccess:"+app.page.pin.source])}catch(e){}var f=this;return(new Request.JSON({url:"index.php?con=pins&act=item&id="+b.pin_id+"&type=share",data:a,onSuccess:function(a){var b=!1;["weibo","qzone","tqq","douban","renren"].each(function(c){a[c]&&a[c].err&&(b=!0)}),b?(alert("分享失败"),f.enable()):f.setTitle("已成功分享")},onFailure:function(a){alert("分享失败"),f.enable()}})).post(),!1}})});if(!f){$("view_pin").set("target","_blank").addEvent("click",function(){setTimeout(g,100)});var h=setTimeout(function(){g()},6e3);$$(".pin-share-description textarea")[0].addEvent("focus",function(){h&&(clearTimeout(h),h=null)})}})()</script><script>(function(){var a=$("PinSuccess"),b=app.$pin;if(!a&&b.is_share_btn)try{var c=b.link,d="",e=(new RegExp("^https?://([^/]+)(?:/.*)?")).exec(c);e&&e.length==2&&(d=e[1]),_gaq.push(["_trackEvent","SharePinSuccess",d,app.page.params.url])}catch(f){}})()</script>')}return buf.join("")},
__t["bidcms/people_list_item"]=function(locals){var buf=[];with(locals||{}){var interp;buf.push("<div"),buf.push(attrs({"data-seq":""+user.seq+"","class":"person"})),buf.push("><div"),buf.push(attrs({"class":"PersonPins"})),buf.push(">");for(var $index=0,$$l=user.pins.length;$index<$$l;$index++){var pin=user.pins[$index];buf.push("<a"),buf.push(attrs({href:"index.php?con=pins&act=item&id="+pin.pin_id,"class":"img"})),buf.push("><img"),buf.push(attrs({src:imgURL(pin.file,"sq75")})),buf.push("/></a>")}buf.push("</div><a"),buf.push(attrs({href:"index.php?con=user&uid="+user.urlname,"class":"PersonImage img"})),buf.push("><img"),buf.push(attrs({src:""+this.avatar(user)+"",alt:""+user.username+""})),buf.push("/></a><p"),buf.push(attrs({"class":"PersonIdentity"})),buf.push("><a"),buf.push(attrs({href:"index.php?con=user&uid="+user.urlname})),buf.push(">"+escape((interp=user.username)==null?"":interp)+"</a></p>"),req.user&&user.user_id===req.user.user_id?(buf.push("<a"),buf.push(attrs({href:"#",onclick:"return false;","class":"disabled btn btn13 rbtn"})),buf.push("><strong> 你</strong><span></span></a>")):user.following?(buf.push("<a"),buf.push(attrs({"data-id":""+user.urlname+"",href:"#",onclick:"return false;","class":"unfollowuser btn btn13 wbtn"})),buf.push("><strong> 取消关注</strong><span></span></a>")):(buf.push("<a"),buf.push(attrs({"data-id":""+user.urlname+"",href:"#",onclick:"return false;","class":"followuser btn btn13 rbtn"})),buf.push("><strong> 关注</strong><span></span></a>")),buf.push("</div>")}return buf.join("")},
__t["bidcms/bookmarklet"]=function(locals){var buf=[];with(locals||{}){var interp;buf.push("<div"),buf.push(attrs({id:"bookmarklet",style:"width: 550px; height: 190px; margin: 60px auto;"})),buf.push("><div"),buf.push(attrs({"class":"form"})),buf.push(">");var __val__=emerge("bidcms/pin_form",{text:page.params.text});buf.push(null==__val__?"":__val__),buf.push('</div></div><script>(function(){var a=320;Browser.ie&&(a+=90),Browser.firefox&&(a+=85),Browser.chrome&&(a+=58),Browser.safari&&(a+=80),window.resizeTo(632,a);var b=$("bookmarklet"),c=app.page.params.minWidth,d=app.page.params.minHeight;app.page.params.media_type!="1"&&(c=c<app.settings.minImageWidth?app.settings.minImageWidth:c,d=d<app.settings.minImageWidth?app.settings.minImageWidth:d);var e=b.getElement(".error"),f=b.getElements("img.load"),g=new ImagePicker(b.getElement(".ImagePicker"));g.setOptions({minW:c,minH:d});var h=app.page.params.media,i=function(a){return a.width===""||a.height===""||a.width.toInt()>=c&&a.height.toInt()>=d},j=b.getElement("a.rbtn"),k=function(a){a.length==0?(e.set("html","抱歉，页面上没有足够大的图片").show(),j&&j.addClass("disabled")):j&&j.removeClass("disabled")};!h||h.length<=0?(f.show(),(new Request.JSON({url:"models/collection.php",data:{url:app.page.params.url},noCache:!0,onSuccess:function(a){if(a.err){e.set("html",a.msg);return}h=a.images.filter(i).map(function(a){return a.src}),h.length==0?e.set("html","抱歉，页面上没有足够大的图片").show():g.load(h,app.page.params.url,k)},onComplete:function(a){(typeOf(h)!="array"||h.length==0)&&f.hide()},onFailure:function(){e.set("html",app.COMMON_ERRMSG).show(),f.hide()}})).get()):g.load(h,app.page.params.url,k)})()</script><script>(function(){if(app.page.params.is_share_btn)try{var a=app.page.params.url,b="",c=(new RegExp("^https?://([^/]+)(?:/.*)?")).exec(a);c&&c.length==2&&(b=c[1]),_gaq.push(["_trackEvent","SharePinClick",b,app.page.params.url])}catch(d){}})()</script>')}return buf.join("")},
__t["bidcms/pin_form"]=function(locals){var buf=[];with(locals||{}){var interp;buf.push("<div"),buf.push(attrs({style:"display:none","class":"pbt"})),buf.push("><div"),buf.push(attrs({"class":"ImagePicker"})),buf.push("><img"),buf.push(attrs({src:"static/bidcms/i/load2.gif",alt:"Loading Indicator","class":"load"})),buf.push("/><div"),buf.push(attrs({"class":"Images pin carousel-container"})),buf.push("><div"),buf.push(attrs({"class":"carousel-clip"})),buf.push("><ul"),buf.push(attrs({"class":"carousel-list"})),buf.push("><li><img"),buf.push(attrs({src:"static/bidcms/i/DefaultPin.gif",alt:"Media"})),buf.push("/></li></ul></div></div><div"),buf.push(attrs({"class":"Arrows"})),buf.push("><a"),buf.push(attrs({href:"#","class":"imagePickerNext picker"})),buf.push(">下一张&nbsp;→<span"),buf.push(attrs({"class":"imagePickerNextArrow"})),buf.push("></span></a><a"),buf.push(attrs({href:"#","class":"imagePickerPrevious picker"})),buf.push(">←&nbsp;上一张<span"),buf.push(attrs({"class":"imagePickerPreviousArrow"})),buf.push("></span></a></div></div><div"),buf.push(attrs({"class":"pin-form"})),buf.push(">");var __val__=emerge("bidcms/board_picker");buf.push(null==__val__?"":__val__),buf.push("<div"),buf.push(attrs({"class":"InputArea"})),buf.push("><ul"),buf.push(attrs({"class":"Form FancyForm"})),buf.push("><li"),buf.push(attrs({"class":"nmb"})),buf.push("><textarea"),buf.push(attrs({rows:"2",name:"caption","class":"DescriptionTextarea"})),buf.push(">"+escape((interp=typeof text!="undefined"?text:"")==null?"":interp)+"</textarea><label>描述一下这个采集…</label><span"),buf.push(attrs({"class":"fff"})),buf.push("></span></li></ul></div><div"),buf.push(attrs({"class":"CreateBoardStatus error mainerror"})),buf.push("></div><div"),buf.push(attrs({"class":"share-opts"})),buf.push(">");var bindings=[];app.req.user.bindings.weibo&&bindings.push({key:"weibo",value:"新浪微博"}),app.req.user.bindings.qzone&&bindings.push({key:"qzone",value:"QQ空间"}),app.req.user.bindings.tqq&&bindings.push({key:"tqq",value:"腾讯微博"}),app.req.user.bindings.renren&&bindings.push({key:"renren",value:"人人"});if(bindings.length>0){buf.push("<span>分享到：</span>");for(var i=0,$$l=bindings.length;i<$$l;i++){var binding=bindings[i];if(i<2){var css_class=binding.key+" enabled"+(i==1?" last":"");buf.push("<label"),buf.push(attrs({"class":""+css_class+""})),buf.push("><input"),buf.push(attrs({type:"checkbox",checked:!0,"data-key":""+binding.key+""})),buf.push("/><span>"+escape((interp=binding.value)==null?"":interp)+"</span></label>")}}}buf.push("</div><div"),buf.push(attrs({"class":"Buttons"})),buf.push("><a"),buf.push(attrs({href:"#",onclick:"return false;","class":"btn btn18 rbtn"})),buf.push("><strong> 采下来</strong><span></span></a></div></div></div><div"),buf.push(attrs({id:"pin_confirm_popup",style:"display: none;"})),buf.push("><div"),buf.push(attrs({"class":"notice"})),buf.push('>你已经在画板<span class="board-name">待归类采集</span>中采集过这张图片，是否继续？</div><div'),buf.push(attrs({"class":"buttons"})),buf.push("><a"),buf.push(attrs({href:"#",onclick:"return false;","class":"cancel btn btn18 wbtn"})),buf.push("><strong> 取消</strong><span></span></a><a"),buf.push(attrs({href:"#",onclick:"return false;","class":"continue btn btn18 rbtn"})),buf.push("><strong> 继续</strong><span></span></a><div"),buf.push(attrs({"class":"clear"})),buf.push('></div></div></div><script>(function(){var a={weibo:1,qzone:2,tqq:4,douban:8,renren:16},b={duration:3650},c=app.page.params&&app.page.params.via||null,d=app.page.params&&app.page.params.file_ticket||null;$$("div.pbt").each(function(b){var e=app.req.user.status.share;if(b.retrieve("initialized"))return;var f=$("bookmarklet")!==null,g=b.getElement("textarea.DescriptionTextarea"),h=function(){var a=!1;return function(b,c){c=typeof c=="function"?c:function(){};if(a)return c();a=!0,setTimeout(function(){(new Request.JSON({url:"/feedback/pin",data:b,onSuccess:function(a){c()},onFailure:function(){a=!1,c()}})).post()},5e3)}}(),i=new ImagePicker(b.getElement(".ImagePicker"));new FancyInput(g),g.get("registered-at")||(g.set("registered-at","registered"),new Autocompleter.Contacts.At(g));var j=b.getElements(".pin-form .share-opts input[type=checkbox]");j.each(function(b){var c=b.get("data-key"),d=b.getParent("label");e&a[c]||(d.removeClass("enabled"),d.addClass("disabled"),b.removeProperty("checked")),b.addEvent("change",function(){return b.get("checked")?(d.removeClass("disabled"),d.addClass("enabled")):(d.removeClass("enabled"),d.addClass("disabled")),!1})});var k=new Button(b.getElement("div.Buttons a.rbtn"),{click:function(){var k=g.get("value"),l=(new BoardPicker(b.getElement(".BoardPicker"))).getSelected(),m=i.getSelected();if(!m)return alert("没有选择要采集的图片");var n={board_id:l,text:k},o=m.el.retrieve("file"),p=m.el.retrieve("pin_id");e=0,j.each(function(b){if(b.get("checked")){var c=b.get("data-key");n[c]=!0,e|=a[c];try{_gaq.push(["_trackEvent","SocialShare",c+":{api}","PinDialog:"+app.page.pin.source])}catch(d){}}}),n.via=app.page.params&&app.page.params.via?app.page.params.via:0,n.media_type=app.page.params&&app.page.params.media_type?app.page.params.media_type:0,n.video=app.page.params&&app.page.params.video?app.page.params.video:0,p?n.via=p:d?(n.file_ticket=d,n.link=app.page.params.url):o?n.file_id=o.id:(n.img_url=m.src,m.link&&(n.link=m.link)),n.share_button=e,f&&(n.is_share_btn=app.page.params.is_share_btn?"1":"");var q=this;q.setTitle("采集中...").disable();var r=b.getParent("#ScrapePin");!document.id("Repin")&&!r&&(n.check=!0);var s=new Request.JSON({url:"models/setpin.php",data:n,onSuccess:function(a){if(a.err){alert(a.msg||app.COMMON_ERRMSG),h(Object.merge(n,a),function(){q.setTitle().enable()});return}if(a.warning==100){var b=document.id("pin_confirm_popup");b.getElement(".continue").addEvent("click",function(){delete s.options.data.check,s.post(),b.hide()}),b.getElement(".cancel").addEvent("click",function(){q.setTitle().enable(),b.hide(),window.close()}),b.getElement("span.board-name").set("html",\'<a href="index.php?con=boards&act=item&id="+a.pin.board.board_id+"><em>\'+a.pin.board.title+"</em></a>"),b.show();return}app.req.user.status.share=e,app.$pin=a.pin,f?app.route("bidcmsact_bookmarklet_success"):(q.element.fireEvent("success"),app.showDialog("pin_success"))},onFailure:function(a){h(Object.merge(n,{err:a.status}),function(){q.setTitle().enable()})}});s.post();var t=[],u=app.req.user.boards.filter(function(a){return a.board_id==l&&t.push(a),a.board_id!=l});return app.req.user.boards=t.concat(u),!1}});d||(k.disable(),i.addEvents({startLoading:function(){k.disable()},finishLoading:function(){k.enable()}})),b.store("initialized",!0)})})()</script>')}return buf.join("")},
__t["bidcms/suggest_friend"]=function(locals){var buf=[];with(locals||{}){var interp,f=friend;buf.push("<div"),buf.push(attrs({"data-id":""+f.urlname+"","class":"convo suggestion"})),buf.push("><a"),buf.push(attrs({href:"index.php?con=user&uid="+escape(f.urlname),title:escape(f.username),"class":"img x"})),buf.push("><img"),buf.push(attrs({width:"40px",height:"40px",src:avatar(f,"sq75")})),buf.push("/></a><a"),buf.push(attrs({href:"index.php?con=user&uid="+f.urlname,"class":"txt userlink"})),buf.push(">"+escape((interp=f.username)==null?"":interp)+"</a><span"),buf.push(attrs({"class":"icon "+(""+f.service_name+"")})),buf.push("></span><span"),buf.push(attrs({"class":"txt"})),buf.push(">"+escape((interp=f.user_info.username)==null?"":interp)+"</span><a"),buf.push(attrs({"data-id":""+f.urlname+"",href:"#",onclick:"return false;","class":"followuser btn wbtn"})),buf.push("><strong> 关注</strong><span></span></a><a"),buf.push(attrs({title:"不再推荐","data-friend-username":""+f.username+"","data-service-name":""+f.service_name+"","class":"mute"})),buf.push("></a></div>")}return buf.join("")},
__t["bidcms/error"]=function(locals){var buf=[];with(locals||{}){var interp;buf.push("<div"),buf.push(attrs({"class":"error-page"})),buf.push("><a"),buf.push(attrs({href:"/"})),buf.push("><h1"),buf.push(attrs({id:"thin_logo"})),buf.push("></h1></a><div"),buf.push(attrs({"class":"logo-bar"})),buf.push("></div><div"),buf.push(attrs({"class":"error"})),buf.push(">");var __val__=page.msg;buf.push(null==__val__?"":__val__),buf.push("</div></div>")}return buf.join("")},
__t["bidcms/image_promotions"]=function(locals){var buf=[];with(locals||{}){var interp;if(promotions&&promotions.length>0){var current_page=Math.floor(Math.random()*promotions.length+1),promotion=promotions[current_page-1],image_url="",target=promotion.open_in_new_tab?"_blank":"_self";promotion.file&&(image_url="http://"+this.settings.hbfile[promotion.file.bucket]+promotion.file.key),buf.push("<div"),buf.push(attrs({"class":"image-promotions"})),buf.push("><a"),buf.push(attrs({href:""+promotion.promotion_url+"",target:""+target+""})),buf.push("><img"),buf.push(attrs({src:""+image_url+"",alt:!0,width:"192",height:"310","class":"promotion"})),buf.push("/></a>");if(promotions.length>1){buf.push("<ul"),buf.push(attrs({"class":"pager"})),buf.push(">");for(var i=1;i<=promotions.length;i++){var promotion=promotions[i-1],image_url="",target=promotion.open_in_new_tab?"_blank":"_self";promotion.file&&(image_url="http://"+this.settings.hbfile[promotion.file.bucket]+"static/bidcms/img/promotion/"+promotion.file.key);var li_class="";i==current_page&&(li_class="current"),buf.push("<li"),buf.push(attrs({"data-url":""+promotion.promotion_url+"","data-target":""+target+"","data-image":""+image_url+"","class":""+li_class+""})),buf.push(">●</li>")}buf.push("</ul>")}buf.push("</div>")}buf.push('<script>(function(){var a=$$(".image-promotions ul.pager li");a.length>0&&a.addEvent("click",function(){if(this.hasClass("current"))return;var a=$$(".image-promotions ul.pager li.current")[0],b=$$(".image-promotions a")[0],c=$$(".image-promotions img.promotion")[0];a.removeClass("current"),b.set("href",this.get("data-url")),b.set("target",this.get("data-target")),c.set("src",this.get("data-image")),this.addClass("current")})})()</script>')}return buf.join("")},
__t["bidcms/people_pins_body"]=function(locals){var buf=[];with(locals||{}){var interp;buf.push("<div"),buf.push(attrs({id:"waterfall"})),buf.push(">");for(var $index=0,$$l=user.pins.length;$index<$$l;$index++){var pin=user.pins[$index],__val__=emerge("bidcms/pin_item",{user:user,pin:pin,board:pin.board});buf.push(null==__val__?"":__val__)}buf.push("</div>")}return buf.join("")},
__t["bidcms/people_likes_body"]=function(locals){var buf=[];with(locals||{}){var interp;buf.push("<div"),buf.push(attrs({id:"waterfall"})),buf.push(">");for(var pins=user.likes,i=0,l=pins.length;i<l;i++){var pin=pins[i],__val__=emerge("bidcms/pin_item",{user:pin.user,pin:pin,board:pin.board});buf.push(null==__val__?"":__val__)}buf.push("</div>")}return buf.join("")},
__t["bidcms/report_callout"]=function(locals){var buf=[];with(locals||{}){var interp;buf.push("<div"),buf.push(attrs({id:"report_callout",style:"display:none;"})),buf.push("><div"),buf.push(attrs({"class":"wrapper"})),buf.push("><div"),buf.push(attrs({"class":"intro sheet"})),buf.push("><div"),buf.push(attrs({"class":"content"})),buf.push("><div"),buf.push(attrs({"class":"sign"})),buf.push("></div><div"),buf.push(attrs({"class":"words"})),buf.push(">谢谢你对BidCms的贡献，BidCms的工作人员会及时处理你的举报的。</div></div><a"),buf.push(attrs({"class":"close"})),buf.push('></a></div></div></div><script>(function(){$$("#report_callout .close").addEvent("click",function(){$("report_callout").hide()})})()</script>')}return buf.join("")},
__t["bidcms/header"]=function(locals){var buf=[];with(locals||{}){var interp;buf.push("<div"),buf.push(attrs({id:"header",style:"width:auto"})),buf.push(">");var _url=page.bidcmsurl,isAtHome=_url=="index.php"||_url.indexOf("/following")===0||_url.indexOf("/boards/following")===0,isAtDiscover=!!_url.match(/^(\/boards)?\/(all|favorite|popular)(\/.*)?$/),isAtIntroduction=_url.indexOf("/about/introduction")===0;!req.user&&_url=="/"&&(isAtDiscover=!0);var navShowing=isAtDiscover;typeof page.is_from_target_site!="undefined"&&page.is_from_target_site&&(navShowing=!0),buf.push("<div"),buf.push(attrs({"class":"wrapper"})),buf.push("><a"),buf.push(attrs({id:"huaban",href:"index.php"})),buf.push("><img"),buf.push(attrs({src:"static/bidcms/i/logo_38.png",width:"80",height:"26",alt:"BidCms"})),buf.push("/></a><div"),buf.push(attrs({id:"main_menu"})),buf.push(">"),isAtHome||(buf.push("<div"),buf.push(attrs({"class":"border"})),buf.push("></div>")),req.user&&(buf.push("<a"),buf.push(attrs({id:"nav_bar_home",href:"index.php?con=following&act=pins",title:"首页","class":isAtHome?"active":""})),buf.push("><span>关注</span></a>")),!isAtDiscover&&!isAtHome&&(buf.push("<div"),buf.push(attrs({"class":"border"})),buf.push("></div>")),buf.push("<a"),buf.push(attrs({id:"nav_bar_discover",href:"index.php","class":isAtDiscover?"active":""})),buf.push("><span>发现</span><div"),buf.push(attrs({onclick:"return false;","class":"open "+(navShowing?"opend":"")})),buf.push("></div></a>"),isAtDiscover||(buf.push("<div"),buf.push(attrs({"class":"border"})),buf.push("></div>")),buf.push("<a"),buf.push(attrs({id:"nav_bar_shopping",href:"index.php?con=markets",title:"BidCms市集"})),buf.push("><span>市集</span></a>"),isAtIntroduction||(buf.push("<div"),buf.push(attrs({"class":"border"})),buf.push("></div>")),req.user||(buf.push("<a"),buf.push(attrs({id:"nav_bar_introduction",href:"index.php?con=about",title:"了解BidCms","class":isAtIntroduction?"active":""})),buf.push("><span>了解BidCms</span></a>"),isAtIntroduction||(buf.push("<div"),buf.push(attrs({"class":"border"})),buf.push("></div>"))),buf.push("</div><div"),buf.push(attrs({id:"menu_bar"})),buf.push("><ul"),buf.push(attrs({id:"menu","class":"menu"})),buf.push(">");if(req.user)var urlbase="/"+req.user.urlname;buf.push("<li"),buf.push(attrs({id:"nav_user"})),buf.push(">"),req.user?(buf.push("<a"),buf.push(attrs({href:"index.php?con=user&uid="+req.user.urlname,"class":"nav"})),buf.push("><img"),buf.push(attrs({src:avatar(req.user,undefined)})),buf.push("/><em></em></a>")):(buf.push("<a"),buf.push(attrs({"class":"nav tools"})),buf.push("><em></em></a>")),buf.push("<ul>"),req.user&&(buf.push("<li"),buf.push(attrs({"class":"mine"})),buf.push("><div"),buf.push(attrs({"class":"links"})),buf.push("><a"),buf.push(attrs({href:"index.php?con=user&uid="+req.user.urlname})),buf.push(">我的BidCms</a></div><em></em></li>")),buf.push("<li"),buf.push(attrs({"class":"mobile"})),buf.push("><div"),buf.push(attrs({"class":"links"})),buf.push("><a"),buf.push(attrs({href:"index.php?con=apps"})),buf.push(">BidCms手机客户端<div"),buf.push(attrs({"class":"info"})),buf.push("><span>iPhone</span><span>Android</span></div></a></div><em></em></li>"),req.user&&(buf.push("<li"),buf.push(attrs({"class":"friends"})),buf.push("><div"),buf.push(attrs({"class":"links"})),buf.push("><a"),buf.push(attrs({href:"index.php?con=user&act=invites"})),buf.push(">在BidCms查找好友<div"),buf.push(attrs({"class":"info"})),buf.push("></div></a></div><em></em></li>")),buf.push("<li"),buf.push(attrs({"class":"goodies"})),buf.push("><div"),buf.push(attrs({"class":"links"})),buf.push("><a"),buf.push(attrs({href:"index.php?con=about&act=goodies"})),buf.push(">BidCms采集工具</a></div><em></em></li><li"),buf.push(attrs({"class":"papers"})),buf.push("><div"),buf.push(attrs({"class":"links"})),buf.push("><a"),buf.push(attrs({href:"index.php?con=bidcms&act=interview",target:"_blank"})),buf.push(">BidCms访谈</a><a"),buf.push(attrs({href:"index.php?con=bidcms&act=weekly"})),buf.push(">BidCms周刊</a></div><em></em></li><li"),buf.push(attrs({"class":"about"})),buf.push("><div"),buf.push(attrs({"class":"links"})),buf.push("><a"),buf.push(attrs({href:"index.php?con=about"})),buf.push(">关于&amp;帮助</a><a"),buf.push(attrs({href:"index.php?con=pins&act=item&id=10000"})),buf.push(">用户反馈</a><a"),buf.push(attrs({href:"index.php?con=about&act=links"})),buf.push(">友情链接</a>"),buf.push("</div><em></em></li>"),req.user?(buf.push("<li"),buf.push(attrs({"class":"settings"})),buf.push("><div"),buf.push(attrs({"class":"links"})),buf.push("><a"),buf.push(attrs({href:"index.php?con=user&act=profile"})),buf.push(">帐号设置</a><a"),buf.push(attrs({href:"index.php?con=user&act=logout"})),buf.push(">退出登录</a></div><em></em></li>")):(buf.push("<li"),buf.push(attrs({"class":"mine"})),buf.push("><div"),buf.push(attrs({"class":"links"})),buf.push("><a"),buf.push(attrs({href:"index.php?con=user&act=login",onclick:"app.showSheet('login', {modal: true});return false;"})),buf.push(">登录</a><a"),buf.push(attrs({href:"index.php?con=user&act=register"})),buf.push(">注册帐号</a></div><em></em></li>")),buf.push("</ul></li>"),req.user?(buf.push("<li"),buf.push(attrs({id:"nav_add","class":req.user&&req.user.pin_count===0?"blink":""})),buf.push("><a"),buf.push(attrs({href:"#",title:"添加","class":"nav"})),buf.push(">添加<span>添加</span></a></li>")):(buf.push("<li"),buf.push(attrs({"class":"login-btn"})),buf.push("><a"),buf.push(attrs({onclick:"app.showSheet('login', {modal: true});return false;",href:"#","class":"btn wbtn"})),buf.push("><strong> 登录</strong><span></span></a></li><li"),buf.push(attrs({"class":"signup-btn"})),buf.push("><a"),buf.push(attrs({href:"index.php?con=user&act=register","class":"btn rbtn"})),buf.push("><strong> 注册</strong><span></span></a></li>")),buf.push("</ul><div"),buf.push(attrs({id:"search"})),buf.push("><form"),buf.push(attrs({id:"search_form",method:"get",action:"index.php","class":"text"})),buf.push("><input type='hidden' name='con' value='search'/><input"),buf.push(attrs({id:"query",type:"text",size:"27",name:"q",autocomplete:"off",placeholder:"搜索你喜欢的",value:page.query?_(page.query.text):"","class":"default_value"})),buf.push("/><a"),buf.push(attrs({id:"search_lens",href:"#",onclick:"$('search_form').submit();return false;"})),buf.push("></a></form></div></div></div><div"),buf.push(attrs({id:"flying_shadow_nav"})),buf.push("></div></div>");var __val__=emerge("bidcms/nav_bar",{navShowing:navShowing,settings:settings,page:page,req:req});buf.push(null==__val__?"":__val__);if(req.from_123_360){var __val__=emerge("bidcms/favorites_callout");buf.push(null==__val__?"":__val__)}else if(!req.user&&0){var __val__=emerge("bidcms/unauth_callout");buf.push(null==__val__?"":__val__)}else if(req.user&&req.user.status.sts&&0){var __val__=emerge("bidcms/user_fix_callout");buf.push(null==__val__?"":__val__)}else{var __val__=emerge("bidcms/chrome_callout");buf.push(null==__val__?"":__val__)}buf.push('<script>window.addEvent("domready",function(){function n(){if(app.page.shijiInner)return h.show(app.page.shijiInner);(new Request.JSON({url:"/shiji/daily/",onSuccess:function(a){if(!a.dcis)return;j.innerHTML=a.dc.title;var b=new Date(a.date);i.innerHTML=b.getFullYear()+"-"+(b.getMonth()+1)+"-"+b.getDate(),a.dcis.each(function(a,b){if(b>2||!a.file)return;(new Element("img",{src:app.imgURL(a.file,"sq75"),styles:{width:"70px",height:"70px","float":"left","margin-right":"5px"}})).inject(k)}),app.page.shijiInner=m,app.req.user&&!Cookie.read("shiji_header_tip")&&!app.req.user.status.past_shopping_welcome&&(h.show(app.page.shijiInner),Cookie.write("shiji_header_tip",1,{duration:90})),h.show(app.page.shijiInner)}})).get()}Browser.ie6||(app.page.$header=(new FixedHeader("header")).attach()),$$("#nav_add a").addEvent("click",function(){return app.showDialog("add"),!1});var a={},b=document.id("nav_user"),c=b.getElement("ul");b.addEvents({mouseenter:function(){clearTimeout(a),c.show()},mouseleave:function(){clearTimeout(a),a=function(){c.hide()}.delay(500)}});var d={},e={},f=document.id("nav_bar_shopping"),g="",h=new SmoothNotification({style:"window",styles:{background:"white",border:"2px solid rgba(0, 0, 0, .1)","border-radius":"8px",width:"350px",height:"110px",padding:"20px 0 0 20px","min-height":"0px"},relative:{to:f,position:"bottomcenter",edge:"topcenter",offset:{x:102,y:5}},arrow:"top",arrowStyles:{background:"url(/img/shopping/tip_arrow.png) 0 0 no-repeat",width:17,height:9,left:76,top:-9},duration:!1}),i=new Element(".date"),j=new Element("a.title",{href:"/shiji/?md=toptips"}),k=new Element("a.img-box",{href:"/shiji/?md=toptips"}),l=new Element("a.close"),m=(new Element("#shiji_header_preview.clearfix")).adopt([i,j,k,l]);l.onclick=function(){h.hide(),Cookie.write("shiji_header_tip",1,{duration:90})},(new Elements([m,f])).addEvents({mouseleave:function(){e=function(){h.hide()}.delay(500)},mouseenter:function(){clearTimeout(e)}}),f.addEvents({mouseenter:function(){d=function(){h.isShowing||n()}.delay(800)},mouseleave:function(){clearTimeout(d)}})}),window.addEvent("domready",function(){app.$shadowNavigation=new ShadowNavigation})</script>'),req.user&&!page.hideNewIndicator&&buf.push('<script>(function(){window.addEvent("domready",function(){app.req.user&&!app.messager&&(app.messager=new MessageChecker),app.messager&&app.messager.showIndicator(!0)})})()</script>'),req.user&&req.user.status&&req.user.status.wc&&!page.isQplus&&(buf.push("<div"),buf.push(attrs({id:"newbies_welcome_overlay",style:"display: none;","class":"phide overlay"})),buf.push('></div><script>(function(){app.render("newbies_welcome_overlay",function(a,b){$("newbies_welcome_overlay").set("html",b),a&&Browser.exec(a)})})()</script>'))}return buf.join("")},
__t["bidcms/people_boards_body"]=function(locals){var buf=[];with(locals||{}){var interp;buf.push("<div"),buf.push(attrs({id:"waterfall"})),buf.push("><ul"),buf.push(attrs({"class":"sortable"})),buf.push(">");var boards=user.boards;for(var $index=0,$$l=boards.length;$index<$$l;$index++){var b=boards[$index];if(b.is_private!=2||b.pin_count>0){buf.push("<li>");var __val__=emerge("bidcms/board_item",{board:b,user:this.req.user});buf.push(null==__val__?"":__val__),buf.push("</li>")}}buf.push("</ul></div>")}return buf.join("")},
__t["bidcms/category_picker"]=function(locals){var buf=[];with(locals||{}){var interp;buf.push("<div"),buf.push(attrs({"class":"BoardListOverlay"})),buf.push("></div><div"),buf.push(attrs({"class":"BoardSelector BoardPicker CategoryPicker"})),buf.push("><div"),buf.push(attrs({"class":"current"})),buf.push("><span"),buf.push(attrs({"class":"CurrentBoard"})),buf.push(">选择分类</span><span"),buf.push(attrs({"class":"DownArrow"})),buf.push("></span></div><div"),buf.push(attrs({"class":"BoardList"})),buf.push("><div"),buf.push(attrs({"class":"BoardListBody"})),buf.push('><ul></ul></div></div></div><script>(function(){$$("div.CategoryPicker").each(function(a){if(a.retrieve("initialized"))return;new CategoryPicker(a),a.store("initialized",!0)})})()</script>')}return buf.join("")},
__t["bidcms/unauth_callout"]=function(locals){var buf=[];with(locals||{}){var interp;buf.push("<div"),buf.push(attrs({id:"unauth_callout",style:"display: none;","class":"has-close"})),buf.push("><div"),buf.push(attrs({"class":"wrapper"})),buf.push("><div"),buf.push(attrs({id:"intro","class":"sheet"})),buf.push(">"),page.isQplus||(buf.push("<div"),buf.push(attrs({"class":"unauth-connect"})),buf.push("><h5>使用合作网站帐号登录</h5><a"),buf.push(attrs({href:"models/weibo/login.php",onclick:"return false;","class":"login-button weibo"})),buf.push(">使用微博账号登陆</a><a"),buf.push(attrs({href:"models/douban/login.php",onclick:"return false;","class":"login-button douban"})),buf.push(">使用豆瓣账号登陆</a><a"),buf.push(attrs({href:"models/renren/login.php",onclick:"return false;","class":"login-button renren"})),buf.push(">使用人人账号登陆</a><a"),buf.push(attrs({href:"models/qzone/login.php",onclick:"return false;","class":"login-button qzone"})),buf.push(">使用QQ账号登陆</a></div>")),buf.push("<div"),buf.push(attrs({"class":"unauth-btns"})),buf.push(">"),page.isQplus?(buf.push("<a"),buf.push(attrs({id:"qplus_login_btn",href:"#",onclick:"return false;","class":"btn btn18 wbtn"})),buf.push('><strong><em></em> 登录</strong><span></span></a><script>(function(){qplus&&window.addEvent("domready",function(){new Button("qplus_login_btn",{click:function(){(new Request.JSON({url:"/qplus/params/",onSuccess:function(a){if(a.err)return alert(a.msg||app.COMMON_ERRMSG);qplus.user.auth(a.querystring,function(a){self.location.href="/oauth/qplus/?"+a.param})}})).get()}})})})()</script>')):(buf.push("<a"),buf.push(attrs({href:"index.php?con=user&act=register","class":"btn btn18 rbtn"})),buf.push("><strong> 注册 »</strong><span></span></a><a"),buf.push(attrs({href:"index.php?con=user&act=login",onclick:"app.showSheet('login', {modal: true});return false;","class":"btn btn18 wbtn"})),buf.push("><strong> 登录</strong><span></span></a>")),buf.push("</div><a"),buf.push(attrs({id:"mv_trigger_callout",href:"#",onclick:"app.showDialog('mv');return false;",title:"观看视频，了解到BidCms网，帮你采集，发现网络上你喜欢的美好事物。你可以用它收集灵感，保存有用的素材，计划旅行，晒晒自己想要的家居， 服饰搭配，发型和婚纱.","class":"mv"})),buf.push('></a><h2>BidCms，</h2>采集你喜欢的。</div></div></div><script>(function(){var a=Cookie.read("_hb_chrome_extention");(a==null||a=="true")&&document.id("unauth_callout").removeClass("has-close").show(),window.oauth_callback=function(a){"string"==typeof a&&(a=JSON.parse(a)),app.req.user=a;if(app.$login_callback){app.redraw();var b=app.$login_callback;delete app.$login_callback,b()}else window.location=app.page.bidcmsurl},$$("a.login-button").addEvent("click",function(a){a.stop();var b=window.open(this.get("href"),"binding_win","status=no,resizable=no,scrollbars=yes,personalbar=no,directories=no,location=no,toolbar=no,menubar=no,width=680,height=500,left=50,top=40");window.focus&&b.focus()})})()</script>')}return buf.join("")},
__t["bidcms/pin_view"]=function(locals){var buf=[];with(locals||{}){var interp,pin=page.pin,board=pin.board,board_url="index.php?con=boards&act=item&id="+board.board_id,pin_url="index.php?con=pins&id="+pin.pin_id+"&act=",user_url="index.php?con=user&uid="+pin.user.urlname,is_owner=this.req.user&&pin.user_id===this.req.user.user_id,via_user=pin.via_user,via=pin.via_pin,pin_link_host=pin.source||"";if(!pin_link_host){var match=/^http(?:s)?:\/\/([^/]+)(?:\/.*)?/.exec(pin.link);match&&match.length==2&&(pin_link_host=match[1]||"")}var callbackDisplay="block";pin.pin_id==53553&&(callbackDisplay="none"),pin.link=pin.media_type==1&&~pin.link.indexOf("youku.com")?"http://cps.youku.com/redirect.html?id=0000028e&url="+encodeURIComponent(pin.link):pin.link;var repin_board_pins_mixin=function(e){e.length==4&&e.pop();for(var t=0,n=e.length;t<n;t++){var r=e[t];buf.push("<a"),buf.push(attrs({href:"index.php?con=pins&act=item&id="+r.pin_id,"class":"img"})),buf.push("><img"),buf.push(attrs({width:"50",height:"50",alt:"Pin Thumbnail",src:imgURL(r.file,"sq75")})),buf.push("/></a>")}if(e.length<3)for(var i=0;i<3-e.length;i++)buf.push("<img"),buf.push(attrs({src:"static/bidcms/img/default_pin_bg.gif",width:"50",height:"50",alt:"Pin Thumbnail"})),buf.push("/>")},__val__=emerge("bidcms/header");buf.push(null==__val__?"":__val__);var __val__=emerge("bidcms/report_callout");buf.push(null==__val__?"":__val__),buf.push("<div"),buf.push(attrs({"class":"wfx"})),buf.push("><div"),buf.push(attrs({"class":"CloseupLeft"})),buf.push(">");var __val__=emerge("bidcms/board_item",{board:board,user:this.req.user,pin:pin});buf.push(null==__val__?"":__val__);if(pin.siblings){buf.push("<div"),buf.push(attrs({"class":"Board DomainPins clearfix"})),buf.push("><h3>同采自<a"),buf.push(attrs({href:"index.php?con=pins&act=from&site="+encodeURIComponent(pin.source),"class":"less x"})),buf.push(">"+escape((interp=pin.source)==null?"":interp)+"</a></h3><a"),buf.push(attrs({href:"index.php?con=pins&act=from&site="+encodeURIComponent(pin.source),"class":"link x"})),buf.push(">");for(var $index=0,$$l=pin.siblings.length;$index<$$l;$index++){var sp=pin.siblings[$index];buf.push("<img"),buf.push(attrs({width:"75",height:"75",src:imgURL(sp.file,"sq75")})),buf.push("/>")}buf.push("</a></div>")}buf.push("<div"),buf.push(attrs({"class":"hotkey-tip"})),buf.push("><h3>使用键盘查看采集</h3><a"),buf.push(attrs({"class":"close-tip"})),buf.push("></a><ul"),buf.push(attrs({"class":"clearfix"})),buf.push("><li><img"),buf.push(attrs({src:"static/bidcms/img/hotkey_left_arrow.png",height:"33px",width:"47px"})),buf.push("/>上一页</li><li><img"),buf.push(attrs({src:"static/bidcms/img/hotkey_right_arrow.png",height:"33px",width:"47px"})),buf.push("/>下一页</li><li"),buf.push(attrs({"class":"help"})),buf.push("><img"),buf.push(attrs({src:"static/bidcms/img/hotkey_help.png",height:"33px",width:"57px"})),buf.push("/>更多帮助</li></ul></div></div><div"),buf.push(attrs({"class":"CloseupRight"})),buf.push("><div"),buf.push(attrs({"class":"wt clearfix"})),buf.push("><div"),buf.push(attrs({id:"PinPinner"})),buf.push("><a"),buf.push(attrs({id:"PinnerImage",href:""+user_url+"","class":"img"})),buf.push("><img"),buf.push(attrs({src:avatar(pin.user,undefined)})),buf.push("/></a>");if(via_user){buf.push("<p"),buf.push(attrs({id:"PinnerName"})),buf.push("><a"),buf.push(attrs({href:""+user_url+""})),buf.push(">"+escape((interp=pin.user.username)==null?"":interp)+"</a><span"),buf.push(attrs({"class":"less"})),buf.push(">&nbsp;从&nbsp;</span><a"),buf.push(attrs({href:"index.php?con=user&uid="+via_user.urlname})),buf.push(">"+escape((interp=via_user.username)==null?"":interp)+"</a></p><p"),buf.push(attrs({id:"PinnerStats","class":"less"})),buf.push(">转采于&nbsp;<span"),buf.push(attrs({"data-ts":""+pin.created_at+"","class":"ts-words"})),buf.push(">");var __val__=Date.timeAgo(pin.created_at);buf.push(null==__val__?"":__val__),buf.push("</span></p>")}else{buf.push("<p"),buf.push(attrs({id:"PinnerName"})),buf.push("><a"),buf.push(attrs({href:""+user_url+""})),buf.push(">"+escape((interp=pin.user.username)==null?"":interp)+"</a></p><p"),buf.push(attrs({id:"PinnerStats","class":"less"})),buf.push(">"),pin.via<1e3&&pin.via_client&&(buf.push("通过"),pin.via_client.client_link?(buf.push("<a"),buf.push(attrs({href:""+pin.via_client.client_link+"",target:"_blank"})),buf.push(">"+escape((interp=pin.via_client.client_name)==null?"":interp)+"</a>")):buf.push("<span>"+escape((interp=pin.via_client.client_name)==null?"":interp)+"</span>")),buf.push("采集于&nbsp;<span"),buf.push(attrs({"data-ts":""+pin.created_at+"","class":"ts-words"})),buf.push(">");var __val__=Date.timeAgo(pin.created_at);buf.push(null==__val__?"":__val__),buf.push("</span></p>")}buf.push("</div><div"),buf.push(attrs({id:"PinActionButtons",style:"display:"+callbackDisplay})),buf.push(">");if(pin.commodity&&pin.commodity.link){buf.push("<div"),buf.push(attrs({id:"pin_commodity_briefly"})),buf.push(">来自<a"),buf.push(attrs({href:"index.php?con=pins&act=go&id="+pin.pin_id+"",target:"_blank","class":"item jd-link"})),buf.push(">");var _css_class=pin.commodity.store?"store-"+pin.commodity.store+" icon":"icon";buf.push("<em"),buf.push(attrs({"class":""+_css_class+""})),buf.push("></em><span"),buf.push(attrs({"class":"from"})),buf.push(">"+escape((interp=pin.commodity.store?page.stores[pin.commodity.store].name:pin.source)==null?"":interp)+"</span>"),pin.commodity.price&&(buf.push("<span"),buf.push(attrs({"class":"price"})),buf.push(">￥"+escape((interp=parseFloat(pin.commodity.price).toFixed(2))==null?"":interp)+"</span>")),buf.push("</a></div>")}else pin.source&&(buf.push("<p"),buf.push(attrs({id:"pin_source","class":"light"})),buf.push(">采自<a"),buf.push(attrs({href:"index.php?con=pins&act=go&id="+pin.pin_id+"",target:"_blank",rel:"nofollow",onclick:"try{_gaq.push(['_trackEvent', 'Pin Links', '"+pin_link_host+"', '"+pin.link+"']);}catch(e){}","class":"jd-link"})),buf.push(">"+escape((interp=pin.source)==null?"":interp)+"</a></p>"));buf.push("<ul"),buf.push(attrs({"class":"actions"})),buf.push(">"),pin.board.is_private!=1&&(buf.push("<li"),buf.push(attrs({"class":"repin-button"})),buf.push("><a"),buf.push(attrs({"data-id":""+pin.pin_id+"",title:"快速转采",href:"#",onclick:"return false;","class":"thunderpin btn btn13 wbtn"})),buf.push("><strong><em></em></strong><span></span></a><a"),buf.push(attrs({onclick:"app.requireLogin(function(){app.showDialog('repin', '"+pin.pin_id+"')}); return false",href:"#","class":"repin btn btn13 wbtn"})),buf.push("><strong>转采</strong><span></span></a></li>")),is_owner?(buf.push("<li"),buf.push(attrs({"class":"edit-button"})),buf.push("><a"),buf.push(attrs({href:""+pin_url+"edit","class":"btn wbtn"})),buf.push("><strong>编辑</strong><span></span></a></li><li"),buf.push(attrs({"class":"del-button"})),buf.push("><a"),buf.push(attrs({href:""+pin_url+"delete","data-board-id":""+board.board_id+"","class":"btn wbtn"})),buf.push("><strong>删除</strong><span></span></a></li>")):pin.liked?(buf.push("<li"),buf.push(attrs({"class":"like-button"})),buf.push("><a"),buf.push(attrs({"data-id":""+pin.pin_id+"",title:"取消喜欢",href:"#",onclick:"return false;","class":"unlike btn wbtn"})),buf.push("><strong><em></em>取消喜欢</strong><span></span></a></li>")):(buf.push("<li"),buf.push(attrs({"class":"like-button"})),buf.push("><a"),buf.push(attrs({"data-id":""+pin.pin_id+"",title:"喜欢",href:"#",onclick:"return false;","class":"like btn wbtn"})),buf.push("><strong><em></em>喜欢</strong><span></span></a></li>")),buf.push("</ul></div>");var pin_desc=pin.raw_text?pin.raw_text.length>20?pin.raw_text.substr(0,20)+"...":pin.raw_text:"";buf.push("<div"),buf.push(attrs({id:"pin_img","data-id":""+pin.pin_id+"","data-media-type":""+pin.media_type+"","data-orig-source":""+pin.orig_source+"","class":"pin-img"})),buf.push(">");if(pin.link)if(pin_link_host){buf.push("<a"),buf.push(attrs({href:"index.php?con=pins&act=go&id="+pin.pin_id+"",target:"_blank",rel:"nofollow",onclick:"try{_gaq.push(['_trackEvent', 'Pin Links', '"+pin_link_host+"', '"+pin.link+"']);}catch(e){}","class":"jd-link"})),buf.push(">");var __val__=img(pin.file,"fw554",{alt:pin_desc,"data-type":pin.file.type});buf.push(null==__val__?"":__val__),buf.push("</a>")}else{buf.push("<a"),buf.push(attrs({href:"index.php?con=pins&act=go&id="+pin.pin_id+"",target:"_blank",rel:"nofollow"})),buf.push(">");var __val__=img(pin.file,"fw554",{alt:pin_desc,"data-type":pin.file.type});buf.push(null==__val__?"":__val__),buf.push("</a>")}else{var __val__=img(pin.file,"fw554",{alt:pin_desc,"data-type":pin.file.type});buf.push(null==__val__?"":__val__)}buf.push("<a"),buf.push(attrs({id:"zoomr_show",title:"查看原图"})),buf.push("></a></div>");if(pin.commodity){buf.push("<div"),buf.push(attrs({id:"pin_commodity_bar","class":"clearfix"})),buf.push(">");var _css_class=pin.commodity.store?"store-"+pin.commodity.store+" icon":"icon";buf.push("<em"),buf.push(attrs({"class":""+_css_class+""})),buf.push("></em>"),pin.commodity.selling?(buf.push("<a"),buf.push(attrs({href:"index.php?con=pins&act=go&id="+pin.pin_id+"",target:"_blank","class":"buy jd-link btn rbtn"})),buf.push("><strong> "+escape((interp=pin.commodity.price?"￥"+parseFloat(pin.commodity.price).toFixed(2)+" ":"")==null?"":interp)+"去购买</strong><span></span></a>")):(buf.push("<a"),buf.push(attrs({href:"index.php?con=pins&act=go&id="+pin.pin_id+"",target:"_blank","class":"buy expire btn wbtn"})),buf.push("><strong> "+escape((interp=pin.commodity.price?"￥"+parseFloat(pin.commodity.price).toFixed(2)+" ":"")==null?"":interp)+"已过期</strong><span></span></a>")),buf.push(""+escape((interp=pin.commodity.title)==null?"":interp)+"</div>")}buf.push("<div"),buf.push(attrs({id:"pin_caption","class":"pin-caption"})),buf.push("><p"),buf.push(attrs({"class":"text"})),buf.push(">");var __val__=pin.raw_text.format_text(pin.text_meta);buf.push(null==__val__?"":__val__),buf.push("</p><p"),buf.push(attrs({"class":"via less"})),buf.push(">"),via?(buf.push("转采自&nbsp;<a"),buf.push(attrs({href:"index.php?con=user&uid="+via_user.urlname,"class":"x"})),buf.push(">"+escape((interp=via_user.username)==null?"":interp)+"</a>&nbsp;的&nbsp;<a"),buf.push(attrs({href:"index.php?con=boards&act=item&id="+via.board_id+"/","class":"x"})),buf.push(">"+escape((interp=via.board.is_private==2?"待归类采集":via.board.title)==null?"":interp)+" &nbsp;</a>")):pin.via<1e3&&pin.via_client&&(buf.push("通过"),pin.via_client.client_link?(buf.push("<a"),buf.push(attrs({href:""+pin.via_client.client_link+"",target:"_blank"})),buf.push(">"+escape((interp=pin.via_client.client_name)==null?"":interp)+"</a>")):buf.push("<span>"+escape((interp=pin.via_client.client_name)==null?"":interp)+"</span>")),buf.push("</p>");if(via&&pin.original!==pin.via&&pin.original_pin){var orig_pin=pin.original_pin;buf.push("<p"),buf.push(attrs({"class":"origin less"})),buf.push(">最初由&nbsp;<a"),buf.push(attrs({href:"index.php?con=user&uid="+orig_pin.user.urlname,"class":"x"})),buf.push(">"+escape((interp=orig_pin.user.username)==null?"":interp)+"</a>&nbsp;采集到&nbsp;<a"),buf.push(attrs({href:"index.php?con=boards&act=item&id="+orig_pin.board_id+"/","class":"x"})),buf.push(">"+escape((interp=orig_pin.board.is_private==2?"待归类采集":orig_pin.board.title)==null?"":interp)+"</a></p>")}buf.push("<p"),buf.push(attrs({"class":"stats less"})),buf.push(">");if(pin.like_count){buf.push("<span"),buf.push(attrs({"class":"LikesCount"})),buf.push(">");var __val__=pin.like_count+" 喜欢&nbsp;&nbsp;";buf.push(null==__val__?"":__val__),buf.push("</span>")}if(pin.comment_count){buf.push("<span"),buf.push(attrs({"class":"CommentsCount"})),buf.push(">");var __val__=pin.comment_count+" 评论&nbsp;&nbsp;";buf.push(null==__val__?"":__val__),buf.push("</span>")}if(pin.repin_count){buf.push("<span"),buf.push(attrs({"class":"RepinsCount"})),buf.push(">");var __val__=pin.repin_count+" 转采&nbsp;&nbsp;";buf.push(null==__val__?"":__val__),buf.push("</span>")}buf.push("<a"),buf.push(attrs({href:"#",onclick:"return false"})),buf.push("><span"),buf.push(attrs({"class":"Report"})),buf.push(">举报</span></a></p></div><div"),buf.push(attrs({id:"pin_comments"})),buf.push(">"),pin.comment_count>20&&(buf.push("<div"),buf.push(attrs({id:"more_comments","class":"comment clearfix"})),buf.push(">加载较早的评论</div>"));if(pin.comments)for(var $index=0,$$l=pin.comments.length;$index<$$l;$index++){var comment=pin.comments[$index];comment.pin_user_id=pin.user_id;var __val__=emerge("bidcms/comment_item",comment);buf.push(null==__val__?"":__val__)}buf.push("</div>");var __val__=emerge("bidcms/comment_form",{pin:pin,user:this.req.user});buf.push(null==__val__?"":__val__),buf.push("<div"),buf.push(attrs({id:"pin_likes",style:"display:"+callbackDisplay,"class":(!pin.likes||pin.likes.length===0?"hidden":"")+" "+"PinActivity"+" "+"clearfix"})),buf.push("><h4>这些人喜欢</h4>");var likes=pin.likes||[],l=pin.like_count-likes.length;for(var $index=0,$$l=likes.length;$index<$$l;$index++){var u=likes[$index];buf.push("<a"),buf.push(attrs({href:"index.php?con=user&uid="+u.urlname,title:""+u.username+"","class":"avatar x"})),buf.push("><img"),buf.push(attrs({src:avatar(u,undefined)})),buf.push("/></a>")}l>0&&(buf.push("<p"),buf.push(attrs({"class":"PinMoreActivity"})),buf.push(">"+escape((interp=l)==null?"":interp)+"更多喜欢的人</p>")),buf.push("</div><div"),buf.push(attrs({id:"PinRepins",style:"display:"+callbackDisplay,"class":(!pin.repins||pin.repins.length===0?"hidden":"")+" "+"PinActivity"+" "+"clearfix"})),buf.push("><h4>被这些人转采</h4>");var repins=pin.repins||[],l=pin.repins_count-repins.length;for(var $index=0,$$l=repins.length;$index<$$l;$index++){var p=repins[$index];buf.push("<div"),buf.push(attrs({"class":"PinRepinStory"})),buf.push("><a"),buf.push(attrs({href:"index.php?con=user&uid="+p.user.urlname,"class":"avatar x"})),buf.push("><img"),buf.push(attrs({src:avatar(p.user,undefined)})),buf.push("/></a><div"),buf.push(attrs({"class":"repin-post-attr"})),buf.push("><a"),buf.push(attrs({href:"index.php?con=user&uid="+p.user.urlname,"class":"x"})),buf.push(">"+escape((interp=p.user.username)==null?"":interp)+"</a>采集到<a"),buf.push(attrs({href:"index.php?con=boards&act=item&id="+p.board_id+"/","class":"x"})),buf.push(">"+escape((interp=p.board.is_private==2?"待归类采集":p.board.title)==null?"":interp)+"</a></div><div"),buf.push(attrs({"class":"repin-board"})),buf.push(">"),repin_board_pins_mixin(p.board.pins),buf.push("<a"),buf.push(attrs({href:"index.php?con=boards&act=item&id="+p.board_id+"/","class":"stats x"})),buf.push(">"+escape((interp=p.board.pin_count)==null?"":interp)+"<span>采集</span></a></div></div>")}l>0&&(buf.push("<p"),buf.push(attrs({"class":"PinMoreActivity"})),buf.push(">"+escape((interp=l)==null?"":interp)+"更多转采</p>")),buf.push("</div><div"),buf.push(attrs({id:"pin_toolbar"})),buf.push("><ul><li><div"),buf.push(attrs({"class":"PriorAndNext"})),buf.push(">");var prev_class=pin.next?"":"disabled",next_class=pin.prev?"":"disabled";pin.next?(buf.push("<a"),buf.push(attrs({href:"index.php?con=pins&act=item&id="+pin.next.pin_id,title:"上一张","class":"prev "+prev_class+""+" "+"x"+" "+"self"})),buf.push("></a>")):(buf.push("<a"),buf.push(attrs({id:"prev_disabled",title:"上一张","class":"prev "+prev_class+""})),buf.push("></a>")),pin.prev?(buf.push("<a"),buf.push(attrs({href:"index.php?con=pins&act=item&id="+pin.prev.pin_id,title:"下一张","class":"next "+next_class+""+" "+"x"+" "+"self"})),buf.push("></a>")):(buf.push("<a"),buf.push(attrs({id:"next_disabled",title:"下一张","class":"next "+next_class+""})),buf.push("></a>")),buf.push("</div></li><li"),buf.push(attrs({"class":"weibo share-button"})),buf.push("><span"),buf.push(attrs({title:"新浪微博"})),buf.push(">微博</span></li><li"),buf.push(attrs({"class":"tqq share-button"})),buf.push("><span"),buf.push(attrs({title:"腾讯微博"})),buf.push(">微博</span></li><li"),buf.push(attrs({"class":"qzone share-button"})),buf.push("><span"),buf.push(attrs({title:"QQ空间"})),buf.push(">空间</span></li><li"),buf.push(attrs({"class":"more"})),buf.push("><ul"),buf.push(attrs({"class":"more-btns"})),buf.push("><li"),buf.push(attrs({"class":"douban share-button"})),buf.push("><span"),buf.push(attrs({title:"豆瓣说"})),buf.push(">豆瓣</span></li><li"),buf.push(attrs({"class":"renren share-button"})),buf.push("><span"),buf.push(attrs({title:"人人网"})),buf.push(">人人</span></li></ul></li></ul></div></div></div></div><div"),buf.push(attrs({"class":"hidden"})),buf.push(">");var __val__=emerge("bidcms/categories_cell");buf.push(null==__val__?"":__val__),buf.push('</div><script>var report_type,report_id;(function(){app.initFollowButtons(),app.initLikeButtons(),app.initDelCommentButtons(),app.initAddCommentButtons(),app.initReplyButtons(),app.initThunderPinButtons()})(),$("pin_comments").addEvent("click:relay(a.ReportButton)",function(a){var b=a.target;return b.get("tag")!=="a"&&(b=b.getParent("a")),report_type="comment",report_id=b.getParent(".comment").getProperty("data-id"),app.showDialog("report"),!1}),function(){try{app.page.pin&&app.page.pin.media_type==1&&(app.page.pin.orig_source&&~app.page.pin.orig_source.indexOf("youku.com")?_gaq.push(["_trackEvent","video-pins","view","youku"]):_gaq.push(["_trackEvent","video-pins","view","others"]))}catch(a){}}(),function(){$$(".Report").addEvent("click",function(){return report_type="pin",report_id=app.page.pin.pin_id,app.showDialog("report"),!1})}(),function(){var a=document.getElement(".CloseupLeft .hotkey-tip");Cookie.read("hide_hotkey_tip")||a.show(),a.getElement(".close-tip").addEvent("click",function(){this.getParent(".hotkey-tip").fade("out"),Cookie.write("hide_hotkey_tip",1,{duration:60})}),a.getElement(".help").addEvent("click",function(){app.hotkey.showIntro()})}(),function(a){var b=document.id("pin_img"),c=b.get("data-id"),d="index.php?con=pins&act=item&id="+c,e=b.getElement("img"),f=e.get("src");if(e.get("height")>1024||e.get("data-type")=="image/gif")var g=f.replace("_fw554","_fw192");var h=app.page.pin,i=h.raw_text;if(i.length>100)i=i.substring(0,100)+"...";else if(!i||i.length==0){var j=app.page.pin.board;i=j.is_private==2?"待归类采集":j.title}var k=b.get("data-media-type");if(k&&k==1){var l=b.get("data-orig-source"),m=550,n=460;if(~l.indexOf("http://manhua1.appsina.com")||~l.indexOf("http://weibo.vmanhua.com"))m=440,n=540;var o=new Swiff(l,{id:c,width:m,height:n,params:{allowfullscreen:!0}});b.getChildren().hide(),b.adopt(o);var p=b.getElements("a")?b.getElement("a").get("href"):"";i+=" "+p}$$(".share-button").addEvent("click",function(){var a=["url="+encodeURIComponent(d)],b;if(this.hasClass("weibo")){b="weibo";var c="http://v.t.sina.com.cn/share/share.php?";a.push("&appkey=2499394483"),e.get("height")>1024||e.get("data-type")=="image/gif"?a.push("&pic="+encodeURIComponent(g)):a.push("&pic="+encodeURIComponent(f)),a.push("&title="+encodeURIComponent(i)),a.push("&ralateUid=2493118952")}else if(this.hasClass("douban")){b="douban";var c="http://www.douban.com/recommend/?",h=i+"（ 分享自@BidCms网 ）";a.push("&title="+encodeURIComponent(h)),a.push("&comment="+encodeURIComponent(h))}else if(this.hasClass("qzone")){b="qzone";var c="http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?";a.push("&title="+encodeURIComponent(i)),a.push("&site="+encodeURIComponent("BidCms网")),a.push("&pics="+encodeURIComponent(f))}else if(this.hasClass("tqq")){b="tqq";var c="http://share.v.t.qq.com/index.php?c=share&a=index&";a.push("&title="+encodeURIComponent(i)),a.push("&appkey=801088644"),a.push("&pic="+encodeURIComponent(f)),a.push("&assname=huaban20111114")}else if(this.hasClass("renren")){b="renren";var c="http://widget.renren.com/dialog/share?",h=i+"（ 分享自@BidCms网 ）";a.push("&title="+encodeURIComponent(h)),a.push("&pic="+encodeURIComponent(f)),a[0]=a[0].replace("url=","resourceUrl=")}try{_gaq.push(["_trackEvent","SocialShare",b+":{js}","PinView:"+app.page.pin.source])}catch(j){}a=a.join(""),function(b,d,e){function f(){window.open([c,a].join(""),"mb",["toolbar=0,status=0,resizable=1,width=620,height=450,left=",(b.width-620)/2,",top=",(b.height-450)/2].join(""))||(u.href=[c,a].join(""))}/Firefox/.test(navigator.userAgent)?setTimeout(f,0):f()}(screen,document,encodeURIComponent)});var q=document.id("PinActionButtons").getElement("li.del-button a");q&&new Button(q,{click:function(){var a=this;return app.confirm("删除采集后不能恢复，确定要删除吗?",function(b){b&&(a.setTitle("正在删除...").disable(),(new Request.JSON({url:"index.php?con=pins&act=delete&id="+c,data:{},onSuccess:function(b){if(b.err){app.error(b.msg||app.COMMON_ERRMSG),a.setTitle().enable();return}var c="index.php?con=boards&act=item&id="+q.get("data-board-id");app.$pageCache.clear(c),app.go(c).addOnceEvent("switchPage",function(){app.msg("已经成功删除采集")})},onFailure:function(){a.setTitle().enable()}})).post())}),!1}});var r,s,t=app.getState().id,v="index.php?con=pins&act=zoom&id="+c,w=function(){r||(r=Elements.from(app.renderSync("bidcms/pin_view_zoom"))[0],r.getElement("#zoomr_hide").addEvent("click",function(){return app.popState(),!1})),s=r.retrieve("slide"),s||(s=new SlidePage(r,{fixedSelector:"#header,#pin_toolbar"}),r.store("slide",s)),r.inject(document.body).show(),app.messager&&(app.messager.detach(),app.messager.hideIndicator(!0)),s.show().chain(function(){r.setStyles({width:"100%",height:"auto"})}),app.registerStateHandler(t,x)},x=function(){if(!r)return;s=r.retrieve("slide"),s.hide().chain(function(){app.messager&&(app.messager.showIndicator(!0),app.messager.attach()),r.destroy(),r=null}),app.removeStateHandler(t)};app.registerStateHandler(v,w),$("zoomr_show").addEvent("click",function(a){return app.pushState(null,null,v),!1});var y=document.id("more_comments");if(y){var z=document.id("pin_comments"),A=z.getElement(".comment:not(#more_comments)").get("data-id"),B=20,C=!1;y.addEvents({click:function(a){C=!0,y.tween("opacity",.3),(new Request.JSON({url:"models/setcomments.php?id="+c,data:{max:A,limit:B},onSuccess:function(a){if(a.err)return alert(a.msg||app.COMMON_ERRMSG);var b=a.comments.reverse(),c;b.each(function(a,b){a.pin_user_id=app.page.pin.user_id;var d=app.renderSync("bidcms/comment_item",a),e=Elements.from(d).inject(y,"after");b===0&&(c=e[0]),e.highlight()}),(new Fx.Scroll(window,{duration:"normal"})).toElementCenter(c);if(b.length<B)return y.dispose();A=b[b.length-1].comment_id,y.tween("opacity",1)}})).get()}})}}(encodeURIComponent)</script>')}return buf.join("")},
__t["bidcms/comment_item"]=function(locals){var buf=[];with(locals||{}){var interp,_metas=typeof text_meta=="undefined"?null:text_meta;buf.push("<div"),buf.push(attrs({"data-id":comment_id,"class":"comment clearfix"})),buf.push("><div"),buf.push(attrs({id:"comment_action_btns","class":"fr"})),buf.push("><a"),buf.push(attrs({"data-name":user.username,title:"回复","class":"pinViewReplyButton"})),buf.push("></a>"),this.req.user&&(user_id===this.req.user.user_id||pin_user_id===this.req.user.user_id)&&(buf.push("<a"),buf.push(attrs({"data-url":"index.php?con=comments&act=delete&id="+pin_id+"&cid="+comment_id,title:"删除","class":"DeleteComment"})),buf.push("></a>"));if(!this.req.user||user_id!==this.req.user.user_id)buf.push("<a"),buf.push(attrs({title:"举报","class":"ReportButton"})),buf.push("></a>");buf.push("</div><a"),buf.push(attrs({href:"index.php?con=user&uid="+escape(user.urlname),title:escape(user.username),"class":"img x"})),buf.push("><img"),buf.push(attrs({src:avatar(user,undefined),"class":"avatar"})),buf.push("/></a><p"),buf.push(attrs({"class":"meta"})),buf.push("><a"),buf.push(attrs({href:"index.php?con=user&uid="+user.urlname,"class":"author"})),buf.push(">"+escape((interp=user.username)==null?"":interp)+"</a>&nbsp;-&nbsp;<span"),buf.push(attrs({"data-ts":""+created_at+"","class":"ts-words"})),buf.push(">"+escape((interp=Date.timeAgo(created_at))==null?"":interp)+"</span>说：</p><p"),buf.push(attrs({"class":"text"})),buf.push(">");var __val__=raw_text.format_text(_metas);buf.push(null==__val__?"":__val__),buf.push("</p></div>")}return buf.join("")},
__t["bidcms/bookmarklet_success"]=function(locals){var buf=[];with(locals||{}){var interp,__val__=emerge("bidcms/pin_success",{pin:app.page.pin});buf.push(null==__val__?"":__val__)}return buf.join("")},
__t["bidcms/user_item"]=function(locals){var buf=[];with(locals||{}){var interp;buf.push("<div"),buf.push(attrs({"data-id":""+user.user_id+"","data-seq":""+user.user_id+"","class":"pin user wfc"})),buf.push("><a"),buf.push(attrs({href:"index.php?con=user&uid="+escape(user.urlname),title:escape(user.username),"class":"img x"})),buf.push("><img"),buf.push(attrs({src:avatar(user,"fw192")})),buf.push("/></a><h2>"+escape((interp=user.username)==null?"":interp)+"</h2><p"),buf.push(attrs({"class":"location less"})),buf.push("></p>"),current_user&&(current_user.user_id!==user.user_id?user.following?(buf.push("<a"),buf.push(attrs({"data-id":user.urlname,href:"#",onclick:"return false;","class":"unfollowuser btn btn13 wbtn"})),buf.push("><strong> 取消关注</strong><span></span></a>")):(buf.push("<a"),buf.push(attrs({"data-id":user.urlname,href:"#",onclick:"return false;","class":"followuser btn btn13 wbtn"})),buf.push("><strong> 关注</strong><span></span></a>")):(buf.push("<a"),buf.push(attrs({href:"index.php?con=user&act=profile","class":"btn btn13 wbtn"})),buf.push("><strong> 帐号设置</strong><span></span></a>"))),buf.push("</div>")}return buf.join("")},
__t["bidcms/promotions"]=function(locals){var buf=[];with(locals||{}){var interp;promotions=promotions||{img_promotions:[],imgtxt_promotions:[],user_promotions:[]},buf.push("<div"),buf.push(attrs({"class":"wfc topright promotions"})),buf.push(">");var __val__=emerge("bidcms/image_promotions",{promotions:promotions.img_promotions});buf.push(null==__val__?"":__val__);var __val__=emerge("bidcms/user_promotions",{promotions:promotions.user_promotions});buf.push(null==__val__?"":__val__);var __val__=emerge("bidcms/reading_promotions",{promotions:promotions.imgtxt_promotions});buf.push(null==__val__?"":__val__),buf.push("</div>")}return buf.join("")},
__t["bidcms/comment_item_convo"]=function(locals){var buf=[];with(locals||{}){var interp,_metas=typeof text_meta=="undefined"?null:text_meta;buf.push("<div"),buf.push(attrs({"class":"comment convo clearfix"})),buf.push("><a"),buf.push(attrs({href:"index.php?con=user&uid="+escape(user.urlname),title:escape(user.username),"class":"img x"})),buf.push("><img"),buf.push(attrs({src:avatar(user,undefined)})),buf.push("/></a><p><a"),buf.push(attrs({href:"index.php?con=user&uid="+user.urlname,"class":"author"})),buf.push(">"+escape((interp=user.username)==null?"":interp)+"</a>:&nbsp;");var __val__=raw_text.format_text(_metas);buf.push(null==__val__?"":__val__),buf.push("</p><a"),buf.push(attrs({title:"回复","class":"replyButton"})),buf.push("></a></div>")}return buf.join("")},
__t["bidcms/favorites_callout"]=function(locals){var buf=[];with(locals||{}){var interp;buf.push("<div"),buf.push(attrs({id:"favorites_callout",style:"display: none;","class":"has-close"})),buf.push("><div"),buf.push(attrs({"class":"wrapper"})),buf.push("><div"),buf.push(attrs({"class":"intro sheet"})),buf.push(">");var from="好123";app.req.from_123_360=="360"?from="360安全网址":app.req.from_123_360=="tao123"?from="淘网址":app.req.from_123_360=="sogou"?from="搜狗网址导航":app.req.from_123_360=="qq"&&(from="QQ相册"),buf.push("<span"),buf.push(attrs({"class":"hi"})),buf.push(">hi，欢迎你从 "+escape((interp=from)==null?"":interp)+" 来到BidCms</span><span"),buf.push(attrs({"class":"favorite-notice"})),buf.push(">如果你喜欢这里，请把BidCms网添加到你的网页收藏夹吧，不担心以后找不到了。</span>"),Browser.Platform.mac?(buf.push("<div"),buf.push(attrs({id:"command_d"})),buf.push("><span>把BidCms网加到你的浏览器收藏夹里</span></div>")):(buf.push("<div"),buf.push(attrs({id:"ctrl_d"})),buf.push("><span>把BidCms网加到你的浏览器收藏夹里</span></div>")),buf.push("<a"),buf.push(attrs({"class":"close"})),buf.push('></a></div></div></div><script>(function(){if(!Cookie.read("_hbfavorites")){var a=Cookie.read("_hb_chrome_extention");if(a==null||a=="true")document.id("favorites_callout").removeClass("has-close").show(),(new Request.JSON({url:"/all/favorite_counter/show"})).post()}$$(".close").addEvent("click",function(){Cookie.read("_hbfavoritesed")?Cookie.write("_hbfavorites",!0,{duration:365}):(Cookie.write("_hbfavorites",!0,{duration:1}),Cookie.write("_hbfavoritesed",!0,{duration:365})),document.id("favorites_callout").hide(),(new Request.JSON({url:"/all/favorite_counter/close"})).post()}),document.addEvent("keydown",function(a){return a.code==68&&(a.meta||a.control)&&(Cookie.write("_hbfavorites",!0,{duration:365}),document.id("favorites_callout").hide(),(new Request.JSON({url:"/all/favorite_counter/fav"})).post()),!0})})()</script>')}return buf.join("")},
__t["bidcms/user_fix_callout"]=function(locals){var buf=[];with(locals||{}){var interp;buf.push("<div"),buf.push(attrs({id:"unauth_callout",style:"display: none;","class":"has-close"})),buf.push("><div"),buf.push(attrs({"class":"wrapper"})),buf.push("><div"),buf.push(attrs({id:"intro","class":"sheet"})),buf.push("><div"),buf.push(attrs({"class":"unauth-btns"})),buf.push("><a"),buf.push(attrs({id:"fix_user_btn",href:"index.php?con=user&act=profile","class":"btn btn18 wbtn"})),buf.push('><strong><em></em> 完善我的注册账号</strong><span></span></a></div><h2>请完善你的BidCms注册邮箱</h2>大侠，你是通过第三方帐号直接登陆的</div></div></div><script>(function(){if(!Cookie.read("_hbfu")||Cookie.read("_hbfu")!=app.req.user.user_id){var a=Cookie.read("_hb_chrome_extention");(a==null||a=="true")&&document.id("unauth_callout").removeClass("has-close").show()}document.id("fix_user_btn").addEvent("click",function(){Cookie.write("_hbfu",app.req.user.user_id,{duration:1}),window.location.href=this.get("href")})})()</script>')}return buf.join("")},
__t["bidcms/board_picker"]=function(locals){var buf=[];with(locals||{}){var interp;buf.push("<div"),buf.push(attrs({"class":"BoardListOverlay"})),buf.push("></div><div"),buf.push(attrs({"class":"BoardSelector BoardPicker"})),buf.push("><div"),buf.push(attrs({"class":"current"})),buf.push("><span"),buf.push(attrs({"class":"CurrentBoard"})),buf.push(">选择画板...</span><span"),buf.push(attrs({"class":"DownArrow"})),buf.push("></span></div><div"),buf.push(attrs({"class":"BoardList"})),buf.push("><div"),buf.push(attrs({"class":"BoardListBody"})),buf.push("><ul></ul></div><div"),buf.push(attrs({"class":"CreateBoard"})),buf.push("><input"),buf.push(attrs({id:"board_name_input",type:"text",placeholder:"创建新画板"})),buf.push("/><a"),buf.push(attrs({href:"#",onclick:"return false;","class":"nf btn btn18 wbtn"})),buf.push("><strong> 创建</strong><span></span></a><div"),buf.push(attrs({"class":"CreateBoardStatus"})),buf.push('></div></div></div></div><script>(function(){$$("div.BoardPicker").each(function(a){if(a.retrieve("initialized"))return;var b=a.getElement("div.CreateBoard"),c=$("board_name_input"),d=b.getElement("a.btn"),e=b.getElement(".CreateBoardStatus"),f=$(document.body).getHeight()<400?5:8,g=new BoardPicker(a,{maxVisibleItems:f}),h=new FancyInput(c);(new Button(d,{click:function(){var a=c.get("value").trim();return a==""?(e.set("html","请输入名称"),!1):(this.disable(),(new Request.JSON({url:"models/setboard.php",data:{title:a},onSuccess:function(a){a.err?alert(a.msg||app.COMMON_ERRMSG):g.add(a.board).hide()},onFailure:function(){alert(app.COMMON_ERRMSG)},onComplete:function(){h.setValue(""),this.enable()}.bind(this)})).post(),!1)}})).disable().bind(h),a.store("initialized",!0)})})()</script>')}return buf.join("")},
__t["bidcms/user_promotions"]=function(locals){var buf=[];with(locals||{}){var interp;if(promotions&&promotions.length>0){buf.push("<div"),buf.push(attrs({"class":"user-promotions"})),buf.push("><h3>推荐用户</h3>");var per_page=3,page=0,total_pages=Math.floor((promotions.length-1)/per_page)+1,current_page=Math.floor(Math.random()*total_pages+1);while(promotions.length>0){var promotions_per_page=promotions.splice(0,per_page),style="";page++,page!=current_page&&(style="display: none;"),buf.push("<ul"),buf.push(attrs({style:""+style+"","class":"page"+page+""})),buf.push(">");for(var $index=0,$$l=promotions_per_page.length;$index<$$l;$index++){var promotion=promotions_per_page[$index];buf.push("<div"),buf.push(attrs({"class":"user"})),buf.push(">");var user=promotion.user;buf.push("<a"),buf.push(attrs({href:"index.php?con=user&uid="+escape(user.urlname),title:escape(user.username),"class":"img x"})),buf.push("><img"),buf.push(attrs({height:"64",width:"64",src:avatar(user,"sq75")})),buf.push("/></a><div"),buf.push(attrs({"class":"user-info"})),buf.push("><h4"),buf.push(attrs({"class":"username"})),buf.push("><a"),buf.push(attrs({href:"index.php?con=user&uid="+user.urlname})),buf.push(">"+escape((interp=user.username)==null?"":interp)+"</a></h4><div"),buf.push(attrs({"class":"meta"})),buf.push("><a"),buf.push(attrs({href:"index.php?con=usre&act=pins&uid="+user.urlname})),buf.push(">"+escape((interp=user.pin_count)==null?"":interp)+"采集</a>&nbsp;|&nbsp;<a"),buf.push(attrs({href:"index.php?con=user&uid="+user.urlname})),buf.push(">"+escape((interp=user.board_count)==null?"":interp)+"画板</a></div></div><div"),buf.push(attrs({"class":"description"})),buf.push(">"+escape((interp=promotion.description)==null?"":interp)+"</div></div>")}buf.push("</ul>")}if(total_pages>1){buf.push("<ul"),buf.push(attrs({"class":"pager"})),buf.push(">");for(var i=1;i<=page;i++){var li_class="";i==current_page&&(li_class="current"),buf.push("<li"),buf.push(attrs({"data-page":""+i+"","class":""+li_class+""})),buf.push(">●</li>")}buf.push("</ul>")}buf.push("</div>")}buf.push('<script>(function(){var a=$$(".user-promotions ul.pager li");a.length>0&&a.addEvent("click",function(){if(this.hasClass("current"))return;var a=$$(".user-promotions ul.pager li.current")[0],b=a.get("data-page"),c=$$(".user-promotions ul.page"+b)[0],d=this.get("data-page"),e=$$(".user-promotions ul.page"+d)[0];c.hide(),a.removeClass("current"),this.addClass("current"),e.show(),app.page.$waterfall.reposition(!0)})})()</script>')}return buf.join("")},
__t["bidcms/nav_bar"]=function(locals){var buf=[];with(locals||{}){var interp,categories=settings.categories,groups=[],cats={};if(page.filter)var filter=page.filter.split(":");else filter=["","",""];for(var i=0,l=categories.length;i<l;i++){var category=categories[i],now_link=(filter[0]!="board"?"index.php?act=":"index.php?con=boards&act=")+"favorite&cindex="+category.id+"&cid=";category.nav_link=now_link+category.cateindex,groups[category.group]=groups[category.group]||[],groups[category.group].push(category),cats[category.id]=category.name};var selected="";filter[2]=="videos"?selected="videos":filter[1]=="category"&&filter[2]=="all"?selected="latest":filter[1]=="following"&&filter[2]=="all"?selected="following":filter[1]=="popular"&&(selected="popular"),buf.push("<div"),buf.push(attrs({id:"shadow_nav","class":navShowing?"":"closed"})),buf.push("><div"),buf.push(attrs({"class":"wrapper"})),buf.push("><div"),buf.push(attrs({"class":"tent"})),buf.push("><div"),buf.push(attrs({"class":"huaban-shadow-nav clearfix"})),buf.push("><div"),buf.push(attrs({"class":"unit"})),buf.push("><a"),buf.push(attrs({href:"index.php","class":"large-btn latest "+(selected=="latest"?"active":"")})),buf.push("><div"),buf.push(attrs({"class":"icon"})),buf.push("></div>最新</a><a"),buf.push(attrs({href:"index.php?act=popular","class":"large-btn hot "+(selected=="popular"?"active":"")})),buf.push("><div"),buf.push(attrs({"class":"icon"})),buf.push("></div>热门</a><a"),buf.push(attrs({href:"index.php?act=videos","class":"large-btn video "+(selected=="videos"?"active":"")})),buf.push("><div"),buf.push(attrs({"class":"icon"})),buf.push("></div>视频</a></div><div"),buf.push(attrs({"class":"border"})),buf.push("></div>");if(groups[0]!=undefined){buf.push("<div"),buf.push(attrs({"class":"unit unit0"})),buf.push("><ul"),buf.push(attrs({"class":"clearfix"})),buf.push(">");for(var $index=0,$$l=groups[0].length;$index<$$l;$index++){var cat=groups[0][$index];buf.push("<li><a"),buf.push(attrs({href:cat.nav_link,"class":cat.id==filter[2]?"onthis":""})),buf.push(">"+escape((interp=cat.name)==null?"":interp)+"</a></li>")}}if(groups[1]!=undefined){buf.push("</ul></div><div"),buf.push(attrs({"class":"border"})),buf.push("></div><div"),buf.push(attrs({"class":"unit unit1"})),buf.push("><ul"),buf.push(attrs({"class":"clearfix"})),buf.push(">");for(var $index=0,$$l=groups[1].length;$index<$$l;$index++){var cat=groups[1][$index];buf.push("<li><a"),buf.push(attrs({href:cat.nav_link,"class":cat.id==filter[2]?"onthis":""})),buf.push(">"+escape((interp=cat.name)==null?"":interp)+"</a></li>")}}if(groups[2]!=undefined){buf.push("</ul></div><div"),buf.push(attrs({"class":"line"})),buf.push("></div><div"),buf.push(attrs({"class":"unit unit2"})),buf.push("><ul"),buf.push(attrs({"class":"clearfix"})),buf.push(">");for(var $index=0,$$l=groups[2].length;$index<$$l;$index++){var cat=groups[2][$index];buf.push("<li><a"),buf.push(attrs({href:cat.nav_link,"class":cat.id==filter[2]?"onthis":""})),buf.push(">"+escape((interp=cat.name)==null?"":interp)+"</a></li>")}}if(groups[3]!=undefined){buf.push("</ul></div><div"),buf.push(attrs({"class":"border"})),buf.push("></div><div"),buf.push(attrs({"class":"unit unit3"})),buf.push("><ul"),buf.push(attrs({"class":"clearfix"})),buf.push(">");for(var $index=0,$$l=groups[3].length;$index<$$l;$index++){var cat=groups[3][$index];buf.push("<li><a"),buf.push(attrs({href:cat.nav_link,"class":cat.id==filter[2]?"onthis":""})),buf.push(">"+escape((interp=cat.name)==null?"":interp)+"</a></li>")}}if(groups[4]!=undefined){buf.push("</ul></div><div"),buf.push(attrs({"class":"border"})),buf.push("></div><div"),buf.push(attrs({"class":"unit unit4"})),buf.push("><ul"),buf.push(attrs({"class":"clearfix"})),buf.push(">");for(var $index=0,$$l=groups[4].length;$index<$$l;$index++){var cat=groups[4][$index];buf.push("<li><a"),buf.push(attrs({href:cat.nav_link,"class":cat.id==filter[2]?"onthis":""})),buf.push(">"+escape((interp=cat.name)==null?"":interp)+"</a></li>")}}if(req.promotions&&req.promotions.dropdown_icontxt_promotions&&req.promotions.dropdown_icontxt_promotions.length){buf.push("<li"),buf.push(attrs({"class":"promotion"})),buf.push(">");var _n=Math.floor(Math.random()*req.promotions.dropdown_icontxt_promotions.length+1)-1,_promotion=req.promotions.dropdown_icontxt_promotions[_n],_target=_promotion.open_in_new_tab?"_blank":"_self";if(_promotion.file){var _promotion_icon="http://"+settings.hbfile[_promotion.file.bucket]+_promotion.file.key;buf.push("<a"),buf.push(attrs({style:"background-image:url('"+_promotion_icon+"');",href:""+_promotion.promotion_url+"",target:""+_target+"","class":"with-img"})),buf.push(">"+escape((interp=_promotion.title)==null?"":interp)+"</a>")}else buf.push("<a"),buf.push(attrs({href:""+_promotion.promotion_url+"",target:""+_target+""})),buf.push(">"+escape((interp=_promotion.title)==null?"":interp)+"</a>");buf.push("</li>")}buf.push("</ul></div></div></div></div></div>")}return buf.join("")},
__t["bidcms/comment_form"]=function(locals){var buf=[];with(locals||{}){var interp;user=user||{urlname:"",username:""},buf.push("<div"),buf.push(attrs({id:"PinAddComment","data-id":pin.pin_id,"class":"clearfix"})),buf.push("><div"),buf.push(attrs({id:"PinInputArea"})),buf.push("><a"),buf.push(attrs({href:"index.php?con=user&uid="+escape(user.urlname),title:escape(user.username),"class":"img x"})),buf.push("><img"),buf.push(attrs({src:avatar(user,undefined),"class":"avatar"})),buf.push("/></a><div"),buf.push(attrs({"class":"InputContainer Form FancyForm"})),buf.push("><textarea"),buf.push(attrs({id:"CloseupComment",name:"caption"})),buf.push("></textarea><label>添加评论或把采集@给好友</label><span"),buf.push(attrs({"class":"fff"})),buf.push("></span></div><div"),buf.push(attrs({id:"PinAddCommentControls",style:"display:none;"})),buf.push("><a"),buf.push(attrs({id:"PostComment",href:"#",onclick:"return false;","class":"disabled btn btn13 wbtn"})),buf.push('><strong> 添加评论</strong><span></span></a></div></div></div><script>(function(a){var b=a("PinAddComment");if(b.retrieve("initialized"))return;var c=b.get("data-id"),d=a("PinAddCommentControls"),e=a("pin_comments"),f=a("CloseupComment"),g=new FancyInput("CloseupComment",{onFocus:function(){d.isDisplayed()||d.show(),f.retrieve("registered-at")||(f.store("registered-at","registered"),new Autocompleter.Contacts.At(f))}});(new Button("PostComment",{click:function(){function f(){(new Request.JSON({url:"models/setcomments.php?id="+c,data:{text:b},onSuccess:function(a){if(a.err)app.error(a.msg||app.COMMON_ERRMSG);else{var b=app.renderSync("bidcms/comment_item",a.comment),c=Elements.from(b).inject(e);c.highlight(),g.setValue("")}d.enable()},onFailure:function(){app.error(app.COMMON_ERRMSG),d.enable()}})).post()}var b=g.getValue().trim();if(b=="")return app.error("好歹输两个字吧，亲!"),!1;var d=this.disable();return app.req.user?f():(app.requireLogin(function(){e=a("pin_comments"),g=new FancyInput("CloseupComment"),g.setValue(b),d=(new Button("PostComment")).disable(),f()}),!1)}})).disable().bind(g),f.addEvent("keydown",function(a){a.key=="esc"&&a.target.blur();if(a.key=="enter"&&(!Browser.Platform.mac&&a.control||Browser.Platform.mac&&a.meta))return document.id("PostComment").fireEvent("click"),!1}),b.store("initialized",!0)})(document.id)</script>')}return buf.join("")},
__t["bidcms/people_layout"]=function(locals){var buf=[];with(locals||{}){var interp,user_url="index.php?con=user&uid="+user.urlname,qt=page.people_query&&escape(page.people_query.text),qn=page.people_query&&page.people_query.total;buf.push("<div"),buf.push(attrs({id:"wrapper","class":"wrapper bl"})),buf.push("><div"),buf.push(attrs({id:"ProfileSidebar"})),buf.push("><h1>"+escape((interp=user.username)==null?"":interp)+"</h1>");if(req.user&&req.user.user_id==1||user.user_id!=1)buf.push("<p"),buf.push(attrs({"class":"stats"})),buf.push("><a"),buf.push(attrs({href:""+user_url+"&act=following"})),buf.push(">关注<span>"+escape((interp=user.following_count)==null?"":interp)+"</span></a><a"),buf.push(attrs({href:""+user_url+"&act=followers"})),buf.push(">粉丝<span>"+escape((interp=user.follower_count)==null?"":interp)+"</span></a></p>");buf.push("<div"),buf.push(attrs({id:"ProfileImage"})),buf.push("><a"),buf.push(attrs({href:"index.php?con=user&uid="+escape(user.urlname),title:escape(user.username),"class":"img x"})),buf.push("><img"),buf.push(attrs({src:avatar(user,"fw192")})),buf.push("/></a>"),req.user&&user.user_id===req.user.user_id?(buf.push("<a"),buf.push(attrs({href:"index.php?con=user&act=profile","class":"btn btn13 wbtn"})),buf.push("><strong> 账号设置</strong><span></span></a>")):user.following?(buf.push("<a"),buf.push(attrs({"data-id":""+user.urlname+"",href:"#",onclick:"return false;","class":"unfollowuser btn wbtn"})),buf.push("><strong> 取消关注</strong><span></span></a>")):(buf.push("<a"),buf.push(attrs({"data-id":""+user.urlname+"",href:"#",onclick:"return false;","class":"followuser btn rbtn"})),buf.push("><strong> 关注</strong><span></span></a>")),buf.push("</div><p"),buf.push(attrs({"class":"muted"})),buf.push(">"+escape((interp=user.profile.about)==null?"":interp)+"</p><p"),buf.push(attrs({"class":"less"})),buf.push(">"+escape((interp=user.profile.location)==null?"":interp)+"</p><ul"),buf.push(attrs({id:"ProfileLinks"})),buf.push(">"),user.profile.url&&(buf.push("<li"),buf.push(attrs({id:"ProfileLinksWebsite"})),buf.push("><a"),buf.push(attrs({href:""+(user.profile.url.substr(0,7)=="http://"?user.profile.url:"http://"+user.profile.url)+"",title:"访问"+user.username+"的个人主页",target:"_blank","class":"btn wbtn"})),buf.push("><strong><img"),buf.push(attrs({src:"static/bidcms/img/ProfileIconWebsite.png",alt:"访问个人主页",style:"margin-top: 3px;"})),buf.push("/></strong><span></span></a></li>"));if(user.bindings.weibo&&!user.status.hide_weibo){var weibo=user.bindings.weibo.user_info;buf.push("<li"),buf.push(attrs({id:"ProfileLinksWeibo"})),buf.push("><a"),buf.push(attrs({href:"http://weibo.com/"+(weibo.urlname?weibo.urlname:weibo.id)+"",title:"访问"+user.username+"的微博",target:"_blank","class":"btn wbtn"})),buf.push("><strong><img"),buf.push(attrs({src:"static/bidcms/img/ProfileIconWeibo.png",alt:"访问微博"})),buf.push("/></strong><span></span></a></li>")}user.bindings.douban&&!user.status.hide_douban&&(buf.push("<li"),buf.push(attrs({id:"ProfileLinksDouban"})),buf.push("><a"),buf.push(attrs({href:"http://www.douban.com/people/"+user.bindings.douban.user_info.urlname,title:"访问"+user.username+"的豆瓣主页",target:"_blank","class":"btn wbtn"})),buf.push("><strong><img"),buf.push(attrs({src:"static/bidcms/img/ProfileIconDouban.png",alt:"访问豆瓣主页"})),buf.push("/></strong><span></span></a></li>")),user.bindings.renren&&!user.status.hide_renren&&(buf.push("<li"),buf.push(attrs({id:"ProfileLinksRenren"})),buf.push("><a"),buf.push(attrs({href:"http://www.renren.com/profile.do?id="+user.bindings.renren.user_info.id+"",title:"访问"+user.username+"的人人主页",target:"_blank","class":"btn wbtn"})),buf.push("><strong><img"),buf.push(attrs({src:"static/bidcms/img/ProfileIconRenren.png",alt:"访问人人主页"})),buf.push("/></strong><span></span></a></li>")),user.bindings.tqq&&!user.status.hide_tqq&&(buf.push("<li"),buf.push(attrs({id:"ProfileLinksTqq"})),buf.push("><a"),buf.push(attrs({href:"http://t.qq.com/"+user.bindings.tqq.user_info.urlname+"",title:"访问"+user.username+"的腾讯微博主页",target:"_blank","class":"btn wbtn"})),buf.push("><strong><img"),buf.push(attrs({src:"static/bidcms/img/ProfileIconTqq.png",alt:"访问腾讯微博主页"})),buf.push("/></strong><span></span></a></li>")),buf.push("</ul>");if(user.feeds){var __val__=emerge("bidcms/feed_list",{feeds:user.feeds,user:user});buf.push(null==__val__?"":__val__)}buf.push("</div><div"),buf.push(attrs({id:"ctx_bar"})),buf.push("><p"),buf.push(attrs({"class":"bar-links"})),buf.push(">");var b=[],m=[[user.board_count,"boards","画板","index.php?con=user"],[user.pin_count,"pins","采集","index.php?con=user&act=pins"],[user.like_count,"likes","喜欢","index.php?con=user&act=likes"]];for(var i=0,$$l=m.length;i<$$l;i++){var x=m[i];if(!page.people_query&&ctx==x[1]){buf.push("<span"),buf.push(attrs({"class":"selected"})),buf.push(">");var __val__=x[0]+" "+x[2];buf.push(null==__val__?"":__val__),buf.push("</span>")}else{buf.push("<a"),buf.push(attrs({href:x[3]+"&uid="+user.urlname})),buf.push(">");var __val__=x[0]+" "+x[2];buf.push(null==__val__?"":__val__),buf.push("</a>")}}buf.push("</p><div"),buf.push(attrs({id:"BoardButton"})),buf.push("><form"),buf.push(attrs({id:"people_search_item",action:"index.php?con=user&act=pins&uid="+user.urlname,"class":"search-item"})),buf.push("><input"),buf.push(attrs({value:page.people_query?_(page.people_query.text):"",name:"q",placeholder:req.user&&req.user.user_id==user.user_id?"搜索我的采集":"搜索TA的采集"})),buf.push("/><a"),buf.push(attrs({onclick:"this.getParent('form').submit();return false;","class":"go"})),buf.push("></a></form>"),ctx=="boards"&&req.user&&req.user.user_id==user.user_id&&(buf.push("<a"),buf.push(attrs({id:"boards_sort",href:"#",onclick:"return false;","class":"btn wbtn"})),buf.push("><strong> 画板排序</strong><span></span></a><a"),buf.push(attrs({id:"boards_sort_cancel",style:"visibility:hidden;",href:"#",onclick:"return false;","class":"btn wbtn"})),buf.push("><strong> 取消</strong><span></span></a>")),buf.push("</div></div>"),qt&&(buf.push("<div"),buf.push(attrs({"class":"search-status"})),buf.push(">找到 "+escape((interp=qn)==null?"":interp)+" 个与<strong>"+escape((interp=qt)==null?"":interp)+"</strong>相关的结果</div>"));var __val__=emerge(body_tpl,{user:user});buf.push(null==__val__?"":__val__),buf.push("<div"),buf.push(attrs({"class":"clear"})),buf.push('></div></div><script>(function(){app.initFollowButtons(),app.initFollowUserButtons(function(a){function b(a,b){b?(new Button(a.addClass("unfollow"))).setTitle("已关注"):(new Button(a.removeClass("unfollow"))).setTitle("关注")}$$("a.follow,a.unfollow").each(function(c){b(c,a.hasClass("unfollowuser"))})}),app.initLikeButtons(),app.initAddCommentButtons(),app.initThunderPinButtons();var a=document.id("boards_sort");if(a){var b=!1,c=$$(".sortable")[0],d,e,f,g=new SmoothNotification({relative:{to:$("ctx_bar"),position:"center",edge:"center"},styles:{"border-radius":"5px"},duration:4e3}),h=function(){b=!0,a.setTitle("保存排序"),a.element.removeClass("wbtn").addClass("rbtn"),c.addClass("dragable");if(!d){var h,i;d=new Sortables(c,{clone:!0,onStart:function(a,b){a.setStyles({border:"dashed 3px #DDD","margin-left":"14px","margin-bottom":"14px",width:b.getStyle("width").toInt()-5,height:b.getStyle("height").toInt()-5}),a.getChildren().setStyles({visibility:"hidden"}),b.setStyles({"z-index":999999,opacity:.6,filter:"alpha(opacity=40)"})},onComplete:function(a){a.getChildren().setStyles({visibility:""}),a.set("style","")}})}f=d.serialize(0,function(a){return a.getElement("div.Board").get("data-id")}),d.attach(),e=document.id("boards_sort_cancel"),e.setStyle("visibility","visible").show(),g.show("提示：拖动画板来改变排序"),e.onclick=function(){var a=d.serialize(0,function(a){return a.getElement("div.Board").get("data-id")});if(f.join("-")!=a.join("-")){var b=c.getChildren("li");b.dispose();for(var e=0;f[e];e++)for(var g=0;b[g];g++)if(b[g].getChildren(".Board").get("data-id")==f[e]){b[g].inject(c);break}j()}else j()}},i=function(){var b=d.serialize(0,function(a){return a.getElement("div.Board").get("data-id")});f.join("-")!=b.join("-")?(a.disable(),(new Request.JSON({url:"index.php?con=boards&act=sort",data:{ids:b.join(",")},onSuccess:j(!0)})).post()):j(!0)},j=function(f){c.removeClass("dragable"),a.setTitle("画板排序"),a.element.removeClass("rbtn").addClass("wbtn"),a.enable(),b=!1,e.hide(),b=!1,d.detach(),f&&(g&&g.hide(),g.show("排序已保存"))};a=new Button(a,{disabledTitle:"正在保存",click:function(){b?i():h()}})}(function(){app._gaq_promotion&&app._gaq_promotion()})()})()</script>')}return buf.join("")},
__t["bidcms/pager"]=function(locals){var buf=[];with(locals||{}){var interp,base_url=base_url||"?page=%_page_&limit=%_limit_";base_url=base_url.replace("%_limit_",per_page);var num_records=parseInt(num_records)||0,cur_page=parseInt(cur_page)||1,per_page=parseInt(per_page)||2,num_pages=Math.ceil(num_records/per_page);cur_page<1&&(cur_page=1),num_pages<1&&(num_pages=1),cur_page>num_pages&&(cur_page=num_pages);if(num_pages>1){buf.push("<div"),buf.push(attrs({"class":"pager"})),buf.push("><div"),buf.push(attrs({"class":"pages"})),buf.push(">"),cur_page>1&&(buf.push('<!--a.nextprev(href="#{base}?page=#{cur_page - 1}&limit=#{per_page}") 上一页--><a'),buf.push(attrs({href:""+base_url.replace("%_page_",cur_page-1)+"","class":"nextprev"})),buf.push(">上一页</a>"));if(cur_page>1)if(cur_page>8){for(var $index=0,$$l=[1,2].length;$index<$$l;$index++){var n=[1,2][$index];buf.push('<!--a(href="#{base}?page=#{cur_page}&limit=#{per_page}") #{n}--><a'),buf.push(attrs({href:""+base_url.replace("%_page_",n)+""})),buf.push(">"+escape((interp=n)==null?"":interp)+"</a>")}buf.push("<span"),buf.push(attrs({"class":"break"})),buf.push(">...</span>");var offset=cur_page-3;cur_page>num_pages-3&&(offset=num_pages-6);for(offset;offset<cur_page;offset++)buf.push('<!--a(href="#{base}?page=#{offset}&limit=#{per_page}") #{offset}--><a'),buf.push(attrs({href:""+base_url.replace("%_page_",offset)+""})),buf.push(">"+escape((interp=offset)==null?"":interp)+"</a>")}else for(var n=1;n<cur_page;n++)buf.push('<!--a(href="#{base}?page=#{n}&limit=#{per_page}") #{n}--><a'),buf.push(attrs({href:""+base_url.replace("%_page_",n)+""})),buf.push(">"+escape((interp=n)==null?"":interp)+"</a>");buf.push("<span"),buf.push(attrs({"class":"current"})),buf.push(">"+escape((interp=cur_page)==null?"":interp)+"</span>");if(num_pages-cur_page>0)if(num_pages-cur_page>8){var offset=7;cur_page>3&&(offset=cur_page+3);for(var n=cur_page+1;n<offset;n++)buf.push('<!--a(href="#{base}?page=#{n}&limit=#{per_page}") #{n}--><a'),buf.push(attrs({href:""+base_url.replace("%_page_",n)+""})),buf.push(">"+escape((interp=n)==null?"":interp)+"</a>");buf.push("<span"),buf.push(attrs({"class":"break"})),buf.push(">...</span>");for(var n=num_pages-1;n<=num_pages;n++)buf.push('<!--a(href="#{base}?page=#{n}&limit=#{per_page}") #{n}--><a'),buf.push(attrs({href:""+base_url.replace("%_page_",n)+""})),buf.push(">"+escape((interp=n)==null?"":interp)+"</a>")}else for(var n=cur_page+1;n<=num_pages;n++)buf.push('<!--a(href="#{base}?page=#{n}&limit=#{per_page}") #{n}--><a'),buf.push(attrs({href:""+base_url.replace("%_page_",n)+""})),buf.push(">"+escape((interp=n)==null?"":interp)+"</a>");cur_page<num_pages&&(buf.push('<!--a.nextprev(href="#{base}?page=#{cur_page + 1}&limit=#{per_page}") 下一页--><a'),buf.push(attrs({href:""+base_url.replace("%_page_",cur_page+1)+"","class":"nextprev"})),buf.push(">下一页</a>")),buf.push("</div></div>")}}return buf.join("")},
__t["bidcms/search_result"]=function(locals){var buf=[];with(locals||{}){var interp,__val__=emerge("bidcms/header");buf.push(null==__val__?"":__val__);var q=page.query,qt=escape(q.text),b=[],m=[[page.pin_count,"pin","采集","&act=index"],[page.shiji_count,"shiji","商品","&act=shiji"],[page.board_count,"board","画板","&act=boards"],[page.people_count,"people","用户","&act=people"]];buf.push("<div"),buf.push(attrs({"class":"wrapper"})),buf.push("><div"),buf.push(attrs({id:"ctx_bar","class":"board"})),buf.push("><form"),buf.push(attrs({id:"search_result_form",action:"index.php","class":"search-item"})),buf.push("><input type='hidden' value='search' name='con'/><input"),buf.push(attrs({value:qt,name:"q",placeholder:"搜索你喜欢的"})),buf.push("/><a"),buf.push(attrs({onclick:"this.getParent('form').submit();return false;","class":"go"})),buf.push("></a></form><ul"),buf.push(attrs({id:"search_switch"})),buf.push(">");for(var i=0,$$l=m.length;i<$$l;i++){var x=m[i];if(q.type==x[1]){buf.push("<li"),buf.push(attrs({"class":"selected "+(i==0?"first ":""+i==m.length-1?"last":"")})),buf.push("><a"),buf.push(attrs({"class":"switch-"+x[1]})),buf.push(">");var __val__=x[0]+" "+x[2];buf.push(null==__val__?"":__val__),buf.push("</a></li>")}else{buf.push("<li"),buf.push(attrs({"class":i==0?"first ":""+i==m.length-1?"last":""})),buf.push("><a"),buf.push(attrs({href:"index.php?con=search"+x[3]+"&q="+qt,"class":"switch-"+x[1]})),buf.push(">");var __val__=x[0]+" "+x[2];buf.push(null==__val__?"":__val__),buf.push("</a></li>")}}buf.push("</ul></div><div"),buf.push(attrs({id:"waterfall"})),buf.push(">");if(q.type=="pin")for(var $index=0,$$l=page.pins.length;$index<$$l;$index++){var pin=page.pins[$index],__val__=emerge("bidcms/pin_item",{user:pin.user,pin:pin,board:pin.board});buf.push(null==__val__?"":__val__)}else if(q.type=="board")for(var $index=0,$$l=page.boards.length;$index<$$l;$index++){var board=page.boards[$index],__val__=emerge("bidcms/board_item",{board:board,user:req.user});buf.push(null==__val__?"":__val__)}else if(q.type=="people")for(var $index=0,$$l=page.users.length;$index<$$l;$index++){var user=page.users[$index],__val__=emerge("bidcms/user_item",{user:user,current_user:this.req.user});buf.push(null==__val__?"":__val__)}else if(q.type=="shiji")for(var $index=0,$$l=page.pins.length;$index<$$l;$index++){var pin=page.pins[$index],__val__=emerge("bidcms/pin_item",{user:pin.user,pin:pin,board:pin.board});buf.push(null==__val__?"":__val__)}buf.push("</div></div><script>(function(){app.initLikeButtons(),app.initAddCommentButtons(),app.initFollowButtons(),app.initFollowUserButtons(),app.initThunderPinButtons()})()</script>")}return buf.join("")},
__t["bidcms/people_likes"]=function(locals){var buf=[];with(locals||{}){var interp,__val__=emerge("bidcms/header");buf.push(null==__val__?"":__val__);var __val__=emerge("bidcms/people_layout",{req:req,user:page.user,ctx:"likes",body_tpl:"bidcms/people_likes_body"});buf.push(null==__val__?"":__val__)}return buf.join("")},
__t["bidcms/board_item"]=function(locals){var buf=[];with(locals||{}){var interp,promt=typeof promotion=="undefined"||!promotion?null:promotion,_fbtn=typeof fbtn=="undefined"?!0:fbtn,seq=promt?"":board.seq,extraCssClass=promt?"promotion":"";buf.push("<div"),buf.push(attrs({"data-id":""+board.board_id+"","data-seq":""+seq+"","class":"Board wfc "+(""+extraCssClass+"")})),buf.push(">"),user&&board.user_id==user.user_id&&(buf.push("<div"),buf.push(attrs({"class":"draglay"})),buf.push("></div>")),board.is_private==2?(buf.push("<h3>待归类采集"),board.pin_count>500&&buf.push("<span>（采集数已达上限）</span>"),buf.push("</h3>")):buf.push("<h3>"+escape((interp=board.title)==null?"":interp)+"</h3>"),typeof pin!="undefined"&&pin.index_in_board?(buf.push("<span"),buf.push(attrs({"class":"position"})),buf.push(">"+escape((interp=pin.index_in_board)==null?"":interp)+"/"+escape((interp=board.pin_count)==null?"":interp)+"</span>")):board.pin_count&&(buf.push("<div"),buf.push(attrs({"class":"pin-count"})),buf.push(">("+escape((interp=board.pin_count)==null?"":interp)+")</div>"));var board_url="index.php?con=boards&act=item&id="+board.board_id,target_url=promt?promt.promotion_url||board_url:board_url,target=promt?promt.open_in_new_tab?"_blank":"_self":"_self",extra_css_class=promt?"promotion-url":"";buf.push("<a"),buf.push(attrs({href:""+target_url+"",target:""+target+"","class":"link "+(""+extra_css_class+"")+" "+"x"})),buf.push(">"),board.description&&(buf.push("<h4"),buf.push(attrs({"class":"hidden"})),buf.push(">"+escape((interp=board.description)==null?"":interp)+"</h4>"));for(var $index=0,$$l=board.pins.length;$index<$$l;$index++){var pin=board.pins[$index];buf.push("<img"),buf.push(attrs({src:imgURL(pin.file,"sq75")})),buf.push("/>")}buf.push("</a>");for(var $index=0,$$l=board.pins.length;$index<$$l;$index++){var pin=board.pins[$index];buf.push("<a"),buf.push(attrs({href:"index.php?con=pins&act=item&id="+pin.pin_id+"",title:""+pin.raw_text+"","class":"hidden"})),buf.push("><img"),buf.push(attrs({title:""+pin.raw_text+"",src:imgURL(pin.file,"sq75")})),buf.push("/></a>")}_fbtn&&(user&&board.user_id===user.user_id?(buf.push("<div"),buf.push(attrs({"class":"FollowBoard"})),buf.push(">"),board.is_private==0?(buf.push("<a"),buf.push(attrs({href:"index.php?con=boards&act=edit&id="+board.board_id,"class":"btn btn13 wbtn"})),buf.push("><strong>编辑</strong><span></span></a>")):(buf.push("<a"),buf.push(attrs({href:"index.php?con=boards&act=edit&id="+board.board_id,onclick:"return false;","class":"disabled btn btn13 wbtn"})),buf.push("><strong>编辑</strong><span></span></a>")),buf.push("</div>")):board.user?(buf.push("<div"),buf.push(attrs({"class":"FollowBoard2"})),buf.push("><a"),buf.push(attrs({href:"index.php?con=user&uid="+escape(board.user.urlname),title:escape(board.user.username),"class":"img x"})),buf.push("><img"),buf.push(attrs({src:avatar(board.user,"sq75"),"class":"BoardAvatar"})),buf.push("/></a><a"),buf.push(attrs({href:"index.php?con=user&uid="+board.user.urlname,"class":"BoardUserUrl x"})),buf.push(">"+escape((interp=board.user.username)==null?"":interp)+"</a>"),board.following?(buf.push("<a"),buf.push(attrs({"data-id":""+board.board_id+"",href:"#",onclick:"return false;","class":""+(board.is_private==2?"disabled":"unfollow")+""+" "+"btn"+" "+"wbtn"})),buf.push("><strong>已关注</strong><span></span></a>")):(buf.push("<a"),buf.push(attrs({"data-id":""+board.board_id+"",href:"#",onclick:"return false;","class":""+(board.is_private==2?"disabled":"follow")+""+" "+"btn"+" "+"wbtn"})),buf.push("><strong>关注</strong><span></span></a>")),buf.push("</div>")):(buf.push("<div"),buf.push(attrs({"class":"FollowBoard"})),buf.push(">"),board.following?(buf.push("<a"),buf.push(attrs({"data-id":""+board.board_id+"",href:"#",onclick:"return false;","class":""+(board.is_private==2?"disabled":"unfollow")+""+" "+"btn"+" "+"btn13"+" "+"wbtn"})),buf.push("><strong>取消关注</strong><span></span></a>")):(buf.push("<a"),buf.push(attrs({"data-id":""+board.board_id+"",href:"#",onclick:"return false;","class":""+(board.is_private==2?"disabled":"follow")+""+" "+"btn"+" "+"btn13"+" "+"wbtn"})),buf.push("><strong>关注</strong><span></span></a>")),buf.push("</div>"))),promt&&promt.show_icon&&(buf.push("<div"),buf.push(attrs({"class":"promotion-icon"})),buf.push("></div>")),buf.push("</div>")}return buf.join("")},
__t["bidcms/notification_view"]=function(locals){var buf=[];with(locals||{}){var interp;buf.push("<div"),buf.push(attrs({id:"ntf_tip"})),buf.push("><div"),buf.push(attrs({"class":"shadow"})),buf.push(">"),strike=req.user?req.user.status.notify.strike:page.notify.strike;if(~strike.indexOf("img:"))buf.push("<div"),buf.push(attrs({id:"ntf_strike",style:"background: url("+strike.substr(4)+") no-repeat center top;"})),buf.push("></div>");else{buf.push("<div"),buf.push(attrs({id:"ntf_strike"})),buf.push(">");var __val__=strike;buf.push(null==__val__?"":__val__),buf.push("</div>")}buf.push("<div"),buf.push(attrs({"class":"bb"})),buf.push("><div"),buf.push(attrs({"class":"wrapper-960"})),buf.push("><h1"),buf.push(attrs({id:"ntf_title"})),buf.push("></h1></div></div><div"),buf.push(attrs({"class":"bt"})),buf.push("><div"),buf.push(attrs({"class":"wrapper-960"})),buf.push("><div"),buf.push(attrs({id:"ntf_content"})),buf.push("></div></div></div><a"),buf.push(attrs({id:"ntf_close"})),buf.push('></a></div></div><script>Asset.javascript("/notifications/oldest/")</script>')}return buf.join("")},
__t["bidcms/people_boards"]=function(locals){var buf=[];with(locals||{}){var interp,__val__=emerge("bidcms/header");buf.push(null==__val__?"":__val__);var __val__=emerge("bidcms/people_layout",{req:req,user:page.user,ctx:"boards",body_tpl:"bidcms/people_boards_body"});buf.push(null==__val__?"":__val__)}return buf.join("")},
__t["bidcms/hotkeys"]=function(locals){var buf=[];with(locals||{}){var interp;buf.push("<div"),buf.push(attrs({"class":"inner"})),buf.push("><h2>热键提示</h2><table"),buf.push(attrs({"class":"ln1"})),buf.push("><tbody><tr"),buf.push(attrs({"class":"title"})),buf.push("><td>全局</td></tr><tr><td><div"),buf.push(attrs({"class":"hotkey"})),buf.push(">?</div></td><td>查看热键提示</td></tr><tr><td><div"),buf.push(attrs({"class":"hotkey"})),buf.push(">Esc</div></td><td>取消焦点 / 退出</td></tr><tr><td><div"),buf.push(attrs({"class":"hotkey"})),buf.push(">/</div></td><td>搜索</td></tr><tr><td><div"),buf.push(attrs({"class":"hotkey"})),buf.push(">N</div></td><td>添加...</td></tr><tr"),buf.push(attrs({"class":"title"})),buf.push("><td>瀑布流</td></tr><tr><td><div"),buf.push(attrs({"class":"hotkey"})),buf.push(">.</div></td><td>显示新采集</td></tr><tr><td><div"),buf.push(attrs({"class":"hotkey"})),buf.push(">空格键</div></td><td>向下滚动</td></tr><tr><td><div"),buf.push(attrs({"class":"hotkey"})),buf.push(">Shift</div><span"),buf.push(attrs({"class":"plus"})),buf.push(">+</span><div"),buf.push(attrs({"class":"hotkey"})),buf.push(">空格键</div></td><td>向上滚动</td></tr></tbody></table><table"),buf.push(attrs({"class":"ln2"})),buf.push("><thead><tr"),buf.push(attrs({"class":"title"})),buf.push("><td>采集页</td></tr></thead><tbody><tr><td><div"),buf.push(attrs({"class":"hotkey"})),buf.push(">←</div></td><td>上一采集</td></tr><tr><td><div"),buf.push(attrs({"class":"hotkey"})),buf.push(">➝</div></td><td>下一采集</td></tr><tr><td><div"),buf.push(attrs({"class":"hotkey"})),buf.push(">F</div></td><td>查看大图  /  返回</td></tr><tr><td><div"),buf.push(attrs({"class":"hotkey"})),buf.push(">O</div></td><td>打开来源网址</td></tr><tr><td><div"),buf.push(attrs({"class":"hotkey"})),buf.push(">D</div></td><td>删除采集</td></tr><tr><td><div"),buf.push(attrs({"class":"hotkey"})),buf.push(">R</div></td><td>转采</td></tr><tr><td><div"),buf.push(attrs({"class":"hotkey"})),buf.push(">Shift</div><span"),buf.push(attrs({"class":"plus"})),buf.push(">+</span><div"),buf.push(attrs({"class":"hotkey"})),buf.push(">R</div></td><td>快速转采</td></tr></tbody></table></div>")}return buf.join("")},
__t["bidcms/board_view"]=function(locals){var buf=[];with(locals||{}){var interp,__val__=emerge("bidcms/header");buf.push(null==__val__?"":__val__);var board=page.board,user=board.user,user_url="index.php?con=user&uid="+user.urlname,board_url="index.php?con=boards&act=item&id="+board.board_id;if(!parseInt(board.is_private)&&req.user&&!board.category_id){buf.push("<div"),buf.push(attrs({id:"category_callout"})),buf.push("><div"),buf.push(attrs({"class":"wrapper"})),buf.push("><div"),buf.push(attrs({"class":"callout sheet"})),buf.push("><div"),buf.push(attrs({"class":"form clearfix"})),buf.push("><p>为这个画板添加个分类，让其他人更容易找到它。</p><div"),buf.push(attrs({"class":"picker"})),buf.push(">");var __val__=emerge("bidcms/category_picker");buf.push(null==__val__?"":__val__),buf.push("</div><div"),buf.push(attrs({"class":"Submit"})),buf.push("><a"),buf.push(attrs({href:"#",onclick:"return false;","class":"btn btn18 rbtn"})),buf.push("><strong> 提交</strong><span></span></a></div></div><div"),buf.push(attrs({style:"display: none;","class":"success"})),buf.push(">已成功设置分类，感谢你的支持。</div><div"),buf.push(attrs({"class":"clear"})),buf.push("></div></div></div></div>")}buf.push("<div"),buf.push(attrs({id:"board_nav_bar"})),buf.push("><div"),buf.push(attrs({id:"BoardTitle","class":"wrapper"})),buf.push("><h1>"+escape((interp=board.is_private==2?"待归类采集":board.title)==null?"":interp)+"<span"),buf.push(attrs({"class":"stats"})),buf.push(">(<span"),buf.push(attrs({"class":"count"})),buf.push(">"+escape((interp=board.pin_count)==null?"":interp)+"个采集"),board.is_private==2&&board.pin_count>500&&buf.push("，待归类采集数已达500上限"),buf.push("</span>)</span><em></em></h1><div"),buf.push(attrs({id:"BoardButton"})),buf.push("><a"),buf.push(attrs({id:"board_share_unit","data-id":""+board.board_id+"","data-name":""+(board.is_private==2?"待归类采集":board.title)+"","data-count":""+board.pin_count+"",href:"#",onclick:"return false;","class":"btn wbtn"})),buf.push("><ul"),buf.push(attrs({"class":"clearfix"})),buf.push("><li"),buf.push(attrs({alt:"新浪微博","class":"sina"})),buf.push(">微博</li><li"),buf.push(attrs({alt:"腾讯微博","class":"tqq"})),buf.push(">微博</li><li"),buf.push(attrs({alt:"QQ空间","class":"qzone"})),buf.push(">Qzone</li><li"),buf.push(attrs({alt:"豆瓣说","class":"douban"})),buf.push(">豆瓣</li><li"),buf.push(attrs({alt:"人人网","class":"renren"})),buf.push(">人人</li></ul><strong> 分享到</strong><span></span></a>"),req.user&&board.user_id===req.user.user_id?(board.is_private||(buf.push("<a"),buf.push(attrs({href:""+board_url+"/edit/","class":"edit btn btn13 wbtn"})),buf.push("><strong>编辑画板</strong><span></span></a>")),board.pins.length&&(buf.push("<a"),buf.push(attrs({href:"#",onclick:"return false;","class":"organize btn btn13 wbtn"})),buf.push('><strong> 批量管理采集</strong><span></span></a><script>(function(){app.pinOrganizer($$("#BoardButton .organize")[0])})()</script>'))):board.following?(buf.push("<a"),buf.push(attrs({"data-id":""+board.board_id+"",href:"#",onclick:"return false;","class":""+(board.is_private==2?"disabled":"unfollow")+""+" "+"btn"+" "+"wbtn"})),buf.push("><strong>取消关注</strong><span></span></a>")):(buf.push("<a"),buf.push(attrs({"data-id":""+board.board_id+"",href:"#",onclick:"return false;","class":""+(board.is_private==2?"disabled":"follow")+""+" "+"btn"+" "+"wbtn"})),buf.push("><strong>关注</strong><span></span></a>")),buf.push("</div></div></div><div"),buf.push(attrs({"class":"wrapper bl"})),buf.push("><div"),buf.push(attrs({id:"waterfall"})),buf.push("><div"),buf.push(attrs({id:"BoardMeta","class":"pin wfc topright"})),buf.push("><h3"),buf.push(attrs({"class":"nmt"})),buf.push(">创建者</h3><div"),buf.push(attrs({id:"BoardUser"})),buf.push("><a"),buf.push(attrs({href:"index.php?con=user&uid="+escape(user.urlname),title:escape(user.username),"class":"img x"})),buf.push("><img"),buf.push(attrs({src:avatar(user,undefined)})),buf.push("/></a><span"),buf.push(attrs({id:"BoardUserName"})),buf.push("><a"),buf.push(attrs({href:""+user_url+"/",title:""+user.username+"","class":"x"})),buf.push(">"+escape((interp=user.username)==null?"":interp)+"</a></span></div>"),board.category_id!=null&&(buf.push("<div"),buf.push(attrs({"class":"category-display"})),buf.push("><h3>所属分类</h3><a"),buf.push(attrs({href:"index.php?act=cate&id="+board.category_id,"class":"board-category x"})),buf.push(">"+escape((interp=board.category_name)==null?"":interp)+"</a></div>")),board.description&&(buf.push("<h3>画板描述</h3><p"),buf.push(attrs({"class":"board-description"})),buf.push(">"+escape((interp=board.description)==null?"":interp)+"</p>"));if(board.followers.length){buf.push("<h3>关注者"),board.follow_count>board.followers.length&&(buf.push("<span>(共"+escape((interp=board.follow_count)==null?"":interp)+"人，<a"),buf.push(attrs({href:"index.php?con=boards&act=followers&id="+board.board_id})),buf.push(">查看所有</a>)</span>")),buf.push("</h3><div"),buf.push(attrs({id:"BoardUsers"})),buf.push(">");for(var $index=0,$$l=board.followers.length;$index<$$l;$index++){var f=board.followers[$index];buf.push("<a"),buf.push(attrs({href:"index.php?con=user&uid="+escape(f.urlname),title:escape(f.username),"class":"img x"})),buf.push("><img"),buf.push(attrs({src:avatar(f,undefined)})),buf.push("/></a>")}buf.push("</div>")}if(board.siblings.length){buf.push("<div"),buf.push(attrs({"class":"clear"})),buf.push("></div><h3>其它画板</h3><div"),buf.push(attrs({id:"BoardBoards"})),buf.push(">");for(var $index=0,$$l=board.siblings.length;$index<$$l;$index++){var b=board.siblings[$index];buf.push("<a"),buf.push(attrs({href:"index.php?con=boards&act=item&id="+b.board_id,"class":"x"})),buf.push(">"+escape((interp=b.title.brief(18))==null?"":interp)+"<span"),buf.push(attrs({"class":"stats"})),buf.push(">"+escape((interp=b.pin_count)==null?"":interp)+"</span></a>")}buf.push("</div>")}buf.push("</div>");for(var $index=0,$$l=board.pins.length;$index<$$l;$index++){var pin=board.pins[$index],__val__=emerge("bidcms/pin_item",{user:user,pin:pin,board:board});buf.push(null==__val__?"":__val__)}buf.push('</div></div><script>(function(){app.initFollowButtons(),app.initLikeButtons(),app.initAddCommentButtons(),app.initThunderPinButtons(),window.addEvent("domready",function(){function f(){a.slide("out").get("slide").chain(function(){a.hide()})}var a=$("category_callout");if(!a||a.retrieve("initialized"))return;var b=a.getElement(".Submit a"),c=a.getElement(".form"),d=a.getElement(".success"),e=new CategoryPicker(a.getElement("div.CategoryPicker")),g=new Button(b,{click:function(){var a=e.getSelected();return a?(this.disable(),(new Request.JSON({url:"index.php?con=boards&act=setcate&id="+app.page.board.board_id,data:{category:a},onSuccess:function(a){a.err?alert(a.msg||app.COMMON_ERRMSG):(c.hide(),d.show(),setTimeout(f,2e3))},onFailure:function(){alert(app.COMMON_ERRMSG)},onComplete:function(){this.enable()}.bind(this)})).post(),!1):!1}});g.disable(),e.addEvent("select",function(){this.getSelected()?g.enable():g.disable()}),a.store("initialized",!0)})})(),function(a){var b=$("board_share_unit"),c=b.get("data-id"),d=b.get("data-name"),e=b.get("data-count"),f="http://"+app.host+"/index.php?con=boards&act=item&id="+c;if($$(".pin:not(#BoardMeta) img")[0])var g=$$(".pin:not(#BoardMeta) img")[0].get("src").replace("_fw192","_fw554");var h="这个画板值得一看 "+d+"("+e+"个采集)";$$("#board_share_unit li").addEvent("click",function(){var b=["url="+a(f)];if(this.className=="sina"){var c="http://v.t.sina.com.cn/share/share.php?";b.push("&appkey=2499394483"),g&&b.push("&pic="+a(g)),b.push("&ralateUid=2493118952"),b.push("&title="+a(h)),b.push("&ralateUid=2493118952")}else if(this.className=="douban"){var c="http://www.douban.com/recommend/?";b.push("&title="+a(h)),b.push("&comment="+a(h))}else if(this.className=="qzone"){var c="http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?";b.push("&title="+a(h)),g&&b.push("&pics="+a(g))}else if(this.className=="renren"){var c="http://widget.renren.com/dialog/share?";b.push("&title="+a(h)),b.push("&pic="+a(g)),b[0]=b[0].replace("url=","resourceUrl=")}else if(this.className=="tqq"){var c="http://share.v.t.qq.com/index.php?c=share&a=index&";b.push("&title="+a(h)),b.push("&appkey=801077561"),b.push("&pic="+a(g)),b.push("&assname=huaban20111114")}b=b.join(""),function(a,d,e){function f(){window.open([c,b].join(""),"mb",["toolbar=0,status=0,resizable=1,width=620,height=450,left=",(a.width-620)/2,",top=",(a.height-450)/2].join(""))||(u.href=[c,b].join(""))}/Firefox/.test(navigator.userAgent)?setTimeout(f,0):f()}(screen,document,encodeURIComponent)})}(encodeURIComponent),app._gaq_promotion&&app._gaq_promotion()</script>')}return buf.join("")},
__t["bidcms/pin_view_zoom"]=function(locals){var buf=[];with(locals||{}){var interp,pin=page.pin;buf.push("<div"),buf.push(attrs({id:"zoomr"})),buf.push("><div"),buf.push(attrs({id:"zoomr_toolbar"})),buf.push("><div"),buf.push(attrs({"class":"bg"})),buf.push("></div><div"),buf.push(attrs({"class":"fg"})),buf.push("><a"),buf.push(attrs({id:"zoomr_logo",href:"index.php"})),buf.push("><img"),buf.push(attrs({src:"static/bidcms/img/logo_grey.png",width:"98",height:"34",alt:"BidCms"})),buf.push("/></a><a"),buf.push(attrs({id:"zoomr_hide",href:"index.php?con=pins&act=item&id="+pin.pin_id,title:"返回"})),buf.push(">返回</a></div></div><div"),buf.push(attrs({id:"zoomr_body"})),buf.push("><img"),buf.push(attrs({id:"zoomr_img",src:""+imgURL(pin.file,suffix="")+"",width:""+pin.file.width+"",height:""+pin.file.height+"",alt:"采集图片"})),buf.push("/></div></div>")}return buf.join("")},
__t["bidcms/feed_list"]=function(locals){var buf=[];with(locals||{}){var interp;buf.push("<ol"),buf.push(attrs({"class":"activity"})),buf.push(">");for(var $index=0,$$l=feeds.length;$index<$$l;$index++){var f=feeds[$index],u=user||f.user,t=f.content.type,p=f.pin,b=f.board,fu=f.follow_user,tu=this.req.user?this.req.user.user_id:-1,ulink='<a href="index.php?con=user&uid='+u.urlname+'">'+(tu===u.user_id?"你":u.username)+"</a>";if(t=="pin"){buf.push("<li><a"),buf.push(attrs({href:"index.php?con=pins&act=item&id="+p.pin_id,"class":"img"})),buf.push("><img"),buf.push(attrs({src:imgURL(p.file,"sq75")})),buf.push("/></a>");var __val__=ulink;buf.push(null==__val__?"":__val__),buf.push("&nbsp;采集&nbsp;<a"),buf.push(attrs({href:"index.php?con=pins&act=item&id="+p.pin_id})),buf.push(">");var __val__=p.raw_text.brief(20);buf.push(null==__val__?"":__val__),buf.push("</a>&nbsp;到&nbsp;<a"),buf.push(attrs({href:"index.php?con=boards&act=item&id="+p.board_id})),buf.push(">");var __val__=p.board.is_private==2?"待归类采集":p.board.title.brief(18);buf.push(null==__val__?"":__val__),buf.push("</a></li>")}else if(t=="repin"){var vu=p.via_user,vul='<a href="index.php?con=user&uid='+vu.urlname+'">'+(tu===vu.user_id?"你":vu.username)+"</a>";buf.push("<li><a"),buf.push(attrs({href:"index.php?con=pins&act=item&id="+p.pin_id,"class":"img"})),buf.push("><img"),buf.push(attrs({src:imgURL(p.file,"sq75")})),buf.push("/></a>");var __val__=ulink;buf.push(null==__val__?"":__val__),buf.push("&nbsp;通过&nbsp;");var __val__=vul;buf.push(null==__val__?"":__val__),buf.push("&nbsp;转采了&nbsp;<a"),buf.push(attrs({href:"index.php?con=pins&act=item&id="+p.pin_id})),buf.push(">");var __val__=p.raw_text.brief(20);buf.push(null==__val__?"":__val__),buf.push("</a>&nbsp;到&nbsp;<a"),buf.push(attrs({href:"index.php?con=boards&act=item&id="+p.board_id})),buf.push(">");var __val__=p.board.is_private==2?"待归类采集":p.board.title.brief(18);buf.push(null==__val__?"":__val__),buf.push("</a></li>")}else if(t=="like"){buf.push("<li><a"),buf.push(attrs({href:"index.php?con=pins&act=item&id="+p.pin_id,"class":"img"})),buf.push("><img"),buf.push(attrs({src:imgURL(p.file,"sq75")})),buf.push("/></a>");var __val__=ulink;buf.push(null==__val__?"":__val__),buf.push("&nbsp;喜欢由&nbsp;<a"),buf.push(attrs({href:"index.php?con=user&uid="+p.user.urlname})),buf.push(">");var __val__=tu===p.user.user_id?"你":p.user.username;buf.push(null==__val__?"":__val__),buf.push("</a>&nbsp;采集的&nbsp;<a"),buf.push(attrs({href:"index.php?con=pins&act=item&id="+p.pin_id})),buf.push(">");var __val__=p.raw_text.brief(20);buf.push(null==__val__?"":__val__),buf.push("</a></li>")}else if(t=="comment"){buf.push("<li><a"),buf.push(attrs({href:"index.php?con=pins&act=item&id="+p.pin_id,"class":"img"})),buf.push("><img"),buf.push(attrs({src:imgURL(p.file,"sq75")})),buf.push("/></a>");var __val__=ulink;buf.push(null==__val__?"":__val__),buf.push("&nbsp;评论了由&nbsp;<a"),buf.push(attrs({href:"index.php?con=user&uid="+p.user.urlname})),buf.push(">");var __val__=tu===p.user.user_id?"你":p.user.username;buf.push(null==__val__?"":__val__),buf.push("</a>&nbsp;采集的&nbsp;<a"),buf.push(attrs({href:"index.php?con=pins&act=item&id="+p.pin_id})),buf.push(">");var __val__=p.raw_text.brief(20);buf.push(null==__val__?"":__val__),buf.push("</a></li>")}else if(t=="follow"){buf.push("<li>");var __val__=ulink;buf.push(null==__val__?"":__val__),buf.push("&nbsp;关注了&nbsp;<a"),buf.push(attrs({href:"index.php?con=user&uid="+b.user.urlname})),buf.push(">");var __val__=tu===b.user.user_id?"你":b.user.username;buf.push(null==__val__?"":__val__),buf.push("</a>&nbsp;的画板&nbsp;<a"),buf.push(attrs({href:"index.php?con=boards&act=item&id="+b.board_id})),buf.push(">");var __val__=b.is_private==2?"待归类采集":b.title.brief(18);buf.push(null==__val__?"":__val__),buf.push("</a></li>")}else if(t=="follow_people"){buf.push("<li>");var __val__=ulink;buf.push(null==__val__?"":__val__),buf.push("&nbsp;关注了&nbsp;<a"),buf.push(attrs({href:"index.php?con=user&uid="+fu.urlname})),buf.push(">");var __val__=tu===fu.user_id?"你":fu.username;buf.push(null==__val__?"":__val__),buf.push("</a></li>")}}buf.push("</ol>")}return buf.join("")}
})(app);