Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff
Author Message
TehBooster
New Member
New Member


Joined: Apr 30, 2005
Posts: 1

PostPosted: Sat Apr 30, 2005 6:51 am Reply with quote

Hi there.

Before i go any further i am fully aware of CPGNuke but it that is a non-option.

Im in the process of creating a bridge file that will be fully compatible of bridging a standalone Coppermine system with phpNuke for those people who like me cant switch over to cpgNuke for whatever reason.

I will admit now I'm not the best at coding these kinds of things but occaisionally i get lucky. At the moment however I am a little bit stuck. I have taken the decision to modify the phpBB bridge as this is already a fully functioning part of phpNuke. What is getting me stuck however is the login system, here is my code so far obviously with my site info deleted.

Code:
// ------------------------------------------------------------------------- //

// phpBB2 Integration for Coppermine                                         //
// ------------------------------------------------------------------------- //
// Modify the values below according to your Board installation              //
// ------------------------------------------------------------------------- //

// database configuration
define('PHPBB_DB_NAME', 'db'); // The name of the database used by the board
define('PHPBB_BD_HOST', 'localhost'); // The name of the database server
define('PHPBB_DB_USERNAME', 'root'); // The username to use to connect to the database
define('PHPBB_DB_PASSWORD', 'password'); // The password to use to connect to the database

// The web path to your phpBB directory
// If your URL to your board is for example 'http://yoursite_name.com/phpBB2/',
// you'll have to set the below var to '/phpBB2/'.
define('PHPBB_WEB_PATH', '/modules.php?name=Forums');
// Logout Flag
// the value of this boolean constant depends on your phpBB version:
// If your version of phpBB is 2.0.4 or lower - change the value to FALSE;
// if your version of phpBB is 2.0.5 or newer - leave it as TRUE
define('PHPBB_LOGOUT_GET', '/modules.php?name=Forums$');
// ------------------------------------------------------------------------- //
// You can keep the default values below if your instalation is standard
// ------------------------------------------------------------------------- //
// The prefix for the phpBB cookies
define('PHPBB_COOKIE_PREFIX', 'phpbb2mysql'); // The prefix used for board cookies

// Prefix and names for the database tables
define('PHPBB_TABLE_PREFIX', 'nuke_'); // The prefix used for the DB tables
define('PHPBB_USER_TABLE', 'users'); // The members table
define('PHPBB_SESSION_TABLE', 'bbsessions'); // The session table
define('PHPBB_GROUP_TABLE', 'bbgroups'); // The groups table
define('PHPBB_UGROUP_TABLE', 'bbuser_group'); // The group/user table

// ------------------------------------------------------------------------- //


Whats getting me stuck is the login coding

Code:
define('PHPBB_WEB_PATH', '/modules.php?name=Forums');


What would i put in here so it logs me into the coppermine gallery rather than just login and redirect to the forum as when i do that im still not logged in on coppermine.

Please help me with this as i really think many phpNuke users will find a good use for it.

If anyone would like to give me more direct help then please feel free to add me to msn messenger: Only registered users can see links on this board! Get registered or login!

Thank you for reading.

Booster
 
View user's profile Send private message
djmaze
Subject Matter Expert


Joined: May 15, 2004
Posts: 719
Location: http://tinyurl.com/5z8dmv

PostPosted: Sat Apr 30, 2005 8:04 am Reply with quote

You're not showing the essential information of the file.
You say that you can't login which means there's a cookie problem.

In that file you will find
Code:
    if (!isset($HTTP_COOKIE_VARS[PHPBB_COOKIE_PREFIX . '_data'])) {

        $cookie_uid = 0;
        $cookie_pass = '*';
    } else {
        $sessiondata = unserialize($HTTP_COOKIE_VARS[PHPBB_COOKIE_PREFIX . '_data']);
        if (is_array($sessiondata)) {
            $cookie_uid = (isset($sessiondata['userid'])) ? intval($sessiondata['userid']) : 0;
            $cookie_pass = (isset($sessiondata['autologinid'])) ? addslashes($sessiondata['autologinid']) : '*';
        } else {
            $cookie_uid = 0;
            $cookie_pass = '*';
        }
    }


You have to MODIFY THAT CODE to reflect the php-nuke login cookie
 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©