Topic Title: Standalone phpBB2 integration within PHPNuke

Forum Index » Other PHPNuke Issues » Standalone phpBB2 integration within PHPNuke
Topic URL: http://www.nukedgallery.net/postt1606.html

AuthorMessage
Post Title: Standalone phpBB2 integration within PHPNuke
dari
Joined: Mar 03, 2003
Posts: 6287
Location: Washington Township, NJ, USA
Posted: Tue May 03, 2005 8:34 pm
This is a DRAFT of the FORTH VERSION of the installation guide. Make backup copies of your phpNuke files and your database before starting this process. If it works for you, let us know [nukedgallery.net]. If it doesn't, let us know what went wrong [nukedgallery.net], then revert back to your saved backup for your site until we can work out the bugs.

Version History:
Beta1 (8 April 2004):
Initial Draft

Beta2 (27 April 2004):
Reduced number of phpNuke modifications by using $user_prefix.

Beta3 (3 May 2004):
Introduced ability to redirect to forums upon login/logout.
Added fixes for phpNuke admin control panel related to change in format of $user_regdate field in the database.

Beta4 (12 July 2004):
Updated to phpNuke 7.2.
Split the integration methods into two separate guides.

How to integrate standalone phpBB with phpNuke
Developed and Authored by: Dariush Molavi (dari AT nukedgallery DOT net) and spcdata
Special thanks to spcdata for testing


This is a how-to on integrating standalone phpBB within PHPNuke. Why do this? Simply stated, it makes upgrading and modifying both pieces of software much simpler.

Standard disclaimer: Before you start any of this:
Backup your existing phpnuke database.
Backup your existing phpnuke directory.


For new PHPNuke / BB2Nuke installations
Those with existing phpNuke installations, read this [nukedgallery.net] post.

<ol><li>Install phpNuke as you normally would.</li>

<li>Make the following database modifications for phpNuke:
<ol type="a"><li>When you install phpNuke for the first time, it creates lots of tables with names in the following format:
Code: › <prefix>_bbXXXXX


phpBB uses tables with the format of:
Code: › <prefix>bb_XXXXX


So, when you first install phpNuke, you will need to delete all of the tables of the format <prefix>_bbXXXXX. Below is a list of the tables:
Code: ›  <prefix>_bbauth_access       
 <prefix>_bbbanlist      
 <prefix>_bbcategories      
 <prefix>_bbconfig      
 <prefix>_bbdisallow      
 <prefix>_bbfavorites      
 <prefix>_bbforum_prune      
 <prefix>_bbforums      
 <prefix>_bbgroups      
 <prefix>_bbposts      
 <prefix>_bbposts_text      
 <prefix>_bbprivmsgs      
 <prefix>_bbprivmsgs_text   
 <prefix>_bbranks      
 <prefix>_bbsearch_results 
 <prefix>_bbsearch_wordlist
 <prefix>_bbsearch_wordmatch
 <prefix>_bbsessions      
 <prefix>_bbsmilies      
 <prefix>_bbthemes      
 <prefix>_bbthemes_name      
 <prefix>_bbtopics      
 <prefix>_bbtopics_watch      
 <prefix>_bbuser_group      
 <prefix>_bbvote_desc      
 <prefix>_bbvote_results      
 <prefix>_bbvote_voters      
 <prefix>_bbwords 


