Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
2 registered (Gizmo, SteveS), 38 Guests and 14 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 06/07/07
Posts: 4
Top Posters (30 Days)
Ruben 50
DennyP 24
Gizmo 23
Dunny 15
SteveS 13
AllenAyres 12
dbremer 10
SD 10
drkknght00 9
doug 8
Latest Photos
OK Corral Shoot Out
Testing
Basildon Train Station
Basildon Town Centre looking from the rounderbout
Basildon Town Square
Page 1 of 2 1 2 >
Topic Options
#248103 - 01/21/12 02:13 PM Mass Permisions Update SQL
Mark S Offline
Carpal Tunnel
Registered: 07/04/06
Posts: 4447
Loc: Liverpool : England : UK
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.


Edited by Mark S (01/21/12 02:16 PM)
_________________________
Version v7.5.6 smile smile < Threads satisfaction status
People who inspire me Rick Gizmo Ian David jgeoff ntdoc
Oooo i hear 8 is coming? just after 7 my friend.
Top
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
#248104 - 01/21/12 02:17 PM Re: Mass Permisions Update SQL [Re: Mark S]
Mark S Offline
Carpal Tunnel
Registered: 07/04/06
Posts: 4447
Loc: Liverpool : England : UK
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.
_________________________
Version v7.5.6 smile smile < Threads satisfaction status
People who inspire me Rick Gizmo Ian David jgeoff ntdoc
Oooo i hear 8 is coming? just after 7 my friend.
Top
#248125 - 01/21/12 06:59 PM Re: Mass Permisions Update SQL [Re: Mark S]
SD Offline
Registered: 04/19/07
Posts: 4056
Loc: SoCal, USA
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
_________________________

Threads tutorials . Threads & Wordpress experts . UBB resume

If I you, click this link as to why
Top
#248130 - 01/22/12 01:42 PM Re: Mass Permisions Update SQL [Re: Mark S]
Mark S Offline
Carpal Tunnel
Registered: 07/04/06
Posts: 4447
Loc: Liverpool : England : UK
Thank you SD

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

Huge Thanks
_________________________
Version v7.5.6 smile smile < Threads satisfaction status
People who inspire me Rick Gizmo Ian David jgeoff ntdoc
Oooo i hear 8 is coming? just after 7 my friend.
Top
#248131 - 01/22/12 02:18 PM Re: Mass Permisions Update SQL [Re: Mark S]
SD Offline
Registered: 04/19/07
Posts: 4056
Loc: SoCal, USA
mass permission copy does the same thing, so i don't know why you aren't using that ?
_________________________

Threads tutorials . Threads & Wordpress experts . UBB resume

If I you, click this link as to why
Top
#248132 - 01/22/12 02:35 PM Re: Mass Permisions Update SQL [Re: Mark S]
Mark S Offline
Carpal Tunnel
Registered: 07/04/06
Posts: 4447
Loc: Liverpool : England : UK
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.
_________________________
Version v7.5.6 smile smile < Threads satisfaction status
People who inspire me Rick Gizmo Ian David jgeoff ntdoc
Oooo i hear 8 is coming? just after 7 my friend.
Top
#248133 - 01/22/12 03:11 PM Re: Mass Permisions Update SQL [Re: Mark S]
Dunny Offline
addict
Registered: 01/16/08
Posts: 460
Loc: DE USA
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
_________________________
Dunny

Removed link due to bleedover spammers

Dawn of Iskirra
Top
#248134 - 01/22/12 04:11 PM Re: Mass Permisions Update SQL [Re: Mark S]
SD Offline
Registered: 04/19/07
Posts: 4056
Loc: SoCal, USA
yup... Dunny perty much sums it up...

use mass permission copy, instead of sql queries

2c
_________________________

Threads tutorials . Threads & Wordpress experts . UBB resume

If I you, click this link as to why
Top
#248135 - 01/22/12 04:11 PM Re: Mass Permisions Update SQL [Re: Mark S]
Mark S Offline
Carpal Tunnel
Registered: 07/04/06
Posts: 4447
Loc: Liverpool : England : UK
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
_________________________
Version v7.5.6 smile smile < Threads satisfaction status
People who inspire me Rick Gizmo Ian David jgeoff ntdoc
Oooo i hear 8 is coming? just after 7 my friend.
Top
#248136 - 01/22/12 04:13 PM Re: Mass Permisions Update SQL [Re: Mark S]
Ruben Offline

