Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: 1 [2] 3 4   Go Down

Author Topic: CPG 1.2/PhpBB2  (Read 51773 times)

0 Members and 1 Guest are viewing this topic.

DaMysterious

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 404
  • My CPG Recources
    • My CPG Recources
CPG 1.2/PhpBB2
« Reply #20 on: November 07, 2003, 09:16:58 pm »

Quote from: "antoined"
Still not working!!!!
Your integration is with CPG 1.2.0???

Antoine


Yes and it works perfect.

Did you have enabled bridgesupport in init.inc.php?

If not try in init.inc.php

Code: [Select]

define('COPPERMINE_VERSION', '1.2.0 - RC2');
// User database integration
// Uncomment the applicable line if you want to use it
define('UDB_INTEGRATION', 'phpbb');
// define('UDB_INTEGRATION', 'invisionboard');
// define('UDB_INTEGRATION', 'vbulletin');
// define('UDB_INTEGRATION', 'yabbse');
if (!defined('IN_COPPERMINE')) die('Not in Coppermine...');
// Start output buffering
ob_start();
// Report all errors except E_NOTICE
// This is the default value set in php.ini
// error_reporting (E_ALL ^ E_NOTICE);
error_reporting(E_ALL);


Did you change the directory structure after installing? Is there a dircectory /coppermine/bridge and in there at last phpbb.inc.php? After upgrade from 1.1 to 1.2 I doe remember some errors here to.


My phpbb.inc.php
Code: [Select]

<?php
// ------------------------------------------------------------------------- //
//  Coppermine Photo Gallery                                                 //
// ------------------------------------------------------------------------- //
//  Copyright &#40;C&#41; 2002,2003  Grégory DEMAR <gdemar@wanadoo.fr>               //
//  http&#58;//www.chezgreg.net/coppermine/                                      //
// ------------------------------------------------------------------------- //
//  Based on PHPhotoalbum by Henning Støverud <henning@stoverud.com>         //
//  http&#58;//www.stoverud.com/PHPhotoalbum/                                    //
// ------------------------------------------------------------------------- //
//  This program is free software; you can redistribute it and/or modify     //
//  it under the terms of the GNU General Public License as published by     //
//  the Free Software Foundation; either version 2 of the License, or        //
//  &#40;at your option&#41; any later version.                                      //
// ------------------------------------------------------------------------- //
//
//  phpBB2 Integration for Coppermine
//
// ------------------------------------------------------------------------- //

// ------------------------------------------------------------------------- //
//  Modify the values below according to your Board installation
// ------------------------------------------------------------------------- //

// database configuration
define&#40;'PHPBB_DB_NAME','phpbb'&#41;;        // The name of the database used by the board
define&#40;'PHPBB_BD_HOST','localhost'&#41;;// The name of the database server
define&#40;'PHPBB_DB_USERNAME','root'&#41;;        // The username to use to connect to the database
define&#40;'PHPBB_DB_PASSWORD',''&#41;;                // The password to use to connect to the database

// The web path to your phpBB directory
// In this example http&#58;//yoursite_name.com/phpBB2/
define&#40;'PHPBB_WEB_PATH','http&#58;//your.url.here/'&#41;;

// ------------------------------------------------------------------------- //
//  You can keep the default values below if your instalation is standard
// ------------------------------------------------------------------------- //

// The prefix for the phpBB cookies
define&#40;'PHPBB_COOKIE_PREFIX','phpbb2mysql'&#41;;// The prefix used for board cookies

// Prefix and names for the database tables
define&#40;'PHPBB_TABLE_PREFIX','phpbb_'&#41;;                // The prefix used for the DB tables
define&#40;'PHPBB_USER_TABLE', 'users'&#41;;                // The members table
define&#40;'PHPBB_SESSION_TABLE', 'sessions'&#41;;        // The session table
define&#40;'PHPBB_GROUP_TABLE', 'groups'&#41;;                // The groups table
define&#40;'PHPBB_UGROUP_TABLE', 'user_group'&#41;;        // The group/user table

// ------------------------------------------------------------------------- //
//  Nothing to edit below this line
// ------------------------------------------------------------------------- //

// Group definitions
define&#40;'PHPBB_ADMIN_GROUP', 1&#41;;
define&#40;'PHPBB_MEMBERS_GROUP', 2&#41;;
define&#40;'PHPBB_GUEST_GROUP', 3&#41;;
define&#40;'PHPBB_BANNED_GROUP', 4&#41;;

