Topic: Multigroup mod for PunBB 1.2
ok, this is the first punbb mod I ever release, so use it at your own risk anyways, this mod enables you to make a user member of more than one group, if you couldn't make that out from the topic the user still has a primary group that is "his/her group", the only time punbb uses the additional groups you have selected is for the read/post reply/post topic permission (i.e it's only used for forum permissions).. because of this you cannot select "Moderator" or "Administrator" as an additional group, they have to be the primary one..
To install the mod you'll need:
* PunBB 1.2 (final, not the beta)
* punmod (tested with version 0.9.4)
I had to tweak punmod to make it work properly with PunBB 1.2 (if you're really wild n crazy you can try punmod 0.95beta). The things I needed to change was in _punmod/_punmod.php:
After (line 10-15)
$PUNMOD_MODE = -1; $PUNMOD_ERROR = null; $pun_root = './';
and after (line 20?)
define('PUN_TURN_OFF_MAINT', 1); // circumvent maintenance mode.
error_reporting(E_ALL ^ E_NOTICE);
which makes the first part of the file look like:
<?php define('PUNMOD_FOLDER', 'punmods'); define('PUNMOD_REGISTRY', PUNMOD_FOLDER.'/_installed_mods.txt'); define('PUNMOD_APPLY', 0); define('PUNMOD_VERIFY', 1); define('PUNMOD_GETINFO', 2); define('PUNMOD_ENGINE', 1); $PUNMOD_MODE = -1; $PUNMOD_ERROR = null; $pun_root = './'; require $pun_root.'include/common.php'; if (!defined('PUN_DEBUG')) define('PUN_DEBUG', 1); // complete error message from PunBB on failure. define('PUN_TURN_OFF_MAINT', 1); // circumvent maintenance mode. error_reporting(E_ALL ^ E_NOTICE); $mod_registry = array();
Then just follow the punmod instructions in the readme.txt:
1. Copy everything from the "upload" folder to your PunBB root folder. 2. Copy any mods you wish to apply into the "punmods" folder. 3. Ensure that PHP has write access permissions in PunBB folder and subfolders. 4. Open your browser to "punmod.php" and follow the on-screen instructions.
After the installation is finished you'll end up with a new listbox under the "Administration" page of the user profile. Hold down ctrl and select the group(s) the user should be member of, click "Save" and hopefully it works
Grab it here!
This mod changes the PunBB source heavily and it might:
1) destroy your forum totally
2) crash your server
3) steal your girlfriend
although this didn't happen to me you never know
and btw, post here if you have any ideas or if it doesn't work...