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
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