Post by SubDevo on Sept 3, 2009 23:13:06 GMT -8
Profile Background Image Global/Certain Users by SubDevo
Tested in IE, FF, Opera, Safari and Chrome.
Allows you to use a background image for the "View Profile" page for your entire forum.
Allows you to give certain users a different background of your choosing.
Using a global profile image will give your forum a little more "character".
Admins can use the "certain users" background image as a "prize" or a "thank you" or whatever for a "special" member!
Let your staff have their own image too! This sets them apart from the regular members.
Enjoy!!!
SubDevo
Variable Descriptions:
var pImg="URL TO IMAGE"; // URL to Global Image.
Enter the URL to your global profile background image. This image will be used for all profiles except for the members listed in the next variable below.
uI["username"]="URL TO IMAGE"; // URL to Image.
Enter the user name (NOT display name) in the first Maroon part, and the URL to their image in the second part. Any users listed here will overide the global image. To add more users, simply copy/repeat this line and change the username and URL to the image.
Example:
uI["admin"]="URL TO IMAGE"; // URL to Image.
uI["joe2000"]="URL TO IMAGE"; // URL to Image.
uI["maryjp"]="URL TO IMAGE"; // URL to Image.
To temporarily disable any user, just set the user name part to "". Using this method, you don't have to remove the entire line of code and you can reuse it later.
NOTE:
If you have a user in the list, and the url does not start with "http://", the global image will be shown instead. If the URL is "bad", even the global image will not show. In this case, correct the URL or disable the user in the list by setting the user name to "".
Another point... You can change the code to use the same image for ALL profiles by setting all the user names in the list to "". Likewise, you may set the Global image to "", to only use a background image for certain users.
Location: Main Footer
<script type="text/javascript">
/* Profile Background Image Global/Certain Users by SubDevo */
/* Main Footer - Please leave this header intact. Do not repost. */
/* interoceandesigns.com or lsdp.proboards.com */
var pImg="URL TO IMAGE"; // URL to Global Image.
var uI=[]; // DO NOT TOUCH
// FORMAT uI["username"]="URL TO IMAGE";
uI["username"]="URL TO IMAGE"; // URL to Image.
var td=document.getElementsByTagName("td"),rm=/user=(.+?)\"/i,a,n,x=0,pU;
if(pb_action=="viewprofile"){
while(td[++x]){a=td[x-1];
if(td[x].width=="80%"&& a.width=="20%"&&rm.test(a.innerHTML)){
pU=RegExp.$1; n=pImg;
if(uI[pU]&&/^http:/i.test(uI[pU])){n=uI[pU];}
if(n&&/^http:/i.test(n)){td[x].style.backgroundImage="url("+n+")"; break;}
}}}
</script>
EDIT (6/10/2011):
Code made smaller and faster. NOT a bug fix.
Tested in IE, FF, Opera, Safari and Chrome.
Allows you to use a background image for the "View Profile" page for your entire forum.
Allows you to give certain users a different background of your choosing.
Using a global profile image will give your forum a little more "character".
Admins can use the "certain users" background image as a "prize" or a "thank you" or whatever for a "special" member!
Let your staff have their own image too! This sets them apart from the regular members.
Enjoy!!!
SubDevo
Variable Descriptions:
var pImg="URL TO IMAGE"; // URL to Global Image.
Enter the URL to your global profile background image. This image will be used for all profiles except for the members listed in the next variable below.
uI["username"]="URL TO IMAGE"; // URL to Image.
Enter the user name (NOT display name) in the first Maroon part, and the URL to their image in the second part. Any users listed here will overide the global image. To add more users, simply copy/repeat this line and change the username and URL to the image.
Example:
uI["admin"]="URL TO IMAGE"; // URL to Image.
uI["joe2000"]="URL TO IMAGE"; // URL to Image.
uI["maryjp"]="URL TO IMAGE"; // URL to Image.
To temporarily disable any user, just set the user name part to "". Using this method, you don't have to remove the entire line of code and you can reuse it later.
NOTE:
If you have a user in the list, and the url does not start with "http://", the global image will be shown instead. If the URL is "bad", even the global image will not show. In this case, correct the URL or disable the user in the list by setting the user name to "".
Another point... You can change the code to use the same image for ALL profiles by setting all the user names in the list to "". Likewise, you may set the Global image to "", to only use a background image for certain users.
Location: Main Footer
<script type="text/javascript">
/* Profile Background Image Global/Certain Users by SubDevo */
/* Main Footer - Please leave this header intact. Do not repost. */
/* interoceandesigns.com or lsdp.proboards.com */
var pImg="URL TO IMAGE"; // URL to Global Image.
var uI=[]; // DO NOT TOUCH
// FORMAT uI["username"]="URL TO IMAGE";
uI["username"]="URL TO IMAGE"; // URL to Image.
var td=document.getElementsByTagName("td"),rm=/user=(.+?)\"/i,a,n,x=0,pU;
if(pb_action=="viewprofile"){
while(td[++x]){a=td[x-1];
if(td[x].width=="80%"&& a.width=="20%"&&rm.test(a.innerHTML)){
pU=RegExp.$1; n=pImg;
if(uI[pU]&&/^http:/i.test(uI[pU])){n=uI[pU];}
if(n&&/^http:/i.test(n)){td[x].style.backgroundImage="url("+n+")"; break;}
}}}
</script>
EDIT (6/10/2011):
Code made smaller and faster. NOT a bug fix.