DIR Return Create A Forum - Home
---------------------------------------------------------
Create A Forum - Support Forums
HTML https://support.createaforum.com
---------------------------------------------------------
*****************************************************
DIR Return to: Create a Forum Codes and Support
*****************************************************
#Post#: 686--------------------------------------------------
[Code] Membergroup Image
DIR By: Agent Moose
Date: August 5, 2010, 10:41 pm
---------------------------------------------------------
This code utilizes jQuery, please use the latest version found
in this thread:
HTML http://support.createaforum.com/5/jquery-v1-8-update/
HTML http://support.createaforum.com/5/jquery-v1-8-update/
Footers:
--- Code ---
<script type="text/javascript">
function GroupImage(Group, Image){
//Created by Agent Moose
var PostGroup = document.getElementsByTagName("li");
for(x=0;x<PostGroup.length;x++){
if(PostGroup[x].className === "membergroup" &&
PostGroup[x].innerHTML.toLowerCase() === Group.toLowerCase()){
$(PostGroup[x]).parent().prev().find("a:last").prepend("<img
src='" + Image + "' />");
};
if(PostGroup[x].className !== "membergroup" &&
PostGroup[x].className === "postgroup" &&
PostGroup[x].innerHTML.toLowerCase() === Group.toLowerCase()){
$(PostGroup[x]).parent().prev().find("a:last").prepend("<img
src='" + Image + "' />");
};
};
};
GroupImage("GROUP", "IMAGE");
</script>
--- End Code ---
Original Request:
HTML http://support.createaforum.com/create-a-forum-codes-and-support/runescape-crown-request/
HTML http://support.createaforum.com/create-a-forum-codes-and-support/runescape-crown-request/
GROUP = The Group for which the selected image will show next to
their names in posts.
IMAGE = the Image for the group you have selected.
To Add more images for certain membergroups, add more of these
lines:
--- Code ---
GroupImage("GROUP", "IMAGE");
--- End Code ---
NOTE:
The only way this code will work is if you remove "Post Group"
title for Admins/Mods:
Admin-> Layout Settings-> Theme Settings-> Turn "Hide post
group titles for grouped members" to on. (section two-subsection
four-option six)
Enjoy :)
EDIT:
Due to popular demand, I created a code that will add the crown
(and whatever else you would like) to your username across the
board!
HTML http://support.createaforum.com/5/%28code%29-name-across-board/msg14864/#msg14864
#Post#: 687--------------------------------------------------
Re: [Code] Membergroup Image
DIR By: Representation
Date: August 5, 2010, 10:55 pm
---------------------------------------------------------
Very nice. I think that this is gonna come in handy. Thanks
again, Moose. (:
#Post#: 688--------------------------------------------------
Re: [Code] Membergroup Image
DIR By: Damien
Date: August 6, 2010, 12:21 am
---------------------------------------------------------
What do you add in header?
#Post#: 690--------------------------------------------------
Re: [Code] Membergroup Image
DIR By: Agent Moose
Date: August 6, 2010, 9:02 am
---------------------------------------------------------
Nope, add it to the footers :)
#Post#: 692--------------------------------------------------
Re: [Code] Membergroup Image
DIR By: Representation
Date: August 6, 2010, 10:08 am
---------------------------------------------------------
He's asking what he should add to the headers. It might be
nothing, but we don't know...
#Post#: 693--------------------------------------------------
Re: [Code] Membergroup Image
DIR By: Damien
Date: August 6, 2010, 10:26 am
---------------------------------------------------------
What kind of Image can I use? A crown right?
#Post#: 694--------------------------------------------------
Re: [Code] Membergroup Image
DIR By: Fate
Date: August 6, 2010, 10:28 am
---------------------------------------------------------
Yes, or any image that you feel would fit nicely. :) You can
always experiment until you find something to your liking.
#Post#: 698--------------------------------------------------
Re: [Code] Membergroup Image
DIR By: Representation
Date: August 6, 2010, 11:51 am
---------------------------------------------------------
Do you need to use the BBC image code inside the code??
#Post#: 700--------------------------------------------------
Re: [Code] Membergroup Image
DIR By: Fate
Date: August 6, 2010, 11:57 am
---------------------------------------------------------
No, simply replace "IMAGE" with the URL of the image you want to
use.
#Post#: 702--------------------------------------------------
Re: [Code] Membergroup Image
DIR By: Representation
Date: August 6, 2010, 12:07 pm
---------------------------------------------------------
Not working for me. :|
*****************************************************
Page 1 of 7
DIR Next Page