vovanan
[Code] Làm avatar drop menu Gần như mọi view
on 03/07/2013vovanan
loading...
Demo : http://club-zoom.5forum.net/t4406-topic#12509
Đầu Tiên Xóa code sau trong viewtopic:
- Code:
{postrow.displayed.profile_field.LABEL}
{postrow.displayed.profile_field.CONTENT}
Vào tìm code sau trong viewtopic :
- Code:
{postrow.displayed.POSTER_AVATAR}
Ẩn rồi trả lời đi
Thêm vào css:
- Code:
/* viewtopic*/
.pun .user {
overflow: visible;
}
.pun .user .user-info {
color: #000!important;
}
.cl dt{width:75px}
.cl dt span{color:#000!important}
.cl dd{width:110px}
.cl dd,.cl dt{float:left;height:1.6em;line-height:1.6em}
.morelink a{padding-right:13px}
.closeWIndowF{background-color:transparent;color:red;font-family:Arial,Helvetica,sans-serif;font-variant:small-caps;letter-spacing:-1px;opacity:1;text-decoration:none;text-transform:capitalize;font-size:20px;text-shadow:0 0 9px #eee 3px 0 1px #131313;font-weight:700;padding:5px}
.user .status{padding-right:20px;margin-bottom:-3px;color:green;float:right;width:250px;height:18px}
.posthead{background-color:transparent;font-size:9px;height:2.6em;left:-2px;position:absolute;text-align:center;top:-3.7em;width:15.3em;padding:.5em 1.3em .5em 1em}
.userInfoF {
position: absolute;
z-index: 301;
background: none repeat scroll 0 0 #fff;
border: 1px solid #cdcdcd;
box-shadow: 2px 2px 3px #ccc;
width: 520px;
display: none;
padding: 15px 0 15px 9px;
}
.user-info{float:right;width:370px}
.manuUserF{float:left;border-bottom:1px dashed;margin-bottom:5px;width:350px;position:relative}
.morelink{text-align: center;float:left;border-top:1px dashed;padding-top:5px;width:350px}
.useravatar img {
width: 135px;
height: 142px;
}
.ava_pt {
width: auto;
height: auto;
border: 1px solid #929294;
background: #FFF;
border-radius: 2px;
-moz-border-radius: 2px;
padding: 3px;
}
.userInfoF .ava_pt {
margin-left:-1px;
margin-top:-1px;
}
Tạo 1 js ở viewtopic:
- Code:
(function(d){function e(a){var b=a||window.event,c=[].slice.call(arguments,1),f=0,e=0,g=0,a=d.event.fix(b);a.type="mousewheel";b.wheelDelta&&(f=b.wheelDelta/120);b.detail&&(f=-b.detail/3);g=f;b.axis!==void 0&&b.axis===b.HORIZONTAL_AXIS&&(g=0,e=-1*f);b.wheelDeltaY!==void 0&&(g=b.wheelDeltaY/120);b.wheelDeltaX!==void 0&&(e=-1*b.wheelDeltaX/120);c.unshift(a,f,e,g);return(d.event.dispatch||d.event.handle).apply(this,c)}var c=["DOMMouseScroll","mousewheel"];if(d.event.fixHooks)for(var h=c.length;h;)d.event.fixHooks[c[--h]]=d.event.mouseHooks;d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=c.length;a;)this.addEventListener(c[--a],e,false);else this.onmousewheel=e},teardown:function(){if(this.removeEventListener)for(var a=c.length;a;)this.removeEventListener(c[--a],e,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);(function($){var F=$.fancybox;F.helpers.buttons={defaults:{skipSingle:false,position:'top',tpl:'<div id="fancybox-buttons"><ul><li><a class="btnPrev" title="Previous" href="javascript:;"></a></li><li><a class="btnPlay" title="Start slideshow" href="javascript:;"></a></li><li><a class="btnNext" title="Next" href="javascript:;"></a></li><li><a class="btnToggle" title="Toggle size" href="javascript:;"></a></li><li><a class="btnClose" title="Close" href="javascript:jQuery.fancybox.close();"></a></li></ul></div>'},list:null,buttons:null,beforeLoad:function(opts,obj){if(opts.skipSingle&&obj.group.length<2){obj.helpers.buttons=false;obj.closeBtn=true;return}obj.margin[opts.position==='bottom'?2]+=30},onPlayStart:function(){if(this.buttons){this.buttons.play.attr('title','Pause slideshow').addClass('btnPlayOn')}},onPlayEnd:function(){if(this.buttons){this.buttons.play.attr('title','Start slideshow').removeClass('btnPlayOn')}},afterShow:function(opts,obj){var buttons=this.buttons;if(!buttons){this.list=$(opts.tpl).addClass(opts.position).appendTo('body');buttons={prev:this.list.find('.btnPrev').click(F.prev),next:this.list.find('.btnNext').click(F.next),play:this.list.find('.btnPlay').click(F.play),toggle:this.list.find('.btnToggle').click(F.toggle)}}if(obj.index>0||obj.loop){buttons.prev.removeClass('btnDisabled')}else{buttons.prev.addClass('btnDisabled')}if(obj.loop||obj.index<obj.group.length-1){buttons.next.removeClass('btnDisabled');buttons.play.removeClass('btnDisabled')}else{buttons.next.addClass('btnDisabled');buttons.play.addClass('btnDisabled')}this.buttons=buttons;this.onUpdate(opts,obj)},onUpdate:function(opts,obj){var toggle;if(!this.buttons){return}toggle=this.buttons.toggle.removeClass('btnDisabled btnToggleOn');if(obj.canShrink){toggle.addClass('btnToggleOn')}else if(!obj.canExpand){toggle.addClass('btnDisabled')}},beforeClose:function(){if(this.list){this.list.remove()}this.list=null;this.buttons=null}}}(jQuery));function fullscreenFancy(){if(RunPrefixMethod(document,"FullScreen")||RunPrefixMethod(document,"IsFullScreen")){RunPrefixMethod(document,"CancelFullScreen")}else{RunPrefixMethod(document.body,"RequestFullScreen")}}var pfx=["webkit","moz","ms","o",""];function RunPrefixMethod(obj,method){var p=0,m,t;while(p<pfx.length&&!obj[m]){m=method;if(pfx[p]==""){m=m.substr(0,1).toLowerCase()+m.substr(1)}m=pfx[p]+m;t=typeof obj[m];if(t!="undefined"){pfx=[pfx[p]];return(t=="function"?obj[m]():obj[m])}p++}}if(GetParam('showpost')!=null){$('head').append('<style type="text/css">.pun .post,.post-options .options-button:nth-child(2),.contactF,#right,.center,#mudimPanel,#navbar,#pun-intro,.boxfmvi.main,.paged-head,.main-foot,.main-head,.paged-foot,#lastFMvi,.fmviToggle,#pun-foot,#add-google-bottom,.p-hidden,.autohidepost{display:none}#main-content{margin:-20px 0 -30px}.pun #p'+GetParam("showpost")+'{background-color:#FFF;display:block!important;position:relative;z-index:1000}#lean_overlay{background-color:#F9F9F9;display:block;opacity:1}.showpostZ{z-index: 10000; position: relative;}</style>')}function viewSfmvi(){$('head').append('<style id="styleF" type="text/css">.user-ident .user-basic-info, .pun .postfoot {display : none} .postmain > .posthead {margin-left : 0} .pun .post .an, .pun .postfoot, .pun .postmain, .user-ident .posthead {margin-left : 0pt} .post:hover .postfoot{display: block} .post .showfoot{height: 3em}</style>')}if(my_getcookie("viewtopicfmvi")=="ngang"){viewSfmvi()}imgauth="http://i48.servimg.com/u/f48/16/58/89/73/writer10.png";imgbanned="http://i48.servimg.com/u/f48/16/58/89/73/banned10.png";function voteajax(a,b){$.ajax({type:"POST",url:location.pathname+"?p_vote="+a+"&eval="+b})}function show_user(z){var dix=$("#userinfo"+z);var teus=dix.find(".user-info .khung:contains('Status')").hide().text();var teuser=dix.find(".user-info div:first a:first").text();var liuser=dix.find(".user-info div:first a").attr("href");var firstT=dix.parent().parent().prev().find("strong").text();dix.find(".Upro5").attr("href",liuser+"wall");dix.find(".Utopic").attr("href","http://"+location.host+"/spa/"+teuser);dix.find(".Ufrien").attr("href","/profile?friend="+teuser+"&mode=editprofile&page_profil=friendsfoes");if(teus.length>0){dix.find(".user-info .status").text(teus)}else{dix.find(".user-info .status").replaceWith('<span style="color:red"> ['+teuser+' chưa đăng phương châm sống]</span>')};if(dix.find(".user-info .fmviOnoff img").length==0){dix.find(".user-info .fmviOnoff").html('<img title="Offline" alt="Offline" src="http://i48.servimg.com/u/f48/16/58/89/73/icon_u11.gif" />')};dix.find(".userInfoF").show()}function hide_user(hu){$("#userinfo"+hu).find(".userInfoF").hide()}function comment_like(sl){if($("#FMvi_like"+sl).attr("class")!="likeNone"){var wall_like=$("#like"+sl+" em a").attr("href").match(/[0-9]+/);$("#like"+sl+" input,#like"+sl+" em,#like"+sl+" .closeFMvi_like").show();$("#FMvi_like"+sl).removeClass().addClass("likeNone");sendbot("thích bài viết [url=http://"+location.host+$("#p"+sl+" .tieudeT").attr("href")+"]"+$("#ch_title").text()+"[/url]");var numthich=$("#like"+sl+" p").text().match(/[0-9]+/);if(numthich==null){$("#like"+sl+" p").text("Bạn là người đầu tiên thích bài viết này")}else{$("#like"+sl+" p").text("Bạn và "+numthich+" người khác đã thích bài viết này")}}}function report_like(rl){if($("#FMvi_like"+rl).attr("class")!="likeNone"){var numtru=eval($("#FMvi_like"+rl).parent().next().find("font").text())+1;voteajax(rl,'minus');$("#FMvi_like"+rl).parent().next().find("font").text(numtru)}$("#FMvi_like"+rl).removeClass().addClass("likeNone");sendbot("không thích bài viết [url=http://"+location.host+$("#p"+rl+" .tieudeT").attr("href")+"]"+$("#ch_title").text()+"[/url]");var report=confirm("Bạn có muốn gửi một báo cáo đến người quản lý");if(report==true){window.location.replace("http://"+location.host+"/report?mode=report&p="+rl)}}function close_like(ll){voteajax(ll,'plus');var userX_like=$("#userID").text();var user_like=$("#like"+ll+" em a").text();var uid=$("#like"+ll+" em a").attr("href").split("/u")[1];var linkXpost="[url=http://"+location.host+location.pathname+"?showpost="+ll+"]"+$(".tieudeT:first").text()+"[/url]";var inputX_like=$("#like"+ll+" input").val();if(inputX_like==""){var quoteXlike=""}else{var quoteXlike='
[quote="+userX_like+"]'+inputX_like+'[/quote]'};var messXwall=userX_like+' thích bài viết của bạn tại '+linkXpost+quoteXlike;$.ajax({type:"POST",url:"/privmsg",data:{subject:"[Tin nhắn tự động]",message:messXwall,username:user_like,u:uid,mode:"post_profile",folder:"profile","auth[]":$("input[name='auth\[\]']:first").val(),post:"Send"},success:function(){}});$("#nub"+ll+",#like"+ll+",#like"+ll+" .closeFMvi_like,#like"+ll+" input,#like"+ll+" em").hide()}function send_comment(event,sc){if(event.keyCode==13){close_like(sc)}}function show_like(cl){$("#nub"+cl+", #like"+cl).show()}function hide_like(hl){if($("#like"+hl+" .closeFMvi_like").css("display")=="none"){$("#nub"+hl+", #like"+hl).hide()}}function reportVot(r){r.parent().next().show().css("background-color","#000");r.parent().remove()}function selectCode(a){var e=$(a).closest('.codebox').find('CODE')[0];if(window.getSelection){var s=window.getSelection();if(s.setBaseAndExtent){s.setBaseAndExtent(e,0,e,e.innerText.length-1)}else{if(window.opera&&e.innerHTML.substring(e.innerHTML.length-4)=='<BR>'){e.innerHTML=e.innerHTML+' '}var r=document.createRange();r.selectNodeContents(e);s.removeAllRanges();s.addRange(r)}}else if(document.getSelection){var s=document.getSelection();var r=document.createRange();r.selectNodeContents(e);s.removeAllRanges();s.addRange(r)}else if(document.selection){var r=document.body.createTextRange();r.moveToElementText(e);r.select()}}function repfmvi(a){if($("#logout").length){if($("#pun-qpost").length){a.parents(".post").after($("#_comments"));$("#_comments").fadeIn("slow")}else{fmvitip("error","Lỗi!","Bạn không được phép bình luận tại chuyên mục này.")}}else{fmvitip("error","Lỗi!","Bạn cần phải đăng nhập để có thể sử dụng chức năng này.")}stip()}function sendreply(a,b,c,d){$.ajax({type:"POST",url:"/post",data:{mode:"reply",subject:a,message:b,t:c,lt:d,"auth[]":$("input[name='auth\[\]']:last").val(),post:"Send"},success:function(data){if($(data).find(".frm-form").length&&$(data).find("#main-content .main-content>p.p-hidden").length){sendreply(a,b,c,$(data).find(".frm-buttons input[name='lt']").val())}else if($(data).find("#main-content .main-content>p.center").length){fmvitip("error","Bạn chưa thể gửi bài vào lúc này!","Vui lòng chờ <span style='color:red'>"+$(data).find(".main-content p.center").text().match(/\d+/)+"</span> giây giữa hai lần gửi bài.");stip()}else if($(data).find(".frm-form").length==0){lirep=$(data).find(".main-content.message p.message a:first").attr("href");fmvitip("success","Bài của bạn đã được gửi thành công!","<a href='"+lirep+"'>Click vào đây để xem bài viết</a>.");window.scrollTo(0,$("#_comments").offset().top);$.ajax({type:"GET",url:lirep,success:function(data){$(data).find(".post:last").css("border","1px solid #216A8C").insertAfter("#_comments");$("#quick_reply input[name='auth\[\]']:last").val($(data).find("#quick_reply input[name='auth\[\]']:last").val());ajaxreplyfmvi();fancyapp();fcshow()}});$("#quick_reply input[name='lt']").val($(data).find("#quick_reply input[name='lt']").val());$("#noidungQR").val("");$("#_comments").fadeOut("slow");stip()}}})}function replyfmvi(){var k=$("#noidungQR").val().length;if(k<20){var h=20-k;fmvitip("error","Lỗi!","Nội dung quá ngắn, bạn cần phải gõ ít nhất <span style='color:red'>"+h+"</span> ký tự nữa.");stip()}else{var a=$("#noidungQR");(/\[item\=(.*?)\]((\n|.)*?)\[\/item\]/gi.test(a)&&/\[tab(\swidth\=((\d{0,3}(px|em|%|pt)?)|auto)?)?\]((\n|.)*?)\[\/tab\]/gi.test(a)||/\
((\n|.)*?)\[\/td\]/gi.test(a)&&/\[column\]((\n|.)*?)\[\/column\]/gi.test(a))&&$("#text_editor_textarea").val(a.replace(/\[item\=(.*?)\]((\n|.)*?)\[\/item\]/gi,"
[*][b]$1[/b]$2").replace(/\[tab(\swidth\=((\d{0,3}(px|em|%|pt)?)|auto)?)?\]((\n|.)*?)\[\/tab\]/gi,"
[table class="fmvitab$1"][tr][td][list]
$5[/list]
[/td]
[/tr]
[/table]
[*]").replace(/\
((\n|.)*?)\[\/td\]/gi,"$4
").replace(/\[column\]((\n|.)*?)\[\/column\]/gi,"$1
").replace(/\s(width=%)/gi,"").replace(/\s(class=\])/gi,"]"));sendreply("Re: "+$(".tieudeT:first").text(),$("#noidungQR").val(),$("#tidX").text(),$("#quick_reply input[name='lt']").val())}}function ajaxreplyfmvi(){linkfancy();fmviAA();$(".entry-content a[href$='tooltip_name#tooltip']").attr({"onmouseover":"show_tooltip(this, $(this).next('.tooltip_data').find('td:first').html(), 'FMvi.vn')","onclick":"return false"});$(".fmvitab").each(function(){var a=$(this);a.find("td:first > ul:first > li > strong:first-child").prependTo(a.find("td:first"));a.show().find("td:first > ul:first > li:first, td:first > strong:first").addClass("active");a.find("td:first > strong").click(function(){var b=a.find("td:first > strong").index(this);a.find("td:first > ul:first > li, td:first > strong").removeClass("active");a.find("td:first > ul:first > li:eq("+b+"), td:first > strong:eq("+b+")").addClass("active")})});$("img[src='http://i48.servimg.com/u/f48/16/58/89/73/flag_r10.png']").parent().each(function(){$(this).prependTo($(this).next().find("cite:first"))});$(".user-info dt:contains('Status'), .user-info dt:contains('avatar-data')").hide().next().hide();$(".user-info .fmviOnoff br").remove();$(".FMvi-like").fadeIn(1000);$('.codebox dt').not("dl.spoiler > dt").html('Code: <a href="javascript:void()" onclick="selectCode(this)">Chọn toàn bộ</a><a href="javascript:void()" onclick="viewcode(this)">Màu nổi bật </a>');var wq;for(wq=0;wq<$(".FMvi-like").length;wq++){if($(".rankimg img:eq("+wq+")").attr("src")==imgbanned){$(".main-content.topic .post:eq("+wq+")").hide().before('<div class="autohidepost" style="padding:10px"><p style="color: rgb(61, 137, 242); text-align: center; padding: 5px; font-size: 14px;" class="closeWIndowF">Bài viết này đã được ẩn do người viết vi phạm nội quy</p><p onclick="reportVot($(this))" class="reportVote closeWIndowF" style="font-size: 15px ! important; text-align: center;cursor: pointer;">Click vào đây để hiển thị bài viết</p></div>')}if($(".FMvi-like:eq("+wq+") .vote-bar").length==1){var numX=$(".FMvi-like:eq("+wq+") .vote-bar").attr("title").split(" ");var mX=parseInt(numX[3].replace(/%/,""))/100;var nX=parseInt(numX[4].replace(/\(/,""));plus=String(Math.round(mX*nX));minus=String(nX-plus);$(".FMvi-like:eq("+wq+") .nolikeminus font").text(minus);$(".commentLike:eq("+wq+") p").text(plus+" thành viên thích bài viết này");if((plus>3&&minus>plus*2)||(plus==0&&minus>5)){$(".post:eq("+wq+")").hide().before('<div class="autohidepost" style="padding:10px"><p style="color: rgb(61, 137, 242); text-align: center; padding: 5px; font-size: 14px;" class="closeWIndowF">Bài viết này đã được ẩn do bị xếp hạng thấp</p><p onclick="reportVot($(this))" class="reportVote closeWIndowF" style="font-size: 15px ! important; text-align: center;cursor: pointer;">Click vào đây để hiển thị bài viết</p></div>')}}else{$(".commentLike:eq("+wq+") p").text("Chưa có đánh giá cho bài viết này")}if($(".FMvi-like:eq("+wq+")").find(".likeplus").length==1){$(".FMvi-like:eq("+wq+") .likeNone").removeClass().addClass("likePro")}}}function linkfancy(){if($(".entry-content a[href*='www.youtube'][href*='v=']").length){var yt=document.createElement("script");yt.type="text/javascript";yt.async=true;yt.src="http://www.youtube.com/player_api";var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(yt,s)}$(".entry-content").find("a[href$='.jpeg'], a[href$='.bmp'], a[href$='.jpg'], a[href$='.png'], a[href$='.gif']").not("a.vlightbox").not("a.iconPlayer").each(function(){if(/imageshack\.us/i.test($(this).attr("href"))){$(this).attr("href",$(this).attr("href").replace(/\/\/img(\d+)\./,"//a."))}$(this).addClass("vlightbox").attr("rel","flb-"+$(this).parents(".post").attr("id"))});set_fancy()}function fancyapp(){$(".entry-content img").not(".fancy-ytb img").each(function(){if(!/illiweb|smiles/i.test($(this).attr("src"))&&$(this).height()>100&&$(this).width()>100&&$(this).attr("class")!="fcim"&&$(this).parent().attr("class")!="vlightbox"){if("708"==$("#tidX").text()){$(this).replaceWith('<span class="fmvichange"><span onClick="avatarfmvi(\''+$(this).attr('src')+"','"+$('#numID').text()+"','"+$('#userID').text()+'\')" class="changeatvar">Thay avatar</span><img class="fcim" alt="www.fmvi.vn" src="'+$(this).attr('src')+'" /></span>')}else{$(this).addClass("fcim").wrap('<a rel="flb-'+$(this).parents('.post').attr('id')+'" class="vlightbox" href="'+$(this).attr("src")+'"></a>')}}});$(".entry-content").each(function(){var $k=$(this).find(".vlightbox");$k.each(function(z){$(this).attr("caption",(z+1)+" / "+$k.length)})});set_fancy()}function set_fancy(){if(/Gecko|WebKit/.test(navigator.userAgent)){var bv='<li><a class="btnFullscreen" title="Toggle fullscreen" href="javascript:;" onclick="fullscreenFancy()"></a></li>'}else{var bv=''}$(".vlightbox").fancybox({fitToView:true,prevEffect:'elastic',nextEffect:'elastic',autoSize:true,closeClick:false,openEffect:'elastic',closeEffect:'elastic',closeBtn:false,helpers:{title:{type:'over'},overlay:{closeClick:false},buttons:{position:'bottom',tpl:'<div id="fancybox-buttons"><ul><li><a class="btnPrev" title="Previous" href="javascript:;"></a></li><li><a class="btnPlay" title="Start slideshow" href="javascript:;"></a></li><li><a class="btnNext" title="Next" href="javascript:;"></a></li><li><a class="btnToggle" title="Toggle size" href="javascript:;"></a></li><li><a class="btnClose" title="Close" href="javascript:jQuery.fancybox.close();"></a></li>'+bv+'</ul></div>'}},beforeLoad:function(){if($(this.element).attr('caption')!=undefined){this.title=$(this.element).attr('caption')+' / '+$('a.vlightbox').length}}})}function onPlayerReady(event){event.target.playVideo()}function onPlayerStateChange(event){if(event.data===0){$.fancybox.next()}}function onYouTubePlayerAPIReady(){$("a[href*='www.youtube'][href*='v=']").each(function(){var a=urlParam("v",$(this).attr("href"));if(/list=/.test($(this).attr("href"))){var b="&list="+urlParam("list",$(this).attr("href"));var d='<span></span>'}else{var b=d=""}var c='http://www.youtube.com/embed/'+a+'?autoplay=1&wmode=opaque'+b;$(this).replaceWith('<p class="fancy-ytb">'+d+'<a class="iconPlayer fancybox.iframe" href="'+c+'" rel="ytb-'+$(this).parents('.post').attr('id')+'" targe="_blank"></a><img alt="youtube" width="480" height="260" src="http://i3.ytimg.com/vi/'+a+'/0.jpg" /></p>')});$(".iconPlayer").fancybox({width:853,height:480,openEffect:'none',closeEffect:'none',nextEffect:'none',prevEffect:'none',tpl:{next:'<a title="Next" style="right:-50px;width:50px" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" style="left:-50px;width:50px" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},beforeShow:function(){var id=$.fancybox.inner.find('iframe').attr('id');var player=new YT.Player(id,{events:{'onReady':onPlayerReady,'onStateChange':onPlayerStateChange}})}})}function fmviAA(){var a,b;$(".Umoney").each(function(){a=$(this).parents(".user-info").find("dt:contains('avatar-data')").next().text();b=$(this).parents(".user-info").find("dt:contains('Gender')").next().children().attr("src");if(!a.length){if(b=="http://2img.net/i/fa/subsilver/icon_minigender_female.gif"){a="57,13098|49,13095|64,12636|48,13097"}else{a="57,13098|49,13094|64,12636|48,13096"}}$(this).attr("href","http://my.go.vn/swf/avatar_editable.swf?itempath=http://farm01.gox.vn/avatar/store/avatar_part_item/&browser=Other&itemlist="+a)}).fancybox({width:255,height:388})}$(function(){if(my_getcookie("viewtopicfmvi")=="ngang"){$("#changeSfmvi img").toggle()}$("#changeSfmvi").click(function(){$("#changeSfmvi img").toggle();if(my_getcookie("viewtopicfmvi")=="ngang"){$("#styleF").remove();document.cookie="viewtopicfmvi=; expires=Monday, December 1, 2010 0:0:0 AM;";fmvitip("success","Thông báo:","Xem bài viết chế độ chuẩn.")}else{viewSfmvi();my_setcookie("viewtopicfmvi","ngang",true);fmvitip("success","Thông báo:","Xem bài viết dạng thu gọn.")}stip()});$("#_comments .blog_comment-avatar.repZ").html($(".avatarUn a img").clone());var tieude=$(".tieudeT:first").text().replace(/[?!(?!)\s+]/g,'+');searchtopic('/search?search_keywords='+tieude,'5','#lienquan ul');ajaxreplyfmvi()});function viewcode(a){var he=$(a).parents(".codebox").find("code").height()+50;if(he>=600){he=600}top_val=(screen.height-he)/2-10;0>top_val&&(top_val=0);left_val=(screen.width-1000)/2-5;var code=$(a).parents(".codebox").find("code").html();var fmviSC=window.open("",null,"toolbar=0,location=0,status=1,menubar=0,scrollbars=1,resizable=1,width=1000,height="+he+", top="+top_val+",left="+left_val);fmviSC.document.write('\<\!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"\>\<html\>\<head\>\<link rel="shortcut icon" type="image/x-icon" href="http://dl.dropbox.com/u/126946313/FMvi/Image/faviconfm.ico" /\>\<meta name="language" content="en" /\>\<meta name="description" content="Hướng dẫn - Chia sẽ - Phát triển ứng dụng cho Forumotion" /\>\<meta name="keywords" content="VietnameseForumotion, FMvi.org, FMvi.tk, Fmvi-Group, Free forum, Templastes, HTML, JavaScript, JQuery, Forumotion, Support, TUT, Share, Free, Easy, Simple" lang="en" /\>\<meta name="robots" content="index, follow, noodp" /\>\<meta name="google-site-verification" content="c5k20fjsxZJqQF83Ldn3cySwds1MUd8CFhUBpIVPXUo" /\>\<meta http-equiv="content-type" content="text/html; charset=utf-8" /\>\<title\>view code - www.fmvi.vn\</title\>\<link rel="stylesheet" href="http://dl.dropbox.com/u/126946313/FMvi/CSS%20code.css" type="text/css" /\>\</script\>\</head\><body id="codefmvi"\>\<pre class="prettyprint linenums"\>'+code+'\</pre\>\<script type="text/javascript" src="http://dl.dropbox.com/u/126946313/Fmvi/viewcode.js"\>\</script\>\</body\>\</html\>');fmviSC.document.close()}