SMF For Free Support Forum
Signup For Free Forum
November 25, 2014, 06:06:44 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to SMF For Free. The best free SMF Host
 
   Home   Help Search Arcade Gallery Login Register Chat  

Pages: [1] 2 3 4
  Print  
Author Topic: [Code] Membergroup Image  (Read 22296 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Moderator
*****
Offline Offline

Posts: 835


Do not PM me for Code Support or Request


View Profile
Total Badges: 25
Badges: (View All)
Poll Voter Level 5 Seventh year Anniversary Sixth year Anniversary Arcade Highscore
« on: May 03, 2009, 09:10:00 pm »

Put this in your Header if you do not already have it:

Code:
<script src="/jquery.js"></script>

Footers:
Code:
<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 Tongue

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:
GroupImage("GROUP NAME","IMAGE URL");

Image shows in Post area only
Do not use with the Name Across Board Code

Enjoy Smiley
« Last Edit: May 04, 2010, 10:54:55 am by simply sibyl » Logged

Check out Revolution X's Brand new Code Index!
Didds
SMF For Free Sr. Member
*
Offline Offline

Posts: 269


Didds Forums


View Profile WWW
Total Badges: 14
Badges: (View All)
Topic Starter Combination Level 3 Level 2 Level 1
« Reply #1 on: May 04, 2009, 03:03:22 am »

Nice Wink
Logged

valhalla95
SMF For Free Member
*
Offline Offline

Posts: 30


View Profile WWW
Total Badges: 9
Badges: (View All)
Topic Starter Combination Level 2 Level 1 10 Posts
« 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
Logged
-A-
SMF For Free Sponsors
*
Offline Offline

Posts: 877


Don't be afraid.


View Profile
Total Badges: 19
Badges: (View All)
Windows User Topic Starter Combination Level 4 Level 3
« 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.
Logged

Agent Moose
Moderator
*****
Offline Offline

Posts: 835


Do not PM me for Code Support or Request


View Profile
Total Badges: 25
Badges: (View All)
Poll Voter Level 5 Seventh year Anniversary Sixth year Anniversary Arcade Highscore
« 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 Smiley  Thanks for asking Smiley
Logged

Check out Revolution X's Brand new Code Index!
-A-
SMF For Free Sponsors
*
Offline Offline

Posts: 877


Don't be afraid.


View Profile
Total Badges: 19
Badges: (View All)
Windows User Topic Starter Combination Level 4 Level 3
« 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"?
Logged

4markie
SMF For Free Full Member
*
Offline Offline

Posts: 141



View Profile WWW
Total Badges: 14
Badges: (View All)
Topic Starter Combination Level 3 Level 2 Level 1
« Reply #6 on: May 06, 2009, 06:24:29 pm »

Thank you for creating this for me Agent Moose!  Smiley I really appreciate your time.
Logged

valhalla95
SMF For Free Member
*
Offline Offline

Posts: 30


View Profile WWW
Total Badges: 9
Badges: (View All)
Topic Starter Combination Level 2 Level 1 10 Posts
« Reply #7 on: May 07, 2009, 07:14:25 am »

Thank you for creating this for me Agent Moose!  Smiley 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
Logged
4markie
SMF For Free Full Member
*
Offline Offline

Posts: 141



View Profile WWW
Total Badges: 14
Badges: (View All)
Topic Starter Combination Level 3 Level 2 Level 1
« 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  Huh
Logged

Agent Moose
Moderator
*****
Offline Offline

Posts: 835


Do not PM me for Code Support or Request


View Profile
Total Badges: 25
Badges: (View All)
Poll Voter Level 5 Seventh year Anniversary Sixth year Anniversary Arcade Highscore
« 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.
Logged

Check out Revolution X's Brand new Code Index!
4markie
SMF For Free Full Member
*
Offline Offline

Posts: 141



View Profile WWW
Total Badges: 14
Badges: (View All)
Topic Starter Combination Level 3 Level 2 Level 1
« 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?
Logged

Pan
SMF For Free Member
*
Offline Offline

Posts: 33



View Profile WWW
Total Badges: 10
Badges: (View All)
Topic Starter Combination Level 2 Level 1 10 Posts
« 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!
Logged
Seldom Fail
Helpers
*
Offline Offline

Posts: 2082


Helping for 3 years! :)


View Profile WWW
Total Badges: 26
Badges: (View All)
Sixth year Anniversary Fifth year Anniversary Apple User Search Poll Voter
« 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
       
Logged

<--- Donate to SMF For Free! Cheesy
Funky bean
SMF For Free Member
*
Offline Offline

Posts: 28

"


View Profile
Total Badges: 9
Badges: (View All)
Topic Starter Combination Level 2 Level 1 10 Posts
« 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
Logged
B E N E L
SMF For Free Member
*
Offline Offline

Posts: 76



View Profile
Total Badges: 11
Badges: (View All)
Topic Starter Combination Level 2 Level 1 50 Posts
« Reply #14 on: June 17, 2009, 03:37:39 pm »

It doesnt work for me Shocked anyways i just use teh add runescape admin crown code Shocked
« Last Edit: June 20, 2009, 05:39:42 pm by B E N E L » Logged

BEST RSPS CLICK SIG DL THE CLIENT Here Runelocus CLICK HERE JOIN!!


Pages: [1] 2 3 4
  Print  
 
Jump to:  



Powered by SMF 1.1.20 | SMF © 2013, Simple Machines