InterOcean Designs
« Mini-Profile Background Image Global/Certain Users »

Welcome Guest. Please Login or Register.
May 24, 2013, 4:04pm




InterOcean Designs :: ProBoards Codes :: ProBoard Code Database :: Mini-Profile Background Image Global/Certain Users
Page 1 of 2 » Jump to page   Go    [Search This Thread] [Share Topic] [Print]
 AuthorTopic: Mini-Profile Background Image Global/Certain Users (Read 1,900 times)
SubDevo
Co-Admin
Code Support
member is offline

[avatar]

Creator of LSD...


[homepage]

Joined: Mar 2009
Gender: Male
Posts: 2,594
Location: MI, USA
Karma: 102
 Mini-Profile Background Image Global/Certain Users
« Thread Started on Sept 3, 2009, 5:32am »

Mini-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 Mini-Profile for your entire forum.
Allows you to give certain users a different background of your choosing.

Using a global mini-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 mini-profile background image. This image will be used for all mini-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 Yellow 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 mini-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: Global Footer
Code:
<script type="text/javascript">
/* Mini-Profile Background Image Global/Certain Users by SubDevo */
/* Global Footer - Please leave this header intact. Do not repost. */
/* [url]http://interoceandesigns.com[/url] or [url]http://lsdp.proboards.com[/url] */

var gImg="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(/(calendar|pm|pre)view|viewprofile|search2|display/i.test(pb_action)){
&nbsp; &nbsp;while(td[++x]){a=td[x-1];
&nbsp; &nbsp;&nbsp; &nbsp;if(td[x].width=="80%"&& a.width=="20%"&&rm.test(a.innerHTML)){
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;pU=RegExp.$1; n=gImg;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;if(uI[pU]&&/^http:/i.test(uI[pU])){n=uI[pU];}
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;if(n&&/^http:/i.test(n)){a.style.backgroundImage="url("+n+")";}
}}}
</script>
« Last Edit: Jun 9, 2011, 11:30pm by SubDevo »Link to Post - Back to Top  IP: Logged

[image] [image]
[image]
Why are you looking at my signature, [ME]?
Super Dave
Junior Member
member is offline

[avatar]

I'm on a boat!



Joined: Apr 2009
Gender: Male
Posts: 77
Location: Toledo,Ohio
Karma: 2
 Re: Mini-Profile Background Image Global/Certain U
« Reply #1 on Sept 3, 2009, 9:07am »

Dude! You freaking ROCK! I will try this after I reply to a few other posts on here,lol..
Link to Post - Back to Top  IP: Logged

I'm Dave.... an all around cool guy! lol..
SubDevo
Co-Admin
Code Support
member is offline

[avatar]

Creator of LSD...


[homepage]

Joined: Mar 2009
Gender: Male
Posts: 2,594
Location: MI, USA
Karma: 102
 Re: Mini-Profile Background Image Global/Certain U
« Reply #2 on Sept 4, 2009, 10:56pm »


Sept 3, 2009, 9:07am, Super Dave wrote:
Dude! You freaking ROCK! I will try this after I reply to a few other posts on here,lol..


Wow! Thanks! ;D Tell me how it works out!

SubDevo
Link to Post - Back to Top  IP: Logged

[image] [image]
[image]
Why are you looking at my signature, [ME]?
Super Dave
Junior Member
member is offline

[avatar]

I'm on a boat!



Joined: Apr 2009
Gender: Male
Posts: 77
Location: Toledo,Ohio
Karma: 2
 Re: Mini-Profile Background Image Global/Certain U
« Reply #3 on Oct 10, 2009, 6:31pm »

I noticed that the background image only shows up when looking at the profile..then when you look at the posts,the background image isnt there..

Also could be because I am using the "make your own miniprofile" code..

heres a link to my profile..then if ya want check out a post I made..

http://swatairsoft.proboards.com/index.cgi?action=viewprofile&user=admin

Link to Post - Back to Top  IP: Logged

I'm Dave.... an all around cool guy! lol..
SubDevo
Co-Admin
Code Support
member is offline

[avatar]

Creator of LSD...


[homepage]

Joined: Mar 2009
Gender: Male
Posts: 2,594
Location: MI, USA
Karma: 102
 Re: Mini-Profile Background Image Global/Certain U
« Reply #4 on Oct 11, 2009, 11:27am »

