Post by SubDevo on Mar 4, 2010 19:47:40 GMT -8
Mini-Profile Replace Anything Global by SubDevo
Tested in IE, FF, Opera, Safari and Chrome.
This code is small and very powerful. It allows you to replace anything in your mini-profile with different text or even an image. It takes the place of many different codes.
Edit the Maroon portions.
Do not put a comma on the last line of the list!
var fRep=[ // "Text to Replace", "Replacement"
["Exalt","Like"],
["Smite","Dislike"] <--- NO COMMA
];
Just place the word you would like to replace first then the replacement.
Copy/paste to add more items.
If you are only replacing one word, do NOT put a comma at the end.
Read below the code for examples of what you can do with this code.
Enjoy!!!
SubDevo
NOTE: Be careful of changing "Posts" or "Gender", some codes rely upon these words in order to run. Especially RPG codes. So place this code BELOW any affected code.
Location: Global Footer
<script type="text/javascript">
/* Mini-Profile Replace Anything Global by SubDevo */
/* Global Footer - Please leave this header intact. Do not repost. */
/* interoceandesigns.com or lsdp.proboards.com */
var fRep=[ // "Text to Replace", "Replacement".
["Exalt","Like"],
["Smite","Dislike"]
];
var tr=document.getElementsByTagName("tr"),a,b,i,n=/n=viewprofile&/,x=-1;
if(/(calendar|pm|pre)view|viewprofile|search2|display/i.test(pb_action)){
while(tr[++x]){a=tr[x].firstChild;
if(a&&a.width=="20%"&&n.test(a.innerHTML)){ b=a.innerHTML;i=-1;
while(fRep[++i]){b=b.replace(fRep[0],fRep[1]);}
a.innerHTML=b;
}}}
</script>
This leaves only the gender icon:
["Gender:",""],
["Female",""],
["Male",""]
Use for group images: (Edit to use your own group names)
["Administrator",'<img src="URL TO IMAGE"/>'],
["Global Moderator",'<img src="URL TO IMAGE"/>'],
["Moderator",'<img src="URL TO IMAGE"/>'],
["New Member",'<img src="URL TO IMAGE"/>'],
["Junior Member",'<img src="URL TO IMAGE"/>'],
["Full Member",'<img src="URL TO IMAGE"/>'],
["Senior Member",'<img src="URL TO IMAGE"/>'],
["Elite Member",'<img src="URL TO IMAGE"/>'],
Change style of online and offline:
["online","<span style='color:Limegreen;'>Online</span>"],
["offline","<font color=Red><b><i>Offline</i></b></font>"],
Change Exalt / Smite with color and hover text:
["Exalt","<font style='padding-left:5px;' title='If I was helpful to you...\nGive Me Some Respect!'color='#4877E0' size='2'>Respect<i>!</i></font>"],
["Smite","<font title='If you think I deserve it...\nGo ahead and Smack Me!' color='#4877E0' size='2'>Smack<i>!</i></font>"],
The above are just to give you an idea of what you can do. You do not have to use the code as it is in the examples. The replacement can be text, or HTML (image or styles) for anything that you want to replace. Just use your imagination...
You may also use regex (regular expressions). This is very powerful and you need to be VERY careful of what you are replacing. You can make a mess of your mini-profile if you don't know what you are doing.
Tested in IE, FF, Opera, Safari and Chrome.
This code is small and very powerful. It allows you to replace anything in your mini-profile with different text or even an image. It takes the place of many different codes.
Edit the Maroon portions.
Do not put a comma on the last line of the list!
var fRep=[ // "Text to Replace", "Replacement"
["Exalt","Like"],
["Smite","Dislike"] <--- NO COMMA
];
Just place the word you would like to replace first then the replacement.
Copy/paste to add more items.
If you are only replacing one word, do NOT put a comma at the end.
Read below the code for examples of what you can do with this code.
Enjoy!!!
SubDevo
NOTE: Be careful of changing "Posts" or "Gender", some codes rely upon these words in order to run. Especially RPG codes. So place this code BELOW any affected code.
Location: Global Footer
<script type="text/javascript">
/* Mini-Profile Replace Anything Global by SubDevo */
/* Global Footer - Please leave this header intact. Do not repost. */
/* interoceandesigns.com or lsdp.proboards.com */
var fRep=[ // "Text to Replace", "Replacement".
["Exalt","Like"],
["Smite","Dislike"]
];
var tr=document.getElementsByTagName("tr"),a,b,i,n=/n=viewprofile&/,x=-1;
if(/(calendar|pm|pre)view|viewprofile|search2|display/i.test(pb_action)){
while(tr[++x]){a=tr[x].firstChild;
if(a&&a.width=="20%"&&n.test(a.innerHTML)){ b=a.innerHTML;i=-1;
while(fRep[++i]){b=b.replace(fRep[0],fRep[1]);}
a.innerHTML=b;
}}}
</script>
This leaves only the gender icon:
["Gender:",""],
["Female",""],
["Male",""]
Use for group images: (Edit to use your own group names)
["Administrator",'<img src="URL TO IMAGE"/>'],
["Global Moderator",'<img src="URL TO IMAGE"/>'],
["Moderator",'<img src="URL TO IMAGE"/>'],
["New Member",'<img src="URL TO IMAGE"/>'],
["Junior Member",'<img src="URL TO IMAGE"/>'],
["Full Member",'<img src="URL TO IMAGE"/>'],
["Senior Member",'<img src="URL TO IMAGE"/>'],
["Elite Member",'<img src="URL TO IMAGE"/>'],
Change style of online and offline:
["online","<span style='color:Limegreen;'>Online</span>"],
["offline","<font color=Red><b><i>Offline</i></b></font>"],
Change Exalt / Smite with color and hover text:
["Exalt","<font style='padding-left:5px;' title='If I was helpful to you...\nGive Me Some Respect!'color='#4877E0' size='2'>Respect<i>!</i></font>"],
["Smite","<font title='If you think I deserve it...\nGo ahead and Smack Me!' color='#4877E0' size='2'>Smack<i>!</i></font>"],
The above are just to give you an idea of what you can do. You do not have to use the code as it is in the examples. The replacement can be text, or HTML (image or styles) for anything that you want to replace. Just use your imagination...
You may also use regex (regular expressions). This is very powerful and you need to be VERY careful of what you are replacing. You can make a mess of your mini-profile if you don't know what you are doing.