SMF For Free Support Forum
Signup For Free Forum
October 11, 2008, 03:25:25 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  

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

Posts: 640


Do not PM me for Code Support or Request


View Profile
« on: May 24, 2008, 03:15:37 pm »

Footers:
Code:
<script>
function GroupImage(Group,Image){
var aTD = document.getElementsByTagName("td");
//Created by Agent Moose (smcodes.smfforfree3.com)
for(x=0;x<aTD.length;x++){
if(aTD[x].width == "16%" && aTD[x].innerHTML.match(Group)){
aTD[x].firstChild.nextSibling.innerHTML = "<img src='" + Image + "' />" + aTD[x].firstChild.nextSibling.innerHTML;
};};};
GroupImage("GROUP","IMAGE");
</script>

GROUP = The name of the group.
IMAGE = the image for that group.

To add more groups, just add more of these lines:
Code:
GroupImage("GROUP","IMAGE");

Original Request: http://www.smfsupport.com/support/code_requests/req_no_title_for_this_request-t17309.0.html
Logged

SMC Code Index - The best Code Index for all your Needs!  Includes a bunch of codes not on Support.[/center]
pker own
SMF For Free Sr. Member
*
Offline Offline

Posts: 372


View Profile WWW
« Reply #1 on: May 24, 2008, 03:20:54 pm »

Wow! Nice what exactly doe's this do Agent Moose?
Logged

Agent Moose
Moderator
*****
Offline Offline

Posts: 640


Do not PM me for Code Support or Request


View Profile
« Reply #2 on: May 24, 2008, 04:31:59 pm »

Adds an image next to the names in a certain group.

Also, I forgot to mention that it only put the images in the topics
Logged

SMC Code Index - The best Code Index for all your Needs!  Includes a bunch of codes not on Support.[/center]
Vice
SMF For Free Full Member
*
Offline Offline

Posts: 136


Photoshop Userbars :d


View Profile WWW
« Reply #3 on: May 25, 2008, 01:46:49 am »

You are mastar codar Smiley i love you
Logged

Vice
SMF For Free Full Member
*
Offline Offline

Posts: 136


Photoshop Userbars :d


View Profile WWW
« Reply #4 on: May 25, 2008, 01:55:08 am »

it don't work for me though the name is just in orange not with crown beside but ill try again
Logged

Vice
SMF For Free Full Member
*
Offline Offline

Posts: 136


Photoshop Userbars :d


View Profile WWW
« Reply #5 on: May 27, 2008, 11:33:57 am »

Sorry for triple post but no one has replied, this isn't working agent moose it just makes the name a colour
Logged

LaundryLady
Global Moderator
*
Offline Offline

Posts: 3068


Multi-Tasking Maven


View Profile WWW
« Reply #6 on: May 27, 2008, 11:43:51 am »

You have to use image html
Logged

73lue73oy
SMF For Free Member
*
Offline Offline

Posts: 63


View Profile WWW
« Reply #7 on: August 02, 2008, 03:34:26 pm »

Code:
<script>
function GroupImage(Group,Image){
var aTD = document.getElementsByTagName("td");
//Created by Agent Moose (smcodes.smfforfree3.com)
for(x=0;x<aTD.length;x++){
if(aTD[x].width == "16%" && aTD[x].innerHTML.match(Group)){
aTD[x].firstChild.nextSibling.innerHTML = "<img src='" + Image + "' />" + aTD[x].firstChild.nextSibling.innerHTML;
};};};
GroupImage("Administrator","http://i33.tinypic.com/1zba0sj.jpg");
</script>

did i spell administrator wrong or something because its not working?
Logged
LaundryLady
Global Moderator
*
Offline Offline

Posts: 3068


Multi-Tasking Maven


View Profile WWW
« Reply #8 on: August 02, 2008, 06:07:09 pm »

It changes on my test forum,  did you look in your posts?
Logged

peepzi
SMF For Free Newbie
*
Offline Offline

Posts: 7


View Profile
« Reply #9 on: August 20, 2008, 12:32:12 pm »

You are mastar codar Smiley i love you

I Agree  Smiley
Logged


Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.6 | SMF © 2006-2008, Simple Machines LLC
ServerBeach Coupon
Page created in 0.51 seconds with 18 queries.