Previous Thread
Next Thread
Print Thread
Hop To
#248103 01/21/2012 3:13 PM
Joined: Jul 2006
Posts: 4,057
Joined: Jul 2006
Posts: 4,057
UPDATE `ubbt_FORUM_PERMISSIONS` SET `SEE_FORUM` = '-1', `READ_TOPICS` = '-1', `CREATE_TOPICS` = '-1', `CREATE_REPLIES` = '-1' WHERE `ubbt_FORUM_PERMISSIONS`.`GROUP_ID` = 6 AND `ubbt_FORUM_PERMISSIONS`.`FORUM_ID` = '2'

This is to save time,
with having the best part of 100 forums and to update them using the control panel permissions screen, was taking for ever. So i created the above SQL to do them 1 at a time.

Would this have updated all in one go ?
6 = The Group


UPDATE `ubbt_FORUM_PERMISSIONS` SET `SEE_FORUM` = '-1', `READ_TOPICS` = '-1', `CREATE_TOPICS` = '-1', `CREATE_REPLIES` = '-1' WHERE `ubbt_FORUM_PERMISSIONS`.`GROUP_ID` = 6

Cheers
i also found that it does remove human error when doing it this way and not 1 at a time screen by scree via the control panel permissions screen.

Wish i was a swish as SD when it come to the SQL stuff.

Last edited by Mark S; 01/21/2012 3:16 PM.

BOOM !! Version v7.6.1.1
People who inspire me Isaac ME Gizmo
Joined: Jul 2006
Posts: 4,057
Joined: Jul 2006
Posts: 4,057
Possible 7.5.6 Bug above.

Adding the SQL to Sql Tgs or Code Tags breaks the code try it and see it stops at _ Uderscore.


BOOM !! Version v7.6.1.1
People who inspire me Isaac ME Gizmo
Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
SQL Query
UPDATE ubbt_FORUM_PERMISSIONS 
SET 
 SEE_FORUM = -1, 
 READ_TOPICS = -1, 
 CREATE_TOPICS = -1, 
 CREATE_REPLIES = -1 
WHERE GROUP_ID = 6 
  AND FORUM_ID = 2

and

SQL Query
UPDATE ubbt_FORUM_PERMISSIONS 
SET 
 SEE_FORUM = -1, 
 READ_TOPICS = -1, 
 CREATE_TOPICS = -1, 
 CREATE_REPLIES = -1 
WHERE GROUP_ID = 6

much more readable too wink

back ticks are the devil's spawn laugh

Joined: Jul 2006
Posts: 4,057
Joined: Jul 2006
Posts: 4,057
Thank you SD

Apreciated that will save me Hrs of work and prevent Human error over so many forums.

Huge Thanks


BOOM !! Version v7.6.1.1
People who inspire me Isaac ME Gizmo
Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
mass permission copy does the same thing, so i don't know why you aren't using that ?

Joined: Jul 2006
Posts: 4,057
Joined: Jul 2006
Posts: 4,057
i guess i'm assuming the mass copy works for NEW forums wanting to copy a Set of Permissions from 1 Forum to many. So Duplicating that Template.

Ive not looked at the Mass Copy Permissions Function.

But in the case above,

I have say 100 Forums
and there very unique in there settings for various groups to see and not see etc. . . SO the above Group 6 is a Restricted access Where i can lock down a user to Group being a Restricted user to only see the ADMIN Holding forum.

So my understaning is that the Mass Permissions works creating new forums, but my request is a Retro Fit to use an existing Group but change who can see it and what.

Hope that makes sense.


BOOM !! Version v7.6.1.1
People who inspire me Isaac ME Gizmo
Joined: Jan 2008
Posts: 514
addict
addict
Joined: Jan 2008
Posts: 514
Mark I have played with that permissions thing quite a bit since 7.X.X came out and it is pretty easy to use for mass permissions. It will do what I think you are looking for.... say 3 forums with this permissions set and 15 others with another type of permission set... it will do that... you just have to have one that is set up he way you want the permissions for the rest then use the Copy function to add it to all the others of the same permissions.


Dunny

Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
yup... Dunny perty much sums it up...

use mass permission copy, instead of sql queries

2c

Joined: Jul 2006
Posts: 4,057
Joined: Jul 2006
Posts: 4,057
For me regardless of all the other settings in each forum,
i only needed these ones updated.

SEE_FORUM = -1, (Forum is Visible)
READ_TOPICS = -1, (Can Read Topics)
CREATE_TOPICS = -1, (Create New Topic)
CREATE_REPLIES = -1 (Reply to a Topic)

This 1 Forum which i set up as a Holding Room.
So anyone i assign to Group 6 can not see / reply / or post a new topic or see anyother forums.

The Mass Copy for me would not work as i also have in the mix Hidden Private forums, so there are custom settings all over the place.

I Have previously used copy forum permissions for new forums but this one is chagning the permissions of an existing group.

