August 16, 2022, 10:29:31 pm
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to Revolution X, where Coding meets Graphics.
 
  Home Help Search Arcade Affiliates Staff List Calendar Members Login Register  

Membergroup Image

Pages: [1]   Go Down
  Print  
Author Topic: Membergroup Image  (Read 425 times)
Agent Moose
Administrator
Adminitrator
Offline Offline

Gender: Male
Posts: 1,470



View Profile WWW
Badges: (View All)
« on: May 03, 2009, 09:15:32 pm »

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");

Enjoy Smiley
« Last Edit: May 03, 2009, 09:22:24 pm by Agent Moose » Report Spam   Logged


Share on Facebook Share on Twitter

Blighted
Blighted Mega Forums Owner
Newcomers!
Newcomers!
Offline Offline

Gender: Male
Posts: 8


View Profile WWW
Badges: (View All)
« Reply #1 on: May 20, 2009, 08:18:50 am »

Great thanks. How did you find out/make all of these codes?
Report Spam   Logged
Exilis
Optimistic & Creative
Global Moderator
Global Moderator
Offline Offline

Posts: 929


View Profile
Badges: (View All)
« Reply #2 on: May 20, 2009, 02:42:50 pm »

He learned JavaScript and learned to use it with SMF For Free. I'm trying to learn, hopefully it'll come to me soon.
Report Spam   Logged

Global Mod, (sort of) at your service.

http://twitter.com/timothyaveni

Agent Moose
Administrator
Adminitrator
Offline Offline

Gender: Male
Posts: 1,470



View Profile WWW
Badges: (View All)
« Reply #3 on: May 21, 2009, 07:18:14 am »

Correct.

I've been coding for around 2 years I think, not sure.

Anway, Blighted, if you would like to learn, I've been posting some tutorials into the Tutorial Section under the Coding Community.  You can learn from there Smiley
Report Spam   Logged


Mojobojo82
MVP
MVP
Offline Offline

Gender: Male
Posts: 838


View Profile
Badges: (View All)
« Reply #4 on: June 17, 2009, 05:52:41 am »

Yea. Been learning a bit there... Most of it i have no idea what it is though Tongue

Nice Code i use it for my Mods and Admins  Afro
Report Spam   Logged






Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy