Post by ialex on May 25, 2008 0:32:56 GMT -8
This will allow each user to add a link to their Bebo account in their mini profile via editing their main profile.
This is the mini profile icon that will be used:
You may continue using it or change it via the image URL at the top of the code.
Global Footer.
Cross Browser.
<script type="text/javascript">
<!--
/*Bebo Icon in Profile - By iAlex - Open Source*/
var iBebo_Icon={
iBebo_Image: "http://img91.imageshack.us/img91/9657/ibebobebobeboiconfd6.gif", //Bebo Image URL
iBebo_Location: function(){
if(document.modifyForm){
this.iBebo_Profile();
}
if(window.location.href.match(/action=(display|(user)?recent|viewprofile|calendarview|pmview)/) || window.location.href.match(/index.cgi$/) && (document.postForm||document.title.match(/\s-\sSearch/))){
this.iBebo_Mini();
}
},
iBebo_Profile: function(){
var iAim_Input=document.modifyForm.aim.parentNode.parentNode.parentNode;
var iPersonal_Text=document.modifyForm.personaltext;
var iBebo_Input=iAim_Input.cloneNode(true);
iBebo_Input.firstChild.firstChild.innerHTML='Bebo:';
iBebo_Input.firstChild.nextSibling.firstChild.innerHTML='<input type="text" size="35" maxlength="13" />';
iBebo_Input.lastChild.firstChild.innerHTML='Your Bebo identification number.';
iBebo_Field=iBebo_Input.firstChild.nextSibling.firstChild.firstChild;
if(iPersonal_Text.value.match(/\[b3B:(.+?)\]/)){
iBebo_Field.value=RegExp.$1;
iPersonal_Text.value=iPersonal_Text.value.replace(/\[b3B:(.+?)\]/, '');
}
iAim_Input.parentNode.insertBefore(iBebo_Input, iAim_Input);
function iBebo_Submit(){
if(iBebo_Field.value!=""){
iPersonal_Text.value=iPersonal_Text.value+'[b3B:'+iBebo_Field.value.replace(/\]/g, '')+']';
}
}
if(document.addEventListener){
document.modifyForm.addEventListener('submit', iBebo_Submit, false);
}
else{
document.modifyForm.attachEvent('onsubmit', iBebo_Submit);
}
},
iBebo_Mini: function(){
var iTd=document.getElementsByTagName('td');
var i=iTd.length-1;
do{
if(iTd.item(i).width=="20%" && iTd.item(i).className.match(/windowbg(2)?/) && iTd.item(i).vAlign=="top" && iTd.item(i).innerHTML.match(/\[b3B:(.+?)\]/)){
iTd.item(i).innerHTML=iTd.item(i).innerHTML.replace(/\[b3B:(.+?)\]/, '');
var iBebo_Span=document.createElement('span');
var iBebo_Centre=document.getElementsByTagName('center');
iBebo_Span.innerHTML='<a href="http://www.bebo.com/Profile.jsp?MemberId='+RegExp.$1+'"><img src="'+this.iBebo_Image+'" border="0" alt="Bebo" title="Bebo" target="_blank" /></a>';
iBebo_Centre.item(iBebo_Centre.length-1).appendChild(iBebo_Span);
}
i--;
}
while(i>5);
}
};
iBebo_Icon.iBebo_Location();
//-->
</script>
This is the mini profile icon that will be used:
You may continue using it or change it via the image URL at the top of the code.
Global Footer.
Cross Browser.
<script type="text/javascript">
<!--
/*Bebo Icon in Profile - By iAlex - Open Source*/
var iBebo_Icon={
iBebo_Image: "http://img91.imageshack.us/img91/9657/ibebobebobeboiconfd6.gif", //Bebo Image URL
iBebo_Location: function(){
if(document.modifyForm){
this.iBebo_Profile();
}
if(window.location.href.match(/action=(display|(user)?recent|viewprofile|calendarview|pmview)/) || window.location.href.match(/index.cgi$/) && (document.postForm||document.title.match(/\s-\sSearch/))){
this.iBebo_Mini();
}
},
iBebo_Profile: function(){
var iAim_Input=document.modifyForm.aim.parentNode.parentNode.parentNode;
var iPersonal_Text=document.modifyForm.personaltext;
var iBebo_Input=iAim_Input.cloneNode(true);
iBebo_Input.firstChild.firstChild.innerHTML='Bebo:';
iBebo_Input.firstChild.nextSibling.firstChild.innerHTML='<input type="text" size="35" maxlength="13" />';
iBebo_Input.lastChild.firstChild.innerHTML='Your Bebo identification number.';
iBebo_Field=iBebo_Input.firstChild.nextSibling.firstChild.firstChild;
if(iPersonal_Text.value.match(/\[b3B:(.+?)\]/)){
iBebo_Field.value=RegExp.$1;
iPersonal_Text.value=iPersonal_Text.value.replace(/\[b3B:(.+?)\]/, '');
}
iAim_Input.parentNode.insertBefore(iBebo_Input, iAim_Input);
function iBebo_Submit(){
if(iBebo_Field.value!=""){
iPersonal_Text.value=iPersonal_Text.value+'[b3B:'+iBebo_Field.value.replace(/\]/g, '')+']';
}
}
if(document.addEventListener){
document.modifyForm.addEventListener('submit', iBebo_Submit, false);
}
else{
document.modifyForm.attachEvent('onsubmit', iBebo_Submit);
}
},
iBebo_Mini: function(){
var iTd=document.getElementsByTagName('td');
var i=iTd.length-1;
do{
if(iTd.item(i).width=="20%" && iTd.item(i).className.match(/windowbg(2)?/) && iTd.item(i).vAlign=="top" && iTd.item(i).innerHTML.match(/\[b3B:(.+?)\]/)){
iTd.item(i).innerHTML=iTd.item(i).innerHTML.replace(/\[b3B:(.+?)\]/, '');
var iBebo_Span=document.createElement('span');
var iBebo_Centre=document.getElementsByTagName('center');
iBebo_Span.innerHTML='<a href="http://www.bebo.com/Profile.jsp?MemberId='+RegExp.$1+'"><img src="'+this.iBebo_Image+'" border="0" alt="Bebo" title="Bebo" target="_blank" /></a>';
iBebo_Centre.item(iBebo_Centre.length-1).appendChild(iBebo_Span);
}
i--;
}
while(i>5);
}
};
iBebo_Icon.iBebo_Location();
//-->
</script>