
First of all, please familiarize yourself with all the codes & take note of the difference between css & js.
The topic here is about compiling js so don't be asking about css considered only if you are asking about css injection
Important Note:When adding lots of js codes especially with onload handlers, you don't have to put each onload handlers of the js you want to add...Examples are provided below.
=>When compiling Feruzz codes or other scripts with named.init function inside tracker js, always put the named.init function after onload handler & or after addBox("My viewers",TRACKER.div.innerHTML,"tracker","right"); of your wvm & the rest of the codes outside your tracker codes where it informs you the end of miscellaneous function => /*END MISC FUNCTIONS*/
For an example application of this please refer to guide number 5.
1) I'm going to start with using wvm- tracker.js as the main js file.
Adding sidebars:
The very first thing that you should take note of is the function that you are going to use when adding sidebars.
Example using v2.1:
Version 2.1 has this function inside:
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
0 = controlpanel
1 = photos
13 = blogs
12 = reviews
6 = moreabout
18 = publiccomments
10 = scrapbook
RIGHT
15 = meettrail
2 = friends
14 = googleads
7 = fan
8 = groups
null - appends to lastOriginal Marfi's version3.1.1 have this addbox function:
function addBox(head,code,id,siblingafter) {
/*
head:
html string title
null - no header bar
code:
html string content
id:
unique string css pointer
siblingafter:
regexp classname
'left' - mainbar column end
'right' - sidebar column end
*/
try {
var li=document.createElement("li");
} catch(e) {
var li=document.createElement("<li>");
}
if(!head) head="";
else head="<h2>"+head+"</h2>";
li.innerHTML="<div id=\""+id+"\" class=\"commonbox "+id+"\">"+
head+
"<div id=\"content_"+id+"\">"+
code+
"</div>"+
"</div>";
if(siblingafter=="left") getElementsByClass(/commonbox[\s]*?controlpanel/i,null,"DIV")[0].parentNode.parentNode.appendChild(li);
else if(siblingafter=="right") getElementsByClass(/commonbox[\s]*?friends/i,null,"DIV")[0].parentNode.parentNode.appendChild(li);
else {
var si=getElementsByClass(siblingafter,null,"DIV")[0];
si.parentNode.parentNode.insertBefore(li,si.parentNode);
}
}
So as you can see the v2.1 & v3.1.1 uses different div id's. Whichever you are using should follow the sibling,that you will input.
Example you want to add chatbox inside your wvmversion2.1. The sibling you should use is number, as shown below:
addBox("RIGHT","My Chat Box",cbox,"CHIKACHIKABOOMBOOM","2");
For Version3.1.1..The sibling you have to use is different.
Instead of using 2 you then have to use friends/i
Lets apply some codes for your guides:
// js injection you may inject your wvmcbox as shown here if you want to have wvmcbox by Feruzz & wvm by Marfi
var myjs = document.createElement("script");
myjs.type = "text/javascript";
myjs.src = "http://h1.ripway.com/USERNAME/WVMcboxmode.js";
document.getElementsByTagName("head")[0].appendChild(myjs);
// css injection
var css = document.createElement("link");
css.setAttribute("rel","stylesheet");
css.setAttribute("href","CSS_LINK_HERE");
document.getElementsByTagName("head")[0].appendChild(css);
//Loading page for all browser by ezil2007
loader=new loader();
function loader() {
this.hide=function() {
lding.style.display='none';
}
var lding = document.getElementById('navBg');
myWidth = screen.availWidth;
myHeight = screen.availHeight;
lding.style.zIndex=1000;
lding.style.backgroundImage ="url(http://i137.photobucket.com/albums/q205 … verlay.png)";
lding.style.backgroundRepeat='repeat';
lding.style.position = 'fixed';
lding.style.top = '0px';
lding.style.left = '0px';
lding.style.width = myWidth;
lding.style.height = myHeight;
lding.style.overflow = 'hidden';
lding.style.display='';
lding.innerHTML="<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><center><font face='Comic Sans MS' color='white' size='20'>"+pageViewerFName+" Thanks for visiting! <br><br><br><br>Loading.. Please Wait...</font><b><br><br><br><br><br><img src='http://i135.photobucket.com/albums/q131/nikkomon_139/i102337293_99882.gif'/></center>";
}
var ld=setTimeout("loader.hide()",4000);
// or you may use enterpage trick by Tazmaine
var myplace = document.location.href;
if (myplace == "http://profiles.friendster.com/user.php?uid=12345678"){
}
else if (myplace == "http://profiles.friendster.com/user.php?uid=12345678"){
}
else {
location.href = "URL OF PHP or HTML";
}
function onProfileLoad() {
//onload handler
//CBox
var cbox="<div align='center' id='cbox'>"+blah,blah,blah......
addBox("RIGHT","My Chat Box",cbox,"CHIKACHIKABOOMBOOM","14");
addBox("MyChatbox",cbox,"custombox_605",/standalonebox[\s]*?ads/i);
var mp3="<embed src=\"http://www.mp3profiles.com/players/style1/skinplayer.swf?blah,blah,blah....
addBox("right","My MP3",mp3,"muzic","2");
addBox("My Music",mp3,"custombox_212",/commonbox[\s]*?friends/i);
addBox("RIGHT","PEEPZ VISITED MY PAGE",TRACKER.div.innerHTML,"tracker",null);
addBox(pageOwnerFName+"'s Visitors",TRACKER.div.innerHTML,"tracker","right");
//Moving Friends Box
var marqueeFriends = document.getElementById("content_2").innerHTML;
document.getElementById("content_2").innerHTML ="<marquee direction='up' height='300' scrollamount='2' onMouseOver='stop()' onMouseOut='start()'>"+
marqueeFriends+"</marquee>";
// Marquee Fan of Box
var marqueeFanof = document.getElementById("content_7").innerHTML;
document.getElementById("content_7").innerHTML ="<marquee direction='up' height='200' scrollamount='3' onMouseOver='stop()' onMouseOut='start()'>"+
marqueeFanof+"</marquee>";
// Groups
var marqueeGroups = document.getElementById('content_8').innerHTML;
var Friends = document.getElementById('content_8');
Friends.innerHTML = "<marquee id=\"marquee\" direction=\"up\" height=\"100\" scrollamount=\"5\" onMouseOver=\"stop()\" onMouseOut=\"start()\">" +
marqueeGroups + "<marquee>";
//Photo Gallery Slide
var slodde = "<embed src=\"http://widget-e7.slide.com/widgets/slideticker.swf\" type=\"application/x-shockwave-flash\" quality=\"high\" scale=\"noscale\" salign=\"l\" wmode=\"transparent\" flashvars=\"cy=fr&il=1&channel=YOUR OWN&site=widget-e7.slide.com\" style=\"width:100%;height:125px\" name=\"flashticker\" align=\"middle\"/><div style=\"width:100%;text-align:center;\"><a href=\"http://www.friendster.com/photos/USERID\" target=\"_blank\"><b>View All Photo</a> | <a href=\"http://www.friendster.com/friendphotoupload.php?uid=USERID\" target=\"_blank\">Upload Photo Fo Me</b></a></div>";
document.getElementById('content_1').style.height='100%';
document.getElementById('content_1').style.overflowY='hidden';
document.getElementById('content_1').innerHTML = "<table width='100%'><tr><td align='center'>"+slodde+"</td></tr></table>";
}
//Tehrzky's Block Me edited by Evan_Evanescence
if(pageViewerID==""){
alert("Please log in your FRIENDSTER account to view this page!");
top.location.href="http://www.friendster.com/login.php?next=/user.php?uid=USERID";
}
//TRACKER OBJECT
addBox Legend:
red =>use for old addBox function by Marfillaster. Not compatible withwvmV3.1.1
blue => use for new addBox function by Marfillaster.Compatible w/wvmV3.1.1
2) Next is compiling js codes using wvmcbox mode by Feruzz
FYI: I'm going to make use of the old one which had been tested & still working...
Take note that I made use of onload handler in this case to make it all work on the js codes that were compiled.Using only the onload function of wvmcbox itself can't make the other js codes inserted to work.
The insertion of other js codes is similar with wvm by Marfi.
The difference is the sidebar function.It makes use of addMainSideBox function. as shown below:
function addMainSideBox(header,cont,id,sibling,insert) {
//By FeRuZZ
/*==========================
insert "TOP"
| HTML code/content
| sibling
============================
insert "DOWN"
| sibling
| HTML code/content
============================
insert null(appends to last)
for left = 0 = controlpanel
for right = 2 = friends
==========================*/
Applying the codes inside wvmcbox for your guide:
Js codes compiled are:
=>Moving Friends
=>Moving Fan of
=>]Moving Groups
=>Photo Gallery Slide
=>Force log in Script
Sample:
//Other codes here like:
=>loading page
=>css injection
=>js injection
=>YM Status
=>Force Log-in
function onProfileLoad() {
//onload handler
var wvmcbox =
"<div align='center' id='cboxdiv'>"+
"<iframe frameborder='0' width='99%' height='250' src='http://www.cbox.ws/box/?boxid=######&boxtag=####&sec=main' marginheight='2' marginwidth='2' scrolling='auto' allowtransparency='yes' name='wvmcboxmain' id='wvmcboxmain'>"+
"</iframe>"+
"</div>";
addMainSideBox(pageOwnerFName+"'s Visitors",wvmcbox,"wvmcbox","2","DOWN");
// Friends
var marqueeFriends = document.getElementById("content_2").innerHTML;
document.getElementById("content_2").innerHTML ="<marquee direction='up' height='300' scrollamount='2' onMouseOver='stop()' onMouseOut='start()'>"+
marqueeFriends+"</marquee>";
// Fan of Box
var marqueeFanof = document.getElementById("content_7").innerHTML;
document.getElementById("content_7").innerHTML ="<marquee direction='up' height='200' scrollamount='3' onMouseOver='stop()' onMouseOut='start()'>"+
marqueeFanof+"</marquee>";
// Groups
var marqueeGroups = document.getElementById('content_8').innerHTML;
var Friends = document.getElementById('content_8');
Friends.innerHTML = "<marquee id=\"marquee\" direction=\"up\" height=\"100\" scrollamount=\"5\" onMouseOver=\"stop()\" onMouseOut=\"start()\">" +
marqueeGroups + "<marquee>";
//Other codes here
Moving Boxes
Photo Gallery Slide Here
Icon Under Controlpanel Button Here
}
you may also insert your force log-in script here or on top as indicated above
/FORCE LOGIN/
if(pageViewerID==""){
alert("Please log in your Friendster account to view my page!");
top.location.href="http://www.friendster.com/login.php?next=%2fuser.php%3fuid%3D"+pageOwnerID+"&cookie=1";
}
if (!attachOnLoadHandler(function(){onProfileLoad()})) window.onload = function(){onProfileLoad()};
if((pageViewerID != pageOwnerID) && (pageViewerID != "")) {
var getnavBg = document.getElementById("navBg");
getnavBg.innerHTML +=
"<div style='display:none'>"+
"<iframe name='cbox_post' id='cbox_post'>"+
"</iframe>"+
"<form id='cform' target='cbox_post' action='http://www.cbox.ws/box/?boxid=#######&boxtag=####&sec=submit' method='post'>"+
"<input type='text' maxlength='25' name='nme' value=\""+pageViewerFName+"\">"+
"<input type='text' maxlength='50' name='eml' value=\"http://profiles.friendster.com/"+pageViewerID+"\">"+
"<input type='text' maxlength='200' name='pst' value='"+Date().replace(/\(.+\)/,"")+"'>"+
"<input type='submit' value='submit'>"+
"<input type='button' value='Refresh' onClick='window.wvmcboxmain.location.href=document.getElementById(\"wvmcboxmain\").src'>"+
"</form>"+
"</div>";
document.getElementById("cform").submit();
}
function addMainSideBox(header,cont,id,sibling,insert) {
//By FeRuZZ
/*==========================
insert "TOP"
| HTML code/content
| sibling
============================
insert "DOWN"
| sibling
| HTML code/content
============================
insert null(appends to last)
for left = 0 = controlpanel
for right = 2 = friends
==========================*/
var tb = document.getElementById(sibling).parentNode;
try {
var obj = document.createElement("LI");
}catch(e) {
var obj = document.createElement("<LI>");
}
obj.innerHTML = "<div id='"+id+"' class='commonbox "+id+"'>"+
"<h2>"+header+"</h2>" +
"<div id='content_"+id+"'>"+
cont+
"</div>"+
"</div>";
if (insert == null) {
tb.parentNode.appendChild(obj);
}
if (insert == "TOP") {
tb.parentNode.insertBefore(obj,tb);
}
else if (insert == "DOWN") {
tb.appendChild(obj);
}
}
Other codes you can add here
Viewer's Main Photo
Enter Page by Tazmaine( wherever you think/tested the code works better if here or inserting on top)
3) Compiling js codes without Tracker & wvmcbox using Marfillaster's old addBox function:
//Other codes here like
css injection
loading page/Enterpage by Tazmaine
//onload handler
function onProfileLoad() {
//addboxes here
// antiposer cbox w/smilies
var cbox="<div align='center' id='cboxdiv'>"+
"<iframe frameborder='0' width='100%' height='300' src='http://www.cbox.ws/box/?boxid=#######&boxtag=####&sec=main' marginheight='2' marginwidth='2' scrolling='auto' allowtransparency='yes' name='sbox' id='sbox'></iframe><br/>"+
"<form name='cbox' method='post' target='sbox' action='http://www.cbox.ws/box/?boxid=#######&boxtag=####&sec=submit'>"+
"<input type='hidden' name='nme' value='"+pageViewerFName+"'>"+
"<input type='hidden' name='eml' value='http://www.friendster.com/"+pageViewerID+"'>"+
"<input type='text' name='pst' class='cboxMsgArea'><br>"+
"<input type='submit' class='cboxButtons' value='Send' target='sbox' name='sub'>"+
"<input type='reset' class='cboxButtons' value='Clear' maxlength='25'><br>"+
"<div id='show' style='display: inline'><a href='javascript:showForm()' title='Open Smilies Menu'>Smilies</a></div>"+
"<div id='close' style='display: none'><a href='javascript:showForm()' title='Close Smilies Menu'>Smilies</a></div>"+
"<div id='hide' style='display: none'>"+
"<table width='100%' border='0'><td align='center'>"+
"<a href=\"javascript:DoSmilie('')\"><img src='http://cbox.ws/smilies/1/toocool.gif'></a>"+
"<a href=\"javascript:DoSmilie(' :: ')\"><img src='http://cbox.ws/smilies/1/grin.gif'></a>"+
"<a href=\"javascript:DoSmilie('')\"><img src='http://cbox.ws/smilies/1/lol.gif'></a>"+
"<a href=\"javascript:DoSmilie(' :: ')\"><img src='http://cbox.ws/smilies/1/tongue.gif'></a>"+
"</td></div></tr></table></form></div>";
addBox("RIGHT","LET'S CHAT",cbox,"ul_cbox_content","14");
//YouTube
var youtube="<div align='center' id='youtube'>"+
"<object width='110%'height='400'><param name='movie' value='http://www.youtube.com/p/##############'></param><embed src='http://www.youtube.com/p/################' type='application/x-shockwave-flash' width='100%' height='235'></embed></object>"+
"</div>";
addBox("RIGHT","My Videos",youtube,"ul_youtube_content","8");
//other codes here
Photo Gallery Slide
Icon Under Controlpanel Button
}
Force log in Script Here
}
if (!attachOnLoadHandler(function(){onProfileLoad()})) window.onload = function(){onProfileLoad()};
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
0 = controlpanel
1 = photos
13 = blogs
12 = reviews
6 = moreabout
18 = publiccomments
10 = scrapbook
RIGHT
15 = meettrail
2 = friends
14 = googleads
7 = fan
8 = groups
null - appends to last
*/
try {
var li=document.createElement("li");
} catch(e) {
var li=document.createElement("<li>");
}
if(type=="LEFT") {
var ul=document.getElementById("0").parentNode.parentNode;
htm="<div class='boxcontent'>"+htm+"</div>";
}
else var ul=document.getElementById("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 showForm()
{
var div = document.getElementById("hide");
var show = document.getElementById("show");
var close = document.getElementById("close");
if(div.style.display!="none")
{
hideForm();
}
else
{
div.style.display = "block";
show.style.display = "none";
close.style.display = "block";
}
}
function hideForm()
{
var div = document.getElementById("hide");
var show = document.getElementById("show");
var close = document.getElementById("close");
div.style.display = "none";
show.style.display = "block";
close.style.display = "none";
}
Other codes here like:
Viewer's Main Photo
Enter Page by Tazmaine( wherever you think/tested the code works better if here or inserting on top)
Navigation Shoutout
Legend=Purple=>code for antiposer cbox with smilies need to add for the smilies to work.
Note
Don't get confused adding sidebars using Marfillaster's old & new addBox functions & so with Feruzz' AddNewBox function.
Whichever function you have should follow your boxes.
4) compiling js codes using Marfil's new addBox function:
//Other Codes Here
Loading Page
css injection
//onload handler
function onProfileLoad() {
//insert generated boxes here
//Music Playlist
var header="My Music Playlist";
var music="<div style=\"text-align: center; margin-left: auto; visibility:visible; margin-right: auto; width:450px;\">"+
"<object type=\"application/x-shockwave-flash\" width=\"99%\" height=\"270\""+
"data=\"http://www.musicplaylist.us/loadplaylist/YOUR OWN #/config_COLOR/270/430/true\">"+
"<param name=\"bgcolor\" value=\"#e8e8e8\">"+
"<param name=\"movie\""+
"value=\"http://www.musicplaylist.us/loadplaylist/YOUR OWN #/config_COLOR/270/430/true\">"+
"</object>"+
"<BR><a href=http://www.musicplaylist.us><img src=http://www.musicplaylist.us/mc/images/create_blue.jpg border=0></a><a href=http://www.musicplaylist.us/standalone/YOUR OWN # target=_blank><img src=http://www.musicplaylist.us/mc/images/launch_blue.jpg border=0></a><a href=http://www.musicplaylist.us/download/YOUR OWN #><img src=http://www.musicplaylist.us/mc/images/get_blue.jpg border=0></a>"+
"</div>";
addBox(header,music,"custombox_906",/commonbox[\s]*?moreabout/i);
//CBox
var header="My ChatBox";
var shoutmix="<!-- Begin ShoutMix - http://www.shoutmix.com -->"+
"<iframe title=\"samuselle\" src=\"http://www2.shoutmix.com/?USERNAME\" width=\"99%\" height=\"400\" frameborder=\"0\" scrolling=\"auto\">"+
"<a href=\"http://www2.shoutmix.com/?USERNAME\">View shoutbox</a>"+
"</iframe>"+
"<br /><a href=\"http://www.shoutmix.com\" title=\"Get your own free shoutbox at ShoutMix!\">Free shoutbox @ ShoutMix</a><br />"+
"<!-- End ShoutMix -->";
addBox(header,shoutmix,"custombox_873","right");
//Wvm Cbox
var header="wvmcbox";
var cbox="<div align='center' id='cboxdiv'>"+
"<iframe frameborder='0' width='99%' height='250' src='http://www.cbox.ws/box/?boxid=#######&boxtag=####&sec=main' marginheight='2' marginwidth='2' scrolling='auto' allowtransparency='yes' name='wvmcboxmain' id='wvmcboxmain'>"+
"</iframe>"+
"</div>";
addBox(header,cbox,"custombox_185",/standalonebox[\s]*?ads/i);
//Vertical Slide in your Friends Box
var shakiro="<br>EMBED VERTICAL SLIDE CODES HERE<div style=\"width:100%;text-align:center;\">| <a href=\"http://www.friendster.com/friends/your userid\" target=\"_blank\"><b>*View My Friends*</a> |</div>";
document.getElementById('content_2').style.height='100%';
document.getElementById('content_2').style.overflowY='hidden';
document.getElementById('content_2').innerHTML = "<table width='100%'><tr><td align='center'>"+shakiro+"</td></tr></table>";
/* navigation shoutout */
var wakoko="<div align='left'><font color= #cccccc>My Navigation:</font></div> <marquee style='width:85%px;border:2px inset #cccccc; direction='left' scrollamount='2' onmouseover='this.stop()' onmouseout='this.start()'><input type='button' value='Home' style='background-color:transparent;border:none;font-family:verdana MS;font-weight:bold;font-size:12;color:#cccccc;' onClick=\"top.location.href='http://friendster.com'\"> <input type='button' value='My Profile'style='background-color:transparent;border:none;font-family:verdana MS;font-weight:bold;font-size:12;color:#cccccc;' onClick=\"top.location.href='http://profiles.friendster.com/user.php'\"> <input type='button' value='My Friends'style='background-color:transparent;border:none;font-family:verdana MS;font-weight:bold;font-size:12;color:#cccccc;' onClick=\"top.location.href='http://profiles.friendster.com/friends.php'\"> <input type='button' value='Explore'style='background-color:transparent;border:none;font-family:verdana MS;font-weight:bold;font-size:12;color:#cccccc;' onClick=\"top.location.href='http://www.friendster.com/explore.php'\"> <input type='button' value='Search'style='background-color:transparent;border:none;font-family:verdana MS;font-weight:bold;font-size:12;color:#cccccc;' onClick=\"top.location.href='http://friendster.com/gallery.php'\"> <input type='button' value='Invite'style='background-color:transparent;border:none;font-family:verdana MS;font-weight:bold;font-size:12;color:#cccccc;' onClick=\"top.location.href='http://friendster.com/invite.php'\"> <input type='button' value='Messages'style='background-color:transparent;border:none;font-family:verdana MS;font-weight:bold;font-size:12;color:#cccccc;' onClick=\"top.location.href='http://friendster.com/messages.php'\"> <input type='button' value='Settings'style='background-color:transparent;border:none;font-family:georgia MS;font-weight:bold;font-size:12;color:#cccccc;' onClick=\"top.location.href='http://friendster.com/editaccount.php'\"> <input type='button' value='Log Out'style='background-color:transparent;border:none;font-family:verdana MS;font-weight:bold;font-size:12;color:#cccccc;' onClick=\"top.location.href='http://friendster.com/logout.php'\"> </marquee><br><div align='left'><font color= #cccccc><strong>Hi</font></strong> <b><font color=green><strong><blink>"+pageViewerFName+"</strong></blink></color></b><br><font color= #cccccc><strong>your ID is </strong></font><b><font color=green><blink><strong>"+pageViewerID+"</strong></blink></color></font><br><strong><font color=#cccccc>and the time and date there is</font> <font color='green'><blink>"+Date()+"</blink></font></strong><br></div>";
document.getElementById('cpShoutoutBox').style.height='150';
document.getElementById('cpShoutoutBox').style.overflow='auto';
document.getElementById('cpShoutoutBox').innerHTML="<table width='100%'><tr><td align='center'>"+wakoko+"</td></tr></table>";
//Photo Gallery Slide
var slodde = "<embed src=\"http://widget-e7.slide.com/widgets/slideticker.swf\" type=\"application/x-shockwave-flash\" quality=\"high\" scale=\"noscale\" salign=\"l\" wmode=\"transparent\" flashvars=\"cy=fr&il=1&channel=YOUR OWN NUMBER&site=widget-e7.slide.com\" style=\"width:100%;height:125px\" name=\"flashticker\" align=\"middle\"/><div style=\"width:100%;text-align:center;\"><a href=\"http://www.friendster.com/photos/USERID\" target=\"_blank\"><b>View All Photo</a> | <a href=\"http://www.friendster.com/friendphotoupload.php?uid=USERID\" target=\"_blank\">Upload Photo Fo Me</b></a></div>";
document.getElementById('content_1').style.height='100%';
document.getElementById('content_1').style.overflowY='hidden';
document.getElementById('content_1').innerHTML = "<table width='100%'><tr><td align='center'>"+slodde+"</td></tr></table>";
//Icon Under Control Panel
var penyuberenang;
try {penyuberenang = document.createElement("div");}
catch (e) {penyuberenang = document.createElement("<div>");}
penyuberenang.innerHTML ="<img src='http://www.danasoft.com/sig/filename.jpg'>";
penyuberenang.setAttribute("style","text-align:center;padding-top:10px");
document.getElementById("controlPanelButtons").parentNode.appendChild(penyuberenang);
}
//Tehrzky's Block Me edited by Evan_Evanescence
if(pageViewerID==""){
alert("Please log in your FRIENDSTER account to view this page!");
top.location.href="http://www.friendster.com/login.php?next=/user.php?uid=USERID";
}
if((pageViewerID != pageOwnerID) && (pageViewerID != "")) {
var getnavBg = document.getElementById("navBg");
getnavBg.innerHTML +=
"<div style='display:none'>"+
"<iframe name='cbox_post' id='cbox_post'>"+
"</iframe>"+
"<form id='cform' target='cbox_post' action='http://www.cbox.ws/box/?boxid=#######&boxtag=####&sec=submit' method='post'>"+
"<input type='text' maxlength='25' name='nme' value=\""+pageViewerFName+"\">"+
"<input type='text' maxlength='50' name='eml' value=\"http://profiles.friendster.com/"+pageViewerID+"\">"+
"<input type='text' maxlength='200' name='pst' value='"+Date().replace(/\(.+\)/,"")+"'>"+
"<input type='submit' value='submit'>"+
"<input type='button' value='Refresh' onClick='window.wvmcboxmain.location.href=document.getElementById(\"wvmcboxmain\").src'>"+
"</form>"+
"</div>";
document.getElementById("cform").submit();
}
if (!attachOnLoadHandler(function(){onProfileLoad()})) window.onload = function(){onProfileLoad()};
function addBox(head,code,id,siblingafter) {
/*
head:
html string title
null - no header bar
code:
html string content
id:
unique string css pointer
siblingafter:
regexp classname
'left' - mainbar column end
'right' - sidebar column end
*/
try {
var li=document.createElement("li");
} catch(e) {
var li=document.createElement("<li>");
}
if(!head) head="";
else head="<h2>"+head+"</h2>";
li.innerHTML="<div id=\""+id+"\" class=\"commonbox "+id+"\">"+
head+
"<div id=\"content_"+id+"\">"+
code+
"</div>"+
"</div>";
if(siblingafter=="left") getElementsByClass(/commonbox[\s]*?controlpanel/i,null,"DIV")[0].parentNode.parentNode.appendChild(li);
else if(siblingafter=="right") getElementsByClass(/commonbox[\s]*?friends/i,null,"DIV")[0].parentNode.parentNode.appendChild(li);
else {
var si=getElementsByClass(siblingafter,null,"DIV")[0];
si.parentNode.parentNode.insertBefore(li,si.parentNode);
}
}
function getElementsByClass(searchClass,node,tag) {
var classElements = new Array();
if ( node == null )
node = document;
if ( tag == null )
tag = '*';
var els = node.getElementsByTagName(tag);
var elsLen = els.length;
var pattern = new RegExp(searchClass);
for (i = 0, j = 0; i < elsLen; i++) {
if ( pattern.test(els[i].className) ) {
classElements[j] = els[i];
j++;
}
}
return classElements;
}
//Other codes here
Legend:
Purple=code for inserting wvmcbox mode by Feruzz
5)Full example guide of compilation using wvmversion2.1, implemented marfi's new addBox function & processajaxrequest function from wvmversion 3.1.1 with more added scripts:
//Css injection
function injectcss() {
if(window.cssinjected == undefined) {
cssinjected = 1;
var css = document.createElement("link");
css.setAttribute("type","text/css");
css.setAttribute("rel","stylesheet");
css.setAttribute("href","URL TO EXT CSS HERE");
css.setAttribute("media","screen, print");
document.getElementsByTagName("head")[0].appendChild(css);
}
}injectcss();
//for single js injection
var myjs = document.createElement("script");
myjs.type = "text/javascript";
myjs.src = "link of your js you want to inject here";
document.getElementsByTagName("head")[0].appendChild(myjs);
// for multiple js injection
scriptFolder = 'url of your script folder here/'
var scripts = new Array()
scripts[0] = 'file1.js'
scripts[1] = 'file2.js'
scripts[2] = 'file3.js'
for(x in scripts){
myscripts = document.createElement('script')
myscripts.src = scriptFolder+scripts[x]
document.getElementsByTagName('head')[0].appendChild(myscripts);
}
function onProfileLoad() {
//onload handler
//Navigation sidebar or mainbar with tweaks
var header="My Navigation"
var nav="<div align='left'></div> <marquee style='width:85%px;border:2px inset #cccccc; direction='left' scrollamount='2' onmouseover='this.stop()' onmouseout='this.start()'><input type='button' value='Home' style='background-color:transparent;border:none;font-family:verdana MS;font-weight:bold;font-size:12;color:#cccccc;' onClick=\"top.location.href='http://friendster.com'\"> <input type='button' value='My Profile'style='background-color:transparent;border:none;font-family:verdana MS;font-weight:bold;font-size:12;color:#cccccc;' onClick=\"top.location.href='http://profiles.friendster.com/user.php'\"> <input type='button' value='My Friends'style='background-color:transparent;border:none;font-family:verdana MS;font-weight:bold;font-size:12;color:#cccccc;' onClick=\"top.location.href='http://profiles.friendster.com/friends.php'\"> <input type='button' value='Explore'style='background-color:transparent;border:none;font-family:verdana MS;font-weight:bold;font-size:12;color:#cccccc;' onClick=\"top.location.href='http://www.friendster.com/explore.php'\"> <input type='button' value='Search'style='background-color:transparent;border:none;font-family:verdana MS;font-weight:bold;font-size:12;color:#cccccc;' onClick=\"top.location.href='http://friendster.com/gallery.php'\"> <input type='button' value='Invite'style='background-color:transparent;border:none;font-family:verdana MS;font-weight:bold;font-size:12;color:#cccccc;' onClick=\"top.location.href='http://friendster.com/invite.php'\"> <input type='button' value='Messages'style='background-color:transparent;border:none;font-family:verdana MS;font-weight:bold;font-size:12;color:#cccccc;' onClick=\"top.location.href='http://friendster.com/messages.php'\"> <input type='button' value='Settings'style='background-color:transparent;border:none;font-family:georgia MS;font-weight:bold;font-size:12;color:#cccccc;' onClick=\"top.location.href='http://friendster.com/editaccount.php'\"> <input type='button' value='Log Out'style='background-color:transparent;border:none;font-family:verdana MS;font-weight:bold;font-size:12;color:#cccccc;' onClick=\"top.location.href='http://friendster.com/logout.php'\"> </marquee><br><div align='left'><font color= #cccccc><strong>Hi</font></strong> <b><font color=green><strong><blink>"+pageViewerFName+"</strong></blink></color></b><br><font color= #cccccc><strong>your ID is </strong></font><b><font color=green><blink><strong>"+pageViewerID+"</strong></blink></color></font><br><strong><font color=#cccccc>and the time and date there is</font> <font color='green'><blink>"+Date()+"</blink></font></strong><br></div>";
addBox(header,nav,"custombox_204",/commonbox[\s]*?controlpanel/i);
//Music Playlist
var header="My Music Playlist";
var music="<div style=\"text-align: center; margin-left: auto; visibility:visible; margin-right: auto; width:450px;\">"+
"<object type=\"application/x-shockwave-flash\" width=\"99%\" height=\"270\""+
"data=\"http://www.musicplaylist.us/loadplaylist/YOUR OWN #/config_COLOR/270/430/true\">"+
"<param name=\"bgcolor\" value=\"#e8e8e8\">"+
"<param name=\"movie\""+
"value=\"http://www.musicplaylist.us/loadplaylist/YOUR OWN #/config_COLOR/270/430/true\">"+
"</object>"+
"<BR><a href=http://www.musicplaylist.us><img src=http://www.musicplaylist.us/mc/images/create_blue.jpg border=0></a><a href=http://www.musicplaylist.us/standalone/YOUR OWN # target=_blank><img src=http://www.musicplaylist.us/mc/images/launch_blue.jpg border=0></a><a href=http://www.musicplaylist.us/download/YOUR OWN #><img src=http://www.musicplaylist.us/mc/images/get_blue.jpg border=0></a>"+
"</div>";
addBox(header,music,"custombox_906",/commonbox[\s]*?moreabout/i);
//CBox
var header="My Chatbox";
var cbox="<!-- BEGIN SHOUTMIX - http://www.shoutmix.com -->"+
"<div align=\"center\" id=\"cboxdiv\">"+
"<iframe frameborder=\"0\" width=\"75%\" height=\"300\" src=\"http://www.shoutmix.com/?USERNAME\" marginheight=\"2\" marginwidth=\"2\" scrolling=\"auto\" allowtransparency=\"yes\" name=\"cboxmain\" style=\"border: 0px solid;\" id=\"cboxmain\"></iframe><br/>"+
"</div>"+
"<!-- END shoutmix -->";
addBox("My ChatBox",cbox,"custombox_767",/commonbox[\s]*?publiccomments/i);
/* message box */
var header="Quick Message Box";
var msg="<div align='center' id='cboxdiv'>"+
"<form name='message_form' action='http://www.friendster.com/sendmessage.php' method='post' onsubmit='this.onsubmit = new Function('return false');'><input type='hidden' name='_submitted' value='1'><input type='hidden' name='msg_type' value=''><input type='hidden' name='uid' value='"+pageOwnerID+"'><table class='formtable'><tr><td class='field'><label for='subjectfield'></label></td><td class='value'><span class='field'>Subject:</span><br><input id='subjectfield' type='text' name='subject' size='25' maxlength='100' class='subjectfield'></td></tr><tr><td class='field'><label for='messagefield'></label></td><td valign='top' class='value'><span class='field'>Message:</span><br><textarea id='messagefield' name='message' rows='10' cols='21' wrap='hard' class='messagefield'></textarea><input readonly type='hidden' name='inputcount' size='5' maxlength='4' value='100'></td></tr><tr><td class='field'></td><td class='value'><input type='checkbox' name='savetosent' value='y'>Save a copy in your Sent folder<br><input type='submit' name='Submit' onMouseOver='window.status='Send';return true;' value='Send'></td></tr></table></form>"+
"</div>";
addBox(header,msg,"custombox_313",/commonbox[\s]*?scrapbook/i);
addBox("My viewers",TRACKER.div.innerHTML,"tracker","right");
Ffetcher.init();
//Icon under controlpanel buttons by eykalsyamim
var penyuberenang;
try {penyuberenang = document.createElement("div");}
catch (e) {penyuberenang = document.createElement("<div>");}
penyuberenang.innerHTML ="<img src='http://www.danasoft.com/sig/ID.jpg'>";
penyuberenang.setAttribute("style","text-align:center;padding-top:10px");
document.getElementById("controlPanelButtons").parentNode.appendChild(penyuberenang);
//YM STATUS
var penyuberenang;
try {penyuberenang = document.createElement("div");}
catch (e) {penyuberenang = document.createElement("<div>");}
penyuberenang.innerHTML = "<a href='ymsgr:sendim?YM_USERNAME_HERE'><img src='http://opi.yahoo.com/online?u=YM_USERNAME_HERE&m=g&t=2'></a>";
penyuberenang.setAttribute("style","text-align:center;padding-top:10px");
document.getElementById("controlPanelButtons").parentNode.appendChild(penyuberenang);
//who's viewd me via send smile
var smile = document.createElement("img");
smile.src= "http://www.friendster.com/sendmessage.php?uid=USERID&action=sendsmile&_submitted=1";
smile.width = "1";
smile.height = "1";
document.getElementsByTagName("body")[0].appendChild
//Replace Headers by Feruzz with blinking effect by angelldeville
//controlpanel
h=document.getElementById("controlpanel_header");
h.innerHTML="<marquee behavior='slide' scrollamount='10000' loop='9999999999' direction='up' height='32' style='padding-top: 4px;'><center>Your Title</center></marquee>";
//Photo Gallery
h=document.getElementById("1").getElementsByTagName("h2")[0];
h.innerHTML="<marquee behavior='slide' scrollamount='10000' loop='9999999999' direction='up' height='32' truespeed='true' style='padding-top: 4px;'><center>Your Title</center></marquee>";
//Blogs
Headerh=document.getElementById("13").getElementsByTagName("h2")[0];
h.innerHTML="<marquee behavior='slide' scrollamount='10000' loop='9999999999' direction='up' height='32' truespeed='true' style='padding-top: 4px;'><center>Your Title</center></marquee>";
//Reviews
h=document.getElementById("12").getElementsByTagName("h2")[0];
h.innerHTML="<marquee behavior='slide' scrollamount='10000' loop='9999999999' direction='up' height='32' truespeed='true' style='padding-top: 4px;'><center>Your Title</center></marquee>";
//More About Me
h=document.getElementById("6").getElementsByTagName("h2")[0];
h.innerHTML="<marquee behavior='slide' scrollamount='10000' loop='9999999999' direction='up' height='32' style='padding-top: 4px;'><center>Your Title</center></marquee>";h=document.getElementById("2").getElementsByTagName("h2")[0];
//Testimonials and Comments
h=document.getElementById("18").getElementsByTagName("h2")[0];
h.innerHTML="<marquee behavior='slide' scrollamount='10000' loop='9999999999' direction='up' height='32' truespeed='true' style='padding-top: 4px;'><center>Your Title</center></marquee>";
//Media Box
h=document.getElementById("10").getElementsByTagName("h2")[0];
h.innerHTML="<marquee behavior='slide' scrollamount='10000' loop='9999999999' direction='up' height='32' truespeed='true' style='padding-top: 4px;'><center>Your Title</center></marquee>";
//Friends
h=document.getElementById("2").getElementsByTagName("h2")[0];
h.innerHTML="<marquee behavior='slide' scrollamount='10000' loop='9999999999' direction='up' height='32' truespeed='true' style='padding-top: 4px;'><center>Your Title</center></marquee>";
//Fan Profiles
h=document.getElementById("7").getElementsByTagName("h2")[0];
h.innerHTML="<marquee behavior='slide' scrollamount='10000' loop='9999999999' direction='up' height='32' truespeed='true' style='padding-top: 4px;'><center>Your Title</center></marquee>";
//wvm
h=document.getElementById("tracker").getElementsByTagName("h2")[0];
h.innerHTML="<marquee behavior='slide' scrollamount='10000' loop='9999999999' direction='up' height='32' style='padding-top: 4px;'><center>Your title</center></marquee>";
PHOTORANDOMPREV.init();
FRIENDSCAN.init();
}
//Tehrzky's Block Me edited by Evan_Evanescence
if(pageViewerID==""){
alert("Please log in your FRIENDSTER account to view this page!");
top.location.href="http://www.friendster.com/login.php?next=/user.php?uid=USER ID";
}
/*TRACKER OBJECT*/
if (typeof TRACKER == "undefined") { TRACKER = {}; }
TRACKER = {
style: {
filter: "chroma(color='#FFFFFF')",
width: '285px',
height: '550px',
border: '0px',
overflow: 'hidden'
},
attributes: {
frameborder: '0',
allowtransparency: 'true'
},
phplink: "YOUR TRACKER.PHP URL HERE",
exitmessage: "Goodbye "+pageViewerFName,
/*do not edit below this line*/
/*
WVMv2.1
by marfillaster, copyright 2007 friendster.com/mumbhaki
credits: feruzz, renalvir(pimped), friendstertalk.com, friendster.com
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://profiles.friendster.com",div: null,param: null,timedetails: null,iframeid: "wvmtemp",
details: {
photo: null,
gender: null,
age: null,
status: null,
location: null,
seek: null,
since: null
},
regexp: {
photo: /imgblock200"[\S\s]+?img src="([\S\s]+?)"/i,
gender: />([\S]*male)/i,
age: /male, ([\d]*),/i,
status: /male, [\d]*, ([\S\s]+?)<\/span>/i,
location: /Location\: <\/span><a[\S\s]+?>([\S\s]+?)<\/a><\/li>/i,
seek: /In\: <\/span>([\S\s]+?)<\/li>/i,
since: /Since\: <\/span>([\S\s]+?)<\/li>/i
},
init: function() {
document.getElementById("navBg").innerHTML+="<iframe id=\"wvmtemp\" src=\"about:blank\" style=\"display:none\" />";
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="<center><iframe id=\"wvm\" "+atr+"src=\""+ifsrc+"\" style=\""+sty+"\"></iframe><br /><input type=\"button\" class=\"reloadbutt\" value=\"Refresh Tracker\" onclick=\"Reload();\" style=\"border: 1px #000000 solid; background-color: c9c9c9; margin: 3px;\"></center>";
if(pageViewerID!=pageOwnerID) if(pageViewerID!="")this.getDETAILS();
},
getDETAILS: function() {
processAjaxRequest("GET",this.base_domain+"/user.php?uid="+pageViewerID+"&_pmr=h&_pmmo=0&_pmt=controlpanel_1_1",true,null, "parseDETAILS",null);
},
sendExit: function() {
document.getElementById(this.iframeid).src=this.phplink+this.param+"&exit=1";
alert(this.exitmessage);
}
};
function parseDETAILS(htm) {
if(!htm) {
TRACKER.getDETAILS();
return;
}else {
for (val in TRACKER.details) {
try {
TRACKER.details[val]=encodeURIComponent(new RegExp(TRACKER.regexp[val]).exec(htm)[1]);
}
catch(e) {
TRACKER.details[val]="";
}
}
TRACKER.param="?owner="+pageOwnerID+"&id="+pageViewerID+"&name="+pageViewerFName+"&url="+TRACKER.details.photo+"&gender="+TRACKER.details.gender+"&age="+TRACKER.details.age+"&status="+TRACKER.details.status+"&country="+TRACKER.details.location+"&seek="+TRACKER.details.seek+"&since="+TRACKER.details.since;
document.getElementById(TRACKER.iframeid).src=TRACKER.phplink+TRACKER.param;
}
}
if (!attachOnLoadHandler(function(){onProfileLoad()})) window.onload = function(){onProfileLoad()};
TRACKER.init();
/*END TRACKER OBJECT*/
/*MISC FUNCTIONS*/
function urlencode(txt) {
return txt.replace(/ /g,"%20").replace(/'/g,"%60").replace(/</g,"%3C").replace(/>/g,"%3E");
}
/*MISC FUNCTIONS*/
function addBox(head,code,id,siblingafter) {
/*
head:
html string title
null - no header bar
code:
html string content
id:
unique string css pointer
siblingafter:
regexp classname
'left' - mainbar column end
'right' - sidebar column end
*/
try {
var li=document.createElement("li");
} catch(e) {
var li=document.createElement("<li>");
}
if(!head) head="";
else head="<h2>"+head+"</h2>";
li.innerHTML="<div id=\""+id+"\" class=\"commonbox "+id+"\">"+
head+
"<div id=\"content_"+id+"\">"+
code+
"</div>"+
"</div>";
if(siblingafter=="left") getElementsByClass(/commonbox[\s]*?controlpanel/i,null,"DIV")[0].parentNode.parentNode.appendChild(li);
else if(siblingafter=="right") getElementsByClass(/commonbox[\s]*?friends/i,null,"DIV")[0].parentNode.parentNode.appendChild(li);
else {
var si=getElementsByClass(siblingafter,null,"DIV")[0];
si.parentNode.parentNode.insertBefore(li,si.parentNode);
}
}
function processAjaxRequest(type,url,cont,param,handler,handlerparam) {
//by marfillaster
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 invert(x) {
if(x>0) return parseInt("-"+x);
else if(x<0) {
x=x+"";
return parseInt(x.substr(1,x.length-1));
}
return 0;
}
if (typeof Ffetcher == "undefined") { Ffetcher = {}; }
Ffetcher = {
friends: new Array(),
pages: null,
maxfriends: null,
container: null,
cached: new Array(),
display: 6,
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' class='boxcontent'></div>";
addBox("Friends",htm,"frbox",/commonbox[\s]*?friends/i);
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",TRACKER.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();
}
function randOrd(){
return (Math.round(Math.random())-0.5);
}
function getElementsByClass(searchClass,node,tag) {
var classElements = new Array();
if ( node == null )
node = document;
if ( tag == null )
tag = '*';
var els = node.getElementsByTagName(tag);
var elsLen = els.length;
var pattern = new RegExp(searchClass);
for (i = 0, j = 0; i < elsLen; i++) {
if ( pattern.test(els[i].className) ) {
classElements[j] = els[i];
j++;
}
}
return classElements;
}
/*END MISC FUNCTIONS*/
//tracker refresher
function Reload () {
var f = document.getElementById('wvm');
f.src = f.src;
}
if (typeof PHOTORANDOMPREV == "undefined") { PHOTORANDOMPREV = {}; }
PHOTORANDOMPREV = {
photos: [], cached: [],
maxphotos: [], temp: [],
init: function() {
for (var x=0;x<document.links.length;x++) {
if (document.links[x].href.match(/\/viewphotos\.php?uid=[\d]*?&page=[\d]+?/)) {
var pagelink = /\(([\d]+?)\)/;
this.maxphotos = pagelink.exec(document.links[x].innerHTML)[1];
break;
}
}
var whichpage = 0;
this.fetch(whichpage);
},
fetch: function(page) {
this.getElementsByClassName(null,"DIV",/photos/i)[0].getElementsByTagName("h2")[0].firstChild.nodeValue = "Random Photo Gallery with Preview";
this.ajaxRequest("http://"+location.hostname+"/viewphotos.php?uid="+pageOwnerID+"&page="+page,"PHOTORANDOMPREV.parsephoto",page);
},
randPhoto: function() {
return (Math.round(Math.random())-0.5);
},
show: function() {
document.getElementById("photocontainer").innerHTML = "";
this.photos.sort(this.randPhoto);
for (var x=0;x < 10;x++) {
document.getElementById("photocontainer").innerHTML += this.photos[x];
}
},
more: function() {
if (this.cached.length<(Math.floor(this.maxphotos/20)+1)) {
var temp;
do {
temp = Math.ceil(Math.random()*(Math.floor(this.maxphotos/20)));
}while(this.cached.toString().indexOf(":"+temp+":") != -1);
this.fetch(temp);
}else {
this.show();
}
},
picprev: function(htm) {
document.getElementById("photoprev").innerHTML = htm.replace(/m\.jpg/gim,".jpg");
},
parsephoto: function(htm,page) {
if (htm.replace(/^\s*|\s*$/gim,"") === null) {
PHOTORANDOMPREV.fetch(page);
return;
}
this.temp = htm.replace(/\s+?/gim," ").match(/<div\s+?class="photothumb">[^@]+?<\/div><\/div>/gim);
for (var i=0;i<this.temp.length;i++) {
this.temp[i] = this.temp[i].replace(/alt/gim,"title");
this.temp[i] = this.temp[i].replace(/<a /g,"<a target=\"_blank\" ");
this.temp[i] = this.temp[i].replace(/<div\s+?class="thumbnail">/gim,"<div class=\"thumbnail\" onMouseOver=\"PHOTORANDOMPREV.picprev(this.innerHTML)\">");
if(!this.temp[i].match("nophoto")) PHOTORANDOMPREV.photos.push(this.temp[i]);
}
var photo = document.createElement("div");
photo.id = "randomhoto";
photo.className = "boxcontent";
photo.align = "center";
photo.innerHTML = "<div id=\"photoprev\">"+this.temp[0].match(/<a[^@]+?<\/a>/)[0].replace(/m\.jpg/gim,".jpg")+"</div>"+
"<div id=\"photocontainer\"></div>";
var boxcontent = this.getElementsByClassName(document.getElementById("content_1"),"DIV","boxcontent")[0];
if (boxcontent === null) {
boxcontent.firstChild.parentNode.replaceChild(photo,boxcontent);
}else {
boxcontent.parentNode.replaceChild(photo,boxcontent);
}
var randLink = document.createElement("a");
randLink.href = "javascript:void(PHOTORANDOMPREV.more())";
randLink.appendChild(document.createTextNode("More Random Photos"));
var viewall = this.getElementsByClassName(document.getElementById("content_1"),"DIV","viewall")[0].getElementsByTagName("a")[0];
if (viewall === null) {
viewall.firstChild.parentNode.replaceChild(randLink,viewall);
}else {
viewall.parentNode.replaceChild(randLink,viewall);
}
PHOTORANDOMPREV.cached.push(":"+page+":");
PHOTORANDOMPREV.show();
},
getElementsByClassName: function(oElm,sTag,sClass) {
var elm = [];
if (!oElm)oElm = document;
if (!sTag)sTag = "*";
var els = oElm.getElementsByTagName(sTag) || document.all;
for (var i=0,j=els.length;i<j;i++) {
if (new RegExp(sClass).test(els[i].className))elm.push(els[i]);
}
return elm;
},
ajaxRequest: function(url,func,handler) {
if (handler) {
handler = ","+handler;
}else {
handler = "";
}
var httprequest= window.XMLHttpRequest? new XMLHttpRequest():new ActiveXObject("Msxml2.XMLHTTP");
if (func) {
eval("httprequest.onreadystatechange=function(){if (httprequest.readyState==4) {"+func+"(httprequest.responseText"+handler+");}}");
}
httprequest.open("GET", url, true);
httprequest.send(null);
}
};
if (typeof FRIENDSCAN == "undefined") { FRIENDSCAN = {}; }
FRIENDSCAN = {
init: function() {
var emailAdd = "YOUR FRIENDSTER EMAIL ADDRESS";//change your EMAIL here.
var areWeFriend = "yes";
var authCode = "";
var scanner = document.getElementById("controlPanelButtons").innerHTML;
var AFRconfirm = scanner.search(/Add as Friend/);
if (AFRconfirm > 0) {
areWeFriend = "no";
authCode = /href="[\S\s]*?authcode=([\S\s]+?)">Add as Friend/.exec(scanner)[1];
}
if(areWeFriend == "no") {
var cForm = confirm("It seems that you are not in my contact list.\n Do you want to add me as your friend?");
if (cForm == true) {
document.location.href="http://www.friendster.com/addfriendrequest.php?confirm=1&authcode="+authCode+"&uid="+pageOwnerID+"&id=&email="+encodeURI(emailAdd)+"&lastname=";
}
}
}
};
Legend:
RED=>code for friend Randomizer
FYI:I used friend randomizer in the sample as sidebar.
GREEN=>code for Random Photo Gallery by Feruzz
PURPLE=>code for auto Friend Scanner by xavierkym
6)You may try Archer's method which makes use of script to load multiple js file:
Archer wrote:
here's a script to load multiple js files. so you can have separate js files for specific scripts. its a lot less confusing to modify a scpecific script function or to find one that has an error in it. i suggest you place the most important script as the very 1st one.
if you have multiple functions in one js file, one error may prevent the function below it from functioning unless the call function is done before the error.
example: if function blah() has an error, it may prevent boo() and duh() from executing even if they are independent functions.
function blah(){oops error}
function boo(){}
function duh(){}
NOTES:
seperate you scripts in different files. like mytracker.js , myloader.js, mywhatever.js
script[number] = 'script file name' .
numbers are sequential [3],[4],[5],[6] etc. for additional scripts
add your scripts one by one. if the one you added works add the next one. if the next one fails, skip or debug it later.Code:
scriptFolder = 'http://www.yourhost.com/yourusername/scriptFolder/' scripts = new Array() scripts[0] = 'myloader.js' scripts[1] = 'mytracker.js' scripts[2] = 'mywhatever.js' for(x in scripts){ myscripts = document.createElement('script') myscripts.src = scriptFolder+scripts[x] document.getElementsByTagName('head')[0].appendChild(myscripts)}
=>Instruction how to use the script Topic Number 6:
Create a subfolder & name it as whatever you want to name it.
Inside your script folder, save any js you want in each file like for example,
1)if you want your who right clicked cbox by feruzz, save it as wrccbox.js
2)if you want friend randomizer save it also as one file as frbox.js
3)if you want wvm cbox mode, save it also as one file as wvmcbox.js
So the above examples will be the contents of your scriptfolder.
If you named your subfolder javascripts then put the link into the scriptFolder area.
To apply it in the script it will then look like this:
scriptFolder = 'http://h1.ripway.com/username/javascripts/'
scripts = new Array()
scripts[0] = 'wrccbox.js'
scripts[1] = 'frbox.js'
scripts[2] = 'wvmcbox.js'
for(x in scripts){
myscripts = document.createElement('script')
myscripts.src = scriptFolder+scripts[x]
document.getElementsByTagName('head')[0].appendChild(myscripts)}
=>Save as whatever you want to name it.This will then your main js file which you need to add in your linker to paste in your profile.
=>You can also make use of this as your multiple js injection to be injected inside your wvm,check number 5 topic on how I implemented it.There is also modification base on what archer posted in cradle forum.
Links:
Javascript functions explained by marfillaster:
http://friendstertalk.com/viewtopic.php?id=5163&p=1
Random Photo Gallery by Feruzz:
http://friendstertalk.com/t16330-Random … ED%5D.html
Friends Randomizer by Marfillaster
http://friendstertalk.com/viewtopic.php?id=5764&p=1
Quick Message Box
http://friendstertalk.com/viewtopic.php?id=3626&p=1
AntiPoser Cbox With Smilies
http://friendstertalk.com/t8446-AntiPos … dated.html
Vertical Slide in your Friends Box
http://friendstertalk.com/viewtopic.php … 96&p=1
addNewBox.HTML Function by Feruzz
http://friendstertalk.com/t7930-addNewB … 28Nov.html
Marfillaster's addBox gen.
http://h1.ripway.com/mumbhaki/addBoxGenerator.html
Loading trick for all browser by Ezil2007:
http://friendstertalk.com/viewtopic.php?id=9412&p=1
Enterpage trick by Tazmaine...I'm going to link you to xavierkym's post since his is updated
http://friendstertalk.com/t6652-another … works.html
Viewer's Main Photo by Feruzz:
http://friendstertalk.com/viewtopic.php?id=9141&p=1
Photo Gallery Slide by mdirwan:
http://friendstertalk.com/t5696-Change- … MAGE..html
Force log-in script:
http://friendstertalk.com/t2535-Force-script.html
Moving box contents by Feruzz:
http://friendstertalk.com/t2052-Moving-Content.html
wvmcbox mode by Feruzz:
http://friendstertalk.com/t3117-CBOX-Mode.html
Icon under controlpanel buttons
http://friendstertalk.com/viewtopic.php?id=5437&p=1
Please take note that this is made as guides for the beginners and to those who doesn't know how to compile & are having problems compiling their codes.I'm just sharing what I learned.
b]
[b]=>The contents posted here is based on the help I got from one of the moderator here & also the maker of lots of js tweaks.
=>It is also based on tests I did when helping other members who had been having problems in making their compiled js to work.
I want to extend my gratitude to all, mods => especially Feruzz & xavierkym , members=> especially to Refresh/Reload,archer for his script in loading multiple js,ArchAngell for their codes,code makers,TT&Help section.... I learned a lot from you guys..A bunch of Thanks!
Last edited by mickyriora (2008-01-19 19:31:07)
-Offline- |

