Post by grayfoot on Feb 17, 2008 14:42:14 GMT -5
I was looking a proboard codes and I found one that may come in handy. It allows a member to select a color when they modify their profile that all of their posts will appear in instead of having to repeatedly type the code [ color=___ ], which we can still use. I thought it come in handy, so feel free to use:
Main Footer
<script>
// Personal Color Code created by Infinite/Reverence.
// Copyright 04-05, All Rights Reserved.
// This code may not be redistributed without the consent of the creator.
// Main Footer.
var Table=document.getElementsByTagName("Table");
for(t=0;t<Table.length;t++){
if(location.href.match("modifyprofile&user=")){
if(Table[t].width=="650" && Table[t].cellPadding=="2" && Table[t].cellSpacing=="2" && Table[t].innerHTML.match(/gender:/i)){
var fieldBoxA=Table[t].insertRow(9).insertCell(0);
fieldBoxA.innerHTML="<font size='-1'>Personal Color:</font>";
var fieldBoxB=Table[t].rows[9].insertCell(1);
fieldBoxB.innerHTML="<font size='-1'><input type='text' name='persColor' id='persColor' size='35' maxlength='7' value='Default'></font>";
var fieldBoxC=Table[t].rows[9].insertCell(2);
fieldBoxC.innerHTML="<font size='-2'>Enter the hex color you would like all your posts to be.</font>";
document.modifyForm.personaltext.value=document.modifyForm.personaltext.value + "|--|" + document.modifyForm.persColor.value;
if(document.modifyForm.persColor.value==""){
document.modifyForm.persColor.value="Default";
}
if(document.modifyForm.personaltext.value.match(/\|--\|/)){
var splitEm=document.modifyForm.personaltext.value.split("|--|");
document.modifyForm.personaltext.value=splitEm[0];
document.modifyForm.persColor.value=splitEm[1];
}
}
function saveIt(){
if(document.modifyForm.persColor.value==""){
document.modifyForm.persColor.value="Default";
}
document.modifyForm.personaltext.value=document.modifyForm.personaltext.value + "|--|" + document.modifyForm.persColor.value;
}
document.modifyForm.onsubmit=saveIt;
}
}
var TD=document.getElementsByTagName("TD");
for(t=0;t<TD.length;t++){
if(location.href.match(/(viewprofile&user=|action=viewprofile)/)){
if(TD[t].innerHTML.match(/\|--\|/) && TD[t].width=="20%"){
var splitEm=TD[t].innerHTML.split("|--|");
var splitEm=splitEm[1].split(/<br>/i);
TD[t].innerHTML=TD[t].innerHTML.replace("|--|"+splitEm[0],"");
}
}
if(location.href.match(/(pmview&view=1&id=|pmview&view=2&id=)/)){
if(TD[t].innerHTML.match(/\|--\|/) && TD[t].width=="20%"){
var splitEm=TD[t].innerHTML.split("|--|");
var splitEm=splitEm[1].split(/<br>/i);
TD[t].innerHTML=TD[t].innerHTML.replace("|--|"+splitEm[0],"");
var persColor=splitEm[0];
if(persColor=="Default"){
var persColor="";
}
}
if(TD[t].colSpan=="3" && TD[t-1].width=="40%" && TD[t-1].height=="20"){
TD[t].innerHTML="<font color='"+persColor+"'>"+TD[t].innerHTML+"</font>";
}
}
}
</script>
Board Footers:
<script>
// Personal Color Code created by Infinite/Reverence.
// Copyright 04-05, All Rights Reserved.
// This code may not be redistributed without the consent of the creator.
// Board Footers.
var TD=document.getElementsByTagName("TD");
for(t=0;t<TD.length;t++){
if(TD[t].innerHTML.match(/\|--\|/) && TD[t].width=="20%"){
var splitEm=TD[t].innerHTML.split("|--|");
var splitEm=splitEm[1].split(/<br>/i);
TD[t].innerHTML=TD[t].innerHTML.replace("|--|"+splitEm[0],"");
var persColor=splitEm[0];
if(persColor=="Default"){
var persColor="";
}
TD[t+5].innerHTML="<font color='"+persColor+"'>"+TD[t+5].innerHTML+"</font>";
}
}
</script>