What i see from the menus with the mass copy option is the copy all the settings from that forum to many which isnt what i had to do, i have to change a Groups settings to fit all the other settings.

Mark


BOOM !! Version v7.6.1.1
People who inspire me Isaac ME Gizmo
Joined: Dec 2003
Posts: 6,562
Likes: 78
Joined: Dec 2003
Posts: 6,562
Likes: 78
I was thinking the same thing about the mass copy feature.
Make one forum the way you want and go to town selecting all the forums you want to change.
With the query method I am not so sure you would change the time involved or make any difference in the human error factor.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
and if you only want to change 1 group, then do the group based screen, instead..

that is where you look @ 1 group, and set perms per forum..

not the one where you have 1 forum and all groups...

regardless, you have multiple ways to do it smile

do what you want smile

Joined: Jul 2006
Posts: 4,057
Joined: Jul 2006
Posts: 4,057
Dam
Originally Posted by SD
and if you only want to change 1 group, then do the group based screen, instead..

that is where you look @ 1 group, and set perms per forum..

not the one where you have 1 forum and all groups...

regardless, you have multiple ways to do it smile

do what you want smile



Missed that one via the Groups.
First time ive had to do what ive done and habit takes me to the permissions page, but its clear now and easy.

Group Managment >>> Forums >>> (In Here)

What's helped is seeing the settings in place as i understand them which has made it so much easier to do / change in the future.

Thanks for the help Apreciated smile


BOOM !! Version v7.6.1.1
People who inspire me Isaac ME Gizmo
Joined: Dec 2003
Posts: 6,562
Likes: 78
Joined: Dec 2003
Posts: 6,562
Likes: 78
Originally Posted by Mark S
Dam
Originally Posted by SD
and if you only want to change 1 group, then do the group based screen, instead..

that is where you look @ 1 group, and set perms per forum..

not the one where you have 1 forum and all groups...

regardless, you have multiple ways to do it smile

do what you want smile



Missed that one via the Groups.
First time ive had to do what ive done and habit takes me to the permissions page, but its clear now and easy.

Group Managment >>> Forums >>> (In Here)

What's helped is seeing the settings in place as i understand them which has made it so much easier to do / change in the future.

Thanks for the help Apreciated smile
I still think that mass copy is the least labor intensive.
Group permissions:
26 permissions X 100 forums =2600 edits.
Mass copy:
26 edits one time.
Then selecting 100 forums = 126 edits.

The end result is the same.
My 2 cents.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Jan 2008
Posts: 514
addict
addict
Joined: Jan 2008
Posts: 514
You can change the group's permissions in one set of forums... leave everyone else's permissions alone, and set that forum.... then use the copy function and the permissions will be exactly set up the way the "template" forum is...all groups that are allowed to post etc will be able to.... and the one group that is -1 will be that way (as long as the forum you are copying from has the correct permissions that you wanted).

Dunny

Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
Originally Posted by Ruben
I still think that mass copy is the least labor intensive.


no, it's not..

the easiest, for what Mark S wanted was to go to the specific group's forum permissions ( 1 screen that has all forums for that 1 group ) and edit there.

like he eventually did, when i pointed out where it was. ( http://yourforums.com/admin/groupmanage.php - then select the group eg: http://yourforums.com/forums/admin/group_forumperms.php?edit_group=6 )

most peeps go to forum permissions ( which is where he was going ), but fail to see that there is another way to do it...

ie: (1 group: all forums), vs (1 forum, all groups, then mass copy)

additionally, mass copy won't work for what he wanted, since it wasn't where he wanted to copy ALL forum perms from the source forum to the others. he only wanted to affect 3 or 4 perms per, but leave the others untouched wink

Joined: Jan 2008
Posts: 514
addict
addict
Joined: Jan 2008
Posts: 514
ahhh well SD I guess we misunderstood what he actually wanted to do.. *sigh* sorry. However I learned something too.... because I didn't know you could do perms that way as well tongue


Dunny

Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
yep, it's not the 'normal' way peeps do perms

soooooooooooooooo... you're forgiven for not knowing it laugh

Joined: Jan 2008
Posts: 514
addict
addict
Joined: Jan 2008
Posts: 514
Yeah I saw the implication of your link in your sig... so I watched it... I am appropriately humbled ROFLMAO


Dunny

Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
rofl.. no dunny... the link in my sig is no where NEAR applying a to you...

you are on top of things...

no worries laugh

Joined: Jan 2004
Posts: 2,474
Likes: 3
D
Pooh-Bah
Pooh-Bah
D Offline
Joined: Jan 2004
Posts: 2,474
Likes: 3
Originally Posted by SD
back ticks are the devil's spawn laugh


I thought that was Comic Sans... eek


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Is UBB.threads still going?
by Aaron101 - 04/01/2022 8:18 AM
Who's Online Now
1 members (Nightcrawler), 607 guests, and 159 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)