Determining whether a forum is guest readable

Discussion forum for MOD Writers regarding MOD Development.
Registered User
Posts: 261
Joined: Sat Nov 02, 2002 4:42 pm

Determining whether a forum is guest readable

Post by Haravikk » Fri Aug 15, 2014 11:32 am

Okay, so I'm finally picking up development on my HTTP guest cache mod again, but I've been tearing my hair out trying to figure out how to do something.

Basically what I need to be able to do is determine whether the current forum and topics are readable by guest users, so I can tweak caching behaviour, i.e - forums not reachable by guests will never be cached, while forums and topics reachable by guests should cache as much as possible (everything in the case of guests, less for registered users).

I know how to query permissions for the currently active user, but it's not quite so obvious how I can do a general check for forum, and of course I need to it efficiently. Of course if the information isn't especially easy to get, then I could just grab it once for all forums, then cache the result, but I'm still currently at a loss as to the right method to get this information with phpBB's permissions system, so any help would be greatly appreciated!


Return to “[3.0.x] MOD Writers Discussion”