![]() |
Description: Basically, this allows the moderator of a certain forum to add/take
access to users via access masks, however it only allows it if the forum they moderate has that option enabled. It also lists what users have access to a specified forum. Please NOTE! If you dont use the Moderator Control Panel (forum/mod/) Then this hack probably wont work, sorry! Install: Step1: First off, you will need phpMyAdmin, or something similar to add a column to the 'forum' database. I suggest you read > http://vbulletin.com/forum/showthrea...threadid=18558 for instructions on how to install it. Once you get that installed, go to the forum table, and scroll down till you see 'Add new field :', put 1 in the box, choose 'At the end of the table' and click Go. Call the field, 'allowmodaccess', its type, 'smallint' and size, '6'(all without quotes of course), then also choose default, and make it 0(zero) Step2: Now comes the modding of forum.php in the AdminCP. Find at approximatly Line 120 PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
Find at approx line 124 PHP Code:
PHP Code:
Okay, this bit wont be easy :| Basically, make this file as below, however, there are a few bits your going to have to grab from user.php in the admin directory.(which i will explain down furthur) PHP Code:
PHP Code:
PHP Code:
Now you need to mod that code. Step5: >> Find PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
Find PHP Code:
PHP Code:
Phew, you should be done. Now go into your AdminCP, and modify all the forums you wish your users to be able to change/add accessmasks to and at the bottom, choose 'yes' for allow mods to change access masks. To access it, go to http://yourforum.url/forumpath/mod/ login, and hit the Add | Edit | View button on the menu. Thats all Folks! PS Phew for the 12345 char limit ;) |
Sorry about the wrapping(or lack of it)
It took too long to write, so im not going to bother going thru it all and fix it all up :| Hope you all enjoy it! PS, there is no demo, unless someone is willing to set one up. But it works, my moderators are using it as we read this! |
Yay! You think you could shove that in a text file though? :)
|
I didnt even think of that ;)
Too late now anyway :( Oh well! :p |
n/t
|
Thanks buddy
|
Great man,
this is exactly the stuff, i was lookin 4 Running an Online Gaming Board its cool to give the mods of certain forums (mostly the 'Clanleaders') the possibility to add certain users (mostly 'Clanmembers' :D) to their internal forums. Haven't installed it yet, but I guess this is it :D -Alex |
Thats exactly why i wrote it :)
Ive almost finished another one that allows them to modify the specific forum colours as well :D |
ERROR IN HACK
I have found an error. I have many moderators who do not reside in the moderator usergroup. Expect a workaround in about 2/3 hours. Sorry! (that means only supermods and admins and mods who still reside in the mod usergroup can see it) |
Hey,
are you in some kind of temporal flux?? Your timeline seems not to be the same as mine :D -Alex |
normal mods wouldnt see any forums, if they wernt in the moderator group, and even sometimes wouldnt show up at all.
simple SQL fix. find PHP Code:
PHP Code:
|
Hi there,
thanx again for this hack. There is one problem I have though: The Option 'List Users Access per Forum' leads to a blank screen, while the 'Access Granting For Forums' Option works perfectly Any hints? -Alex |
And one more thing i noticed:
if a forum has subforums and the the moderator is only moderator of the subforums by inharitance, this mod will not be able to modify the subforums specifically. -Alex |
Good point, not that i really care about that much, it is a point.
If you want to go ahead and try and fix it, best bet would most probably be something along the lines of looking for a forum with the forumid of XX, or looking for the forum with parentid CONTAINING XX. probably too complex for what i wrote the script for, but hey, if you want to fix it all up... ;) |
I have been using a hack similar to this for the past couple of months. But I also have the edit access masks as part of the UserGroup Permissions.
The inheritance also works for my version. I would have to try and remember what I done as I never bothered documenting it when i done it. If anyone wishes it I will post it. |
Quote:
|
I am reposting the text file, with the updated code, and I have added the sql query you should execute to create this field.....
|
Thanks heaps Prohacker.
I couldnt be bothered making one :) |
Quote:
Regarding the other prob, displaying blank screen when 'List Users Access per Forum'.... anything?? -Alex |
This is the version i have been using on my forums for past couple of months.
Editing access masks is added to the find feature within /mod/user.php it follows same principles as the ban mod features. People with admin and super mod privledges for the usergroup can edit all forum access masks. If someone is a moderator by inheritance they can also edit all the forums they are entitled to. Hope this helps some people. |
swank. Installing...
|
A small problem I ran into during the install:
Quote:
Quote:
|
Didn't work. When they go to "Edit access masks" it says "you do not have permission to do this!"
|
Did you enable it for hte usergroup?
|
No, I enabled it for the forum itself.
I set the following option to "yes" for the forum: Quote:
|
you need to enable it for the usergroup as well as the forum.
its a usergroup permission |
Hm...if I enable it for "Registered" users, will all users then be able to do it? Or only those who are moderators of specific forums?
|
Nope, it wouldn't.
Cause of the if (!$perms[ismoderator] and !$ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid]")) { echo "<p>You do not have permission to do this!</p>"; exit; } stops people from doing this. its all throughout the mod control panel. |
It still doesn't work. I've given the usergroup the user is in access to modify the access masks as well as specifying this in the forum settings and making him a moderator. It still says "You do not have permission to do this"
|
if your getting that error, you shouldn't be able to even do a search on someone as it uses the exact same code that is in searching, banning and viewing a user's details.
PHP Code:
|
I have the same problem:
Usergroup enabled: Yes Forum Enabled: Yes "You do not have permission to do this" I've spent a few hours making sure everything you had said is correctly done, or at least I hope it is. I also noticed the error at the end of the file which Darkreaper mentioned. Thanks |
Well..? Why isn't this working?
|
I recently formatted and install Win 2k, so sorry for not replying. I will try and install it on a fresh vbulletin and see if i get the same error. Hopefully I won't.
Last question, does your admin usergroup also have super moderator set to yes, as I'm presumming your testing this as the admin user. |
I was testing using the account of a regular forum user who I had set to be able to do this.
Well...I just tested it with my account and it worked fine. You mentioned being a super moderator. Do I have to enable this for the person/category for it to work? I think I remember you mentioning having a hack that allows moderators to be given the ability to change the styles for their forums. Do you? Or is that someone else? |
This hack is for allowing moderators to give access to the forums they moderate(or take.)
The styles hack for moderators is coming, but its more complex, and im adding more options for control. |
Quote:
|
Ah, okay :D
|
No, the user only has to be a moderator of a forum and if they are also a super mod then they will show all forums. If you wish to enable it for people who are not moderators then it would involve editing of everything within the vBulletin mod panel.
Scott |
I made the person a moderator, enabled it for his usergroup, and enabled it for his forum, and it still doesn't work.
|
PHP Code:
|
All times are GMT. The time now is 04:45 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|