// Authenticate a user using cookies
function udb_authenticate&#40;&#41;
&#123;
        
global $HTTP_COOKIE_VARS$USER_DATA$UDB_DB_LINK_ID$UDB_DB_NAME_PREFIX$CONFIG;
        
        
// For error checking
        
$CONFIG['TABLE_USERS'&#93; = '**ERROR**';

        
$default_group = array&#40;
                
'group_id' => PHPBB_GUEST_GROUP,
                
'group_name' => 'Unknown',
                
'has_admin_access' => 0,
                
'can_send_ecards' => 0,
                
'can_rate_pictures' => 0,
                
'can_post_comments' => 0,
                
'can_upload_pictures' => 0,
                
'can_create_albums' => 0,
                
'pub_upl_need_approval' => 1,
                
'priv_upl_need_approval' => 1,
        &
#41;;
        
        // Retrieve cookie stored login information
        
if &#40;!isset&#40;$HTTP_COOKIE_VARS[PHPBB_COOKIE_PREFIX.'_data'&#93;&#41;&#41; &#123;
                
$cookie_uid  0;
                
$cookie_pass '*';
        &
#125; else &#123;
                
$sessiondata unserialize&#40;$HTTP_COOKIE_VARS[PHPBB_COOKIE_PREFIX . '_data'&#93;&#41;;
                
if &#40;is_array&#40;$sessiondata&#41;&#41; &#123;
                        
$cookie_uid  = &#40; isset&#40;$sessiondata['userid'&#93;&#41; &#41; ? intval&#40;$sessiondata['userid'&#93;&#41; &#58; 0;
                        
$cookie_pass = &#40; isset&#40;$sessiondata['autologinid'&#93;&#41; &#41; ? addslashes&#40;$sessiondata['autologinid'&#93;&#41; &#58; '*';
                
&#125; else &#123;
                        
$cookie_uid  0;
                        
$cookie_pass '*';
                &
#125;
        
&#125;
        
        // If autologin was not selected, we need to use the sessions table
        
if&#40;$cookie_uid && !$cookie_pass && isset&#40;$HTTP_COOKIE_VARS[PHPBB_COOKIE_PREFIX.'_sid'&#93;&#41;&#41;&#123;

                
$session_id addslashes&#40;$HTTP_COOKIE_VARS[PHPBB_COOKIE_PREFIX.'_sid'&#93;&#41;;

                
$sql "SELECT user_id, username as user_name, user_level ".
                           
"FROM ".$UDB_DB_NAME_PREFIX.PHPBB_TABLE_PREFIX.PHPBB_SESSION_TABLE." ".
                           
"INNER JOIN ".$UDB_DB_NAME_PREFIX.PHPBB_TABLE_PREFIX.PHPBB_USER_TABLE." ON session_user_id = user_id ".
                           
"WHERE session_id='$session_id' AND session_user_id ='$cookie_uid'";

        &
#125; else &#123;

                
$sql "SELECT user_id, username as user_name, user_level ".
                           
"FROM ".$UDB_DB_NAME_PREFIX.PHPBB_TABLE_PREFIX.PHPBB_USER_TABLE." ".
                           
"WHERE user_id='$cookie_uid' AND user_password='$cookie_pass'";

        &
#125;
        
$result db_query&#40;$sql, $UDB_DB_LINK_ID&#41;;
        
        
if &#40;mysql_num_rows&#40;$result&#41;&#41;&#123;
                
$USER_DATA mysql_fetch_array&#40;$result&#41;;
                
mysql_free_result&#40;$result&#41;;
        
            
define&#40;'USER_ID', &#40;int&#41;$USER_DATA['user_id'&#93;&#41;;
            
define&#40;'USER_NAME', $USER_DATA['user_name'&#93;&#41;;

                // Define the basic groups
                
if&#40;$USER_DATA['user_level'&#93;==1&#41;&#123;
                        
$user_group_set PHPBB_ADMIN_GROUP.','.PHPBB_MEMBERS_GROUP.',';
                &
#125; else &#123;
                        
$user_group_set PHPBB_MEMBERS_GROUP.',';
                &
#125;
                
                // Retrieve the groups the user is a member of
                
$sql =  "SELECT &#40;ug.group_id + 5&#41; as group_id ".
                                
"FROM ".$UDB_DB_NAME_PREFIX.PHPBB_TABLE_PREFIX.PHPBB_UGROUP_TABLE." as ug ".
                                
"LEFT JOIN ".$UDB_DB_NAME_PREFIX.PHPBB_TABLE_PREFIX.PHPBB_GROUP_TABLE." as g ON ug.group_id = g.group_id ".
                                
"WHERE user_id = ".USER_ID." AND user_pending = 0 AND group_single_user = 0";
                
$result db_query&#40;$sql&#41;;
                
while&#40;$row = mysql_fetch_array&#40;$result&#41;&#41;&#123;
                        
$user_group_set .= $row['group_id'&#93;.',';
                
&#125;
                
mysql_free_result&#40;$result&#41;;
                
                
$user_group_set '&#40;'.substr&#40;$user_group_set, 0, -1&#41;.'&#41;';

                // Default group data
                
$USER_DATA['group_quota'&#93; = 1;
                
$USER_DATA['can_rate_pictures'&#93; = 0;
                
$USER_DATA['can_send_ecards'&#93; = 0;
                
$USER_DATA['can_post_comments'&#93; = 0;
                
$USER_DATA['can_upload_pictures'&#93; = 0;
                
$USER_DATA['can_create_albums'&#93; = 0;
                
$USER_DATA['pub_upl_need_approval'&#93; = 1;
                
$USER_DATA['priv_upl_need_approval'&#93; = 1;
                
                
$sql "SELECT  group_quota as gq, ".
                           
"                can_rate_pictures as crp, ".
                           
"                can_send_ecards as cse, ".
                           
"                can_post_comments as cpc, ".
                           
"                can_upload_pictures as cup, ".
                           
"                can_create_albums as cca, ".
                           
"                pub_upl_need_approval as puna, ".
                           
"                priv_upl_need_approval as pruna ".
                           
"FROM &#123;$CONFIG['TABLE_USERGROUPS'&#93;&#125; ".
                           
"WHERE group_id IN ".$user_group_set;
                
$result db_query&#40;$sql&#41;;

                // Merge permissions for groups the user is a member of
                
while&#40;$row = mysql_fetch_array&#40;$result&#41;&#41;&#123;
                        
$USER_DATA['can_rate_pictures'&#93; += $row['crp'&#93;;
                        
$USER_DATA['can_send_ecards'&#93; += $row['cse'&#93;;
                        
$USER_DATA['can_post_comments'&#93; += $row['cpc'&#93;;
                        
$USER_DATA['can_upload_pictures'&#93; += $row['cup'&#93;;
                        
$USER_DATA['can_create_albums'&#93; += $row['cca'&#93;;
                        
$USER_DATA['pub_upl_need_approval'&#93; *= $row['puna'&#93;;
                        
$USER_DATA['priv_upl_need_approval'&#93; *= $row['pruna'&#93;;
                        
                        
$quota $USER_DATA['group_quota'&#93;;
                        
if&#40;&#40;$quota && $row['gq'&#93; > $quota&#41; || !$row['gq'&#93;&#41; $USER_DATA['group_quota'&#93; = $row['gq'&#93;;
                
&#125;
                
mysql_free_result&#40;$result&#41;;

            
define&#40;'USER_GROUP', ''&#41;;
                
define&#40;'USER_GROUP_SET', $user_group_set&#41;;
            
define&#40;'USER_IS_ADMIN', &#40;$USER_DATA['user_level'&#93; == 1&#41;&#41;;
            
define&#40;'USER_CAN_SEND_ECARDS', &#40;int&#41;$USER_DATA['can_send_ecards'&#93;&#41;;
            
define&#40;'USER_CAN_RATE_PICTURES', &#40;int&#41;$USER_DATA['can_rate_pictures'&#93;&#41;;
            
define&#40;'USER_CAN_POST_COMMENTS', &#40;int&#41;$USER_DATA['can_post_comments'&#93;&#41;;
            
define&#40;'USER_CAN_UPLOAD_PICTURES', &#40;int&#41;$USER_DATA['can_upload_pictures'&#93;&#41;;
            
define&#40;'USER_CAN_CREATE_ALBUMS', &#40;int&#41;$USER_DATA['can_create_albums'&#93;&#41;;
        
&#125; else &#123;
            
$result db_query&#40;"SELECT * FROM &#123;$CONFIG['TABLE_USERGROUPS'&#93;&#125; WHERE group_id = ".PHPBB_GUEST_GROUP&#41;;
                
if &#40;!mysql_num_rows&#40;$result&#41;&#41; &#123;
                        
$USER_DATA $default_group;
                &
#125; else &#123;
                        
$USER_DATA mysql_fetch_array&#40;$result&#41;;
                
&#125;
            
define&#40;'USER_ID', 0&#41;;
            
define&#40;'USER_NAME', 'Anonymous'&#41;;
                
define&#40;'USER_GROUP_SET', '&#40;'.PHPBB_GUEST_GROUP.'&#41;'&#41;;
            
define&#40;'USER_IS_ADMIN', 0&#41;;
            
define&#40;'USER_CAN_SEND_ECARDS', &#40;int&#41;$USER_DATA['can_send_ecards'&#93;&#41;;
            
define&#40;'USER_CAN_RATE_PICTURES', &#40;int&#41;$USER_DATA['can_rate_pictures'&#93;&#41;;
            
define&#40;'USER_CAN_POST_COMMENTS', &#40;int&#41;$USER_DATA['can_post_comments'&#93;&#41;;
            
define&#40;'USER_CAN_UPLOAD_PICTURES', &#40;int&#41;$USER_DATA['can_upload_pictures'&#93;&#41;;
            
define&#40;'USER_CAN_CREATE_ALBUMS', 0&#41;;
                
mysql_free_result&#40;$result&#41;;
        
&#125;
&#125;

// Retrieve the name of a user
function udb_get_user_name&#40;$uid&#41;
&#123;
        
global $UDB_DB_LINK_ID$UDB_DB_NAME_PREFIX$CONFIG;

        
$sql "SELECT username as user_name ".
                   
"FROM ".$UDB_DB_NAME_PREFIX.PHPBB_TABLE_PREFIX.PHPBB_USER_TABLE." ".
                   
"WHERE user_id = '$uid'";

        
$result db_query&#40;$sql, $UDB_DB_LINK_ID&#41;;

        
if &#40;mysql_num_rows&#40;$result&#41;&#41; &#123;
            
$row mysql_fetch_array&#40;$result&#41;;
                
mysql_free_result&#40;$result&#41;;
                
return $row['user_name'&#93;;
        
&#125; else &#123;
                
return '';
        &
#125;
&#125;

// Redirect
function udb_redirect&#40;$target&#41;
&#123;
        
header&#40;'Location&#58; '.PHPBB_WEB_PATH.$target&#41;;
        
exit;
&
#125;

// Register
function udb_register_page&#40;&#41;
&#123;
        
$target 'profile.php?mode=register';
        
udb_redirect&#40;$target&#41;;
&#125;

// Login
function udb_login_page&#40;&#41;
&#123;
        
global $CONFIG;

        
$target 'login.php';
        
udb_redirect&#40;$target&#41;;
&#125;

// Logout
function udb_logout_page&#40;&#41;
&#123;
        
global $CONFIG;

        
$target 'login.php?logout=true';
        
udb_redirect&#40;$target&#41;;
&#125;

// Edit users
function udb_edit_users&#40;&#41;
&#123;
        
$target 'admin/index.php';
        
udb_redirect&#40;$target&#41;;
&#125;

// Get user information
function udb_get_user_infos&#40;$uid&#41;
&#123;
        
global $UDB_DB_NAME_PREFIX$UDB_DB_LINK_ID;
        global 
$lang_register_php;

        
$sql "SELECT username as user_name, user_email, user_regdate, ".
                   
"user_from as user_location, user_interests, user_website, user_occ as user_occupation ".
                   
"FROM ".$UDB_DB_NAME_PREFIX.PHPBB_TABLE_PREFIX.PHPBB_USER_TABLE." ".
                   
"WHERE user_id = '$uid'";
        
$result db_query&#40;$sql, $UDB_DB_LINK_ID&#41;;
        
if&#40;!mysql_num_rows&#40;$result&#41;&#41; cpg_die&#40;ERROR, $lang_register_php['err_unk_user'&#93;, __FILE__, __LINE__&#41;;
        
        
$user_data mysql_fetch_array&#40;$result&#41;;
        
$user_data['group_name'&#93; = '';
        
mysql_free_result&#40;$result&#41;;

        
return $user_data;
&
#125;

// Edit user profile
function udb_edit_profile&#40;$uid&#41;
&#123;
        
$target 'profile.php?mode=editprofile';
        
udb_redirect&#40;$target&#41;;
&#125;

// Query used to list users
function udb_list_users_query&#40;&$user_count&#41;
&#123;
        
global $CONFIG$FORBIDDEN_SET;
        
        
$sql =  "SELECT &#40;category - ".FIRST_USER_CAT."&#41; as user_id,".
                        
"                '???' as user_name,".
                        
"                COUNT&#40;DISTINCT a.aid&#41; as alb_count,".
                        
"                COUNT&#40;DISTINCT pid&#41; as pic_count,".
                        
"                MAX&#40;pid&#41; as thumb_pid ".
                        
"FROM &#123;$CONFIG['TABLE_ALBUMS'&#93;&#125; AS a ".
                        
"INNER JOIN &#123;$CONFIG['TABLE_PICTURES'&#93;&#125; AS p ON p.aid = a.aid ".
                        
"WHERE approved = 'YES' AND category > ".FIRST_USER_CAT." ".
                        
"$FORBIDDEN_SET ".
                        
"GROUP BY category ".
                        
"ORDER BY category ";
        
$result db_query&#40;$sql&#41;;
        
        
$user_count mysql_num_rows&#40;$result&#41;;
        
        
return $result;
&
#125;

function udb_list_users_retrieve_data&#40;$result, $lower_limit, $count&#41;
&#123;
        
global $CONFIG$UDB_DB_NAME_PREFIX$UDB_DB_LINK_ID;
        
        
mysql_data_seek&#40;$result, $lower_limit&#41;;

        
$rowset = array&#40;&#41;;
        
$i=0;
        
$user_id_set='';
        
        while &
#40;&#40;$row = mysql_fetch_array&#40;$result&#41;&#41; && &#40;$i++ < $count&#41;&#41;&#123;
                
$user_id_set .= $row['user_id'&#93;.',';
                
$rowset[&#93; = $row;
        
&#125;
        
mysql_free_result&#40;$result&#41;;

        
$user_id_set '&#40;'.substr&#40;$user_id_set, 0, -1&#41;.'&#41;';
        
$sql "SELECT user_id, username as user_name ".
                   
"FROM ".$UDB_DB_NAME_PREFIX.PHPBB_TABLE_PREFIX.PHPBB_USER_TABLE." ".
                   
"WHERE user_id IN $user_id_set";
        
$result db_query&#40;$sql, $UDB_DB_LINK_ID&#41;;
        
while &#40;$row = mysql_fetch_array&#40;$result&#41;&#41;&#123;
                
$name[$row['user_id'&#93;&#93; = $row['user_name'&#93;;
        
&#125;
        
for&#40;$i=0; $i<count&#40;$rowset&#41;; $i++&#41;&#123;
                
$rowset[$i&#93;['user_name'&#93; = empty&#40;$name[$rowset[$i&#93;['user_id'&#93;&#93;&#41; ? '???' &#58; $name[$rowset[$i&#93;['user_id'&#93;&#93;;
        
&#125;
        
        
return $rowset;
&
#125;

// Group table synchronisation
function udb_synchronize_groups&#40;&#41;
&#123;
        
global $CONFIG$UDB_DB_NAME_PREFIX$UDB_DB_LINK_ID;

        
$PHPBB_groups = array&#40;
                
PHPBB_ADMIN_GROUP => 'Admin',
                
PHPBB_MEMBERS_GROUP => 'Members',
                
PHPBB_GUEST_GROUP => 'Guests',
                
PHPBB_BANNED_GROUP => 'Banned',
        &
#41;;
        
        
$sql =  "SELECT &#40;ug.group_id + 5&#41; as group_id, group_name ".
                        
"FROM ".$UDB_DB_NAME_PREFIX.PHPBB_TABLE_PREFIX.PHPBB_UGROUP_TABLE." as ug ".
                        
"LEFT JOIN ".$UDB_DB_NAME_PREFIX.PHPBB_TABLE_PREFIX.PHPBB_GROUP_TABLE." as g ON ug.group_id = g.group_id ".
                        
"WHERE user_pending=0 AND group_single_user=0";
        
$result db_query&#40;$sql, $UDB_DB_LINK_ID&#41;;
        
while &#40;$row = mysql_fetch_array&#40;$result&#41;&#41;&#123;
                
$PHPBB_groups[$row['group_id'&#93;&#93; = $row['group_name'&#93;;
        
&#125;
        
mysql_free_result&#40;$result&#41;;
        
        
$result=db_query&#40;"SELECT group_id, group_name FROM &#123;$CONFIG['TABLE_USERGROUPS'&#93;&#125; WHERE 1"&#41;;
        
while &#40;$row = mysql_fetch_array&#40;$result&#41;&#41;&#123;
                
$cpg_groups[$row['group_id'&#93;&#93; = $row['group_name'&#93;;
        
&#125;
        
mysql_free_result&#40;$result&#41;;
        
        // Scan Coppermine groups that need to be deleted
        
foreach&#40;$cpg_groups as $c_group_id => $c_group_name&#41;&#123;
                
if &#40;&#40;!isset&#40;$PHPBB_groups[$c_group_id&#93;&#41;&#41;&#41; &#123;
                           
db_query&#40;"DELETE FROM &#123;$CONFIG['TABLE_USERGROUPS'&#93;&#125; WHERE group_id = '".$c_group_id."' LIMIT 1"&#41;;
                        
unset&#40;$cpg_groups[$c_group_id&#93;&#41;;
                
&#125;
        
&#125;
        
        // Scan phpBB groups that need to be created inside Coppermine table
        
foreach&#40;$PHPBB_groups as $i_group_id => $i_group_name&#41;&#123;
                
if &#40;&#40;!isset&#40;$cpg_groups[$i_group_id&#93;&#41;&#41;&#41; &#123;
                        
db_query&#40;"INSERT INTO &#123;$CONFIG['TABLE_USERGROUPS'&#93;&#125; &#40;group_id, group_name&#41; VALUES &#40;'$i_group_id', '".addslashes&#40;$i_group_name&#41;."'&#41;"&#41;;
                        
$cpg_groups[$i_group_id&#93; = $i_group_name;
                
&#125;
        
&#125;
        
        // Update Group names
        
foreach&#40;$PHPBB_groups as $i_group_id => $i_group_name&#41;&#123;
                
if &#40;$cpg_groups[$i_group_id&#93; != $i_group_name&#41; &#123;
                        
db_query&#40;"UPDATE &#123;$CONFIG['TABLE_USERGROUPS'&#93;&#125; SET group_name = '".addslashes&#40;$i_group_name&#41;."' WHERE group_id = '$i_group_id' LIMIT 1"&#41;;
                
&#125;
        
&#125;
&#125;

// Retrieve the album list used in gallery admin mode
function udb_get_admin_album_list&#40;&#41;
&#123;
        
global $CONFIG$UDB_DB_NAME_PREFIX$UDB_DB_LINK_ID$FORBIDDEN_SET;

        if &
#40;UDB_CAN_JOIN_TABLES&#41; &#123;
                
$sql "SELECT aid, CONCAT&#40;'&#40;', username, '&#41; ', title&#41; AS title ".
                           
"FROM &#123;$CONFIG['TABLE_ALBUMS'&#93;&#125; AS a ".
                           
"INNER JOIN ".$UDB_DB_NAME_PREFIX.PHPBB_TABLE_PREFIX.PHPBB_USER_TABLE." AS u ON category = &#40;".FIRST_USER_CAT." + user_id&#41; ".
                           
"ORDER BY title";
                return 
$sql;
        &
#125; else &#123;
                
$sql "SELECT aid, IF&#40;category > ".FIRST_USER_CAT.", CONCAT&#40;'* ', title&#41;, CONCAT&#40;' ', title&#41;&#41; AS title ".
                           
"FROM &#123;$CONFIG['TABLE_ALBUMS'&#93;&#125; ".
                           
"ORDER BY title";
                return 
$sql;
        &
#125;
&#125;

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

// Define wheter we can join tables or not in SQL queries &#40;same host & same db or user&#41;
define&#40;'UDB_CAN_JOIN_TABLES', &#40;PHPBB_BD_HOST == $CONFIG['dbserver'&#93; && &#40;PHPBB_DB_NAME == $CONFIG['dbname'&#93; || PHPBB_DB_USERNAME == $CONFIG['dbuser'&#93;&#41;&#41;&#41;;
//define&#40;'UDB_CAN_JOIN_TABLES', false&#41;;

// Connect to phpBB database if necessary
$UDB_DB_LINK_ID 0;
$UDB_DB_NAME_PREFIX PHPBB_DB_NAME '`'.PHPBB_DB_NAME.'`.' &#58; '';
if &#40;!UDB_CAN_JOIN_TABLES&#41; &#123;
        
$UDB_DB_LINK_ID = @mysql_connect&#40;PHPBB_BD_HOST, PHPBB_DB_USERNAME, PHPBB_DB_PASSWORD&#41;;
        
if &#40;!$UDB_DB_LINK_ID&#41; die&#40;"<b>Coppermine critical error</b>&#58;<br />Unable to connect to phpBB Board database !<br /><br />MySQL said&#58; <b>".mysql_error&#40;&#41;."</b>"&#41;;
&#125;
?>

Logged
DaMysterious.

Titooy

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 736
    • under construction...
CPG 1.2/PhpBB2
« Reply #21 on: November 08, 2003, 03:05:52 pm »

OK I found out my error. I've set up the same cookie name for CPG and phpBB. Now that I've 2 different cookie names, everything works just fine.
Logged

reomac

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Login prob use with phpbb2
« Reply #22 on: November 19, 2003, 10:43:53 am »

uadmin/sers canot loging atomaticly after they login the phpbb2, if refresh once it may appears those options as if u have login. but if you click any link or refresh again they disapear. if you go back to the phpbb, your log in is still on. I did all the in the manaul for plug the cpg to phpbb, but there is some cookie problem i think.

anyone can help?
thanks in advance
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
CPG 1.2/PhpBB2
« Reply #23 on: November 19, 2003, 10:54:55 am »

this has been asked very often; I moved your posting into the thread containing the answer. Do not use the same cookie names for phpbb and coppermine.

GauGau
Logged

reomac

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
CPG 1.2/PhpBB2
« Reply #24 on: November 19, 2003, 12:17:44 pm »

ok
I have same groups in coppermine n' phpbb

cookie domain has a bit diffrent domain name, my phpbb cookie domain do not have 'www'

but it still do not work after i sync them.

check this

after i login in php bb
Quote

phpbb2_data
a%3A2%3A%7Bs%3A11%3A%22autologinid%22%3Bs%3A32%3A%225c729ddd145eddca44026be71903fc60%22%3Bs%3A6%3A%22userid%22%3Bs%3A1%3A%226%22%3B%7D
www.g-d-a.net/
1536
2741196288
29674847
715995088
29601422
*

after i go to coppermine
Quote

phpbb2_data
YToyOntzOjI6IklEIjtzOjMyOiJlYWEyYmM0YTMyZjkxOWVmM2I0NTU2NzZjM2EyYzQzYSI7czoyOiJhbSI7aToxO30%3D
www.g-d-a.net/
1024
1527273728
29607457
1663495088
29601422
*


session changed!
BTW i am using phpbb 2.0.4
Logged

reomac

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
CPG 1.2/PhpBB2
« Reply #25 on: November 19, 2003, 12:36:33 pm »

Hi, my stupid fault, forgot to update the cokkie name in bridge file.
Logged

pero

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
How to get redirected to CPG after login (from CPG)?
« Reply #26 on: November 21, 2003, 01:55:23 pm »

I (think) I have a fully working CPG/phpBB integration.
If I log in from CPG, I'm prompted with the phpBB login screen. After I pass username and password, I end up on the front page of phpBB, which is not what I would expect.

Is there some way so that I can get redirected to CPG if I log in from CPG (but not if I log in from phpBB)?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
CPG 1.2/PhpBB2
« Reply #27 on: November 21, 2003, 04:35:56 pm »

read the stickies and search the board :evil: !
This has been discussed in detail; I moved your posting to the thread that deals with this issue.

GauGau
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
CPG 1.2/PhpBB2
« Reply #28 on: November 24, 2003, 08:39:27 am »

[size=18]To solve the issue with the "phpBB login/logout not working properly with coppermine", please use the fix mentioned in phpBB integration: solution for login/logout issue

GauGau[/size]
Logged

Odin

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
CPG 1.2/PhpBB2
« Reply #29 on: January 10, 2004, 08:21:23 am »

snip...nevermind...got it working..
Logged
Webmaster@NMA

mgurry

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
CPG 1.2/PhpBB2
« Reply #30 on: January 16, 2004, 07:25:05 pm »

Gaugau, I had the login/logout issue with cp1.2 and phpbb2.0.6. But, I used the fix above and it fixed ALMOST everything. The problem now is that I get an "invalid_session" error on the phpbb login page when I attempt to logout of the gallery, rather than having it return me to another page.

If you would like a test account to see this problem, let me know.

http://DetMusic.com/gallery
Logged

mgurry

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Error on logout while using cp1.2 / phpbb2.0.6
« Reply #31 on: January 22, 2004, 08:18:03 pm »

I read the sticky for cp1.2/2.0.6 above, and even responded to it with my problem, but nobody has responded.

I originally had the login/logout issue described in the sticky, but followed the fix instructions and resolved it. However, the problem now is that I get an "invalid_session" error on the phpbb login page when I attempt to logout of the cp gallery, rather than having it return me to another page.

http://DetMusic.com/gallery
http://DetMusic.com/board

Thanks for any help that can be provided.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
CPG 1.2/PhpBB2
« Reply #32 on: January 23, 2004, 12:54:50 am »

...and as I won't let you get away with double-posting or cross-posting I moved your second standalone posting back to the thread where you posted the question the very first time.
If people don't answer to your question, there might be two reasons: they don't know the answer or they don't want to answer (your choice).
If you want to "clear your throat" and point out that you haven't received a reply to a question, you can reply to it with the words *bump*.
You may also want to have a look at http://coppermine.sourceforge.net/faq.php?q=lamesupport#lamesupport

GauGau
Logged

mgurry

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
CPG 1.2/PhpBB2
« Reply #33 on: January 23, 2004, 03:57:06 am »

Quote from: "gaugau"
...and as I won't let you get away with double-posting or cross-posting I moved your second standalone posting back to the thread where you posted the question the very first time.
If people don't answer to your question, there might be two reasons: they don't know the answer or they don't want to answer (your choice).
If you want to "clear your throat" and point out that you haven't received a reply to a question, you can reply to it with the words *bump*.
You may also want to have a look at http://coppermine.sourceforge.net/faq.php?q=lamesupport#lamesupport

GauGau


"Won't let you get away with..." - What's that all about? Let me "get away with"? I'm sorry, but this doesn't sound very professional. Perhaps I should use a different application.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
CPG 1.2/PhpBB2
« Reply #34 on: January 23, 2004, 09:05:37 am »

I'm not a professional, I'm a volunteer on this project. No reason in threatening not to use coppermine - there's no benefit for me if you use it or not...

You haven't really read my posting - it's up to me to decide if I support people or not, that's what I was going to say...

GauGau
Logged

mgurry

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
CPG 1.2/PhpBB2
« Reply #35 on: January 23, 2004, 09:24:26 pm »

Nobody threatened anything. I pointed out how unprofessional this is. It's obvious you don't care if anyone uses coppermine or not based on your professionalism. I'll just use an app that actually works with phpbb.

Thanks.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
CPG 1.2/PhpBB2
« Reply #36 on: January 24, 2004, 10:57:02 am »

oh yeah, I forgot: double-posting is considered to be highly professional! That's what the pros do all the time - some even make a living out of double posting on internet boards :lol: .

Go ahead and look for another app that works better for you, good luck!

GauGau
Logged

mgurry

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
CPG 1.2/PhpBB2
« Reply #37 on: February 20, 2004, 04:39:43 pm »

Thanks. Your attitude sucks. Have a nice day.
Logged

galaxyfantasy

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Invalid_session error
« Reply #38 on: March 02, 2004, 06:39:20 am »

I have been working on this one project for some time now and for some reason still can't seem to figure it out. I am hoping that someone might know what is going on.

I have followed all the bridge instructions from cpg to phpbb. Everthing is running great as far as when someone logs in and as well as when someone registers new. However when someone tries to log out. It say this

General Error

Invalid_session

I am not sure why this is happing. I have spent to many hours just on this one simple thing.

Can anyone tell me what seems to be going on.

my gallery is located at http://galaxyfantasy.com/photogallery/

my phpbb2 is located at http://galaxyfantasy.com/phpBB2/
Logged

osfdeath

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
CPG 1.2/PhpBB2
« Reply #39 on: March 09, 2004, 03:56:04 am »

Hello - terrific system you have here :)

Having 2 small problems

1.  Full integration with phpbb worked great but for some reason coppermine won't remember login details and requires login every time
(session or cookie? - how do i know and fix this?)

2.  Looking through  the index.html docs and it shows the catagory settings with PERMISSIONS being
 Album can be viewed by [Everybody (public album)]
After phpbb integration I no longer have that for some reason.
I have the other three options
Visitors can upload pictures  [Yes]
Visitors can post comments  [Yes]
Visitors can rate pictures      [Yes]

Ideas?
Logged
Pages: 1 [2] 3 4   Go Up
 

Page created in 0.033 seconds with 18 queries.