
If you saw my profile and wonderin why it's a Wan Cowum Pwofayl.. Just read this thread.. LOL
CAUTION: Needs understanding on how functions work
This is not just a copy paste code it needs your analysis of how the code works.
This script will make your Friendster Profile Boxes in One Column
The function codes work like this:
function fixBox(boxID,set) {
//by xavierkym
//set "CUSTOM" | null
//if "CUSTOM" set your settings in the function below
/* Available default boxID
RIGHT BOXES
0 = controlpanel
1 = photos
13 = blogs
12 = reviews
6 = moreabout
18 = publiccomments
10 = scrapbook
*/
var box;
box = parent.document.getElementById(boxID);
if (set == null) {
box.style.position = "relative";
box.style.overflow = "auto";
box.style.overflowX = "hidden";
box.style.left = "160px";
box.style.width = "490px";
}
else if (set == "CUSTOM") {
box.style.position = "relative";
box.style.overflow = "hidden";
box.style.left = "160px";
box.style.width = "490px";
}
}
function centerBox(boxID,sibling,insert,set) {
//by xavierkym
//insert "UP" | "DOWN"
//set default is = null
/* Available default boxID
RIGHT BOXES
15 = meettrail
2 = friends
14 = googleads
7 = fan
8 = groups
Available default sibling
LEFT BOXES
0 = controlpanel
1 = photos
13 = blogs
12 = reviews
6 = moreabout
18 = publiccomments
10 = scrapbook
*/
var baseID; var cNode; var module; var box;
baseID = document.getElementById(sibling);
cNode = baseID.parentNode;
module = document.getElementById(boxID);
box = parent.document.getElementById(boxID);
if (set == null) {
box.style.position = "relative";
box.style.overflow = "auto";
box.style.overflowX = "hidden";
box.style.left = "160px";
box.style.width = "490px";
}
if (insert == "UP") {
cNode.parentNode.insertBefore(module,cNode);
}
else if (insert == "DOWN") {
cNode.appendChild(module);
}
}I created 2 functions called centerBox and fixBox
How does it work??
The fixBox function is used just to push your Left Side Boxes to the Center
While the centerBox is used to bring the Right Side Boxes to the Center as well..
But you can set where you want the box to appear.. 
If you have the complete friendster boxes.. Most Likely You'll end up with having Cpanel, Photos, Blogs, Reviews, AboutMe, Comments and Scrapbook for the Left Side Boxes..
Then Meettrail, Friends, Fanof and Groups for the Right Side Boxes.. (You need to hide the ads though)
First we need to configure the Left Sideboxes using the fixBox function.
This code below will put your LEFT Side Boxes to the Center..
if (!attachOnLoadHandler(function(){leftBoxes()})) window.onload = function(){leftBoxes()};
function leftBoxes() {
fixBox("0",null); //Cpanel
fixBox("1",null); //Photos
fixBox("13",null); //Blogs
fixBox("12",null); //Reviews
fixBox("6",null); //MoreAbout
fixBox("18",null); // Comments
fixBox("10",null); //Media Box
}
function fixBox(boxID,set) {
//by xavierkym
//set "CUSTOM" | null
//if "CUSTOM" set your settings in the function below
/* Available default boxID
RIGHT BOXES
0 = controlpanel
1 = photos
13 = blogs
12 = reviews
6 = moreabout
18 = publiccomments
10 = scrapbook
*/
var box;
box = parent.document.getElementById(boxID);
if (set == null) {
box.style.position = "relative";
box.style.overflow = "auto";
box.style.overflowX = "hidden";
box.style.left = "160px";
box.style.width = "490px";
}
else if (set == "CUSTOM") {
box.style.position = "relative";
box.style.overflow = "hidden";
box.style.left = "160px";
box.style.width = "490px";
}
}After that, you can now transfer your Right side boxes to the center using the centerBox function..
if (!attachOnLoadHandler(function(){rightBoxes()})) window.onload = function(){rightBoxes()};
function rightBoxes() {
centerBox("2","13","DOWN",null); //Friends below Blogs
centerBox("7","10","UP",null); //Fanof above Media Box
centerBox("8","18","DOWN",null); //Groups below Comments
centerBox("15","0","UP",null); //Mettrail above CPanel
}
function centerBox(boxID,sibling,insert,set) {
//by xavierkym
//insert "UP" | "DOWN"
//set default is = null
/* Available default boxID
RIGHT BOXES
15 = meettrail
2 = friends
14 = googleads
7 = fan
8 = groups
Available default sibling
LEFT BOXES
0 = controlpanel
1 = photos
13 = blogs
12 = reviews
6 = moreabout
18 = publiccomments
10 = scrapbook
*/
var baseID; var cNode; var module; var box;
baseID = document.getElementById(sibling);
cNode = baseID.parentNode;
module = document.getElementById(boxID);
box = parent.document.getElementById(boxID);
if (set == null) {
box.style.position = "relative";
box.style.overflow = "auto";
box.style.overflowX = "hidden";
box.style.left = "160px";
box.style.width = "490px";
}
if (insert == "UP") {
cNode.parentNode.insertBefore(module,cNode);
}
else if (insert == "DOWN") {
cNode.appendChild(module);
}
}If you use the addBox function.. There is a simple trick so that it will also move to the center..
First get your box id.. for example: custombox_69
Adjust it using CSS.
#custombox_69 {
position: relative;
left: 160px!important;
overflow: auto;
width: 490px
}
If you don't know what I'm talking about.. Just view this Preview.
Browser Compatible: IExplorer6+ , FireFox2+, Opera 8+
Screen Resolution: Best in 1024 X 768 or 1280 X 1024
ENJOY! 
Last edited by xavierkym (2008-01-21 19:19:47)

