
All the Credits to Cip192
I will just interpret this tweak in Multiply Application Using the Addbox Function...
Image Preview...
Full Code:
if (!addEvent(function() { onPageLoad();})) { window.onload = function() { onPageLoad();};}
function onPageLoad() {
//existing codes here
var dk="<div id=\"object\"></div>";
addBox("top","<font size=2px>Object Switcher: <A HREF=\"javascript:normal()\">0</A> | <A HREF=\"javascript:one()\">1</A> | <A HREF=\"javascript:two()\">2</A> | <A HREF=\"javascript:three()\">3</A> | <A HREF=\"javascript:four()\">4</A></font>",dk,"DK");
normal();
}
//ADDBOX FOR MULTIPLY
function addBox (type,head,htm,id,sibling) {
//by blurrycloud multiply version 2008-3000
//credits to marfillaster friendster version
//type "top" | "bottoml" | "bottomr" | "siderail"
//head header string
//htm innerHTML string
//id css_id string
/* Available default Siblings
Coming Soon
*/
try {
var br=document.createElement("li");
} catch(e) {
var br=document.createElement("<br>");
}
if(type=="top") {
var ul=document.getElementById("mainbox_1");
htm="<div class='itemboxsub'>"+htm+"</div>";
}
else if(type=="bottomr") {
var ul=document.getElementById("mainbox_4");
}
else if(type=="siderail") {
var ul=document.getElementById("rail");
}
else var ul=document.getElementById("mainbox_3");
br.innerHTML="<br><div id='"+id+"' class='itemboxsub "+id+"'>"+
"<h2>"+head+"</h2>"+
"<div id='content_"+id+"'>"+htm+
"</div>"+
"</div>";
if(sibling==null) ul.appendChild(br);
else {
sibling=document.getElementById(sibling);
ul.insertBefore(br,sibling);
}
}
function normal()
{
ht = document.getElementById("object");
ht.innerHTML="<div align=\"center\">objects here,videos,mp3 or images deafult</div>";
}
function one()
{
ht = document.getElementById("object");
ht.innerHTML="<div align=\"center\">objects here,videos,mp3 or images deafult</div>";
}
function two()
{
ht = document.getElementById("object");
ht.innerHTML="<div align=\"center\">objects here,videos,mp3 or images deafult</div>";
}
function three()
{
ht = document.getElementById("object");
ht.innerHTML="<div align=\"center\">objects here,videos,mp3 or images deafult</div>";
}
function four()
{
ht = document.getElementById("object");
ht.innerHTML="<div align=\"center\">objects here,videos,mp3 or images deafult</div>";
}
replace those red parts in your own arrangement in each objects
note:
dont forget to add--> \ before each quotation of the object you want to put--> \"
or other way replace double quotation (") by single quote (')
for example in function normal we add a youtube video.
function normal()
{
ht = document.getElementById("object");
ht.innerHTML="<div align=\"left\"><object width=\"95%\" height=\"370\"><param name=\"movie\" value=\"http://www.youtube.com/v/V-WVjl5n0JU&rel=1\"></param><embed src=\"http://www.youtube.com/v/V-WVjl5n0JU&rel=1\" type=\"application/x-shockwave-flash\" width=\"80%\"height=\"200\"></embed></object></div>";
}
function one()
{
ht = document.getElementById("object");
ht.innerHTML="<div align=\"center\">objects here,videos,mp3 or images deafult</div>";
}
function two()
{
ht = document.getElementById("object");
ht.innerHTML="<div align=\"center\">objects here,videos,mp3 or images deafult</div>";
}
function three()
{
ht = document.getElementById("object");
ht.innerHTML="<div align=\"center\">objects here,videos,mp3 or images deafult</div>";
}
function four()
{
ht = document.getElementById("object");
ht.innerHTML="<div align=\"center\">objects here,videos,mp3 or images deafult</div>";
}
then after picking up the function put this code below the onloadhandler (inside) code-----> normal();
function onProfileLoad() {
//existing codes here
normal();
}
Complete Example:
function onProfileLoad() {
//existing codes here
var dk="<div id=\"object\"></div>";
addBox("top","<font size=2px>Object Switcher: <A HREF=\"javascript:normal()\">0</A> | <A HREF=\"javascript:one()\">1</A> | <A HREF=\"javascript:two()\">2</A> | <A HREF=\"javascript:three()\">3</A> | <A HREF=\"javascript:four()\">4</A></font>",dk,"DK");
normal();
}
That's it your done... Goodluck
FAQ
Q: Can I change the position of the box?
A: Yes Ofcourse: If you read how to apply the addbox function that i posted on the other thread....
you can change the position of your box
Available positions if your boxes is in default mode....top
bottoml
bottomr
siderail
Just look for the bod part hereaddBox("top","Object Switcher.........
Last edited by blurrycloud (2008-05-17 06:03:29)
cool...but can it be use in friendster too?
-Offline- |

this tweak is originally made for friendster profile


^ thanks bro.. more tweaks to come... hehe
![]()

nice thanks for sharing! 


thx for share...cool ![]()

|
wow! nice tricks! i'll try dis one later! cheers dude!

cool 

here are my existing codes:
//YOUTUBE
var youtube7="<embed src='http://www.youtube.com/v/3X4CwGGJQMI&hl=1' type='application/x-shockwave-flash' width='90%' height='100'></embed>";
addBox("top","Holy is The Lord-Chris Tomlin",youtube7,"ul_youtube_content");
i dunno where will i put my other u tube codes below:
<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/2YzhWLImPUE&hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/2YzhWLImPUE&hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>
<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/1frAsGmQHE8&hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/1frAsGmQHE8&hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>
is this correct?
function one()
{
ht = document.getElementById("object");
ht.innerHTML="<div align=\"center\">
<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/1frAsGmQHE8&hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/1frAsGmQHE8&hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></div>";
}
Last edited by valjesnet (2008-05-02 23:45:33)
-Offline- |

<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/1frAsGmQHE8&hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/1frAsGmQHE8&hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>
i told you before to change the double quotes into single quote right?
so this will be the code refer below 
function one()
{
ht = document.getElementById("object");
ht.innerHTML="<div align=\"center\"><object width='425' height='355'><param name='movie' value='http://www.youtube.com/v/1frAsGmQHE8&hl=en'></param><param name='wmode' value='transparent'></param><embed src='http://www.youtube.com/v/1frAsGmQHE8&hl=en' type='application/x-shockwave-flash' wmode='transparent' width='425' height='355'></embed></object></div>";
}
Last edited by blurrycloud (2008-05-03 00:52:12)

thanks for sharin.
it will help me a lot.