Holy crap Dave, I feel so stupid... It is MY fault. :-[

I just modified the original post with code that actually works.
I won't go into the details, but it was a dumb mistake.
I changed the code at your site for you. Everything should be good now.
Sorry bro, and thanks for bringing this to my attention.

SubDevo
Link to Post - Back to Top  IP: Logged

[image] [image]
[image]
Why are you looking at my signature, [ME]?
Super Dave
Junior Member
member is offline

[avatar]

I'm on a boat!



Joined: Apr 2009
Gender: Male
Posts: 77
Location: Toledo,Ohio
Karma: 2
 Re: Mini-Profile Background Image Global/Certain U
« Reply #5 on Oct 11, 2009, 10:00pm »

lol..its all good my friend..I haven't been on alot lately so I didnt even notice right away.. :D
Link to Post - Back to Top  IP: Logged

I'm Dave.... an all around cool guy! lol..
GFX Support
GFX Designer
member is offline

[avatar]

Off duty



Joined: Apr 2009
Gender: Male
Posts: 1,962
Karma: 75
 Re: Mini-Profile Background Image Global/Certain U
« Reply #6 on Oct 12, 2009, 12:51am »


Sept 3, 2009, 5:32am, SubDevo wrote:
Location: Main Footer

<script type="text/Javascript">
<!--
/* Mini-Profile Background Image Global/Certain Users by SubDevo */
/* Global Footer - Please leave this header intact. Do not repost. */
/* http://interoceandesigns.proboards.com or http://lsdp.proboards.com */


So, where are we supposed to put this code? (see the parts in orange)
« Last Edit: Oct 12, 2009, 12:52am by GFX Support »Link to Post - Back to Top  IP: Logged

I'm off duty! For questions or support please contact RADesign or Speed Demon.
Super Dave
Junior Member
member is offline

[avatar]

I'm on a boat!



Joined: Apr 2009
Gender: Male
Posts: 77
Location: Toledo,Ohio
Karma: 2
 Re: Mini-Profile Background Image Global/Certain U
« Reply #7 on Oct 12, 2009, 7:57am »

lol..Nice catch RAD.. :D
Link to Post - Back to Top  IP: Logged

I'm Dave.... an all around cool guy! lol..
SubDevo
Co-Admin
Code Support
member is offline

[avatar]

Creator of LSD...


[homepage]

Joined: Mar 2009
Gender: Male
Posts: 2,594
Location: MI, USA
Karma: 102
 Re: Mini-Profile Background Image Global/Certain U
« Reply #8 on Oct 12, 2009, 10:19pm »

OMG! I'm falling apart! lol GLOBAL is correct. (changed post) geez...

SubDevo
Link to Post - Back to Top  IP: Logged

[image] [image]
[image]
Why are you looking at my signature, [ME]?
LunyRed
Senior Member
member is offline

[avatar]


[homepage]

Joined: Sept 2009
Gender: Male
Posts: 542
Location: An archipelago in SE Asia
Karma: 14
 Re: Mini-Profile Background Image Global/Certain U
« Reply #9 on Oct 14, 2009, 12:54am »

Finally I can use this code now! :D
Link to Post - Back to Top  IP: Logged

[image]
[ME] and I are best buddies~ Unlike me, [ME] is obsessed with Justin Bieber.. o_o'
Super Dave
Junior Member
member is offline

[avatar]

I'm on a boat!



Joined: Apr 2009
Gender: Male
Posts: 77
Location: Toledo,Ohio
Karma: 2
 Re: Mini-Profile Background Image Global/Certain U
« Reply #10 on Oct 14, 2009, 7:07am »

Works perfectly now my friend! ;D
Link to Post - Back to Top  IP: Logged

I'm Dave.... an all around cool guy! lol..
SubDevo
Co-Admin
Code Support
member is offline

[avatar]

Creator of LSD...


[homepage]

Joined: Mar 2009
Gender: Male
Posts: 2,594
Location: MI, USA
Karma: 102
 Re: Mini-Profile Background Image Global/Certain U
« Reply #11 on Oct 15, 2009, 5:25pm »

@Dave... Cool! Thank gawd you found there was a problem. I had to go and change my code at PBS, StudioZero and Provision... damn. LOL
And thanks to Rad for the "Main/Global" catch! hehe


Oct 14, 2009, 12:54am, LunyRed wrote:
Finally I can use this code now! :D

What? Did you try using it and it didn't work? Should have told me. :-/
I don't like to do half azz work boys and girls! :D

SubDevo
Link to Post - Back to Top  IP: Logged

[image] [image]
[image]
Why are you looking at my signature, [ME]?
GFX Support
GFX Designer
member is offline

[avatar]

Off duty



Joined: Apr 2009
Gender: Male
Posts: 1,962
Karma: 75
 Re: Mini-Profile Background Image Global/Certain U
« Reply #12 on Oct 16, 2009, 12:59am »


Oct 15, 2009, 5:25pm, SubDevo wrote:
I don't like to do half azz work boys and girls! :D

Why not? You just proved to be VERY GOOD in it. LMAO.

(Make one mistake and it'll haunt you for the rest of your life. ;))

Just kidding, Sub.
We ALL make mistakes, f*ck-up on something or mess things up. So we correct it, learn from it an become better man (hopefully ;)).
Link to Post - Back to Top  IP: Logged

I'm off duty! For questions or support please contact RADesign or Speed Demon.
LunyRed
Senior Member
member is offline

[avatar]


[homepage]

Joined: Sept 2009
Gender: Male
Posts: 542
Location: An archipelago in SE Asia
Karma: 14
 Re: Mini-Profile Background Image Global/Certain U
« Reply #13 on Oct 16, 2009, 9:39pm »


Oct 15, 2009, 5:25pm, SubDevo wrote:
What? Did you try using it and it didn't work? Should have told me. :-/
I don't like to do half azz work boys and girls! :D

SubDevo

Ah, I was about to, but I've completely forgotten all about this code. D: (I was still working back then on my forum layouts so I lost track of this)

But don't worry about this code not working before. You did a very good job with this cool code, Sub! :)
Link to Post - Back to Top  IP: Logged

[image]
[ME] and I are best buddies~ Unlike me, [ME] is obsessed with Justin Bieber.. o_o'
SubDevo
Co-Admin
Code Support
member is offline

[avatar]

Creator of LSD...


[homepage]

Joined: Mar 2009
Gender: Male
Posts: 2,594
Location: MI, USA
Karma: 102
 Re: Mini-Profile Background Image Global/Certain U
« Reply #14 on Jan 21, 2011, 11:33am »

Code has been updated to be smaller and faster! 8-)
Link to Post - Back to Top  IP: Logged

[image] [image]
[image]
Why are you looking at my signature, [ME]?
Page 1 of 2 » Jump to page   Go    [Search This Thread] [Share Topic] [Print]

Click Here To Make This Board Ad-Free


This Board Hosted For FREE By ProBoards
Get Your Own Free Message Boards & Free Forums!
Terms of Service | Privacy Policy | Notice | FTC Disclosure | Report Abuse | Mobile