Hello,
I am trying to make a PHP page for postnuke, that I want only to be accessible by certain usergroups that are set up in PNphpBB2. How do I go about doing this?
- Teb answered »MenuTree Mystery« 05. Jul
- dks answered »include a file« 05. Jul
- dks answered ».764 -> 1.1.1, Can't add new blocks« 05. Jul
- craigh posted »PostCalendar 5.5.0RC1 needs testers and translators« 05. Jul
- bartl answered »Upgrading 1.0.2 --> 1.1.1« 05. Jul
- Charlie-otb answered »SafeHTML output filter and youtube« 05. Jul
- dl7und answered »Adding an "About Us" page« 05. Jul
Login
Pnphpbb2 group permissions
-
- Rank: Freshman
- Registered: 20.03.06
- last visit: 04.04.06
- Posts: 3
-
- Rank: Professional
- Registered: 12.07.03
- last visit: 30.03.07
- Posts: 667
Something like...
Code
<?php
// Begin PNphpBB2 Module
if (!defined("LOADED_AS_MODULE")) {
die ("You can't access this file directly...");
}
global $pnconfig;
$pntable = pnDBGetTables();
$ModName = basename( dirname( __file__ ) );
// End PNphpBB2 Module
define('IN_PHPBB', true);
// Begin PNphpBB2 Module
$phpbb_root_path = './modules/' . $ModName . '/';
// End PNphpBB2 Module
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_VIEWMEMBERS);
init_userprefs($userdata);
//
// End session management
//
if ($userdata['session_logged_in'])
{
/* Your PHP Content here
echo "Hello World";
*/
}
?>
Didnt have the time to test it, off to work now!
- Moderated by :
- Support
