Pages: 12

  2008-08-25 08:14:37

KaNaLiTnUk
» FTalkFreak
FTalk Level: zero
1911
0
1969-12-31

[b]Credits[/b] : Angell de Ville (Slide Comment) and Feruzz (Commentor Box) [b]Preview[/b] : [url]http://profiles.friendster.com/bangkanal[/url] (FF view) This a simple JS trick combination for comme

[b]Credits[/b] : Angell de Ville (Slide Comment) and Feruzz (Commentor Box) [b]Preview[/b] : [url]http://profiles.friendster.com/bangkanal[/url] (FF view) This a simple JS trick combination for commentor box (PS : I remove the smileys :D) and also make your comment slide automatically. Just add this script into you main JS :) :arrow: [b]FF user script :[/b] [spoiler]comLinks=content_18.getElementsByTagName("div")[0].innerHTML document.getElementById("18").style.display="none" navBg.innerHTML+="<div id='myComments' class='commonbox myComments'>" +"<h2>Testimonials and Comments for "+pageOwnerFName+"</h2>" +"<div id='content_myComments'>" +"<div class='viewall'>" +comLinks +"</div>" +"<div class='fitem1wrapper' id='fitem1wrapperCom'>" +"</div>" +"</div>" +"</div>" document.getElementById("6").parentNode.appendChild(myComments) testiCount=0 slideTesti=new Array() function getComments(){ a=content_18 b=a.getElementsByTagName('table') for(x=0;x<b.length;x++){ slideTesti[x]=b[x].innerHTML } tickComments() } function tickComments(){ if(testiCount<b.length){ fitem1wrapperCom.innerHTML=slideTesti[testiCount] testiCount++ if(testiCount==slideTesti.length){ testiCount=0 } setTimeout("tickComments()",5000) } } if(navigator.appName.indexOf("Netscape")!=-1){ getComments() } if (!attachOnLoadHandler(function(){COMMENTOR.init();})) window.onload = function(){COMMENTOR.init();}; if (typeof COMMENTOR == "undefined") { COMMENTOR = {}; } COMMENTOR = { comment: [], init: function() { this.comment = document.getElementById("content_myComments").getElementsByTagName("div")[0]; this.comment.innerHTML = "<div class=\"viewall\" id=\"quickreply\"><center>"+ "<form name=\"testimonial_form\" method=\"post\">"+ "<input type=\"hidden\" name=\"testimonial_firstname\" value=\""+pageOwnerFName+"\">"+ "<input type=\"hidden\" name=\"testimonial_uid\" value=\""+pageViewerID+"\">"+ "<input type=\"hidden\" name=\"_submitted\" value=\"1\">"+ "<table class=\"formtable\"><tr><td class=\"value\">"+ "<textarea id=\"thingy\" rows=\"5\" cols=\"100\" name=\"body\"></textarea>"+ "</td></tr><tr><td class=\"value\">"+ "<input readonly type=\"hidden\" name=\"inputcount\" size=\"4\" maxlength=\"4\" value=\"1000\">"+ "<input style='padding: 4px 0; margin: 10px 0 6px 0;font-family:Arial;font-weight:bold;color:#17728f;border:1px solid #196B91;background-color:#ffffff' type=\"button\" name=\"Submit\" onMouseOver=\"window.status='Post';return true;\" onClick=\"document.testimonial_form.action='http://www.friendster.com/testimonials.php?uid="+pageOwnerID+"&action=add';document.testimonial_form.submit();\" value=\"Submit\"> "+ "<input style='padding: 4px 0; margin: 10px 0 6px 0;font-family:Arial;font-weight:bold;color:#17728f;border:1px solid #196B91;background-color:#ffffff' class=\"cancelButtons\" type=\"reset\" name=\"cancel\" value=\"Clear\" maxlength=\"25\"><br>"+ "</td></tr></table></form></center></div><br><hr><br>"; } };[/spoiler] :arrow: [b]IE user script :[/b] [spoiler]comLinks=content_18.getElementsByTagName("div")[0].innerHTML document.getElementById("18").style.display="none" navBg.innerHTML+="<div id='myComments' class='commonbox myComments'>" +"<h2>Testimonials and Comments for "+pageOwnerFName+"</h2>" +"<div id='content_myComments'>" +"<div class='viewall'>" +comLinks +"</div>" +"<div class='fitem1wrapper' id='fitem1wrapperCom'>" +"</div>" +"</div>" +"</div>" document.getElementById("6").parentNode.appendChild(myComments) testiCount=0 slideTesti=new Array() function getComments(){ a=content_18 b=a.getElementsByTagName('table') for(x=0;x<b.length;x++){ slideTesti[x]=b[x].innerHTML } tickComments() } function tickComments(){ if(testiCount<b.length){ fitem1wrapperCom.innerHTML=slideTesti[testiCount] testiCount++ if(testiCount==slideTesti.length){ testiCount=0 } setTimeout("tickComments()",5000) } } getComments() if (!attachOnLoadHandler(function(){COMMENTOR.init();})) window.onload = function(){COMMENTOR.init();}; if (typeof COMMENTOR == "undefined") { COMMENTOR = {}; } COMMENTOR = { comment: [], init: function() { this.comment = document.getElementById("content_myComments").getElementsByTagName("div")[0]; this.comment.innerHTML = "<div class=\"viewall\" id=\"quickreply\"><center>"+ "<form name=\"testimonial_form\" method=\"post\">"+ "<input type=\"hidden\" name=\"testimonial_firstname\" value=\""+pageOwnerFName+"\">"+ "<input type=\"hidden\" name=\"testimonial_uid\" value=\""+pageViewerID+"\">"+ "<input type=\"hidden\" name=\"_submitted\" value=\"1\">"+ "<table class=\"formtable\"><tr><td class=\"value\">"+ "<textarea id=\"thingy\" rows=\"5\" cols=\"100\" name=\"body\"></textarea>"+ "</td></tr><tr><td class=\"value\">"+ "<input readonly type=\"hidden\" name=\"inputcount\" size=\"4\" maxlength=\"4\" value=\"1000\">"+ "<input style='padding: 4px 0; margin: 10px 0 6px 0;font-family:Arial;font-weight:bold;color:#17728f;border:1px solid #196B91;background-color:#ffffff' type=\"button\" name=\"Submit\" onMouseOver=\"window.status='Post';return true;\" onClick=\"document.testimonial_form.action='http://www.friendster.com/testimonials.php?uid="+pageOwnerID+"&action=add';document.testimonial_form.submit();\" value=\"Submit\"> "+ "<input style='padding: 4px 0; margin: 10px 0 6px 0;font-family:Arial;font-weight:bold;color:#17728f;border:1px solid #196B91;background-color:#ffffff' class=\"cancelButtons\" type=\"reset\" name=\"cancel\" value=\"Clear\" maxlength=\"25\"><br>"+ "</td></tr></table></form></center></div><br><hr><br>"; } };[/spoiler] [b]Addition:[/b] if you want to control the size of the images posted in your slide comment, just add this CSS extension : [quote]#fitem1wrapperCom .data img { width:[b]320[/b]; }[/quote] Just edit the bold part OK. Happy tweaking FTalk'ers :thumbsup: [b][u]UPDATE[/u] :[/b] Due to FS updates recently, you must add this script inside your CSS extension to hide the default testimonial box : [quote]head:first-child + body .publiccomments{display:none!important}[/quote]

Last edited by KaNaLiTnUk (2008-10-14 12:38:11)

Pages: 12

Board footer

© 2024 F Talk

Current time is 17:21

[ 12 queries - 1.266 second ]
Privacy Policy