PhotoPlog

PhotoPlog (http://www.photoplog.com/forum/index.php)
-   "How Do I..." Questions (http://www.photoplog.com/forum/forumdisplay.php?f=7)
-   -   Categories in Thumbs and Age Permissions (http://www.photoplog.com/forum/showthread.php?t=1538)

Digital Jedi 07-31-2007 02:30 PM

Categories in Thumbs and Age Permissions
 
I have categories in my gallery that are rated like the ESRB rating system. E for Everyone, T for Teen, M for Mature. Couple of questions.

Can I lock a section based on a user's age,/birthday?

But mainly, how would I go about keeping images from the Mature section from showing up in random thumbs. Note that I also use the vBadvanced, and have thumbs on that page.


EDIT: Come to think of it, how do I remove the file list below the categories?

Morgan 07-31-2007 03:50 PM

PhotoPlog Lite does not have the ability to prevent access to certain categories while allowing access to other categories. PhotoPlog Pro will let you assign category based permissions, so if your usergroups are determined by age, you could prevent access to certain categories based on usergroup. Otherwise you'd need to edit the code to prevent access to certain categories. For thumbnails, see this thread, and for the file list, see this thread.

Digital Jedi 07-31-2007 04:02 PM

Alrighty, thanks. No biggie on the age thing. But if I can at least control what thumbs appear, that should be sufficient. I'll check those threads out. Thanks again.

Digital Jedi 07-31-2007 04:30 PM

One small problem. In the PhotoPlog Forum Home Thumbs plugin, there is no
Code:

AND moderate = 0
I see a WHERE moderate = 0, but adding the AND catid IN code there doesn't seem to affect anything. Have I left something out?

Morgan 07-31-2007 04:37 PM

What do you see in the PhotoPlog Forum Home Thumbs plugin?

Digital Jedi 07-31-2007 05:03 PM

There is no "AND moderate", but rather a "WHERE moderate".

PHP Code:

$photoplog_file_infos $db->query_read("SELECT * 
                        FROM photoplog_fileuploads 
                        WHERE moderate = 0 
                        ORDER BY RAND() 
                        LIMIT 5 

I tried changing it to AND to no avail.

Morgan 07-31-2007 05:06 PM

Edit it like so to include categories 1, 2, and 3:
Code:

WHERE moderate = 0 AND catid IN (1,2,3)
Edit it like so to exclude categories 1, 2, and 3:
Code:

WHERE moderate = 0 AND catid NOT IN (1,2,3)

Digital Jedi 07-31-2007 05:34 PM

Hrm, Doesn't seem to be working for me. Perhaps I just have my category IDs incorrect. I'll keep working at. Thanks again.

Digital Jedi 08-01-2007 05:53 PM

Well, I worked on this quite a bit last night, and it still has no affect on the thumbs. Is it possible for another modification to be preventing it? Or is there an alternate option I can try? Thanks again, and sorry for being pesky. ;)

Morgan 08-01-2007 06:22 PM

The PhotoPlog Forum Home Thumbs plugin is for random thumbs appearing on the forum index page. For random thumbs in the gallery itself, you'd need to edit the PhotoPlog Lite settings.php file:
Code:

        $photoplog_file_infos = $db->query_read("SELECT *
                                                FROM photoplog_fileuploads
                                                WHERE 1=1
                                                AND catid IN (1,2,3)
                                                $photoplog_admin_sql1
                                                ORDER BY RAND()
                                                LIMIT 5
        ");



All times are GMT. The time now is 05:40 PM.

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.