PDA

View Full Version : PHP modified Forum Permissions & updating the forum cache


Medi0cr3
01-21-2015, 06:57 PM
As I figured out how to do this, I'm editing my post entirely more for a tutorial or a small how to.

If you want to update forum permissions by entries you make into the database, the data must be cached for it to be visible in the forum. There's a few lines you need in a custom page.

You must also reference a permission for a particular forum. I would setup a forum like you want using the AdminCP and then going into the database. Look at the "forumpermissions" table and loo to see what the permission that usergroup received for that particular forumid.

If the column forumpermissions is equal to 0, the usergroup doesn't have any permissions and relatively enables it unusable by that usergroup.

You must include these lines on your page:

require_once('./global.php');
require_once( './includes/adminfunctions.php');
global $vbulletin;


Your custom code:
Do your insert/update/delete commands and then finalize it by adding:

build_forum_permissions();


This works great.