Registered: 12/20/03
Posts: 4424
Loc: Lutz,FL
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
Top
#248137 - 01/22/12 04:16 PM Re: Mass Permisions Update SQL [Re: Mark S]
SD Offline
Registered: 04/19/07
Posts: 4056
Loc: SoCal, USA
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
_________________________

Threads tutorials . Threads & Wordpress experts . UBB resume

If I you, click this link as to why
Top
#248138 - 01/22/12 04:47 PM Re: Mass Permisions Update SQL [Re: SD]
Mark S Offline
Carpal Tunnel
Registered: 07/04/06
Posts: 4447
Loc: Liverpool : England : UK
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
_________________________
Version v7.5.6 smile smile < Threads satisfaction status
People who inspire me Rick Gizmo Ian David jgeoff ntdoc
Oooo i hear 8 is coming? just after 7 my friend.
Top
#248139 - 01/22/12 04:59 PM Re: Mass Permisions Update SQL [Re: Mark S]
Ruben Offline

Registered: 12/20/03
Posts: 4424
Loc: Lutz,FL
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
Top
#248140 - 01/22/12 05:21 PM Re: Mass Permisions Update SQL [Re: Mark S]
Dunny Offline
addict
Registered: 01/16/08
Posts: 460
Loc: DE USA
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
_________________________
Dunny

Removed link due to bleedover spammers

Dawn of Iskirra
Top
#248142 - 01/22/12 06:20 PM Re: Mass Permisions Update SQL [Re: Ruben]
SD Offline
Registered: 04/19/07
Posts: 4056
Loc: SoCal, USA
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
_________________________

Threads tutorials . Threads & Wordpress experts . UBB resume

If I you, click this link as to why
Top
#248145 - 01/22/12 07:28 PM Re: Mass Permisions Update SQL [Re: Mark S]
Dunny Offline
addict
Registered: 01/16/08
Posts: 460
Loc: DE USA
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
_________________________
Dunny

Removed link due to bleedover spammers

Dawn of Iskirra
Top
#248146 - 01/22/12 07:50 PM Re: Mass Permisions Update SQL [Re: Mark S]
SD Offline
Registered: 04/19/07
Posts: 4056
Loc: SoCal, USA
yep, it's not the 'normal' way peeps do perms

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

Threads tutorials . Threads & Wordpress experts . UBB resume

If I you, click this link as to why
Top
#248150 - 01/22/12 09:37 PM Re: Mass Permisions Update SQL [Re: Mark S]
Dunny Offline
addict
Registered: 01/16/08
Posts: 460
Loc: DE USA
Yeah I saw the implication of your link in your sig... so I watched it... I am appropriately humbled ROFLMAO


Dunny
_________________________
Dunny

Removed link due to bleedover spammers

Dawn of Iskirra
Top
#248151 - 01/22/12 10:46 PM Re: Mass Permisions Update SQL [Re: Mark S]
SD Offline
Registered: 04/19/07
Posts: 4056
Loc: SoCal, USA
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
_________________________

Threads tutorials . Threads & Wordpress experts . UBB resume

If I you, click this link as to why
Top
#248152 - 01/23/12 11:09 AM Re: Mass Permisions Update SQL [Re: SD]
driv Offline

Pooh-Bah
Registered: 01/10/04
Posts: 2377
Originally Posted By: SD
back ticks are the devil's spawn laugh


I thought that was Comic Sans... eek
_________________________
Using version :: 7.5.6
Top
Page 1 of 2 1 2 >



Moderator:  AllenAyres, Harold, Ian, Ron M 
Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Temporary Password email not being received
by
05/24/12 10:02 PM
Ability to "like" individual posts (not Facebook "likes)
by doug
05/23/12 09:03 AM
Island Permissions
by ThreadsUser
05/22/12 03:03 PM
streaming video
by prkrgrp
05/20/12 07:02 PM
New Posts Corrupted? Can someone help?
by PianoWorld
05/19/12 09:41 AM
Forum Stats
10492 Members
36 Forums
33842 Topics
181709 Posts

Max Online: 978 @ 06/24/07 11:19 PM
Random Image