Gallery and phpBB2 problem

djb_rh

Joined: 2003-01-28
Posts: 15
Posted: Thu, 2005-09-29 20:42

So, I had Gallery 1.4.4something working with phpBB2.0.11. Upgraded phpBB to 2.0.17 and upgraded Gallery to 1.5.1. As near as I can tell I have all the mods done to phpBB2 to make Gallery embed properly. I had it working fine before. One thing I had to do was change this line in modules.php:

include(MODULES_PATH."$name/$file.$phpEx");

to this:

include(MODULES_PATH."gallery/index.php");

I reported this in a thread several months ago, but nobody had a reason why this was required. If I don't make this change, all I get is a blank white page when I click to go to my gallery.

You can see what's wrong currently by going to:

http://forums.donniebarnes.com

You don't need to login. Click "Gallery" in the navigation links at the top. You now see my public albums listed. Great so far, but now click and album. Bam, error.

If you go to:

http://gallery.donniebarnes.com

Things work fine. Yes, I'm using two virtual hosts, but everything is physically on the same server. For some reason Gallery seems to be putting the "gallery.donniebarnes.com" in the URL in the embedded gallery when it *should* be "forums.donniebarnes.com". This DEFINITELY worked on the previous installation.

Basically, I want gallery.donniebarnes.com to work standalone and I also want Gallery to embed properly in phpBB2. I've dug and dug through code today for two hours and don't see what's wrong, but I'm betting it's some setting somewhere I'm just overlooking. Help?

--Donnie

 
djb_rh

Joined: 2003-01-28
Posts: 15
Posted: Thu, 2005-09-29 21:27

Damn, ignore the "include" changes above. I put that stuff back and it *that* part works.

That said, I still have the same fundamental problem. Links in my albums should be to forums.donniebarnes.com/blah/blah and instead they are to gallery.donniebarnes.com/blah/blah.

Help!

--Donnie

 
djb_rh

Joined: 2003-01-28
Posts: 15
Posted: Thu, 2005-09-29 21:46

Lamest hack ever to make it work:

+++ url.php 2005-09-29 17:40:43.213404848 -0400
@@ -104,6 +104,7 @@
if( isset($GALLERY_EMBEDDED_INSIDE) && !$isSetupUrl && where_i_am() != 'config') {
switch ($GALLERY_EMBEDDED_INSIDE_TYPE) {
case 'phpBB2':
+ $urlprefix = 'http://forums.donniebarnes.com';
$cookiename = $board_config['cookie_name'];
if(!isset($_COOKIE[$cookiename . '_sid'])) {
// no cookie so we need to pass the session ID manually.

url.php is in lib in the gallery install. Looking at that code (and I know next to nothing about PHP), it doesn't seem to me that there is any attempt to "do the right thing" as far as virtual hosts are concerned. It appears to just use the gallery config information for the URL rather than where gallery is currently embedded. This file looks dramatically different than the lib/url.php that was in gallery 1.4.4, which appears to be the source of my amusement.

--Donnie