PDA

View Full Version : Bulk Mature Switch with


skidpics
March 25th, 2008, 07:04 PM
What can be done to tweak the mature switching for a all pics in a category in bulk rather than editing one by one?

http://skidpics.com

Michael P
March 25th, 2008, 07:12 PM
You could run a query on your DB:

update photos SET ismature=1 WHERE cat=###;

(add in your prefix if you have one)

skidpics
March 26th, 2008, 06:11 AM
Thanks Micheal for that tip!

kisii
April 1st, 2008, 10:51 AM
This seems more of a reactive process versus proactive. is there any way that a category can be flagged as mature. This query pretty much has to be run with any additions of media to that category.

Chuck S
April 1st, 2008, 11:48 AM
categories are not set mature images are and a user sets whether their image is mature or not and users select whether they want to view mature content or not

skidpics
April 8th, 2008, 09:03 AM
another question on this then. How can it be integrated during registration with SMF so that it asks when registering? instead of users having to edit their profile in PP in order for this to take effect?

Chuck S
April 8th, 2008, 09:42 AM
Well I guess that would require you to write some modification to your smf forum scripts to do that.

skidpics
April 11th, 2008, 05:31 PM
You could run a query on your DB:

update photos SET ismature=1 WHERE cat=###;

(add in your prefix if you have one)

my prefix is pp_

so that would be:
update pp_photos SET ismature=1 WHERE cat=###;

correct?

Would be nice if you can just do that per category, or bulk photo edit. Basically just have to set a query then to do this based on all pics in category, correct?

Chuck S
April 11th, 2008, 06:13 PM
Yes thats what the query would look like.

skidpics
May 7th, 2008, 06:23 AM
You could run a query on your DB:

update photos SET ismature=1 WHERE cat=###;

(add in your prefix if you have one)


Do I run that from the root of the DB? I am using the following comment, with prefix, and I tried in several different places within pp_photos, but no luck.

update pp_photos SET ismature=1 WHERE cat=532

Chuck S
May 7th, 2008, 09:58 AM
You run that when actually in your photopost database within phpmyadmin viewing the tables or the pp_photos table itself and hit the sql box in phpmyadmin.

skidpics
May 8th, 2008, 10:55 AM
that worked like a charm.

I would be nice to write some coding that perhaps we can add intro the intro for the category, display ONLY if admin is logged in to query the db category to set all images to mature - that way, no manual edit would have to be done, and since some users forget the switch, would allow easy editing of new uploads going to that category instead of editing pics one by one at times.

Chuck S
May 8th, 2008, 11:13 AM
Feel free as always to make suggestions in the suggestions forum.