You may have more or less, depending on your version of PHPNuke (this list is from phpNuke 7.2).</li>
<li>Do the following in the <prefix>_users table:
<ol type="i">
<li>Change the user_regdate from varchar(20) to int(11).</li>
<li>Change the user_id field from int(11) to mediumint(Cool and remove the autoincrement property.</li>
<li>Change the Anonymous user to have a user_id of -1.</li></ol></li></ol>
That is the end of database modifications that need to be done to phpNuke.</li>
<li>Make the following file modifications in your PHPNuke installation.
<ol type="a"><li>The following file modifications are done inside Your_Account/index.php.
PHP: › <?php #
#-----[ OPEN ]-----------------------------------
#
modules/Your_Account/index.php

#
#-----[ FIND - THERE ARE 2 INSTANCES OF THIS]----
#
    
$sql "SELECT * FROM ".$prefix."_bbconfig";
    
$result $db->sql_query($sql);

#
#-----[ REPLACE BOTH INSTANCES WITH ]------------
#
    
$sql "SELECT * FROM ".$prefix."bb_config";
    
$result $db->sql_query($sql);

#
#-----[ FIND ]-----------------------------------
#
    
$user_regdate date("M d, Y");

#
#-----[ REPLACE WITH ]-----------------------------------
#
    
$user_regdate time();


#
#-----[ FIND ]-----------------------------------
#
    
$db->sql_query("INSERT INTO ".$user_prefix."_users_temp (user_id, username, user_email, user_password, user_regdate, check_num, time) VALUES (NULL, '$username', '$user_email', '$new_password', '$user_regdate', '$check_num', '$time')");

#
#-----[ REPLACE WITH ]-----------------------------------
#
    
$db->sql_query("INSERT INTO ".$user_prefix."_users_temp (user_id, username, user_email, user_password, user_regdate, check_num, time) VALUES (NULL, '$username', '$user_email', '$new_password', $user_regdate, '$check_num', '$time')");

#
#-----[ FIND ]-----------------------------------
#
     
$db->sql_query("DELETE FROM ".$user_prefix."_users_temp WHERE time < $past");
     
$sql "SELECT * FROM ".$user_prefix."_users_temp WHERE username='$username' AND check_num='$check_num'";
     
$result $db->sql_query($sql);

#
#-----[ AFTER, ADD ]-----------------------------------
#
    
$uid_result $db->sql_query("SELECT MAX(user_id) AS total FROM ".$user_prefix."_users");
    
$uid_row $db->sql_fetchrow($uid_result);
    
$user_id $uid_row['total'] + 1;

#
#-----[ FIND ]-----------------------------------
#
        
$db->sql_query("INSERT INTO ".$user_prefix."_users (user_id, username, user_email, user_password, user_avatar, user_regdate, user_lang) VALUES (NULL, '$row[username]', '$row[user_email]', '$row[user_password]', 'gallery/blank.gif', '$row[user_regdate]', '$language')");

#
#-----[ REPLACE WITH ]-----------------------------------
#
        
$sql2 "INSERT INTO ".$user_prefix."_users (user_id, username, user_email, user_password, user_avatar, user_regdate, user_lang) VALUES ('$user_id', '$row[username]', '$row[user_email]', '$row[user_password]', 'gallery/blank.gif', $row[user_regdate], '$language')";
        
$db->sql_query($sql2);
 
#
#-----[ FIND ]-----------------------------------
#
    
$db->sql_query("DELETE FROM ".$prefix."_bbsessions WHERE session_user_id='$r_uid'");

#
#-----[ REPLACE WITH ]-----------------------------------
#
    
$db->sql_query("DELETE FROM ".$prefix."bb_sessions WHERE session_user_id='$r_uid'");


#
#-----[ FIND ]-----------------------------------
#
        
if ($pm_login != "") {
            
Header("Location: modules.php?name=Private_Messages&file=index&folder=inbox");
            exit;
        }
        if (
$redirect == "" ) {
            
Header("Location: modules.php?name=Your_Account&amp;op=userinfo&amp;bypass=1&amp;username=$username");
        } else if (
$mode == "") {
            
Header("Location: modules.php?name=Forums&amp;file=$forward");
        } else if (
$t !="")  {
            
Header("Location: modules.php?name=Forums&amp;file=$forward&amp;mode=$mode&amp;t=$t");
        } else {
            
Header("Location: modules.php?name=Forums&amp;file=$forward&amp;mode=$mode&amp;f=$f");
        }

#
#-----[ REPLACE WITH ]-----------------------------------
#
        
if ($redirect == "" ) {
            
Header("Location: modules.php?name=Your_Account&op=userinfo&bypass=1&username=$username");
        } 
        else if (
$redirect == "phpBB") {
            
Header("Location: /phpBB2/");
        }
        else if (
$mode == "") {
            
Header("Location: /phpBB2/$forward");
        } else if (
$t !="")  {
            
Header("Location: /phpBB2/$forward&amp;mode=$mode&amp;t=$t");
        } else {
            
Header("Location: /phpBB2/$forward&amp;mode=$mode&amp;f=$f");
        }

#
#-----[ FIND ]-----------------------------------
#
    
if ($redirect != "") {
        echo 
"<META HTTP-EQUIV=\"refresh\" content=\"3;URL=modules.php?name=$redirect\">";
    } else {
        echo 
"<META HTTP-EQUIV=\"refresh\" content=\"3;URL=/index.php\">";
    }

#
#-----[ REPLACE WITH ]-----------------------------------
#
    
if($redirect == "phpBB") {
                echo 
"<META HTTP-EQUIV=\"refresh\" content=\"0;URL=/phpBB2/\">";
    }
    else {
            if (
$redirect != "") {
                echo 
"<META HTTP-EQUIV=\"refresh\" content=\"3;URL=modules.php?name=$redirect\">";
            } else {
                echo 
"<META HTTP-EQUIV=\"refresh\" content=\"3;URL=/index.php\">";
            }
    }

#
#-----[ SAVE & CLOSE ]-----------------------------------
#
/modules/Your_Account/index.php ?>
</li>
<li>The following file modifications are done in admin.php:
PHP: › <?php #
#-----[ OPEN ]-----------------------------------
#
admin.php

#
#-----[ FIND ]-----------------------------------
#
$user_regdate date("M d, Y");

#
#-----[ REPLACE WITH ]-----------------------------------
#
$user_regdate time();

#
#-----[ FIND ]-----------------------------------
#
$sql "INSERT INTO ".$user_prefix."_users (user_id, username, user_email, user_website, user_avatar, user_regdate, user_password, theme, commentmax, user_lang, user_dateformat) VALUES (NULL,'$name','$email','$url','$user_avatar','$user_regdate','$pwd','$Default_Theme','$commentlimit','english','D M d, Y g:i a')";

#
#-----[ REPLACE WITH ]-----------------------------------
#
$sql "INSERT INTO ".$user_prefix."_users (user_id, username, user_email, user_website, user_avatar, user_regdate, user_password, theme, commentmax, user_lang, user_dateformat) VALUES (2,'$name','$email','$url','$user_avatar',$user_regdate,'$pwd','$Default_Theme','$commentlimit','english','D M d, Y g:i a')";

#
#-----[ FIND ]-----------------------------------
#
            
$db->sql_query("INSERT INTO ".$user_prefix."_users (user_id, username, user_email, user_website, user_avatar, user_regdate, user_password, theme, commentmax, user_level, user_lang, user_dateformat) VALUES (NULL,'$name','$email','$url','$user_avatar','$user_regdate','$pwd','$Default_Theme','$commentlimit', '2', 'english','D M d, Y g:i a')");

#
#-----[ REPLACE WITH ]-----------------------------------
#
           
$sql "INSERT INTO ".$user_prefix."_users (user_id, username, user_email, user_website, user_avatar, user_regdate, user_password, theme, commentmax, user_lang, user_dateformat) VALUES (2,'$name','$email','$url','$user_avatar',$user_regdate,'$pwd','$Default_Theme','$commentlimit','english','D M d, Y g:i a')";
           
$db->sql_query($sql);

#
#-----[ FIND ]-----------------------------------
#
    
$curDate2 "%".$month[0].$month[1].$month[2]."%".$mday."%".$year."%";

#
#-----[ REPLACE WITH ]-----------------------------------
#
    
$curDate2 $month[0].$month[1].$month[2]." ".$mday." ".$year;

#
#-----[ FIND ]-----------------------------------
#
    
$curDateP "%".$premonth[0].$premonth[1].$premonth[2]."%".$preday."%".$preyear."%";

#
#-----[ REPLACE WITH ]-----------------------------------
#
    
$curDateP $premonth[0].$premonth[1].$premonth[2]." ".$preday." ".$preyear;


#
#-----[ FIND ]-----------------------------------
#
    
$row3 $db->sql_fetchrow($db->sql_query("SELECT COUNT(user_id) AS userCount from $user_prefix"._users." WHERE user_regdate LIKE '$curDate2'"));
    
$userCount $row3['userCount'];
    
$row4 $db->sql_fetchrow($db->sql_query("SELECT COUNT(user_id) AS userCount FROM $user_prefix"._users." WHERE user_regdate LIKE '$curDateP'"));
    
$userCount2 $row4['userCount'];

#
#-----[ REPLACE WITH ]-----------------------------------
#
    
$sql "SELECT COUNT(user_id) AS userCount from $user_prefix"._users." WHERE FROM_UNIXTIME(user_regdate,'%b %e %Y') LIKE '$curDate2'";
    
$result $db->sql_query($sql);
    
$row3 $db->sql_fetchrow($result);
    
$userCount $row[userCount];
    
$sql "SELECT COUNT(user_id) AS userCount FROM $user_prefix"._users." WHERE FROM_UNIXTIME(user_regdate,'%b %e %Y') LIKE '$curDateP'";
    
$result $db->sql_query($sql);
    
$row4 $db->sql_fetchrow($result);
    
$userCount2 $row[userCount];

#
#-----[ SAVE & CLOSE ]-----------------------------------
#
/admin.php ?>
</li>
<li>The following modifications are made in admin/modules/users.php:
PHP: › <?php #
#-----[ FIND ]-----------------------------------
#
    
$user_regdate date("M d, Y");

#
#-----[ REPLACE WITH ]-----------------------------------
#
    
$user_regdate time();

#
#-----[ FIND ]-----------------------------------
#
    
$sql .= "values (NULL, '$add_name', '$add_uname', '$add_email', '$add_femail', '$add_url', '$user_regdate', '$add_user_icq', '$add_user_aim', '$add_user_yim', '$add_user_msnm', '$add_user_from', '$add_user_occ', '$add_user_intrest', '$add_user_viewemail', '$add_avatar', '$add_user_sig', '$add_pass', '$add_newsletter', '1', '0')";

#
#-----[ REPLACE WITH ]-----------------------------------
#
    
$sql .= "values (NULL, '$add_name', '$add_uname', '$add_email', '$add_femail', '$add_url', $user_regdate, '$add_user_icq', '$add_user_aim', '$add_user_yim', '$add_user_msnm', '$add_user_from', '$add_user_occ', '$add_user_intrest', '$add_user_viewemail', '$add_avatar', '$add_user_sig', '$add_pass', '$add_newsletter', '1', '0')";

#
#-----[ SAVE & CLOSE ]-----------------------------------
#
/admin/modules/users.php ?>
</li>
</ol></li></ol>
That is all the file mods that need to be made for stock phpNuke files.

Next is the installation and modification of phpBB.
<ol>
<li>Change the $user_prefix in <phpNuke_root>/config.php to look like this:
$user_prefix = "nukebb";
(You may have a different portion for the "nuke" part. The important thing here is that you have "bb" on the end of it.)</li>
<li>Install phpBB, making sure to specify the proper database name, database login, and password (the same as your phpNuke database). Make sure that your database prefix is the same as the $user_prefix for your phpNuke installation.</li>
<li>Delete the <prefix>bb_users table just installed by phpBB, and rename your <prefix>_users table (from phpNuke) to <prefix>bb_users.</li>
<li>Rename your <prefix>_users_temp table (from phpNuke) to <prefix>bb_users_temp. There are no further database modifications to be made.</li>

<li>Now comes the fun part, modifying the phpBB files to work with PHPNuke. Luckily, most of the modifications are minor. These are the only modifications you will have to repeat when/if you upgrade your phpBB installation. If you are using the stock subSilver template in your forum, it is important that you do NOT overwrite your templates directory during an upgrade of phpBB. This may look like a lot of modifications, but most are only one or two lines. With a heavily modified installation, such as the one here at NukedGallery.net, the additional time required to perform these alterations is trivial compared to the time required to re-implement all of the other modifications already in place.
PHP: › <?php #
#-----[ OPEN ]-----------------------------------
#
phpBB2/admin/pagestart.php

#
#-----[ FIND ]-----------------------------------
#
 
include($phpbb_root_path 'common.'.$phpEx);
 
#
#-----[ AFTER, ADD ]-----------------------------------
#
global $nukeuser;

#
#-----[ FIND ]-----------------------------------
#
$userdata session_pagestart($user_ipPAGE_INDEX);

#
#-----[ REPLACE WITH ]-----------------------------------
#
$userdata session_pagestart($user_ipPAGE_INDEX,$nukeuser);

#
#-----[ OPEN ]-----------------------------------
#
phpBB2/admin/page_header_admin.php

#
#-----[ FIND ]-----------------------------------
#
'S_LOGIN_ACTION' => append_sid('../login.'.$phpEx),

#
#-----[ REPLACE WITH ]-----------------------------------
#
'S_LOGIN_ACTION' => append_sid('/modules.'.$phpEx.'?name=Your_Account'),

#
#-----[ OPEN ]-----------------------------------
#
phpBB2/common.php

#
#-----[ FIND ]-----------------------------------
#
 
{
     die(
"Hacking attempt");
 }

#
#-----[ AFTER, ADD ]-----------------------------------
#
$user $_COOKIE['user'];
$nukeuser base64_decode($user);
 
#
#-----[ OPEN ]-----------------------------------
#
phpBB2/faq.php

#
#-----[ FIND ]-----------------------------------
#
$userdata session_pagestart($user_ipPAGE_FAQ);

#
#-----[ REPLACE WITH ]-----------------------------------
#
$userdata session_pagestart($user_ipPAGE_FAQ,$nukeuser);

#
#-----[ OPEN ]-----------------------------------
#
phpBB2/groupcp.php

#
#-----[ FIND ]-----------------------------------
#
$userdata session_pagestart($user_ipPAGE_GROUPCP);

#
#-----[    REPLACE WITH ]-----------------------------------
#
$userdata session_pagestart($user_ipPAGE_GROUPCP,$nukeuser);

#
#-----[ OPEN ]-----------------------------------
#
phpBB2/includes/constants.php

#
#-----[ FIND ]-----------------------------------
#
define('DELETED', -1);
define('ANONYMOUS', -1);
                                                                                
define('USER'0);
define('ADMIN'1);
define('MOD'2);

#
#-----[ REPLACE WITH ]-----------------------------------
#
define('DELETED', -1);
define('ANONYMOUS', -1);
  
define('USER'1);
define('ADMIN'2);
define('MOD'3);

#
#-----[ OPEN ]-----------------------------------
#
phpBB2/includes/functions.php

#
#-----[ FIND ]-----------------------------------
#
    
global $db$template$board_config$theme$lang$phpEx$phpbb_root_path$nav_links$gen_simple_header$images;

#
#-----[ REPLACE WITH ]-----------------------------------
#
    
global $db$template$board_config$theme$lang$phpEx$phpbb_root_path$nav_links$gen_simple_header$images,$user;

#
#-----[ FIND ]-----------------------------------
#
        
$userdata session_pagestart($user_ipPAGE_INDEX);

#
#-----[ REPLACE WITH ]-----------------------------------
#
        
$userdata session_pagestart($user_ipPAGE_INDEX$nukeuser);

#
#-----[ FIND ]-----------------------------------
#
        // Behave as per HTTP/1.1 spec for others
        
header('Location: ' $server_protocol $server_name $server_port $script_name $url);
    exit;
 }
 
#
#-----[ AFTER, ADD ]-----------------------------------
#
function bblogin($nukeuser$session_id) {
        global 
$nukeuser$userdata$user_ip$session_length$session_id$db$nuke_file_path;
        
define("IN_LOGIN"true);
        
$cookie explode(":"$nukeuser);
        
$nuid $cookie[0];
        
$sql "SELECT s.*
                FROM " 
SESSIONS_TABLE " s
                WHERE s.session_id = '$session_id'
                AND s.session_ip = '$user_ip'"
;
        if ( !(
$result $db->sql_query($sql)) )
        {
                
message_die(CRITICAL_ERROR'Error doing DB query userdata row fetch : session_pagestar');
        }
        
$logindata $db->sql_fetchrow($result);

        if( 
$nuid != $logindata['session_user_id'] ) {
            
$nusername $cookie[1];
            
$sql "SELECT user_id, username, user_password, user_active, user_level
                    FROM "
.USERS_TABLE."
                    WHERE username = '" 
str_replace("\'""''"$nusername) . "'";
            
$result $db->sql_query($sql);
            if(!
$result) {
                
message_die(GENERAL_ERROR"Error in obtaining userdata : login"""__LINE____FILE__$sql);
            }
            
$rowresult $db->sql_fetchrow($result);
            
$password $cookie[2];
            if(
count($rowresult) ) {
                if( 
$rowresult['user_level'] != ADMIN && $board_config['board_disable'] ) {
                    
header("Location: " append_sid("/phpBB2/index.php"true));
                } else {
                    if( 
$password == $rowresult['user_password'] && $rowresult['user_active'] ) {
                        
$autologin 0;
                        
$userdata session_begin($rowresult['user_id'], $user_ipPAGE_INDEX$session_lengthFALSE$autologin);
                        
$session_id $userdata['session_id'];
                        if(!
$session_id ) {
                            
message_die(CRITICAL_ERROR"Couldn't start session : login"""__LINE____FILE__);

                        } else {
                        }
                    } else {
                        
$message $lang['Error_login'] . "<br /><br />" sprintf($lang['Click_return_login'], "<a href=\"" append_sid("/phpBB2/login.php&amp;$redirect") . "\">""</a> ") . "<br /><br />" .  sprintf($lang['Click_return_index'], "<a href=\"" append_sid("/phpBB2/index.php") . "\">""</a> ");
                        
message_die(GENERAL_MESSAGE$message);
                    }
                }
            } else {
                
$message $lang['Error_login'] . "<br /><br />" sprintf($lang['Click_return_login'], "<a href=\"" append_sid("/phpBB2/login.php&amp;$redirect") . "\">""</a> ") . "<br /><br />" .  sprintf($lang['Click_return_index'], "<a href=\"" append_sid("/phpBB2/index.php") . "\">""</a> ");
                
message_die(GENERAL_MESSAGE$message);
            }
        }

}

