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
Restrict Name Changes on a Group-Basis
Topic Started: Apr 12 2012, 10:48 AM (870 Views)
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Code Name: Restrict Name Changes on a Group-Basis

What the code does: Display's an error message when you restrict name changes on a group-basis with the code below. Preview

How to use the code: Change the capitalized text in the last line of code and repeat that line to restrict name changes for more groups.

How to install the code:

Admin CP >> Themes >> Board Template >> Below the Board
Code:
 
<script type="text/javascript">
if (location.href.indexOf('/home/?c=20') !== -1) {
function addGroup(group_name) {
$.get($('#top_info strong a').attr('href') + '?force_ads', function (data) {
if ($('dl.user_info dt:contains(Group:) + dd', data).html() === group_name) {
$('#name_change_req').closest('form').replaceWith('<table cellspacing="0" id="error_box"><thead><tr><th>Error:</th></tr></thead><tbody><tr class="generic"><td>Your user group does not have permission to request name changes</td></tr></tbody></table>');
}
});
}
}

addGroup('GROUP_NAME');
</script>
Edited by Cory, Oct 29 2016, 12:59 AM.
Online Profile Quote Post Goto Top
 
.Realm
Member Avatar
Crowd in the Face
[ *  * ]
Cannot thank you enough for this Cory!
Offline Profile Quote Post Goto Top
 
SandyC (PM)
Member Avatar
Member
[ *  *  *  * ]
A dumb question I know, but which line do I put the group name, and can more than one group be added?...
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Code:
 
addGroup('GROUP_NAME');
GROUP_NAME is what should be changed and that whole line can be repeated to add more groups.
Online Profile Quote Post Goto Top
 
SandyC (PM)
Member Avatar
Member
[ *  *  *  * ]
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