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 ] Restrict auto tools fix
Topic Started: Jul 14 2012, 09:10 AM (1,149 Views)
Ferby
Member Avatar
Developer
[ *  *  *  *  * ]
Board Address: here
Board Software: Zetaboards
Description: Cory had made me this code to restrict certain global mods from using certain autotools. Well I just got around to doing this but it does not work. It restricts all autotools selected for all global mods. I'm asking if it could be fixed

http://resources.zetaboards.com/topic/5150018/1/
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Use the second version if you want to restrict by User ID.
Offline Profile Goto Top
 
Ferby
Member Avatar
Developer
[ *  *  *  *  * ]
Cory
Jul 15 2012, 08:54 AM
Use the second version if you want to restrict by User ID.
It'll be better for me to have it by groups to be honest but if it cant be fixed I'll have to remember when someone moves group to put them on the list
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
I'm not sure what you're after, to be honest. If it's by group, it will remove the option for every user in that group. If you want it for specific users in a group, you would have to do it by User ID.
Offline Profile Goto Top
 
H3LLH0UND
Member Avatar
Hellish Hound
[ *  * ]
Now if I understand you, you want to restrict them by forum groups: members, admin, elite, rookies, forum mod, global mod, section mods, etc.

Any forums groups you made, you want to have restrictions on the groups that you made, right??
Edited by H3LLH0UND, Jul 15 2012, 11:49 AM.
Offline Profile Goto Top
 
Ferby
Member Avatar
Developer
[ *  *  *  *  * ]
H3LLH0UND
Jul 15 2012, 11:47 AM
Now if I understand you, you want to restrict them by forum groups: members, admin, elite, rookies, forum mod, global mod, section mods, etc.

Any forums groups you made, you want to have restrictions on the groups that you made, right??
yeah, certain global mod groups get certain autotools. Thats what I mean

I'm more than happy to use the user ID code but it'll be a pain to fiddle around with
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
I'm still confused. If you're referring to actual member groups, that's what the original code does, removes the option for every member in that group. If you're referring to individual members in specific groups, then I'm afraid you'll have to do it by User ID. If you're referring to forum moderators, then that would require too many AJAX requests.
Offline Profile Goto Top
 
Ferby
Member Avatar
Developer
[ *  *  *  *  * ]
Cory
Jul 16 2012, 08:32 PM
If you're referring to actual member groups, that's what the original code does
Okay thats the second code now.. sorry I thought it meant if I added the groups into it they get access to it. Its just like that restrict groups add-on for the flexible form script. :facepalm:

Okay thanks, turns out I misunderstood the code
Okay well, I tried both codes on here and they didnt remove any for some reason. My javascript is enabled so I dont see the problem.
Edited by Ferby, Jul 17 2012, 04:08 PM.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Mind posting what you tried?
Offline Profile Goto Top
 
Ferby
Member Avatar
Developer
[ *  *  *  *  * ]
This is the profile ID one since I removed the group id one
Code: HTML
 
<script type="text/javascript">
function removeOption(profileID, optionName) {
if (location.href.indexOf('/profile/' + profileID + '/') !== -1) $('select[name="mem_amod"] option:contains(' + optionName + ')').remove();
}

removeOption('3236669', 'Move: Forum Moderator');
</script>
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
I created a member autotool with that name and tested in on my profile on my test board and it appeared to work correctly for me. Are you sure the User ID is correct?
Offline Profile Goto Top
 
Ferby
Member Avatar
Developer
[ *  *  *  *  * ]
I'll test it again, maybe I did get it wrong
It seems I have explained it wrong. This code disables it for certain groups/members. I wish for a code that only allows certain group/member's to use certain autotools
Edited by Ferby, Jul 19 2012, 11:08 AM.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Code:
 
if (
Change that to this:
Code:
 
if (!
Offline Profile Goto Top
 
Ferby
Member Avatar
Developer
[ *  *  *  *  * ]
Cory
Jul 19 2012, 02:33 PM
Code:
 
if (
Change that to this:
Code:
 
if (!
Will that also work with the Group code?
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
I believe it should, it basically makes it do the opposite of what it does.
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