cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery - Page 2 cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery - Page 2
 

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

Main Menu

cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery

Started by zorbas2, February 09, 2015, 04:20:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

zorbas2

Can someone beat me please??  :o
ecards went again in the spam folder. With bridge enabled and without...  :-[
But what about the redirecting back from phpbb after logging in??

Αndré

Quote from: zorbas2 on February 15, 2015, 08:19:05 PM
But what about the redirecting back from phpbb after logging in??

Phill already told you twice what to do!

zorbas2


phill104

Quote from: Αndré on February 14, 2015, 08:33:03 PM
The current code in udb_base.inc.php doesn't support joining other tables. But as neither user_location nor user_website is used anywhere in the rest of the Coppermine code (at least I haven't found a direct access to it), we can simply replace
                'location' => 'user_from', // name of 'location' field in users table
                'website' => 'user_website', // name of 'website' field in users table

with
                'location' => "''", // name of 'location' field in users table
                'website' => "''", // name of 'website' field in users table


This should fix the error message when bridged to phpBB 3.1 and should also work with phpBB 3.0. If somebody can verify that it works for both, I'll update the bridge file accordingly.

All seems to work fine for me in both versions.
It is a mistake to think you can solve any major problems just with potatoes.

phill104

Quote from: zorbas2 on February 15, 2015, 08:19:05 PM
ecards went again in the spam folder. With bridge enabled and without...  :-[
That will be a setting on your mail client. Nothing we can do to help with that.
It is a mistake to think you can solve any major problems just with potatoes.

zorbas2

Thanks Phill for checking this out.
Of course the fact that the ecards went into my spam folder was my or the mail client fault...
So the adjusted phpbb3.inc.php by Andé works fine now!  :D

However, I don't understand why the login/logout redirects were working with your local fresh installs of both, cpg 1.5.34 and phpBB 3.1.3
Both, cpg and phpbb are updated versions and not fresh installs on my server.
Do you think it would be a good idea to do a fresh install of both to get this bl&*!dy redirect working?

phill104

No, the redirects do not work on my install unless I modify files on phpBB. As I am only testing there is no need for me to go down the route of learning the edits to phpBB. They are documented on the phpBB site, at least they were for older versions and probably on these forums too. Hopefully someone from phpBB will respond on their forums.
It is a mistake to think you can solve any major problems just with potatoes.

zorbas2

Ok! That explais a lot.
So I am going on to chase the subject on phpbb forums.
In case I find a solution, I will post it to this thread...

zorbas2

Just found the following on the German phpBB board for older versions:

QuoteCreate a file in your phpBB root directory named cpg_redir.php
Content:
<?php
if (!$_SERVER['HTTP_HOST']) {
  
$cpg_host=$HTTP_SERVER_VARS['HTTP_HOST'];
} else {
  
$cpg_host=$_SERVER['HTTP_HOST'];
}
$cpg_path='/gallery';
header("Location: http://".$cpg_host.$cpg_path);
exit;
?>
Could that still do the trick??

Αndré

Please unterstand that we're not the phpBB support. Either test it yourself or ask the phpBB team/community.

zorbas2

Quote from: Αndré on February 16, 2015, 05:40:48 PM
Please unterstand that we're not the phpBB support. Either test it yourself or ask the phpBB team/community.

I completely understand that. I do not really await support from you directly, just thought that there may be other users of coppermine with the same problem. And solving problems is for the benefit of everyone - isn't it?
However, I think that Coppermine - a great and popular program, which I use for many years now - should also have at least some interest that bridges to other popular community scripts work and like this make both even more interesting...

Αndré

Made phpBB 3 bridge compatible with phpBB version 3.1.x in SVN revision 8772.

zorbas2

I made it!!  8)
Redirects working perfectly...

I created a file 'redirect.php' for the phpBB root folder:

My redirect.php:
<?php
define
('IN_PHPBB'true);
$phpbb_root_path './';
$phpEx substr(strrchr(__FILE__'.'), 1);
include(
$phpbb_root_path 'common.' $phpEx);

$redirect_target '../CoppermineFolder';    /* Path to Coppermine!  */

$user->session_begin(); 
$auth->acl($user->data);

if(!
$user->data['is_registered'])
{
login_box($redirect_target);
}
else if (
$user->data['user_id'] != ANONYMOUS && $request->is_set('sid') && $request->variable('sid''') === $user->session_id)
        {
            
$user->session_kill();
        }

redirect($redirect_target);


And changed the following part in phpbb3.inc.php:
.
.
.

        function login_page()
        {
            global $CONFIG;

            $redirect = urlencode($CONFIG['site_url']);
            $this->redirect("/redirect.php");
        }

        function logout_page()
        {
            global $CONFIG;

            $redirect = urlencode($CONFIG['site_url']);
            $this->redirect("/redirect.php?mode=logout&redirect=$redirect&sid=" . $this->session_id);
        }
.
.
.