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
Disable Profile Fields on Group or User Basis
Topic Started: Aug 3 2012, 09:28 AM (1,009 Views)
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Code Name: Disable Profile Fields on Group or User Basis

What the code does: There are two codes found in this topic, the first code removes profile fields found on the Editing Profile page for a specific group, the second code removes profile fields found on the Editing Profile page for specific users.

How to use the code: Edit the capitalized text as necessary and you may repeat that line to remove another profile field.

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.

How to install the code:

Admin CP Posted Image Themes Posted Image Board Template Posted Image Below the Board

Group version:
Code:
 
<script type="text/javascript">
//<![CDATA[
function addGroup(groupID, pField) {
if ($.zb.stat.gid == groupID) $('#edit_profile td.c_desc:contains(' + pField + ')').parent('tr').remove();
}

addGroup('GROUP_ID', 'PROFILE_FIELD_NAME');
//]]>
</script>
User version:
Code:
 
<script type="text/javascript">
//<![CDATA[
if ($('#top_info strong a').length) {
function addUser(username, pField) {
var topInfo = $('#top_info strong a').text();
if (topInfo === username) $('#edit_profile td.c_desc:contains(' + pField + ')').parent('tr').remove();
}
}

addUser('USERNAME', 'PROFILE_FIELD_NAME');
//]]>
</script>
Edited by Cory, Oct 30 2016, 12:00 AM.
Online Profile Quote Post Goto Top
 
Ferby
Member Avatar
Developer
[ *  *  *  *  * ]
Useful code, thanks Cory
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · ZetaBoards Codes & Modifications · Next Topic »
Add Reply