#
#-----[ OPEN ]-----------------------------------
#
phpBB2/includes/functions_post.php

#
#-----[ FIND ]-----------------------------------
#
        
$userdata session_pagestart($user_ip$page_id);
#
#-----[ REPLACE WITH ]-----------------------------------
#
        
$userdata session_pagestart($user_ip$page_id,$nukeuser);

#
#-----[ OPEN ]-----------------------------------
#
phpBB2/includes/page_header.php

#
#-----[ FIND ]-----------------------------------
#
'S_LOGIN_ACTION' => append_sid('login.'.$phpEx),

#
#-----[ REPLACE WITH ]-----------------------------------
#
'S_LOGIN_ACTION' => append_sid('/modules.'.$phpEx.'?name=Your_Account'),

#
#-----[ FIND ]-----------------------------------
#
//
// Generate logged in/logged out status
//
if ( $userdata['session_logged_in'] )
{
    
$u_login_logout 'login.'.$phpEx.'?logout=true&amp;sid=' $userdata['session_id'];
    
$l_login_logout $lang['Logout'] . ' [ ' $userdata['username'] . ' ]';
}
else
{
    
$u_login_logout 'login.'.$phpEx;
    
$l_login_logout $lang['Login'];
}

#
#-----[ REPLACE WITH ]-----------------------------------
#
//
// Generate logged in/logged out status
//
if ( $userdata['session_logged_in'] )
{
        
$u_login_logout '/modules.php?name=Your_Account&op=logout&redirect=phpBB';
        
$l_login_logout $lang['Logout'];
        
$l_user "Hello, ".$userdata['username']."! "
}
else
{
        
$u_login_logout 'login.'.$phpEx.'?redirect=phpBB';
        
$l_login_logout $lang['Login'];
        
$l_user "<a class=\"phpnuke\" href=\"/modules.php?name=Your_Account&amp;op=new_user\">Create</a> an account";
}

#
#-----[ FIND ]-----------------------------------
#
    
'L_USERNAME' => $lang['Username'],
     
'L_PASSWORD' => $lang['Password'],
     
'L_LOGIN_LOGOUT' => $l_login_logout,

#
#-----[ AFTER, ADD ]-----------------------------------
#
    
'L_USER' => $l_user,

#
#-----[ OPEN ]-----------------------------------
#
phpBB2/includes/page_tail.php

#
#-----[ FIND ]-----------------------------------
#
 //
 // Show the overall footer.
 //

#
#-----[ AFTER, ADD ]-----------------------------------
#
global $nukeuser;

#
#-----[ OPEN ]-----------------------------------
#
phpBB2/includes/sessions.php

#
#-----[ FIND ]-----------------------------------
#
    
$SID 'sid=' $session_id;

#
#-----[ REPLACE WITH ]-----------------------------------
#
    
$SID = ( $sessionmethod == SESSION_METHOD_GET ) ? 'sid=' $session_id '';
 
#
#-----[ FIND ]-----------------------------------
#
function session_pagestart($user_ip$thispage_id)

#
#-----[ REPLACE WITH ]-----------------------------------
#
function session_pagestart($user_ip$thispage_id,$nukeuser)

#
#-----[ FIND ]-----------------------------------
#
    
global $db$lang$board_config;

#
#-----[ REPLACE WITH ]-----------------------------------
#
    
global $db$lang$board_config,$session_id;

#
#-----[ FIND ]-----------------------------------
#
        
$session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : '';
         
$sessionmethod SESSION_METHOD_GET;
     }

#
#-----[ AFTER, ADD ]-----------------------------------
#
        
if ( ($nukeuser != "") && ($userdata['session_logged_in'] == "" )) {
                
bblogin($nukeuser$session_id);
        } else {
                
$sessiondata = array();                
        }

#
#-----[ OPEN ]-----------------------------------
#
phpBB2/includes/topic_review.php

#
#-----[ FIND ]-----------------------------------
#
        
$userdata session_pagestart($user_ip$forum_id);

#
#-----[ REPLACE WITH ]-----------------------------------
#
        
$userdata session_pagestart($user_ip$forum_id,$nukeuser);

#
#-----[ OPEN ]-----------------------------------
#
phpBB2/index.php

#
#-----[ FIND ]-----------------------------------
#
$userdata session_pagestart($user_ipPAGE_INDEX);

#
#-----[ REPLACE WITH ]-----------------------------------
#
global $nukeuser;
$userdata session_pagestart($user_ipPAGE_INDEX,$nukeuser);

#
#-----[ OPEN ]-----------------------------------
#
phpBB2/login.php

#
#-----[ FIND ]-----------------------------------
#
$userdata session_pagestart($user_ipPAGE_LOGIN);

#
#-----[ REPLACE WITH ]-----------------------------------
#
$userdata session_pagestart($user_ipPAGE_LOGIN,$nukeuser);

#
#-----[ FIND ]-----------------------------------
#
$s_hidden_fields '<input type="hidden" name="redirect" value="' $forward_page '" />';

#
#-----[ REPLACE WITH ]-----------------------------------
#
if($forward_page == "phpBB?") {
    
$forward_page "phpBB";
}

$s_hidden_fields '<input type="hidden" name="op" value="login"><input type="hidden" name="redirect" value="' $forward_page '" />';

#
#-----[ OPEN ]-----------------------------------
#
phpBB2/memberlist.php

#
#-----[ FIND ]-----------------------------------
#
$userdata session_pagestart($user_ipPAGE_VIEWMEMBERS);

#
#-----[ REPLACE WITH ]-----------------------------------
#
$userdata session_pagestart($user_ipPAGE_VIEWMEMBERS,$nukeuser);

#
#-----[ OPEN ]-----------------------------------
#
phpBB2/modcp.php

#
#-----[ FIND ]-----------------------------------
#
$userdata session_pagestart($user_ip$forum_id);

#
#-----[ REPLACE WITH ]-----------------------------------
#
$userdata session_pagestart($user_ip$forum_id,$nukeuser);

#
#-----[ OPEN ]-----------------------------------
#
phpBB2/posting.php

#
#-----[ FIND ]-----------------------------------
#
$userdata session_pagestart($user_ipPAGE_POSTING);

#
#-----[ REPLACE WITH ]-----------------------------------
#
$userdata session_pagestart($user_ipPAGE_POSTING,$nukeuser);

#
#-----[ OPEN ]-----------------------------------
#
phpBB2/privmsg.php

#
#-----[ FIND ]-----------------------------------
#
$userdata session_pagestart($user_ipPAGE_PRIVMSGS);

#
#-----[ REPLACE WITH ]-----------------------------------
#
$userdata session_pagestart($user_ipPAGE_PRIVMSGS,$nukeuser);

#
#-----[ OPEN ]-----------------------------------
#
phpBB2/profile.php

#
#-----[ FIND ]-----------------------------------
#
$userdata session_pagestart($user_ipPAGE_PROFILE);

#
#-----[ REPLACE WITH ]-----------------------------------
#
$userdata session_pagestart($user_ipPAGE_PROFILE,$nukeuser);

#
#-----[ OPEN ]-----------------------------------
#
phpBB2/search.php

#
#-----[ FIND ]-----------------------------------
#
$userdata session_pagestart($user_ipPAGE_SEARCH);

#
#-----[ REPLACE WITH ]-----------------------------------
#
$userdata session_pagestart($user_ipPAGE_SEARCH,$nukeuser);

#
#-----[ OPEN ]-----------------------------------
#
phpBB2/viewforum.php

#
#-----[ FIND ]-----------------------------------
#
$userdata session_pagestart($user_ip$forum_id);

#
#-----[ REPLACE WITH ]-----------------------------------
#
$userdata session_pagestart($user_ip$forum_id,$nukeuser);

#
#-----[ OPEN ]-----------------------------------
#
phpBB2/viewonline.php

#
#-----[ FIND ]-----------------------------------
#
$userdata session_pagestart($user_ipPAGE_VIEWONLINE);

#
#-----[ REPLACE WITH ]-----------------------------------
#
$userdata session_pagestart($user_ipPAGE_VIEWONLINE,$nukeuser);

#
#-----[ OPEN ]-----------------------------------
#
phpBB2/viewtopic.php

#
#-----[ FIND ]-----------------------------------
#
$userdata session_pagestart($user_ip$forum_id);

#
#-----[ REPLACE WITH ]-----------------------------------
#
$userdata session_pagestart($user_ip$forum_id,$nukeuser);

#
#-----[ OPEN ]-----------------------------------
#
phpBB2/templates/subSilver/index_body.tpl

#
#-----[ FIND ]-----------------------------------
#
<input type="submit" class="mainoption" name="login" value="{L_LOGIN}" /></td>

#
#-----[ AFTER, ADD ]-----------------------------------
#
<td><input type="hidden" name="redirect" value="phpBB" /><input type="hidden" name="op" value="login" /></td>

#
#-----[ OPEN ]-----------------------------------
#
phpBB2/templates/subSilver/login_body.tpl

#
#-----[ FIND SIMILAR ]---------------------------
#
<form action="{S_LOGIN_ACTION}" method="post">

#
#-----[ CONFIRM ]-----------------------------------
#
You MUST confirm that there is no "target="_top"" statement in this form tag. If there isyou MUST remove it.

#
#-----[ FIND SIMILAR ]---------------------------
#
<input type="password" name="user_password" size="25" maxlength="32" />

#
#-----[ CONFIRM ]-----------------------------------
#
You MUST confirm that the name of the "password" variable is "user_password".  If it is no "user_password"you MUST change it to "user_password".


#
#-----[ SAVE & CLOSE]-----------------------------------
#
All Files ?>

