Posted on: 06/04/05 06:47am
By: ofey
Hi,
I have installed GeeklogGalleryRandomPhoto_v1.2 with GL (1.3.11) and I already use Gallery v1.5-RC2.
The random Photo block is working, but there is an error. Images in the 'Random Photo Block' sometimes have no caption. Such images when clicked on produce the error:
Fatal error: Call to a member function on a non-object in /hsphere/local/home/fjryanio/trojanswimclub.ie/gallery/classes/AlbumItem.php on line 453
People have posted similar issues but I can't find any solutions.
Any help would be greatly appreciated.
Regards,
Shane
My GL site
here[*1]
GalleryRandomPhoto error
Posted on: 06/07/05 06:47am
By: ofey
Anyone got any ideas, or am I just annoying people?
GalleryRandomPhoto error
Posted on: 06/07/05 11:51am
By: ppmnt
That happens when the random photo that it picked is actually the highlight of an album, so there is no corresponding large photo for it. I don't remember the fix for this right now, but you can search for this on the gallery forums too.
I'll see if I can find it in my email later on.
GalleryRandomPhoto error
Posted on: 06/08/05 01:01am
By: ppmnt
Hi -
With my new web site I made it easie on me: In lib-custom add the following function:
/* -----------------------
BEGIN RANDOM PHOTO
----------------------- */
function phpblock_randomphoto () {
@include '/path/to/gallery/block-random.php' ;
return $retval;
}
And inside block-random.php (now comes with gallery):
Change
require(dirname(__FILE__) . "/init.php");
to:
require_once(dirname(__FILE__) . "/init.php");
Then change all occurances of "echo" and "print" with "$retval .=", then return $retval at the end.
OK, that may look complicated, but it's not. Just make a backup copy of block-random.php. This way your using gallery's latest update, and the bug is fixed.
GalleryRandomPhoto error
Posted on: 06/08/05 03:23am
By: ofey
Thanks for your help ppmnt,
I have one problem. I find five occurences of block-random.php in my directory.
geeklog/plugins/GeeklogGalleryRandomPhoto_v1.2/block-random.php
geeklog/plugins/gallery/block-random.php
trojanswimclub.ie/admin/plugins/gallery/block-random.php
trojanswimclub.ie/block-random.php
trojanswimclub.ie/gallery/block-random.php
Which one should I be working with?
Regards,
Shane
GalleryRandomPhoto error
Posted on: 06/08/05 01:10pm
By: ppmnt
Did you use some kind of special gallery/geeklog integration? Unfortunately I'm not familiar with that. I simply install gallery into my /public_html/gallery directory and tell it it's integrated into Geeklog. This means you don't have the admin functionality under Geeklogs Admin page, but I've never missed that.
Try comparing all the block-random.php files. Are they all the same? What are the time stamps? You must have some of those from previous installations. Which is your document_root?
If your document root is trojanswimclub.ie then the file would be trojanswimclub.ie/gallery/block-random.php. But in general, just make sure you have the latest version of block-random.php, then make your changes to that and include that one in the function. It really doesn't matter where it is.
GalleryRandomPhoto error
Posted on: 06/08/05 04:28pm
By: ofey
The files,
trojanswimclub.ie/admin/plugins/gallery/block-random.php
and
trojanswimclub.ie/gallery/block-random.php
are the same. When I made the changes you suggested to
trojanswimclub.ie/gallery/block-random.php
I saw no change to the site. The same error which as you said only occurs with highlighted photos.
I don't think Dirk would be too happy with me using up GL space with code so I put the five files
here[*2] .
Did you use some kind of special gallery/geeklog integration?
Not as far as I know. My specifications above are as much as I know.
I have installed GeeklogGalleryRandomPhoto_v1.2 with GL (1.3.11) and I already use Gallery v1.5-RC2.
I had a few problems with the gallery installation I probably copied the file around a few times. So that might explain why the file is repeated.
Thanks for your help so far.
Shane