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:
Locked Topic
  • Pages:
  • 1
[ C ] Group Icon Selector
Topic Started: Jul 31 2012, 01:37 AM (733 Views)
VSword
Member Avatar

[ * ]
Board Address: http://bbs.thechipmunks.org
Board Software: ZetaBoards
Description: I need a code that makes the Group Icon become something selectable... The members of a certain user group would be able to choose the icon they like the most somewhere under their Preferences.
Similar to a Multiple-Choice Profile Field but changing the current Group Icon. Also, not all groups are supposed to have this option, only a few.

Can this be done?

Thank you for your time.
Offline Profile Goto Top
 
Ferby
Member Avatar
Developer
[ *  *  *  *  * ]
I think this can be done but for people to select for themselves the group icons from the list might be a bit of a problem to code
Offline Profile Goto Top
 
VSword
Member Avatar

[ * ]
Yeah... I thought so...
Some members were trying to help me coding this but we failed D:
So, I decided to post here, hoping someone could do it.
Offline Profile Goto Top
 
Ferby
Member Avatar
Developer
[ *  *  *  *  * ]
VSword
Jul 31 2012, 12:01 PM
Yeah... I thought so...
Some members were trying to help me coding this but we failed D:
So, I decided to post here, hoping someone could do it.
I think either Quozzo or Geoffrey can code this. Cory doesn't normally do big codes
Offline Profile Goto Top
 
VSword
Member Avatar

[ * ]
So there's a hope...
Alright, I'll wait to see what they think.

Thanks.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Code released: http://resources.zetaboards.com/topic/5153874/1/

To remove the option to select team icons for specific groups, use this:
Code:
 
<script type="text/javascript">
function addGroup(groupID) {
if ($.zb.stat.gid == groupID) $('#edit_profile td.c_desc:contains(Team Icon)').parent('tr').remove();
}

addGroup('GROUP_ID');
</script>
Change GROUP_ID as necessary and you may repeat that line to remove the option for more groups. The Group ID can be retrieved via the page source (look for 'gid'), or via the member list by selecting a group from the 'Displaying' drop down menu, the &group= number found in the address bar is the Group ID.
Offline Profile Goto Top
 
VSword
Member Avatar

[ * ]
Hi Cory!
Thanks for giving it a try, but it's not working... The team icon doesn't change..

The code for removing the option for certain groups is working though.

Edit:
Wait I second... I think I figured out what's wrong...
Edited by VSword, Aug 1 2012, 03:03 PM.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
So you got it working now? :)
Offline Profile Goto Top
 
VSword
Member Avatar

[ * ]
Er... Nope.
Still nothing. :(
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Mind approving my account?
Offline Profile Goto Top
 
VSword
Member Avatar

[ * ]
Done.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Try placing my code before all other codes.
Offline Profile Goto Top
 
VSword
Member Avatar

[ * ]
Done (again).

I see it's working now... I never knew the order would matter.

But now there are two icons up... Is there any way of making the new one replace the old one?

(Geez, I'm a pain ain't I?)
Edited by VSword, Aug 1 2012, 03:31 PM.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Code:
 
<script type="text/javascript">
$('div.usertitle').each(function () {
$(this).find('img + br + img').prev('br').prev('img').hide();
});
</script>
Place that below the code to hide the original team icon.
Offline Profile Goto Top
 
VSword
Member Avatar

[ * ]
Yes!
It's working perfectly now.

Thank you very much! :D
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Closed Requests · Next Topic »
Locked Topic
  • Pages:
  • 1