All of these modifications get phpBB and phpNuke to share the same user database and recognise when users are logged in. You can now view your forum and log in/out via the forum or phpNuke. But, you may notice that it doesn't have the phpNuke header and footer, and some colors or fonts might be wrong.</li>
<li>For the header (the part of the page at the top with your site logo) and the footer (the bottom of the page, with all of the boring copyright information) to match your phpNuke site, you must make a few minor modifcations to the following files:
Code: › /phpBB2/templates/<your_template>/overall_header.tpl
/phpBB2/templates/<your_template>/overall_footer.tpl

We'll start on overall_footer.tpl.
<ol type="a"><li>The easiest way for your phpBB footer to match your phpNuke footer is to view the html source of your phpNuke page. Scroll down to the part that contains your footer code and just copy and paste the html source into your overall_footer.tpl file. Please do the wonderful developers at phpBB the courtesy of leaving their copyright information intact.</li>
<li>Making your header match your phpNuke header is a little more complicated. You cannot have any database driven information in your overall_header.tpl file (no $db->sql_query statements). So, you'll have to keep a basic navigation menu at the top, similar to the one you see here. To add your header, put your desired html code in overall_header.tpl after the <body> tag.</li></ol>
<li>Lastly, the fonts and background colors. Those are controlled via CSS, and are either located in a separate CSS file in your template directory (ie /phpBB2/templates/fisubsilver/fisubsilver.css), or both in the overall_header.tpl file and a separate CSS file (as is the case with the default subSilver template). You will want to add/modify code to these CSS files to create fonts, etc to your liking.</li></ol>

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
andrewbelcher
Joined: Jun 09, 2005
Posts: 8

Posted: Mon Jun 13, 2005 9:16 pm
I wasn't having any success creating from an existing, so I tried from scratch...

The phpnuke stuff seems to all be working fine except when you try and get the the forums/memberlist/pms.

PM Error wrote: › phpBB : Critical Error

Could not query config information

DEBUG MODE

SQL Error : 1146 Table 'jamiea64_nuke2.nuke_bbconfig' doesn't exist

SELECT * FROM nuke_bbconfig

Line : 218
File : /home/jamiea64/public_html/tnbb2/modules/Forums/common.php

Memberlist Error wrote: › phpBB : Critical Error

Could not query config information

DEBUG MODE

SQL Error : 1146 Table 'jamiea64_nuke2.nuke_bbconfig' doesn't exist

SELECT * FROM nuke_bbconfig

Line : 218
File : /home/jamiea64/public_html/tnbb2/modules/Forums/common.php

Forum Error wrote: › phpBB : Critical Error

Could not query config information

DEBUG MODE

SQL Error : 1146 Table 'jamiea64_nuke2.nuke_bbconfig' doesn't exist

SELECT * FROM nuke_bbconfig

Line : 218
File : /home/jamiea64/public_html/tnbb2/modules/Forums/common.php


As far as I can tell, all other nuke things work fine... I haven't missed any sections, yet it still seems to want to use the modules/forum/ integrated forum, rather than my external one... How do I change that?


To test the forum, I manually switched (using URL) to it... I experienced some problems there also... I can't log in... When I try to log in it comes up with this:
Login Error wrote: › Not Found
The requested URL /tbbn/modules.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
I don't know why it's going to /tbnn/, as my php is in tnbb2... But I don't know why it can't go to the right place... Have I done something wrong?

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
dari
Joined: Mar 03, 2003
Posts: 6287
Location: Washington Township, NJ, USA
Posted: Tue Jun 14, 2005 6:16 am
this mod replaces your phpnuke forums, private messages, and memberlist.

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
andrewbelcher
Joined: Jun 09, 2005
Posts: 8

Posted: Tue Jun 14, 2005 6:24 am
Yeh, that's what I thought... But it hasn't done so... It still looks for them all under the modules sections...

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
dari
Joined: Mar 03, 2003
Posts: 6287
Location: Washington Township, NJ, USA
Posted: Tue Jun 14, 2005 6:44 am
you have to delete those modules and hard code in the links...

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
andrewbelcher
Joined: Jun 09, 2005
Posts: 8

Posted: Tue Jun 14, 2005 3:32 pm
When I try and access the forums (either through nuke or through the URL) I get this message come back:
Quote: › Hacking attempt
Fatal error: Call to undefined function: session_pagestart() in /home/jamiea64/public_html/tnbb2/modules/Forums/index.php on line 31

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
dari
Joined: Mar 03, 2003
Posts: 6287
Location: Washington Township, NJ, USA
Posted: Tue Jun 14, 2005 4:25 pm
this REPLACES your nuke modules, you do NOT access it via modules.php?name=Forums.

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
andrewbelcher
Joined: Jun 09, 2005
Posts: 8

Posted: Tue Jun 14, 2005 6:14 pm
How do I link to it then? Do I add in a link to the 'index.php' of the forum?

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
dari
Joined: Mar 03, 2003
Posts: 6287
Location: Washington Township, NJ, USA
Posted: Wed Jun 15, 2005 6:24 am
if your new installation is in /public_html/phpBB2 then you would link to the index file in that directory.

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
Katatawnic
Joined: Jan 31, 2005
Posts: 37
Location: Forest Falls, CA; USA
Posted: Fri Jun 17, 2005 1:06 am
So THAT is why we get the error/debug messages RE: nuke_bbconfig not existing, etc.?

OK, so then the question for those of us who don't know how to properly link modules.... is there a suggestion as to the best (i.e., most functional) way to do this? Confused (I honestly don't remember that being addressed in the tutorial, and I went over it extensively several times.)

Thanks (yet again) in advance,
~~ Kat ~~

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
Neserit
Joined: Jun 16, 2005
Posts: 2

Posted: Fri Jun 17, 2005 11:46 am
I wanted to double check with this.
I wanted to convert my site from the regular html to a CMS. I tried postNuke out...wasn't so pleased with it. Tried Mambo...nothing works on that thing.

My last resort is phpNuke. I have a phpbb forum with 592 members, 60813 articles, the database is over 15MB, and it's been around for about 2-3 years now (updated to 2.0.15). The theme is custom made by me and it's heavily modded. When I tried to go with postNuke, there was all of this pressure and suggesting for everyone who had phpbb to switch to their pnphpbb (is that right?). I don't want to switch. I'm quite happy with phpbb, you know? I've gotten used to the coding and the way it works.

What I wanted to do with any CMS I use (which looks like it might be phpNuke), is make it so that phpbb is a seperate entity from Nuke--in the way that I can leave the style, database, and mods alone and updated it by itself, but have Nuke share the user information.
Having people log in on both might turn quite a few off, you know?

After reading this, I want to double check that this is what it will do.

Another question is: Do I really have to edit the header and footer templates for phpbb? Can I leave that part alone (at least for now)?

Dumb question time: Once (or if) phpNuke will share the users from phpbb, can I add other features to Nuke--like a gallery--and it will still work properly with the users?

Last stupid question, I swear!: Which version of phpNuke should I use? I see the 6.5 enhanced bundle, but would that really work with what I want to do?


