Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
Pnphpbb2 group permissions
  • Posted: 03.04.2006, 22:08
     
    Snipernosniping
    rank:
    Freshman Freshman
    registered:
     March 2006
    Status:
    offline
    last visit:
    03.04.06
    Posts:
    3
    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?
  • Posted: 12.04.2006, 14:54
     
    ThePyromaniac
    rank:
    Professional Professional
    registered:
     July 2003
    Status:
    offline
    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!

Extensions Moderation

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula