Advertise Here

Author Topic: [Code] Membergroup Image  (Read 32509 times)

0 Members and 1 Guest are viewing this topic.

Offline Agent Moose

  • Moderator
  • *****
  • Posts: 836
  • Do not PM me for Code Support or Request
    • View Profile

  • Total Badges: 32
    Badges: (View All)
    Search Level 6 Tenth year Anniversary Nineth year Anniversary Eighth year Anniversary
[Code] Membergroup Image
« on: May 03, 2009, 09:10:00 pm »
Put this in your Header if you do not already have it:

Code: [Select]
<script src="/jquery.js"></script>
Footers:
Code: [Select]
<script type="text/javascript">
function GroupImage(Name,Image){
//Created by Agent Moose (revolutionx.smfforfree3.com)
var DiV1 = document.getElementsByTagName("DiV");
var DiV2 = DiV1.length;
while(DiV2--){
if(DiV1[DiV2].innerHTML.indexOf(Name) != -1 && DiV1[DiV2].previousSibling.innerHTML){
DiV1[DiV2].previousSibling.firstChild.innerHTML = "<img src='" + Image + "' />" + DiV1[DiV2].previousSibling.firstChild.innerHTML;
}else if(DiV1[DiV2].innerHTML.indexOf(Name) != -1 && DiV1[DiV2].previousSibling.previousSibling.innerHTML){
DiV1[DiV2].previousSibling.previousSibling.firstChild.innerHTML = "<img src='" + Image + "' />" + DiV1[DiV2].previousSibling.previousSibling.firstChild.innerHTML;
};
};
};
GroupImage("GROUP NAME","IMAGE URL");
</script>
Original Request: http://www.smfsupport.com/support/code_requests/request_runescape_crowns_v2_read_for_more_info-t26638.0.html

I wasn't sure if I made this code already or not, so I just created it again :P

GROUP NAME = The Name of the Group.
IMAGE URL = The Image you want in front of that user who is in that particular group.

To add more groups, add more of these lines:
Code: [Select]
GroupImage("GROUP NAME","IMAGE URL");
Image shows in Post area only
Do not use with the Name Across Board Code

Enjoy :)
« Last Edit: May 04, 2010, 10:54:55 am by simply sibyl »
Check out Revolution X's Brand new Code Index!

Offline Didds

  • SMF For Free Sr. Member
  • *
  • Posts: 269
  • Didds Forums
    • View Profile
    • Didds Forums

  • Total Badges: 14
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Membergroup Image
« Reply #1 on: May 04, 2009, 03:03:22 am »
Nice ;)

Offline valhalla95

  • SMF For Free Member
  • *
  • Posts: 30
    • View Profile
    • {LYLE CODING}

  • Total Badges: 9
    Badges: (View All)
    Topic Starter Combination Level 2 Level 1 10 Posts
Re: [Code] Membergroup Image
« Reply #2 on: May 05, 2009, 07:41:30 am »
great code AM, it is faster and easier than the change name across board...so that u can just do the UG in stead of single users

Offline -A-

  • SMF For Free Sponsors
  • *
  • Posts: 877
  • Don't be afraid.
    • View Profile

  • Total Badges: 22
    Badges: (View All)
    Search Apple User Mobile User Windows User Topic Starter
Re: [Code] Membergroup Image
« Reply #3 on: May 05, 2009, 08:02:13 am »
Great... Can I customize it further? I am not into RSPS and all that, but I would like certian groups to have certian font styles, etc.

Offline Agent Moose

  • Moderator
  • *****
  • Posts: 836
  • Do not PM me for Code Support or Request
    • View Profile

  • Total Badges: 32
    Badges: (View All)
    Search Level 6 Tenth year Anniversary Nineth year Anniversary Eighth year Anniversary
Re: [Code] Membergroup Image
« Reply #4 on: May 05, 2009, 03:20:53 pm »
Great... Can I customize it further? I am not into RSPS and all that, but I would like certian groups to have certian font styles, etc.
Go right ahead :)  Thanks for asking :)
Check out Revolution X's Brand new Code Index!

Offline -A-

  • SMF For Free Sponsors
  • *
  • Posts: 877
  • Don't be afraid.
    • View Profile

  • Total Badges: 22
    Badges: (View All)
    Search Apple User Mobile User Windows User Topic Starter
Re: [Code] Membergroup Image
« Reply #5 on: May 05, 2009, 04:29:50 pm »
Noooo. I mean, I am awful at coding... if I put some time into it, I could probably figure out a way to make that work, but can the code be used for those things, "as is"?

Offline 4markie

  • SMF For Free Full Member
  • *
  • Posts: 141
    • View Profile
    • MARS- Markie's Action Replay Site

  • Total Badges: 14
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Membergroup Image
« Reply #6 on: May 06, 2009, 06:24:29 pm »
Thank you for creating this for me Agent Moose!  :) I really appreciate your time.

