We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
  • Pages:
  • 1
Group Icons without removal of pips
Topic Started: Oct 22 2009, 11:11 AM (4,710 Views)
slayer766-ZNR
Member
[ *  *  *  * ]
Name: Add Group Icons without removing pips
Description: Add Group icons for each member group in the posts without the removal of pips
Copyright: slayer766
Known Bugs: None
Browser compatibility: All
Preview/screen shot: Preview
Installation: Board Template - Below the board:

Code which removes the Group:
Code:
 
<script type="text/javascript">
function Icons(group,img){
$(".user_info dd:contains('"+group+"')").parent().prev().append("<img src='"+img+"'>").next().find("dt:contains('Group')").empty().next().empty();
}

Icons("Admins","Image");
Icons("Members","Image");
</script>


Code which doesn't remove the Group:
Code:
 
<script type="text/javascript">
function Icons(group,img){
$(".user_info dd:contains('"+group+"')").parent().prev().append("<img src='"+img+"'>");
}

Icons("Admins","Image");
Icons("Members","Image");
</script>


If you want to add more just keep adding Icons("Group Name","Image"); after each other and so on.
Offline Profile Quote Post Goto Top
 
Hahk
Member
[ *  * ]
This is a really awesome code!!

I just had one glitch with it. I'm not sure if I can prevent it or not but... I added custom pips and they don't seem to align properly with the ranks.


Posted Image
Offline Profile Quote Post Goto Top
 
FalconsHonour
Member Avatar
Member
[ * ]
Stupid question maybe, but would this code allow a member to be part of more than one group? I've been looking for a code that'd do that, and if this is the one I'd be over the moon.
Offline Profile Quote Post Goto Top
 
LuffyUA
Member Avatar
GFX'er
[ * ]
Slayer, I love you, I really really love you (not in the gay way xD) You have solved a lot of my problems due to this thanks a lot, A LOT :)
Offline Profile Quote Post Goto Top
 
.awd (R)
Member Avatar
Member
[ *  *  * ]
@FalconsHonor: I beleive that is not possible because that is something based on the server, or at least that was what I was told when I requested that.
Offline Profile Quote Post Goto Top
 
Sweetmelody.06
Member Avatar
Member
[ * ]
Love it! Thanks!
Offline Profile Quote Post Goto Top
 
.Realm
Member Avatar
Crowd in the Face
[ *  * ]
How would I go about and center my ranks? Tried a bunch of things, but none worked :/

Also, if 2 groups have access to the Admin CP, is it possible to give them different ranks?
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
When running the script on your board, the ranks are centered for me.
Code:
 
<script type="text/javascript">
function Icons(group,img){
$(".user_info dd:contains('"+group+"')").parent().prev().append("<img src='"+img+"'>");
}

Icons("Technical Administrators","IMAGE_URL");
Icons("Administrators","IMAGE_URL");

$('dl.user_info dd:contains(Technical Administrators)').parent().prev().find('img:last').remove();
</script>
You could use something like that to remove the additional team icon added to the Technical Administrators group.
Online Profile Quote Post Goto Top
 
.Realm
Member Avatar
Crowd in the Face
[ *  * ]
Thanks, helpful as always Cory.
Offline Profile Quote Post Goto Top
 
Zezarely
Member
[ * ]
Do you know if there's a way I could flip them around?

Edit: Also do you know if I'm able to give a specific member more than one rank - sort of similar to the groups but with just one member?
Edited by Zezarely, Nov 19 2011, 11:52 AM.
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Code:
 
<script type="text/javascript">
function Icons(group,img){
$(".user_info dd:contains('"+group+"')").parent().prev().find('br').before("<br /><img src='"+img+"'>");
}

Icons("Admins","Image");
Icons("Members","Image");
</script>
Use that to flip them around.
Code:
 
<script type="text/javascript">
function addRank(p_id, img) {
$('td.c_username:has(a[href*="' + p_id + '"])').parent().next().find('div.usertitle br').before('<br /><img src="' + img + '" alt="Icon" />');
}

addRank('PROFILE_ID', 'IMAGE_URL');
</script>
Use that to give an individual member a rank.
Online Profile Quote Post Goto Top
 
Zezarely
Member
[ * ]
Cory, your flipped version seems to take over the Post Rank, anyway it could show both?

Also here's something I post on Zeta I'm wondering if you knew:


Zezarely
 
Alright, I'm wondering if I can add a group rank with the post rank but having the group rank 3 times side-by- side. I'll show you an example.

Example:

Posted Image

Posted Image

The Santa Hat and Crowns (PartyHats) are of a different group (obviously), but the crowns are 3 different images and so are the santa hats.

I'm wondering if I can get a code to go for specific groups that makes this: Posted Image into this: Posted ImagePosted ImagePosted Image

I would also like to add that the armour you see below the crowns and hats are the Post Ranks, the Crowns and Santas are the Group Ranks.

Thanks.

Edited by Zezarely, Nov 25 2011, 12:08 PM.
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
May I see a link to your board? Running the code on my test board, it simply added the icon before the pips.
Online Profile Quote Post Goto Top
 
Zezarely
Member
[ * ]
My board: s11.zetaboards.com/arcanex

Also I removed the code, and if this doesn't work for Zetaboards I will try it on my Invisionfree later.
Edited by Zezarely, Nov 25 2011, 07:27 PM.
Offline Profile Quote Post Goto Top
 
paradise.engineering
Member Avatar
Lowpoly Workshop Founder
[ *  *  * ]
please make me understand, this code automatically makes both pips and group icons visible? or do you have to manually add image links?
edit: never mind, i figured it myself


Edited by paradise.engineering, Nov 28 2011, 05:01 AM.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · ZetaBoards Codes & Modifications · Next Topic »
Add Reply
  • Pages:
  • 1