![]() |
It irked me to no end that when I added a new usergroup, they had access to all private forums if I wasn't careful. Thus, I wrote this.
It should also be useful for other things. With this field in the forum table, queries to exclude private forums are MUCH easier. Do not download this attachment for new installs. Download this one |
Can you please explain in more details what this hack does?
I have a similar problem, that when I opened a new hidden forum, all people who had access to the first one also had access to the new one, and I don't like it. Will your hack help me? |
What it does is when you create a new private forum or make a forum private that wasn't private before, it sets a field in the database to mark it as private.
Then, when you create a new user group, it sets the forumpermissions to can't view for all private forums. This way, you can create a new group and not have them see your private forums by default. I am not 100% sure, but cutting this code: PHP Code:
Amy |
Just one thing. :)
Instead of this: Code:
$tempGroupid=$DB_site->query_first("Select usergroupid from usergroup ORDER BY usergroupid DESC limit 1"); Code:
$tempGroupid=$DB_site->insert_id(); http://www.php.net/manual/en/functio...-insert-id.php :) |
Cool. I learn something every day.
Amy |
Hm...ok. Lets say I have 2 private forums already, and all moderators and admins have access to it. I then create another private forum, but want the moderators for that one not to have access to the previous forum, and I don't want any existing moderators to have access to the forum I just created. Can I do this?
|
[QUOTE]Originally posted by DarkReaper
Hm...ok. Lets say I have 2 private forums already, and all moderators and admins have access to it. I then create another private forum, but want the moderators for that one not to have access to the previous forum, and I don't want any existing moderators to have access to the forum I just created. Can I do this? |
Installed the hack, but it dont work for me. Im using 2.3.0
Everything is added and I get no error messages, but the new usergroup's I make still got access to all "hidden" forums. Wayne2k1.com: A quite fast and easy solution to your problem would be to make another usergroup and make that "moderators" too, then edit the settings on who got rights of the usergroups to view the different forums. |
This is a real oldie and I can't guarantee it works anymore. I don't use it because I don't install more usergroups.
Amy |
Wow this is an oldie but a lovely idea :)!
How do i miss these hacks :p? - miSt |
I think I need to look at this one again. I did it way back when I barely knew a thing about VB. There might be a better or more efficient way to handle this. Off to play :)
Amy |
OK. I have improved things slightly by getting rid of the extra queries in admin/forum.php
You do not have to upgrade. The hack still works as written. I believe the person having problems didn't remember to update his forum settings in private forums. If you want to upgrade, simply uninstall the changes in admin/forum.php and use the changes in this new file. I am going to leave the original file in the first post to aid with uninstalls. Don't forget, after you install this hack, you MUST go update the settings on existing private forums or new usergroups will have access to them. Amy |
[QUOTE]Originally posted by amykhar
Don't forget, after you install this hack, you MUST go update the settings on existing private forums or new usergroups will have access to them. Amy |
No. Open the modify forum screen, make sure it's checked private and then click submit even if you made no changes. That makes sure the value is updated in the new column.
Amy |
Looks like a very good hack to install...... but how many queries does this add?
|
None to the day-to day operation of your board. Only 1 extra when you are adding a new usergroup.
Amy |
That's great. Thanks, Amy.
|
[QUOTE]03-10-03 at 03:59 PM amykhar said this in Post #12
OK. I have improved things slightly by getting rid of the extra queries in admin/forum.php You do not have to upgrade. The hack still works as written. I believe the person having problems didn't remember to update his forum settings in private forums. If you want to upgrade, simply uninstall the changes in admin/forum.php and use the changes in this new file. I am going to leave the original file in the first post to aid with uninstalls. Don't forget, after you install this hack, you MUST go update the settings on existing private forums or new usergroups will have access to them. Amy |
You may if you would like. It will work either way.
Amy |
Love this hack, it makes things SO much easier!
I've got about...20-25 private forums that I have to normally Untick when making a new member group Thanks alot Amy :) |
Glad you like it :)
Amy |
All times are GMT. The time now is 04:49 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:
|