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]   Go Down

Author Topic: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery  (Read 54771 times)

0 Members and 1 Guest are viewing this topic.

zorbas2

  • Coppermine novice
  • *
  • Country: gr
  • Offline Offline
  • Gender: Male
  • Posts: 43
  • not bridged yet :(
    • Zorbas Travel Stoupa - Greece
Re: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery
« Reply #20 on: February 15, 2015, 08:19:05 pm »

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??
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery
« Reply #21 on: February 15, 2015, 08:25:01 pm »

But what about the redirecting back from phpbb after logging in??

Phill already told you twice what to do!
Logged

zorbas2

  • Coppermine novice
  • *
  • Country: gr
  • Offline Offline
  • Gender: Male
  • Posts: 43
  • not bridged yet :(
    • Zorbas Travel Stoupa - Greece
Re: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery
« Reply #22 on: February 15, 2015, 08:30:17 pm »

I started a thread in the phpbb forums, but no luck yet...
https://www.phpbb.com/community/viewtopic.php?f=496&t=2297011&p=13955291#p13954221
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me

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
Code: [Select]
                'location' => 'user_from', // name of 'location' field in users table
                'website' => 'user_website', // name of 'website' field in users table
with
Code: [Select]
                '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.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery
« Reply #24 on: February 15, 2015, 10:58:19 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.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

zorbas2

  • Coppermine novice
  • *
  • Country: gr
  • Offline Offline
  • Gender: Male
  • Posts: 43
  • not bridged yet :(
    • Zorbas Travel Stoupa - Greece
Re: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery
« Reply #25 on: February 16, 2015, 08:08:13 am »

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?
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery
« Reply #26 on: February 16, 2015, 01:12:15 pm »

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.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

zorbas2

  • Coppermine novice
  • *
  • Country: gr
  • Offline Offline
  • Gender: Male
  • Posts: 43
  • not bridged yet :(
    • Zorbas Travel Stoupa - Greece
Re: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery
« Reply #27 on: February 16, 2015, 04:15:59 pm »

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...
Logged

zorbas2

  • Coppermine novice
  • *
  • Country: gr
  • Offline Offline
  • Gender: Male
  • Posts: 43
  • not bridged yet :(
    • Zorbas Travel Stoupa - Greece
Re: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery
« Reply #28 on: February 16, 2015, 05:20:32 pm »

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

Quote
Create a file in your phpBB root directory named cpg_redir.php
Content:
Code: [Select]
<?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??
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery
« Reply #29 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.
Logged

zorbas2

  • Coppermine novice
  • *
  • Country: gr
  • Offline Offline
  • Gender: Male
  • Posts: 43
  • not bridged yet :(
    • Zorbas Travel Stoupa - Greece
Re: Re: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery
« Reply #30 on: February 16, 2015, 07:38:47 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...
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery
« Reply #31 on: February 16, 2015, 09:18:18 pm »

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

zorbas2

  • Coppermine novice
  • *
  • Country: gr
  • Offline Offline
  • Gender: Male
  • Posts: 43
  • not bridged yet :(
    • Zorbas Travel Stoupa - Greece
Re: cpg1.5.34 bridged with phpbb 3.1.3 but after login no access to gallery
« Reply #32 on: February 17, 2015, 03:46:45 pm »

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

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

My redirect.php:
Code: [Select]
<?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:
Code: [Select]
.
.
.

        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);
        }
.
.
.
Logged
Pages: 1 [2]   Go Up
 

Page created in 0.022 seconds with 20 queries.