Welcome to Geeklog Friday, October 22 2021 @ 12:31 am EDT

Geeklog Forums

Changing Multiple Story Permissions


Status: offline

computerade

Forum User
Chatty
Registered: 17/05/04
Posts: 46
Is there anyway to select a number of stories at once and give them all the same permissions. I made everything only for members, and now i want to give it anonymous access and that would take hours to manually set all the permissions for each story. Anyone know how i could do it faster ? Maybe in SQL ?

Thanks.
 Quote

Status: offline

hidden

Forum User
Chatty
Registered: 13/11/03
Posts: 51
i dont know if there is a feature like that in geeklog. but if you have access to you database you can do that with just a single query. i have done that once.

uo can do something like this
PHP Formatted Code

UPDATE gl_stories set perm_anon=2
 


change gl_stories to the actual stories table name in your geeklog database.
we are just shadows of our hidden identities
 Quote

Status: offline

computerade

Forum User
Chatty
Registered: 17/05/04
Posts: 46
can you give me a little bit more detail, im really bad at working with SQL. Im using phpmyadmin for an SQL administration program.
 Quote

Status: offline

hidden

Forum User
Chatty
Registered: 13/11/03
Posts: 51
in your phpmyadmin point to your geeklog database click on query window. execute the query below.

PHP Formatted Code

UPDATE gl_stories set perm_anon=2
 


change gl_stories to the actual stories table name in your geeklog database.

this will give anonymous user read access to all of you stories.
we are just shadows of our hidden identities
 Quote

Status: offline

computerade

Forum User
Chatty
Registered: 17/05/04
Posts: 46
i already tried that it doesn't seem to do anything, at most it just lists all the stories, and then someitmes it just says:

" You have to choose at least one Column to display "

There are all kinds of boxes in the query option that i don't know about.

My table is gl_stories.
 Quote

Status: offline

hidden

Forum User
Chatty
Registered: 13/11/03
Posts: 51
Quote by computerade: i already tried that it doesn't seem to do anything, at most it just lists all the stories, and then someitmes it just says:

" You have to choose at least one Column to display "

There are all kinds of boxes in the query option that i don't know about.

My table is gl_stories.


you mean this code?

PHP Formatted Code
UPDATE gl_stories set perm_anon=2
 


try doing it again, this time use this query
PHP Formatted Code
UPDATE gl_stories set perm_anon=2 where perm_anon<>2
 

we are just shadows of our hidden identities
 Quote

Status: offline

computerade

Forum User
Chatty
Registered: 17/05/04
Posts: 46
here's a screen:

SQL Screen
 Quote

Status: offline

hidden

Forum User
Chatty
Registered: 13/11/03
Posts: 51
did you click on submit query? the one on the lower right? that query should do what you wanted to happen.
we are just shadows of our hidden identities
 Quote

Status: offline

computerade

Forum User
Chatty
Registered: 17/05/04
Posts: 46
yes i did, nothing happens except that error message in red comes up.
 Quote

mach

Anonymous
maybe throw a semicolon at the end of the command. shouldn't matter with phpmyadmin, but whoknows
 Quote

Status: offline

computerade

Forum User
Chatty
Registered: 17/05/04
Posts: 46
PHP Formatted Code
Error
SQL-query:

SELECT *
FROM `gl_stories`
WHERE 1
UPDATE gl_stories SET perm_anon =2 WHERE perm_anon <>2 LIMIT 0 ,
30
MySQL said:  

#1064 - You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'UPDATE gl_stories set perm_anon=2 where perm_anon<>2 LIMIT 0, 3

 


That is all i get, it has gone through properly and it says it affects like 300 rows but then nothing is even changed, the permissions are still not anonymous for all the stories.
 Quote

Status: offline

hidden

Forum User
Chatty
Registered: 13/11/03
Posts: 51
thats not the query i was telling you! try to compare the one you executed and the one im telling you.

on the screen shot you've posted here. just below the phpMyAdmin logo in the upper left. that icon third from left(the one that was labeled SQL), click that, paste the query i'm telling you and click on go button.
we are just shadows of our hidden identities
 Quote

Status: offline

computerade

Forum User
Chatty
Registered: 17/05/04
Posts: 46
PHP Formatted Code
Affected rows: 0 (Query took 0.0329 sec)  
SQL-query:
UPDATE gl_stories SET perm_anon =2 WHERE perm_anon <>2

 
 Quote

All times are EDT. The time is now 12:31 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content