Many thanks in advance!

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
Katatawnic
Joined: Jan 31, 2005
Posts: 37
Location: Forest Falls, CA; USA
Posted: Fri Jun 17, 2005 1:31 pm
Neserit.... I got a "remark" (in jest mind you, not insulting) about "dumb" questions. (My word was "stupid" but it's all the same.) So be careful with your wording here, or you might get teased like I did. Laughing Cool

From what Dari has told me before, and I believe that it's mentioned somewhere in the tutorial but don't quote me on that one, is that the whole idea behind doing the file edits is that you CAN add mods/hacks to your phpBB and modules to Nuke without it affecting your users, etc. Even if you upgrade to a newer version of phpBB and/or Nuke, you'd only have a few file edits to do to KEEP IT integrated, so that's a plus too.

I did use PHP-Nuke before I went to standalone phpBB. I liked PHP-Nuke a lot, so did my site's members. Not that it's the best thing in the world, but when one doesn't know enough PHP to create their own CMS from scratch OR simply doesn't have the time to do so, IMNSHO PHP-Nuke is the best one to use. (I didn't like PostNuke, PHPWiki, Xoops, etc., as I'm too new to PHP and they're not as user friendly RE: figuring out how to configure/use functions as PHP-Nuke is.). The only thing about Nuke (any CMS for that matter) I didn't like is that VERY FEW phpBB mods/hacks will work with Nuke's "version" of phpBB because it's ported.... lots of coding changed to make it a forum inside of Nuke rather than integrating it with standalone (which would have been the smart thing to do to begin with, but I didn't program it. LOL!). So I "dumped" Nuke altogether and switched to standalone phpBB so that I could use any mod/hack I wanted. (If I'm going to build a site, albeit from scratch or from starting with an open source CMS or forums prog, I still want CONTROL over what my site does and how it appears, etc.!)

Dari's tutorial is what made me finally decide that yes, it's time to go back to using Nuke so that I can use features they have that standalone phpBB doesn't, and yet still have my phpBB standalone so that I can use its features to its fullest extent as well. Balance and all that. Well, the integration just wouldn't work for me, but I'm 99.99999999999999% positive that it was directly caused by my phpBB being premodded.... it's not only so crammed with mods that it's absolutely ludicrous, but also so many lines of code are changed including how the files and SQL handle posts, PM's, etc., that it not only doesn't want to respond to any integration but it also prevents me from installing mods that I DO want, I can't even uninstall mods they've got on there that no one uses and therefore is a waste of space and bandwidth, etc., because they've bastardized the coding so much that you simply can't uninstall THEIR mods, and at least half the time install your own mods, without the entire board going POOF! gone and having to restore the backed up files and database just to get the site to reappear! SOOO.... I'm in the process of "dumping" my premodded phpBB (long story LOL) but before that I've got a "vanilla" installation of phpBB in a "test" directory that I'm modding the way I want it, which will take some time of course, before switching from the premodded phpBB to MY modded phpBB.

Speaking of which: my version of phpBB is 2.0.15 and Nuke's latest is 7.7 (unless 7.8 has come out in the last month anyway, LOL) .... I've already listed in these forums the difference between 7.2 edits and 7.6, I'm sure it won't be much (if at all) different with 7.7 though. (If you get the latest PHP-Nuke at nukescripts.net, you can get it with tons of security already installed for you but it's not bastardized coding, these guys know their stuff; I always recommend nukescripts.net for obtaining Nuke as well as any initial search for modules/blocks/addon's etc. [well, I don't know about the gallery provided here as I haven't used Nuke in over a year so therefore haven't tried out Dari's version of the gallery] as they fix what php-nuke.org puts out as a "finished" project but turns out to be so full of bugs AND security holes it's just ridiculous, not to mention unworkable functions all over the place due to sloppy coding by the "original" authors! There's "controversy" about the "author" of PHP-Nuke as it is, but there are posts/articles all over the 'net RE: this so I don't need to get into it here, plus I don't know how much is truth and how much is Urban Legend per se and/or jealous/competitive programmers, etc.)

ANYHOOO.... I've been searching for well over a year now for a way to use PHP-Nuke and standalone phpBB together, and this is the ONLY way I've ever found that'd be even CLOSE to workable: others did absolutely nothing at all except produce error after error in simply running the install files and/or updating the SQL manually. This one DOES work, I've seen too many people who use this method and are very happy with it. Like I said, I know that it didn't work for me because my phpBB is HEAVILY premodded and it won't work with anything!

So now I just have to juggle time for study, family, daily household crud we don't like to do but are forced to do anyway (LOL), work on my site, and somewhere in there still find leisure time for MYSELF to try to stay sane! But I AM going to do this integration again ASAP, on my fresh phpBB instead.

And hey, so long as you make sure you back up every file you edit BEFORE you edit it and your entire database (the database I'd back up immediately before the actual database changes take place, of course).... then the worst that can happen is that you restore your backups and then try it again a bit more slowly so as to avoid missing anything you might have missed the first time (which can be SO easy to do, no matter how experienced one is with PHP we're still human and make mistakes; even the most simple mistake and/or oversight will cause an entire project to crash, of course). Wink

OH, and RE: having members logging onto both Nuke and phpBB simultaneously possibly being a turn off.... that's what Nuke does already (ANY form of Nuke or CMS that has forums ported into it for that matter), is log users in to the CMS and the forums both. The difference with THIS approach is that the users will simply be logged into a better format of phpBB, one that you as the admin/webmaster can control unlike the phpBB that is ported into the CMS's. Idea Exclamation Smile

~~ Kat ~~

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
Neserit
Joined: Jun 16, 2005
Posts: 2

Posted: Fri Jun 17, 2005 2:35 pm
Thank you so much for all of that!
I ran right over to nukescripts and got the latest version of it.

I tried other ones, just like you and--argh!!--I wanted to gouge out my eyes! Mambo is horrible! Nothing on it worked!

I did have one other question that I completely forgot.

Now, when I install the Nuke, I'll have to set up an admin account, right? I use the same name for all of my scripts. Will it get confused beacuse I have the same name in my phpbb?
Should I just use a different name to cover my butt? Wink

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
Katatawnic
Joined: Jan 31, 2005
Posts: 37
Location: Forest Falls, CA; USA
Posted: Fri Jun 17, 2005 3:12 pm
NP Neserit.... I'm guessing dari hasn't been online and/or hasn't had the chance to address these things yet.... I'm no pro, I'm only going by what I've already experienced and/or read w/the tutorial. But because I'm no pro, don't take what I post as "dogma" because I'm mostly going by memory: getting it from the horse's mouth (i.e., dari or else someone who also is very knowledgable in this area) is the best route.

Read the tutorial that Dari has provided VERY carefully & extensively, and then reread it if necessary (I don't know how many times I've read it, and I've gotten a "revelation" each time by noticing something I didn't before; it's not as difficult as the tutorial appears to make it, but it's still a VERY step by step IN ORDER process).... just about any modification has to be done in the correct order to be a success, but this one is a definite. Exclamation

It will tell you exactly what to do with your database RE: changes AND backup as well as keeping the phpbb_ prefixes intact until all is working properly (I believe the database "stuff" is the first step, but again don't quote me, I'm only recalling what I read before, LOL), what to do with your config.php files during installation, as well as username "stuff".... If I remember correctly, you DO make the admin name/password (etc.) the same, because it will not only be in the same database when all is finished but also the I'm pretty positive that the admin needs to be the same for Nuke and phpBB both in order to manage both without logging in to them separately. (Makes sense anyway, eh?)

Hey dari, when you're logged in again and get to read/address this....

Quote: › dari: this mod replaces your phpnuke forums, private messages, and memberlist.
andrewbelcher: Yeh, that's what I thought... But it hasn't done so... It still looks for them all under the modules sections...
dari: you have to delete those modules and hard code in the links...
andrewbelcher: When I try and access the forums (either through nuke or through the URL) I get this message come back:
Hacking attempt
Fatal error: Call to undefined function: session_pagestart() in /home/jamiea64/public_html/tnbb2/modules/Forums/index.php on line 31
dari: this REPLACES your nuke modules, you do NOT access it via forums.html.
andrewbelcher: How do I link to it then? Do I add in a link to the 'index.html' of the forum?
dari: if your new installation is in /public_html/phpBB2 then you would link to the index file in that directory.
Katatawnic: So THAT is why we get the error/debug messages RE: nuke_bbconfig not existing, etc.?
OK, so then the question for those of us who don't know how to properly link modules.... is there a suggestion as to the best (i.e., most functional) way to do this?

Well, some of us are "dummies" in this area, namely me. Embarassed Laughing

Are there instuctions I/we missed in the tutorial as to how we do this (and correctly/successfully), or is this something that needs to be answered "post tutorial" so that we know exactly how to do this?

Thanks for all your hard work and help!
~~ Kat ~~

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
Ridicule
Joined: Jul 06, 2005
Posts: 4

Posted: Thu Jul 07, 2005 6:16 pm
ive done all this but when i go to login it just gives me a blank page,
phpnuke 7.8 and phpBB 2.0.15

ive done all the mods cant figure it out thinking about just using the nuke version..

just turned on display errors i get this:
Parse error: parse error, unexpected $ in /usr/home/flipside/www/newsite/modules/Your_Account/index.php on line 1768

anyone been able to fix this yet?

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
Katatawnic
Joined: Jan 31, 2005
Posts: 37
Location: Forest Falls, CA; USA
Posted: Thu Jul 07, 2005 10:24 pm
I haven't heard of anything since my last post here. As a matter of fact I was going to attempt it again tonight, but without knowing how to hard code in the links for the modules I can't go further.

I too get blank pages with phpBB; and although Nuke says there are users, no one can log in.... as it is, I'll end up logged in as the "God" admin automatically if I go to the admin.php page itself initially, but cannot log in as a user or do anything BUT administration.

At this time, I simply have a "redirect" page for the forums that I set up for keeping people out of directories they're not supposed to be snooping around for Nuke's Forums link, so that the users for the WORKING phpBB I've had set up can still get there; they only get to browse the Nuke section of the site to see what it will look like, etc., when it's up and functioning properly.

I've also noticed that simply renaming the nuke_bb tables to nukebb_ doesn't ever work, because Nuke is instructed to look for the "nukebb.php" page in the Forums directory from Nuke's includes directory (Nuke's ported phpBB used to have its own includes directory, but now Nuke is set up with one includes directory for the whole site; which would work if you don't modify anything, but change something and it all goes to hell), and if those tables are gone then it simply will give error messages saying that "nuke_bbconfig" (or any other 'nuke_bb' table for that matter) doesn't exist, and that's as far as it will take you. I've followed the instructions for this integration to a "T" many times over, and get the same results every time.

It's just sooooo frustrating! I like Nuke itself, but I absolutely hate the ported phpBB they have.... Nuke has been promising to make the ported phpBB work like standalone phpBB as people just aren't happy with how it's been, but every new release brings no change. That's why I initially dropped Nuke and went to standalone phpBB last year, because standalone phpBB allows for so much modification so that you can make your site function the way you want it to.... Nuke's version of phpBB is crud, yet won't function without it.... so what does one do??? Rolling Eyes Evil or Very Mad

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
dari
Joined: Mar 03, 2003
Posts: 6287
Location: Washington Township, NJ, USA
Posted: Fri Jul 08, 2005 5:24 am
Quote: › I've also noticed that simply renaming the nuke_bb tables to nukebb_ doesn't ever work, because Nuke is instructed to look for the "nukebb.php" page in the Forums directory from Nuke's includes directory (Nuke's ported phpBB used to have its own includes directory, but now Nuke is set up with one includes directory for the whole site; which would work if you don't modify anything, but change something and it all goes to hell)


yeah, the problem with nuke is that there are TOO many changes made structurally to the system with each release. phpBB, thankfully, doesn't suffer the same "new-feature-itis" syndrome. personally, phpNuke was at it's best around 6.5, it had everything you needed, and minimal fluff that you didn't. it would be impossible for me to maintain this integration for every new release that came out.

Quote: › It's just sooooo frustrating! I like Nuke itself, but I absolutely hate the ported phpBB they have

Amen.

Quote: › Nuke has been promising to make the ported phpBB work like standalone phpBB as people just aren't happy with how it's been, but every new release brings no change. That's why I initially dropped Nuke and went to standalone phpBB last year, because standalone phpBB allows for so much modification so that you can make your site function the way you want it to....

FB, phpNuke's dictator/developer, probably won't do this. I can think of several reasons:
1. He's more interested in adding more useless and exploit-prone code to phpNuke.
2. Most changes that are made (not new features) are just patches from other users.
3. phpBB is too big a thing for him to tackle. His methodology of programming phpNuke is VASTLY different than the way the phpBB team does it. IMHO, the phpBB methodology (template files, etc) is much superior to the way that phpNuke works. You can mess around with the template file without fscking up the php code that drives it.

Quote: › Nuke's version of phpBB is crud, yet won't function without it.... so what does one do???

I'm in the process of transitioning this site over to be strictly powered by phpBB. This does not mean that I will drop support for phpNuke. It's simply a matter of what is easier and more convenient for me to maintain. The Smartor phpBB2 portal is what you need.

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
Katatawnic
Joined: Jan 31, 2005
Posts: 37
Location: Forest Falls, CA; USA
Posted: Fri Jul 08, 2005 3:15 pm
HAH!!! I came "this close" last night to making almost the exact same statements about FB as you did, Dari, but thought perhaps I should keep my "keyboard mouth" shut as I wasn't sure how you felt about someone posting on your site RE: someone else's so called programming (*cough* ripping off of others' programming *cough*) and how poor the "changes" are.

Nuke is probably going to go down the toilet sooner or later anyway, at least the Nuke that we've known. Too many REAL developers who've been fixing FB's screw ups have been disgruntled for exactly what you said: "Most changes that are made (not new features) are just patches from other users." I've seen countless news articles by well known Nuke developers who have "had it" with the Nuke "community" (FB in general LOL) and are constantly considering quitting altogether as they're tired of fixing what someone else broke and then even worse than that someone stealing what they did and putting HIS name on the copyright. Rolling Eyes

And yes, since VERY shortly after I switched over to standalone phpBB and dumped Nuke over a year ago, I started using Smartor's portal, and it works wonderfully. So perhaps I should stop banging my head against a wall over this whole Nuke thing and just stick with what I know WORKS.

phpBB has come along so far that one CAN mod it just about all one wants, and it still works.... that is the kind of program I need, since I'm grasping PHP much more than I did a year and a half ago when I began but I'm not savvy enough to know how to FIX the Nuke CMS and honestly I'm so very tired out.... AND this site that I have is made up mostly of "online friends" who've known each other for several years; they asked me to create a forums site because I was the only one of the "gang" who knew HTML, and that's how I ended up embarking on PHP to begin with. However, in trying to integrate Nuke with phpBB and make it work, all that I have BEEN doing is working: I haven't had the time or energy to have fun on my site with my friends.... my site is supposed to be fun for me as well as the users, as we were all a "gang" of online buddies per se to begin with and I want to have fun with my friends rather than constantly having to fix what's broken on the site! Crying or Very sad

And Dari, I truly hope you know that my post last night was not aimed at you in the least. Your tutorial is the closest I've seen anyone come to integrating the two programs, but I do know how much everything is changed with each "new" Nuke release, and it really IS extremely difficult (and in certain cases, like integrating Nuke with phpBB, highly improbable if not impossible) to keep up with the changes that come along seemingly monthly lately! How does one keep one's site up to date and still not lose all the work one has done if there are constant "upgrades" that are SO recommended due to security vulnerabilities that FB should NEVER be releasing to begin with, and especially when the structure of the program is so vastly changed every time?

At least phpBB's security upgrades not only rarely ever change the actual structure of the program, but they now also provide manual coding instructions for those with modded phpBB boards so that modified files don't have to be overwritten and then remodded anymore.... they didn't used to give very much support in that area, but they've really come around immensely. phpBB does care about their users as much as their own work.... they don't have such inflated egos that they only think of what THEY want rather than stopping to listen to those who use their program like FB. Razz

So, I'm with you on this one.... I made a wise choice in dumping Nuke in order to have a board that works the way I and my users WANT it to work, and I'm personally going to simply stick to standalone phpBB and just forget about Nuke altogether, at least for now. (Hmmmm, I've said this before, but I really did believe that perhaps Nuke had improved since then. LOL) It'll save me a lot of headaches, time, energy, and I'll be able to get back to studying more (not a FUN thing, but necessary), as well as modding my phpBB board the way I/we want it AND still have time to have fun with my site rather than it continue to be a burden on me like it's been feeling for over a year now as I've been constantly searching for a way to still use Nuke yet have the functionality of the REAL phpBB.

I was getting close to dumping my site altogether actually, because of all of the work and no play, but I'll keep the site up and running as is and just continue using phpBB's mods and portals, etc.: stick to what I know will work.

Who knows? Perhaps someday FB will get tired of the Nuke community being fed up with him, all of the articles on REAL Nuke development sites RE: FB's screw ups and IMNSHO stealing other developers' fixes and copyrighting them under his name in his "new" releases; the vast number of developers and users alike calling out to FB to just leave Nuke to the REAL developers and go away, etc. If or when that happens, I truly believe that Nuke WILL be a much better program. Mr. Green

~~ Kat ~~

P.S.: I just Googled for an article comment I'd made at nukecops.com RE: my dumping Nuke, etc., over a year ago, but it seems that their site is down at this time.... hopefully a server or upgrade thing, as they are a great site and along with nukescripts.net are the REAL developers/fixers of Nuke. Anyhow, meanwhile I found this on FB's site, and it's full of whines and rants RE: the Nuke community "bashing" Nuke and FB in general. It just cracks me up to no end how much he whines, as well as points fingers at those who remove "his" copyrights from their footers, etc., when he's stealing other developers' work and putting it into his "new" releases and copyrighting them with his name; only chatserv and Tom (who did the initial phpBB port I believe; he gets the credit anyhow) ever get any credit for FB's "work" and yet he has the audacity to whine and gripe about copyright/GPL and people "talking down" FB in general. That's what I meant earlier about FB's ego. Laughing Well, when nukecops.com is back up, you can Google "katatawnic nukecops" or "katatawnic Nuke Cops - PHP-Nuke new development direction (part 2)" and you should find the article comment I'd posted.

Meanwhile, here's FB's rants pages, the "main" page (second link provided) is actually titled "PHP-Nuke: Bad, Bad, Bad" and that in and of itself makes me just ROFLMFAO!

http://phpnuke.org/modules.php?name=New ... ode=nested
Here is a RANT (attack on) about nukescripts.net .... one of the two major sites that FIX the security and other screw ups that FB puts out, and he's got the audacity to say that nukescripts.net is violating GPL.... and then goes as far as saying that the comments function/option is turned off because the arguments are useless?!?!? Rolling Eyes (He just can't handle it is all.... like they say, if you can't take the heat then get out of the kitchen!!!)

http://phpnuke.org/modules.php?name=News&new_topic=4
This is the "PHP-Nuke: Bad, Bad, Bad" mentioned above.... yep, after browsing that page I'm definitely dumping Nuke and sticking with what WORKS, as well as dumping all of the whines and rants that FB puts out. Exclamation Why should I use a program that CHARGES for the "new" releases that end up free a week or so later, AND to top it off is so full of security and functionality bugs that nukecops.com and nukescripts.net, et al, have to FIX for users.... and then the "developer" (FB of course) points his finger at these people for "violiating" his copyrights? SHEESH!!!

OH, and on the second link, the first article refers to Google "banning" phpnuke.org from their search engine (I didn't know about this till today LOL), and FB's pretty ticked off. Aaawwwww! Crying or Very sad Laughing

OK, I'm done with my "book" here about FB for now.... he's simply not worth my time or energy or stress, I have enough to worry about in life. Cool Wink

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
dari
Joined: Mar 03, 2003
Posts: 6287
Location: Washington Township, NJ, USA
Posted: Mon Jul 11, 2005 8:05 am
Quote: › HAH!!! I came "this close" last night to making almost the exact same statements about FB as you did, Dari, but thought perhaps I should keep my "keyboard mouth" shut as I wasn't sure how you felt about someone posting on your site RE: someone else's so called programming (*cough* ripping off of others' programming *cough*) and how poor the "changes" are.


Hehe...feel free to post whatever you want in these forums. As long as it doesn't violate the AUP [nukedgallery.net] or the Forum Rules [nukedgallery.net], you won't be reprimanded.

Quote: › And Dari, I truly hope you know that my post last night was not aimed at you in the least.


No worries, I know Smile

Quote: › OK, I'm done with my "book" here about FB for now.... he's simply not worth my time or energy or stress, I have enough to worry about in life.


Agreed Smile

PHPNuke used to be a wonderful thing, and, as I said, up to version 6 point something, it was the best thing out there. But, as the security flaws grew, and as FB ignored them in favor of new features and his "club", the userbase became increasingly displeased with him. For the average Joe who wants a quick site with forums, etc, PHPNuke as it is now probably suits them best, since they will do a minimal amount of modifications to the code, making upgrades easy. For hardcore developers, though, it's another story. I've got a list that's about three pages long of modifications I've made to the code running this site. That makes an upgrade all but impossible. Ergo: I'm switching to phpBB in the future, since this site is primarily a support forum site. I will maintain a micro-site for phpNuke with the Gallery and Gallery2 demonstration albums available to the users. I will also continue development on the Gallery/PHPNuke side as well (well, as much as time will allow with a newborn coming into the picture in October).

Anyhow, I agree completely with everything you've said. Don't be shy to post your opinions here (well, actually, here [nukedgallery.net] or here [nukedgallery.net]).

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
Katatawnic
Joined: Jan 31, 2005
Posts: 37
Location: Forest Falls, CA; USA
Posted: Mon Jul 11, 2005 5:23 pm
Heh heh heh.... well, I'm definitely full of opinions!
(I know I just left myself wide open for a smart ass remark there, but oh well.) Laughing

Thanks for those forum links, I found something interesting already that I wasn't aware existed on this site.... I've only been to the "integration tutorial" threads thus far. Wink Cool

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
MetalHellsAngel
Joined: Apr 18, 2005
Posts: 1

Posted: Tue Aug 23, 2005 3:32 pm
Phpnuke would be very nice if it were left alone to have time to grow due to users input and mods just as you said above. I think the biggest problem is that each phpnuke upgrade is a reason for the nuke site to make money by keeping it's members one step ahead of the rest by allowing them first access to each new release.

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
Katatawnic
Joined: Jan 31, 2005
Posts: 37
Location: Forest Falls, CA; USA
Posted: Tue Aug 30, 2005 2:49 am
You've nailed that one right on the head!!! Mr. Green

Also remember, FB's "new" releases nearly always have the FIXES that nukescripts.net and nukecops.com, et al, code for Nuke users.... but aside from Chatserv's security fix (that he has to update constantly of course as FB keeps putting out more new versions that have MORE security holes), I never see anyone's name in the copyright/credits aside from FB.... isn't that stealing intellectual property? Open source does NOT mean ripping off others' work and putting your name on it! Evil or Very Mad

~~ Kat ~~

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
pabloe
Joined: Feb 19, 2006
Posts: 19

Posted: Sun Feb 19, 2006 10:49 pm
Compleate begginner to all this phpnuke, phpbb2, php stuff.
Sql db on linux server running.

Sorry folks but i am having difficulties 2 i have tried the intergation process about 6 times now with limited and increasing luck every time gaining more and more understanding.

But still stuck and can't read code =:-{

The things is it all works togeather now phpnuke and nukebb2 together that still don't work in Nuke for me are.

PhpNuke ALL COOL SO FAR ALL WORKS fine

In Phpbb2, all but one thing


i'm quite lost but feel so close to sorting the my phpbb2 problem.

Please please can somebody help i tried to describe my issues preventing me from logging into phpbb2 and using private_messages i am completely lost an at an end and have tried everything these last Four weeks i feel like i have grown older by a year atleats, i've been everywhere.
please help!

Please for the love of god, if there is anyone out there that can solve this integration problem, please show some mercy and pitty on us less worthy and help with a clear and accurate and easy to follow solution to this issue.
It surely can't be that hard for someone who knows there shit.

You Would Go Down As A Global Internet Legend. Your source would be implemented and integrated into PHPnuke and Phpbb2 sites all over the world and people would share the joy you would have spread and people would wisper your name maybe even shout it out loud in public and the would say. "There goes the greatest man ever". Man i'd even do it if i could for that kind of respect and recognition.

Major S.O.S going out to those out there who know there stuff.

Respect people, and Please Help.

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
pabloe
Joined: Feb 19, 2006
Posts: 19

Posted: Mon Feb 20, 2006 6:50 pm
Have nearly all of the integration up and running the Your_Account and User/admin Login/out link works correctly and takes you to the relavent Sections admin/user/login/register section and you can register and edit your profile etc now all phpnuke works all the way through the reg process and registers users into phpbb2/nuke data base as temp user when fully registered as Users "NO BLANK PAGES OR ERRORS" anywhere on any pages just....

Just alitte more luck or some enlightenment and we will be there anytime soon Confused

"WHO WROTE THE INTEGRATION"??
Please have and couple of simple question?

PHPBB2 Also all works fine??? just going to test and make sure
there are know issues....

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
pabloe
Joined: Feb 19, 2006
Posts: 19

Posted: Mon Feb 20, 2006 7:23 pm
Mad
Have a little problem can't seem to login as phpbb2 as admin all else cool???

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
pabloe
Joined: Feb 19, 2006
Posts: 19

Posted: Mon Feb 20, 2006 7:58 pm

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
pabloe
Joined: Feb 19, 2006
Posts: 19

Posted: Mon Feb 20, 2006 8:18 pm
Wink

I Tasted the water and it was sour to begin with but it grows on you eventually so, persistence, lose some sleep and when you wake again everything will be alright. Wink

The integration does work fine, just a little finesse is required.
require a tweak or two nothing special. ??? need allittle help if possible please.

Someone!!

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
Katatawnic
Joined: Jan 31, 2005
Posts: 37
Location: Forest Falls, CA; USA
Posted: Wed Feb 22, 2006 11:58 am
WOW, you're a diligent one aren't you? I kept at it off and on myself, but finally gave up; as my previous posts show. However, I also haven't had time for the computer much at all until recently, spent the last few months house hunting and moving. Rolling Eyes

So let me get this right.... You used Nuke 7.8 and phpBB 2.0.1.6 correct?

It's apparent that you posted progress as you went along, but it's therefore a bit difficult to figure out just what steps made it work (or at least what you've accomplished so far), and if there is any order of certain changed steps.

You don't have your "revised version" of this integration in a text document per chance, do you? I just may have an inkling to try this yet again. Wink

~~ Kat ~~

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
pabloe
Joined: Feb 19, 2006
Posts: 19

Posted: Sat Feb 25, 2006 2:25 am
Crying or Very sad Sad Confused Shocked Shocked Shocked Shocked Smile Surprised Very Happy Laughing Rolling Eyes

Please please just alittle help from anyone.....

Everything work great PM/Profiles/login/out/Your_Accounts/Db/registration? everything just having a little issue directing to the right address to my phpbb2 my link takes me to www.makemehot.co.uk/honda/phpbb2 but the bb board comes up as disabled for me but when my friend logins in its fine around his, but when i try it takes me to the same address but the board seems to be disables. but when i enter www.honda.makemehot.co.uk it works fine???

Any ideas anybody please???

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
pabloe
Joined: Feb 19, 2006
Posts: 19

Posted: Fri Mar 03, 2006 6:51 pm
Cool everthing seems to be working now except the admin login to administrate phpbb2 wont login after entering user name and pass then press login it keeps saying page can not be found???

Everything else in the integration is all cool Question
So far so good bit by bit step by step Exclamation

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
pabloe
Joined: Feb 19, 2006
Posts: 19

Posted: Fri Mar 03, 2006 6:55 pm
Complete beginner here and my first forum experience
Any clues anybody please not had any help so far, now would be a good time....

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
pabloe
Joined: Feb 19, 2006
Posts: 19

Posted: Sun Mar 05, 2006 11:47 pm
I heard say, to sumon the Dari the great for help, all you have to is.
Go to the bathroom and with the lights off in this order.
initally you need to have a 3ft bathroom mirror, small black candle 3 inches long,
three large steps

1. light a small black candle and hold the flame an inch away from your lips.

2. Take three large steps towards the bathroom mirror without blowing the candle out.

3. Then stair dead straight into the mirror for 3 long seconds, then

4. Whisper Dari, Dari, Dari without blowing the candle out.

5. And then wait 3 long seconds more.

6. Now blow the candle out and wait for Dari to manifest himself before you.

Caution this may take a while and could be dangerous and i will not be held responsible for anything that may happen.

Good Luck!

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
dari
Joined: Mar 03, 2003
Posts: 6287
Location: Washington Township, NJ, USA
Posted: Mon Mar 06, 2006 7:55 am
heh...i'm flattered Smile

i'm busy right now w/ Gallery 2.1 related things (and new baby related things, too), so this has been put on hold for awhile. Hopefully I'll get back to it ASAP Smile

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
pabloe
Joined: Feb 19, 2006
Posts: 19

Posted: Tue Mar 07, 2006 3:31 am
Embarassed I burn't my lip doing that but it worked and was worth it, mumbled the idiot Shocked. Will hold out a while for your advice, but as far as i can tell all your integration works just about fine, for me it has, all good so far????... good luck and congratulations DARI....

(Can't log in as admin in phpbb2 after integration???).

what have i done wrong???
Thanx.

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
pabloe
Joined: Feb 19, 2006
Posts: 19

Posted: Sun Mar 19, 2006 11:26 pm
Please any help for a some what small problem with my admin login/out please.

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
pabloe
Joined: Feb 19, 2006
Posts: 19

Posted: Sun Mar 26, 2006 8:19 am
Hi still looking for alittle help with the integration. just have one last problem with the phpbb admin login, everytime i try to login as admin it just take me back to the phpbb main page instead in admin control panel??? any ideas anyone please.

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
pabloe
Joined: Feb 19, 2006
Posts: 19

Posted: Sun Apr 02, 2006 10:34 pm
Still Hanging out like a junkie here please help somebody! Sad
is there anybody who actually checks these posts??

Am i wasting my time holding out and asking for help here???

Have been very very patient but nothing or nobody has come forward with any kind or adivce any literally no response of any kind to anything???
What is up??? Is there no help avalible on for integration and where should i be looking???? It seems that there is none or very little that actually helps???

Please help, i just want to secure and finish my site and the integration.
please help somebody! Crying or Very sad

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
dari
Joined: Mar 03, 2003
Posts: 6287
Location: Washington Township, NJ, USA
Posted: Mon Apr 03, 2006 7:06 am
sorry, but due to the changes in phpBB since the original MOD i posted, plus the fact that I'm supporting the Gallery 2.1 integration as well, I haven't had time to maintain this.

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
Ridicule
Joined: Jul 06, 2005
Posts: 4

Posted: Sat Apr 08, 2006 5:44 pm
heres how to make this work with the latest version of phpBB, it does not work with the latest ver of phpnuke so im using PHP-Nuke-7.8 also if you already have a phpBB forum you can keep all your data,

after following all the mods, for those with the "Parse error: parse error, unexpected $ in /home/.../modules/Your_Account/index.php..." error, make sure your modules/Your_Account/index.php has the following, this error is due to a } being left out here: (you may have forum instead of phpBB2)



PHP: › <?php #
#-----[ OPEN ]-----------------------------------

modules/Your_Account/index.php

#
#-----[ CHECK ]-----------------------------------

         
if ($redirect == "" ) {
            
Header("Location: modules.php?name=Your_Account&op=userinfo&bypass=1&username=$username");
        } else if (
$redirect == "phpBB") {
            
Header("Location: /phpBB2/");
        } else if (
$mode == "") {
            
Header("Location: /phpBB2/$forward");
        } else if (
$t !="") {
            
Header("Location: /phpBB2/$forward&amp;mode=$mode&amp;t=$t");
        } else {
            
Header("Location: /phpBB2/$forward&amp;mode=$mode&amp;f=$f");
        } 
    } 
// make sure you have this one.
}

#
#-----[ SAVE & CLOSE ]-----------------------------------

modules/Your_Account/index.php ?>


next we want to be able to get into the forums admin panel so do the following:

PHP: › <?php #
#-----[ OPEN ]-----------------------------------

phpBB2/login.php

#
#-----[ FIND ]-----------------------------------

else
{
    
//
    // Do a full login page dohickey if
    // user not already logged in
    //
    
if( !$userdata['session_logged_in'] || (isset($HTTP_GET_VARS['admin']) && $userdata['session_logged_in'] && $userdata['user_level'] == ADMIN))
    {
        
$page_title $lang['Login'];
        include(
$phpbb_root_path 'includes/page_header.'.$phpEx);

        
$template->set_filenames(array(
            
'body' => 'login_body.tpl')
        );

        
$forward_page '';

        if( isset(
$HTTP_POST_VARS['redirect']) || isset($HTTP_GET_VARS['redirect']) )
        {
            
$forward_to $HTTP_SERVER_VARS['QUERY_STRING'];

            if( 
preg_match("/^redirect=([a-z0-9\.#\/\?&=\+\-_]+)/si"$forward_to$forward_matches) )
            {
                
$forward_to = ( !empty($forward_matches[3]) ) ? $forward_matches[3] : $forward_matches[1];
                
$forward_match explode('&'$forward_to);

                if(
count($forward_match) > 1)
                {
                    for(
$i 1$i count($forward_match); $i++)
                    {
                        if( !
ereg("sid="$forward_match[$i]) )
                        {
                            if( 
$forward_page != '' )
                            {
                                
$forward_page .= '&';
                            }
                            
$forward_page .= $forward_match[$i];
                        }
                    }
                    
$forward_page $forward_match[0] . '?' $forward_page;
                }
                else
                {
                    
$forward_page $forward_match[0];
                }
            }
        }

        
$username = ( $userdata['user_id'] != ANONYMOUS ) ? $userdata['username'] : '';

        if(
$forward_page == "forum?") {
            
$forward_page "forum";
        }

        
$s_hidden_fields '<input type="hidden" name="op" value="login"><input type="hidden" name="redirect" value="' $forward_page '" />';
        
$s_hidden_fields .= (isset($HTTP_GET_VARS['admin'])) ? '<input type="hidden" name="admin" value="1" />' '';

        
make_jumpbox('viewforum.'.$phpEx);
        
$template->assign_vars(array(
            
'USERNAME' => $username,

            
'L_ENTER_PASSWORD' => (isset($HTTP_GET_VARS['admin'])) ? $lang['Admin_reauthenticate'] : $lang['Enter_password'],
            
'L_SEND_PASSWORD' => $lang['Forgotten_password'],

            
'U_SEND_PASSWORD' => append_sid("profile.$phpEx?mode=sendpassword"),

            
'S_HIDDEN_FIELDS' => $s_hidden_fields)
        );

        
$template->pparse('body');

        include(
$phpbb_root_path 'includes/page_tail.'.$phpEx);
    }
    else
    {
        
redirect(append_sid("index.$phpEx"true));
    }

}

#
#-----[ REPLACE WITH ]-----------------------------------

else
{
    if (
$userdata['user_level'] == ADMIN)
    {
        if( !
$userdata['session_logged_in'] || (isset($HTTP_GET_VARS['admin']) && $userdata['session_logged_in'] && $userdata['user_level'] == ADMIN))
        {
            
$page_title $lang['Login'];
            include(
$phpbb_root_path 'includes/page_header.'.$phpEx);
    
            
$template->set_filenames(array(
                
'body' => 'login_body_admin.tpl')
            );

            
$forward_page '';

            if( isset(
$HTTP_POST_VARS['redirect']) || isset($HTTP_GET_VARS['redirect']) )
            {
                
$forward_to $HTTP_SERVER_VARS['QUERY_STRING'];

                if( 
preg_match("/^redirect=([a-z0-9\.#\/\?&=\+\-_]+)/si"$forward_to$forward_matches) )
                {
                    
$forward_to = ( !empty($forward_matches[3]) ) ? $forward_matches[3] : $forward_matches[1];
                    
$forward_match explode('&'$forward_to);

                    if(
count($forward_match) > 1)
                    {
                        for(
$i 1$i count($forward_match); $i++)
                        {
                            if( !
ereg("sid="$forward_match[$i]) )
                            {
                                if( 
$forward_page != '' )
                                {
                                    
$forward_page .= '&';
                                }
                                
$forward_page .= $forward_match[$i];
                            }
                        }
                        
$forward_page $forward_match[0] . '?' $forward_page;
                    }
                    else
                    {
                        
$forward_page $forward_match[0];
                    }
                }
            }

            
$username = ( $userdata['user_id'] != ANONYMOUS ) ? $userdata['username'] : '';

            if(
$forward_page == "forum?") {
                
$forward_page "forum";
            }

            
$s_hidden_fields '<input type="hidden" name="op" value="login"><input type="hidden" name="redirect" value="' $forward_page '" />';
            
$s_hidden_fields .= (isset($HTTP_GET_VARS['admin'])) ? '<input type="hidden" name="admin" value="1" />' '';

            
make_jumpbox('viewforum.'.$phpEx);
            
$template->assign_vars(array(
                
'USERNAME' => $username,

                
'L_ENTER_PASSWORD' => (isset($HTTP_GET_VARS['admin'])) ? $lang['Admin_reauthenticate'] : $lang['Enter_password'],
                
'L_SEND_PASSWORD' => $lang['Forgotten_password'],

                
'U_SEND_PASSWORD' => append_sid("profile.$phpEx?mode=sendpassword"),

                
'S_HIDDEN_FIELDS' => $s_hidden_fields)
            );

            
$template->pparse('body');

            include(
$phpbb_root_path 'includes/page_tail.'.$phpEx);
        }
        else
        {
            
redirect(append_sid("index.$phpEx"true));
        }
    }
    else
    {
        if( !
$userdata['session_logged_in'] || (isset($HTTP_GET_VARS['admin']) && $userdata['session_logged_in'] && $userdata['user_level'] == ADMIN))
        {
            
$page_title $lang['Login'];
            include(
$phpbb_root_path 'includes/page_header.'.$phpEx);

            
$template->set_filenames(array(
                
'body' => 'login_body.tpl')
            );

            
$forward_page '';

            if( isset(
$HTTP_POST_VARS['redirect']) || isset($HTTP_GET_VARS['redirect']) )
            {
                
$forward_to $HTTP_SERVER_VARS['QUERY_STRING'];

                if( 
preg_match("/^redirect=([a-z0-9\.#\/\?&=\+\-_]+)/si"$forward_to$forward_matches) )
                {
                    
$forward_to = ( !empty($forward_matches[3]) ) ? $forward_matches[3] : $forward_matches[1];
                    
$forward_match explode('&'$forward_to);

                    if(
count($forward_match) > 1)
                    {
                        for(
$i 1$i count($forward_match); $i++)
                        {
                            if( !
ereg("sid="$forward_match[$i]) )
                            {
                                if( 
$forward_page != '' )
                                {
                                    
$forward_page .= '&';
                                }
                                
$forward_page .= $forward_match[$i];
                            }
                        }
                        
$forward_page $forward_match[0] . '?' $forward_page;
                    }
                    else
                    {
                        
$forward_page $forward_match[0];
                    }
                }
            }

            
$username = ( $userdata['user_id'] != ANONYMOUS ) ? $userdata['username'] : '';
    
            if(
$forward_page == "forum?") {
                
$forward_page "forum";
            }

            
$s_hidden_fields '<input type="hidden" name="op" value="login"><input type="hidden" name="redirect" value="' $forward_page '" />';
            
$s_hidden_fields .= (isset($HTTP_GET_VARS['admin'])) ? '<input type="hidden" name="admin" value="1" />' '';
    
            
make_jumpbox('viewforum.'.$phpEx);
            
$template->assign_vars(array(
                
'USERNAME' => $username,

                
'L_ENTER_PASSWORD' => (isset($HTTP_GET_VARS['admin'])) ? $lang['Admin_reauthenticate'] : $lang['Enter_password'],
                
'L_SEND_PASSWORD' => $lang['Forgotten_password'],

                
'U_SEND_PASSWORD' => append_sid("profile.$phpEx?mode=sendpassword"),

                
'S_HIDDEN_FIELDS' => $s_hidden_fields)
            );

            
$template->pparse('body');

            include(
$phpbb_root_path 'includes/page_tail.'.$phpEx);
        }    
        else
        {
            
redirect(append_sid("index.$phpEx"true));
        }
    }
}

#
#-----[ SAVE & CLOSE ]-----------------------------------
#
phpBB2/login.php ?>


next we need to create the login_body_admin.tpl template file (*replace with name of the template your using)

PHP: › <?php #
#-----[ CREATE FILE /phpBB2/templates/*your template/login_body_admin.tpl ]-----------------------------------

<form action="login.php" method="post">

<
table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
  <
tr
    <
td align="left" class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></td>
  </
tr>
</
table>

<
table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center">
  <
tr
    <
th height="25" class="thHead" nowrap="nowrap">{L_ENTER_PASSWORD}</th>
  </
tr>
  <
tr
    <
td class="row1"><table border="0" cellpadding="3" cellspacing="1" width="100%">
          <
tr
            <
td colspan="2" align="center">&nbsp;</td>
          </
tr>
          <
tr
            <
td width="45%" align="right"><span class="gen">{L_USERNAME}:</span></td>
            <
td
              <
input type="text" class="post" name="username" size="25" maxlength="40" value="{USERNAME}" />
            </
td>
          </
tr>
          <
tr
            <
td align="right"><span class="gen">{L_PASSWORD}:</span></td>
            <
td
              <
input type="password" class="post" name="password" size="25" maxlength="32" />
            </
td>
          </
tr>
          <!-- 
BEGIN switch_allow_autologin -->
          <
tr align="center"
            <
td colspan="2"><span class="gen">{L_AUTO_LOGIN}: <input type="checkbox" name="autologin" /></span></td>
          </
tr>
          <!-- 
END switch_allow_autologin -->
          <
tr align="center"
            <
td colspan="2">{S_HIDDEN_FIELDS}<input type="submit" name="login" class="mainoption" value="{L_LOGIN}" /></td>
          </
tr>
          <
tr align="center"
            <
td colspan="2"><span class="gensmall"><a href="{U_SEND_PASSWORD}" class="gensmall">{L_SEND_PASSWORD}</a></span></td>
          </
tr>
        </
table></td>
  </
tr>
</
table>

</
form>

#
#-----[ SAVE & CLOSE ]-----------------------------------
#
/phpBB2/templates/*your template/login_body_admin.tpl ?>


This should all make a working integration, if you get any problems, post back...



r|d

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
pabloe
Joined: Feb 19, 2006
Posts: 19

Posted: Wed May 17, 2006 9:37 pm
Crying or Very sad
Question
Phpnuke 7.8 & phpbb2 integration was working fine until my site got defaced and ruined my portal.

I was wondering if the integration would still work with patched 3.1 files for nuke to help secure my site and sentinal???

3 month of hard work down the drain!!...

Will try again soon and also try maybe with the above changes..

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
dari
Joined: Mar 03, 2003
Posts: 6287
Location: Washington Township, NJ, USA
Posted: Thu May 18, 2006 6:52 am
my first suggestion is to restore from backup, to save you time.
but...
this should probably work, but i can't promise anything.

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
pabloe
Joined: Feb 19, 2006
Posts: 19

Posted: Thu Jun 01, 2006 9:43 pm
No luck, no backup and no excuse either just got complacent/busy and really, honestly thought, phpnuke was a secure package. This time performing the integration with the 3.2 patch and will try and install nuke-sentinal pl4 when done.

All working so far, phpnuke, working fine.

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
pabloe
Joined: Feb 19, 2006
Posts: 19

Posted: Wed Jun 21, 2006 12:57 am
Back again right performed the integration again from scratch. 2 thumbs up at present maybe, pre-mature?
Everything seems to work all fine as before. the only thing is i'm unable to login to phpbb admin i just brings up a blank page still haven't performed the new part yet???

I thinks its something to do with the nukebb_sessions table.

In Myphp, when i edit the nukebb_sessions table and edit session_admin from 0 to 1, and return to phpbb2 and press refresh it "logs" me in to phpbb2 admin panel as it should.

Is there a way of fixing this little glitch in some little way, so i don't have to keep logging in to the admin panel like that and do it normaly. For some reason i can't access the files in the phpbb2/admin/ folder through my web brower??? like i should be able to after the integration???


UPDATE `nukebb_sessions` SET `session_admin` = '1' WHERE CONVERT( `session_id` USING utf8 ) = '*****session key*******' LIMIT 1 ;

AuthorMessage
Post Title: Re: Standalone phpBB2 integration within PHPNuke
greatderren
Joined: Oct 31, 2006
Posts: 1

Posted: Tue Oct 31, 2006 4:09 pm
i have followed the instuctions.. but it hasn't worked... i get this error message

phpBB : Critical Error

Could not query config information

DEBUG MODE

SQL Error : 1146 Table 'phpBB2.nuke_bbconfig' doesn't exist

SELECT * FROM nuke_bbconfig

Line : 228
File : common.php

how can i solve this problem?.. thanks.

AuthorMessage
Post Title: PLEASE HELP (Integrate Existing PHPBB forum with NUKE)
ilikemycomputer
Joined: Aug 20, 2008
Posts: 2

Posted: Wed Aug 20, 2008 4:14 pm
Can anybody please help me? I currently have a phpBB2 forum running with ALOT of modifications, and would like to integrate it with PHP-Nuke. I don't want to do a table script because I would then loose all of my mods. Is there any way possible to integrate an existing forum into my new PHP-Nuke? I have tried overwriting all of the files in the '/html/modules/forums/' with my forum files, but when you click on the 'Forum' link in Nuke, all it displays is a blank white page..?

My forum URL is;
www[dot]halescomputerservice[dot]com/phpBB/

The Nuke URL is;
www[dot]halescomputerservice[dot]com/home/html/

Thanks in Advanced,

Shane

All times are GMT - 5 Hours
Powered by PHPNuke and phpBB2 © 2006 phpBB Group