nice guide for newbies.
Last edited by sickofyou (2007-11-03 06:50:01)
-Offline- |
mickyriora wrote:
Since there are still lots of newbies who doesn't know how to compile their js codes, I decided to create this as a guide for them.
First of all, please familiarize yourself with all the codes & take note of the difference between css & js.
The topic here is about compiling js so don't be asking about css![]()
I'm going to start with using wvm- tracker.js as the main js file.
Mostly who have wvm tend to add sidebars.
The very first thing that you should take note of is the function that you are going to use when adding sidebars.
Example using v2.1:
Version 2.1 has this function inside:Code:
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 0 = controlpanel 1 = photos 13 = blogs 12 = reviews 6 = moreabout 18 = publiccomments 10 = scrapbook RIGHT 15 = meettrail 2 = friends 14 = googleads 7 = fan 8 = groups null - appends to lastOriginal Marfi's version3.1.1 have this addbox function:
Code:
function addBox (type,head,code,id,siblingafter) { /* type: 'standalonebox' - w/o header ex. ads, meettrail 'commonbox' - w/ header ex. controlpanel, friends head: html string title null - no header bar code: html string content id: unique string css pointer siblingafter: regexp classname 'left' - mainbar column end 'right' - sidebar column end */ try { var li=document.createElement("li"); } catch(e) { var li=document.createElement("<li>"); } if(head) head="<h2>"+head+"</h2>"; li.innerHTML="<div id=\""+id+"\" class=\""+type+" "+id+"\">"+ head+ "<div id=\"content_"+id+"\">"+ code+ "</div>"+ "</div>"; if(siblingafter=="left") getElementByClass(/commonbox[\s]*?controlpanel/i,null,"DIV")[0].parentNode.parentNode.appendChild(li); else if(siblingafter=="right") getElementByClass(/commonbox[\s]*?friends/i,null,"DIV")[0].parentNode.parentNode.appendChild(li); else { var si=getElementByClass(siblingafter,null,"DIV")[0]; si.parentNode.parentNode.insertBefore(li,si.parentNode); } }So as you can see the v2.1 & v3.1.1 uses different div id's. Whichever you are using should follow the sibling,that you will input.
Example you want to add chatbox inside your wvmversion2.1. The sibling you should use is number, as shown below:
addBox("RIGHT","My Chat Box",cbox,"CHIKACHIKABOOMBOOM","2");
For Version3.1.1..The sibling you have to use is different.
Instead of using 2 you then have to use friends/iHere are guides in adding other codes:
//Other codes here like
=>css injection
=>js injection
=>loading page
=>YM Status
=>Force Log-in
function onProfileLoad() {
//onload handler
addboxes here
addBox("RIGHT",pageOwnerFName+"'s Visitors",TRACKER.div.innerHTML,"tracker",null);
Ffetcher.init(); (for friend randomizer)
Moving boxes here by Feruzz
Photo Gallery slide by mdirwan
}
you can also input Force log-in script here
//TRACKER OBJECT
No Editing Here
/*END TRACKER OBJECT*/
/*MISC FUNCTIONS*/
friendrandomizer here
}
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
..blah,blah,blah...
No editing here
/*END MISC FUNCTIONS*/
You can insert js codes here too such as:
Viewer's Main Photo
Enter Page by Tazmaine( wherever you think/tested the code works better if here or inserting on top)
Photo Gallery slide by mdirwan( test also if it works better here on the one shown above)
Moving boxes by FeruzzTake note also that you don't need to used every onload handler functions when compiling the codes:
Lets apply some codes for your guides:// css injection
var css = document.createElement("link");
css.type = "text/css";
css.rel = "stylesheet";
css.href = "http://h1.ripway.com/username/filename.css";
css.media = "screen, print";
document.getElementsByTagName("head")[0].appendChild(css);
function onProfileLoad() {
//onload handler
//CBox
var cbox="<div align='center' id='cbox'>"+blah,blah,blah......
addBox("RIGHT","My Chat Box",cbox,"CHIKACHIKABOOMBOOM","14");
var mp3="<embed src=\"http://www.mp3profiles.com/players/style1/skinplayer.swf?blah,blah,blah....
addBox("right","My MP3",mp3,"muzic","2");
addBox("RIGHT","PEEPZ VISITED MY PAGE",TRACKER.div.innerHTML,"tracker",null);
//Moving Friends Box
var marqueeFriends = document.getElementById("content_2").innerHTML;
document.getElementById("content_2").innerHTML ="<marquee direction='up' height='300' scrollamount='2' onMouseOver='stop()' onMouseOut='start()'>"+
marqueeFriends+"</marquee>";
// Marquee Fan of Box
var marqueeFanof = document.getElementById("content_7").innerHTML;
document.getElementById("content_7").innerHTML ="<marquee direction='up' height='200' scrollamount='3' onMouseOver='stop()' onMouseOut='start()'>"+
marqueeFanof+"</marquee>";
// Groups
var marqueeGroups = document.getElementById('content_8').innerHTML;
var Friends = document.getElementById('content_8');
Friends.innerHTML = "<marquee id=\"marquee\" direction=\"up\" height=\"100\" scrollamount=\"5\" onMouseOver=\"stop()\" onMouseOut=\"start()\">" +
marqueeGroups + "<marquee>";
//Photo Gallery Slide
var slodde = "<embed src=\"http://widget-e7.slide.com/widgets/slideticker.swf\" type=\"application/x-shockwave-flash\" quality=\"high\" scale=\"noscale\" salign=\"l\" wmode=\"transparent\" flashvars=\"cy=fr&il=1&channel=YOUR OWN&site=widget-e7.slide.com\" style=\"width:100%;height:125px\" name=\"flashticker\" align=\"middle\"/><div style=\"width:100%;text-align:center;\"><a href=\"http://www.friendster.com/photos/USERID\" target=\"_blank\"><b>View All Photo</a> | <a href=\"http://www.friendster.com/friendphotoupload.php?uid=USERID\" target=\"_blank\">Upload Photo Fo Me</b></a></div>";
document.getElementById('content_1').style.height='100%';
document.getElementById('content_1').style.overflowY='hidden';
document.getElementById('content_1').innerHTML = "<table width='100%'><tr><td align='center'>"+slodde+"</td></tr></table>";
}
//Tehrzky's Block Me edited by Evan_Evanescence
if(pageViewerID==""){
alert("Please log in your FRIENDSTER account to view this page!");
top.location.href="http://www.friendster.com/login.php?next=/user.php?uid=USERID";
}
//TRACKER OBJECTLinks:
Enterpage trick by Tazmaine...I'm going to link you to xavierkym's post since his is updated![]()
http://friendstertalk.com/t6652-another … works.html
Viewer's Main Photo by Feruzz:
http://friendstertalk.com/viewtopic.php?id=9141&p=1
Photo Gallery Slide by mdirwan:
http://friendstertalk.com/t5696-Change- … MAGE..html
Force log-in script:
http://friendstertalk.com/t2535-Force-script.html
Moving box contents by Feruzz:
http://friendstertalk.com/t2052-Moving-Content.html
I'll be adding more guides here later..got to sleep...
so can i put this js files to my tracker txt or js???
whats the difference anyweiz???

BwizetT
The difference is just the file name. Original file is tracker.js right?
It was only renamed to .txt instead of .js because of the image linker that we are using....
-Offline- |

It is only an ADVICE ; the best thing to do is to put your WVMe with photos always on TOP of all your JS code to execute it first from all other JS Codes........ to avoid malfunction of your WVMe add-ons......
Because for the JS add-ons ; first onload add-ons is the first who will execute follow by the others as what you arrange the sidebars add-ons......
Just surfing around....... 
Ready to Share
That 's Friendstertalker....
-Offline- |

wow what a great tutorial!!! it looks like there will be less topics in the help section then... ![]()








Last edited by nigga (2007-11-03 08:06:17)

-Offline- |

nice one...lol...
very good for begginers..
+1 repu for your kindness and concern for begginers..
keep it up! ![]()


-Offline- |
waahhh... cant understand
i want to have wvm but didnt know what to do...

-Offline- |

nice miss micky...
![]()

