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
[ C ] Default Avatar for Group; as opposed to a badge image
Topic Started: Jul 29 2011, 05:31 PM (377 Views)
cnm-ZNR
Member Avatar
Infinite Diversity in Infinite Combinations
[ *  * ]
Board Address: http://s4.zetaboards.com/Talk_Wordy_to_Me/index/
Board Software: ZetaBoards or InvisionFree
Description: I created a group and would like for it to have its own default avatar (which I already have), separate from the board's default avatar. So I need the code to implement the default av for that group alone, if it's possible.

I searched but didn't find this, so if it's already out there, please share the link. Thanks! :)
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Admin CP Posted Image Themes Posted Image Board Template Posted Image Below the Board
Code:
 
<script type="text/javascript">
function changeAvatar(group, image) {
$("dl.user_info dd:contains(" + group + ")").parent().parent().find("img.member").attr("src", "" + image + "");
}

changeAvatar("GROUP_NAME", "IMAGE_URL");
</script>
Replace 'GROUP_NAME' and 'IMAGE_URL'.

This will only work if you have the default avatar enabled.
Offline Profile Goto Top
 
cnm-ZNR
Member Avatar
Infinite Diversity in Infinite Combinations
[ *  * ]
That worked perfectly! I had replaced the default avatar with a different image previously, but it didn't seem to matter.

Thanks so much. You are absolutely awesome, Cory. Such a big help. Thanks! :D
Offline Profile Goto Top
 
Leonardo
Member Avatar
Hakuna Matata
[ *  *  *  *  *  *  * ]
Completed!

Your request has been completed. If you have any questions or concerns regarding the state of your request, please feel free to contact me via PM.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Closed Requests · Next Topic »
Locked Topic