Offline valhalla95

  • SMF For Free Member
  • *
  • Posts: 30
    • View Profile
    • {LYLE CODING}

  • Total Badges: 9
    Badges: (View All)
    Topic Starter Combination Level 2 Level 1 10 Posts
Re: [Code] Membergroup Image
« Reply #7 on: May 07, 2009, 07:14:25 am »
Thank you for creating this for me Agent Moose!  :) I really appreciate your time.

nobody said it was just for you....AM codes for the general public, unless theres a special request...but yet again it gets to the general public

Offline 4markie

  • SMF For Free Full Member
  • *
  • Posts: 141
    • View Profile
    • MARS- Markie's Action Replay Site

  • Total Badges: 14
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Membergroup Image
« Reply #8 on: May 07, 2009, 04:22:14 pm »
Quote
nobody said it was just for you....AM codes for the general public, unless theres a special request...but yet again it gets to the general public

I requested this code, I didn't mean it that way.

PS: Moose, the code for some reason is not working for me  ???

Offline Agent Moose

  • Moderator
  • *****
  • Posts: 836
  • Do not PM me for Code Support or Request
    • View Profile

  • Total Badges: 32
    Badges: (View All)
    Search Level 6 Tenth year Anniversary Nineth year Anniversary Eighth year Anniversary
Re: [Code] Membergroup Image
« Reply #9 on: May 07, 2009, 05:58:22 pm »
I probably see your problem.

You have this code and the Name Across board code.  You can only have one of them.  It won't work if you have both on your board at the same time.
Check out Revolution X's Brand new Code Index!

Offline 4markie

  • SMF For Free Full Member
  • *
  • Posts: 141
    • View Profile
    • MARS- Markie's Action Replay Site

  • Total Badges: 14
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Membergroup Image
« Reply #10 on: May 08, 2009, 05:54:27 pm »
I probably see your problem.

You have this code and the Name Across board code.  You can only have one of them.  It won't work if you have both on your board at the same time.

It works now xD

Btw I didn't have both codes in at the same time.

There's also another thing, this code only shows the image in the posts section, not everywhere. is there a way to adapt this code to do this?

Offline Pan

  • SMF For Free Member
  • *
  • Posts: 33
    • View Profile
    • MangaFive Forum Community

  • Total Badges: 10
    Badges: (View All)
    Topic Starter Combination Level 2 Level 1 10 Posts
Re: [Code] Membergroup Image
« Reply #11 on: May 15, 2009, 05:43:03 am »
It works but the rank image is on the left side of the name, please help me!

Offline Seldom Fail

  • Helpers
  • *
  • Posts: 2082
  • Helping for 3 years! :)
    • View Profile
    • My Site!

  • Total Badges: 26
    Badges: (View All)
    Sixth year Anniversary Fifth year Anniversary Apple User Search Poll Voter
Re: [Code] Membergroup Image
« Reply #12 on: May 15, 2009, 07:31:16 am »
This is more for adding crowns or other images next to usernames for specific groups.

What you're looking for is this guide: How to use your own Rank Images
       
<--- Donate to SMF For Free! :D

Offline Funky bean

  • SMF For Free Member
  • *
  • Posts: 28
  • "
    • View Profile

  • Total Badges: 9
    Badges: (View All)
    Topic Starter Combination Level 2 Level 1 10 Posts
Re: [Code] Membergroup Image
« Reply #13 on: May 18, 2009, 11:10:20 am »
hmm strange it worked but all of a sudden the crowns disapeared... =/
http://blightedmegaforum.smfforfree.com

Offline B E N E L

  • SMF For Free Member
  • *
  • Posts: 76
    • View Profile

  • Total Badges: 11
    Badges: (View All)
    Topic Starter Combination Level 2 Level 1 50 Posts
Re: [Code] Membergroup Image
« Reply #14 on: June 17, 2009, 03:37:39 pm »
It doesnt work for me :o anyways i just use teh add runescape admin crown code :o
« Last Edit: June 20, 2009, 05:39:42 pm by B E N E L »
BEST RSPS CLICK SIG DL THE CLIENT Here Runelocus CLICK HERE JOIN!!

 

Related Topics

  Subject / Started by Replies Last post
2 Replies
1436 Views
Last post August 21, 2007, 02:20:47 pm
by Xarjin
0 Replies
937 Views
Last post July 01, 2008, 04:00:16 pm
by raggi5
2 Replies
1526 Views
Last post July 07, 2008, 11:17:17 am
by simply sibyl
2 Replies
2509 Views
Last post November 26, 2008, 03:38:15 pm
by - Lawrence -
1 Replies
4125 Views
Last post February 16, 2013, 07:22:58 pm
by simplyaura