Pages: 123

  2008-09-27 08:17:20

anoer
» FTalkAddict
FTalk Level: zero
467
0
1969-12-31

Re: Membuat Public Comment Box berformat Tabs [b][update 15-09-2008][/b] Menambah option optOwnBox, supaya Public Comment bisa ditaruh di addBox(...) [b]Update Log:[/b] [spoiler][b][update 13-09-2008][/b

:arrow: [b]bimbi[/b] Coba aja dulu langsung copast JS nya bagian di [b]C[/b] [spoiler]/Put you text, picture etc. in this HTML string var strMyTCLayout = "<br><br><table align='center'><tr><td width='150px' bgcolor='#C8E458' ><div align='center'>Insert your image here</div></td><td width='300px'><div style='text-align:center'>The greatest pain is <span style='color:skyblue'>Loneliness</span>.<br>I stand in front of everyone, looking for comfort..<br>but all I see are eyes of disgust.<br>Someday I will become Hokage,<br>and let everyone acknowledge my <span style='color:skyblue'>STRENGTH</span>.</div></td></tr></table>"; //Do not edit this var -- arrTabsComments, n don't forget to include this var arrTabsComments = []; tflTabsComment(arrTabsComments,strMyTCLayout,'fade',1500); // function tflTabsComment(v,w,x,y,z){ //tflTabsComment [update 15-09-2008] //by tekfatliu, copyright 2008 http://profiles.friendster.com/47964002 //credits: tekfatliu, mooTools //licensed under GNU General Public License, version 2 http://www.gnu.org/licenses/gpl.html //Disclaimer: NO GUARANTEE and WARRANTY provided! For educational purposes only. //Author will not be liable of ANY damage through the use of this program function tflMakeTab(x,y){ var b=new Array("1st","2nd","3rd","4th","5th","6th","7th","8th","9th","10th");var c="";var d="";var e="#"+y+" div.fitem1wrapper";var f="#"+y+" div.viewall";$$(e).each(function(a,i){c+="<li><a href='javascript:void(0)' title='"+b[i]+" Comment'>"+b[i]+"</a></li>";d+="<div id='tfltabcontent"+b[i]+"' class='tfltabcontent'><div class=fitem1wrapper>"+a.innerHTML.replace(/<script(.+?)script>/i," ")+"</div></div>"});$(y).setHTML(x+"<div style='padding:15px'>"+$$(f)[0].innerHTML+"</div><a name='tflWasHere'></a><div><ul id='tfltabpanel' class='tfltpwrapper'>"+c+"</ul></div><div class='tfltcwrapper'>"+d+"</div>")} function tflSetClickEvent(x,y,z){ $$('#tfltabpanel li a').each(function(c,i){(y=='slide')?x.push(new Fx.Slide($$('.tfltcwrapper div.fitem1wrapper')[i],{duration:z})):x.push(new Fx.Style($$('.tfltcwrapper div.fitem1wrapper')[i],'opacity',{duration:z}));c.addEvent('click',function(el){if(!$(c).hasClass('selected')){$$('#tfltabpanel li a').each(function(a,i){if($(a).hasClass('selected')){(y=='slide')?x[i].slideOut():x[i].start(1,0);$(a).removeClass('selected');$$('.tfltcwrapper div.tfltabcontent')[i].removeClass('enabled')}});var b="tfltabcontent"+$(c).innerHTML;$(c).addClass('selected');$(b).addClass('enabled');(y=='slide')?x[i].slideIn():x[i].start(0,1)}});if(i==0){$$('#tfltabpanel li a')[i].addClass('selected');$$('div.tfltabcontent')[i].addClass('enabled')}else{(y=='slide')?x[i].slideOut():x[i].set(0)}})}x=x||'slide';y=y||1000;z=z||'18';z='content_'+z;if(z!="content_18"){$(z).setHTML($('content_18').innerHTML);$('content_18').setHTML("")}tflMakeTab(w,z);tflSetClickEvent(v,x,y)}//end of tflTabsComment();[/spoiler] Kemudian masukin [b]CSS[/b] nya juga [spoiler].tfltpwrapper{float:right;padding-right:10px;} .tfltpwrapper li{float:left;} .tfltpwrapper li a{ background-image: url("http://tekfatliu.web44.net/FS/images/3dtabx.gif"); background-position: left bottom; background-repeat: no-repeat; width: 36px; height: 15px; text-align: center; color: #fff; padding: 5px 0; display: block; font-family:Arial, Helvetica, sans-serif; font-size:10px; } .tfltpwrapper li a:hover{background-position: left top;color: #ffcc66;} .tfltpwrapper li a.selected{background-position: left center;color: #ffcc66;font-weight:bold;} .tfltabcontent{ width:400; height:340; border-top:#32415a solid 10px; overflow-x:hidden; overflow-y:auto; padding-top:4px; display:none; } .enabled{display:block} .tfltcwrapper{clear:both}[/spoiler] klo scriptnya dah bisa jalan, terserah kamu deh, mo di edit :) ato tampilannya default aja :D

Pages: 123

Board footer

© 2025 F Talk

Current time is 04:39

[ 12 queries - 0.008 second ]
Privacy Policy