Posted on: 01/07/05 01:19pm
By: congleal
1. Gallery2 is installed and functioning (C:geeklogpublic_htmlgallery2). Its data base was created in a separate directory, which was recommeded. (C:g2data)
2. GeeklogGalleryRandomPhoto_v1.2 - Seems pretty simple with only 3 files to install but I haven't been able to successfully install this plugin.
3. When I encounter errors I attempt to look at the path statements and make corrections accordingly. Ex:Fatal error: Call to undefined function: fs_file_exists() in C:geeklog-1.3.11rc1systemlib-custom.php on line 413.
4. My question at this point is am I suppose to create a file named "block-random.cache" in accordance with Step 3 of the instructions?
"Step 3
Modify your /system/lib-custom.php file
Insert the function from the provided file phpblock_GalleryRemotePhoto.php
IMPORTANT: Modify the settings in the function to setup your site paths
$GALLERY_BASEDIR = "/path/to/gallery/";
define(CACHE_FILE, "/path/to/gallery/block-random.cache");
NOTE: Its advised that your CACHE_FILE directory differ from your $GALLERY_BASEDIR to avoid the "Warning: Invalid argument supplied for foreach()" error."
Thanks
Random Photo Install
Posted on: 01/07/05 05:42pm
By: Dirk
Hmm, Gallery 2? I may be wrong, but isn't that block made for Gallery 1.4?
bye, Dirk
Random Photo Install
Posted on: 01/07/05 07:29pm
By: Anonymous (congleal)
Thanks
Random Photo Install
Posted on: 03/15/05 03:43pm
By: Anonymous (Andr0id)
I had major issues with the Random Photo block code. My solution was to redo it from scratch. I was able to solve the problem buy creating a function in the lib-custom.php as follows:
function phpblock_RandomPhoto() {
$buffer=file_get_contents("http://www.domain.name/gallery/block-random.php");
return $buffer;
}
and then adding the phpblock_RandomPhoto function in the new block, and that was all I had to do. No file uploads, nor path problems or anything. It might not be the best way but it lets block-random.php provided by the gallery install to do all the work.
Hope it helps...
www.andr0id.com
Random Photo Install
Posted on: 03/21/05 12:55pm
By: Anonymous (jamgill)
Wow! That's a sweet, sweet solution. Good call on letting the existing gallery code do the work. This could be considered a hack, no?
Thank you.
Random Photo Install
Posted on: 05/28/05 11:02am
By: zewt
And if you are actually using Gallery2, then this will work.
function phpblock_RandomPhoto() {
$buffer=file_get_contents("http://www.domain.name/gallery/main.php?g2_view=imageblock:External&g2_blocks=randomImage&g2_show=title");
return $buffer;
}
The "main" and "g2" may change depending on your install.
Random Photo Install
Posted on: 07/30/05 12:19am
By: Anonymous (merknz)
[QUOTE BY= zewt] And if you are actually using Gallery2, then this will work.
function phpblock_RandomPhoto() {
$buffer=file_get_contents("http://www.domain.name/gallery/main.php?g2_view=imageblock:External&g2_blocks=randomImage&g2_show=title");
return $buffer;
}
[/QUOTE]
That works a treat, much better then the @readfile suggested in the external block command.
Random Photo Install
Posted on: 07/30/05 04:08am
By: surgeon
nevermind... (Can i delete this post? )