1st to comment!
Thanks !I'll try on my test proffy.YOu got some good looking proffy and thanks for sharing!

Last edited by lilprincess950 (2008-02-01 00:32:09)


WOW..super looking profile and thanks so much for sharing
+1 for sure 

-Offline- |

Wan Cowum Pwofayl...nice trick buddy.... 
Last edited by lordheinz (2008-01-19 04:01:33)
-Offline- |

-Offline- |

waakakak wan kowum pwofayl rocks hahahaha even it can cause the page to be long just have the scrolling box to minimize the height
nice nice epic win XD
-Offline- |

tenx for sharing

-Offline- |

nice ! 

-Offline- |

da pweview wooks gw8!
It kind of wooks wyk a bwog with 1 kowum or an ovaway
wahehe
sir when i view ur preview i see dat all the boxes are overlap...
i dunno if its my pc's problem...
but thx agen for sharing

-Offline- |

cool script!!! 

-Offline- |
I'll try to make the simplified version
very nice effort bro 
sadie wrote:
sir when i view ur preview i see dat all the boxes are overlap...
i dunno if its my pc's problem...
but thx agen for sharing
I think he should remove the setTimeout and use onload handler
Last edited by feruzz (2008-01-19 07:29:40)

it didn't work
my boxes just over laped!
one box on top of another 

-Offline- |

oh i see..now i know how did you do that.. finally you posted it sir xavier..hehe!




-Offline- |

tnx for sharing this kewl trick
just a question sir..can we arrange the boxes in order that we want?


-Offline- |

^unfortunately dude, you cannot.. it is in the 1st post..
The fixBox function is used just to push your Left Side Boxes to the Center
While the centerBox is used to bring the Right Side Boxes to the Center as well..
But you can set where you want the box to appear..




-Offline- |

`w0w nice preview...it's okay to mask it?
-Offline- |

@ slashedkite maybe we can?.for ex. media box on top of photo gallery box something like that?
But you can set where you want the box to appear..
Last edited by mentalblock27 (2008-01-19 11:00:46)


-Offline- |