Got Gallery 1.3.2/phpNuke6.0 and Random block working WITHOU

dmolavi
dmolavi's picture

Joined: 2002-12-05
Posts: 573
Posted: Fri, 2002-12-06 18:57

To save everyone from reading this whole thread, I've updated the initial posting:

Go <!-- BBCode Start --><A HREF="http://www.yankeesinthesouth.org/modules.php?name=News&amp;file=article&amp;sid=8" TARGET="_blank">here</A><!-- BBCode End --> for how to get Gallery 1.3.3/phpNuke 6.0/random block to work and have the clicked image (and album name) open in the nuke context.

It works perfectly :smile: ( http://www.yankeesinthesouth.org ).
By the way, if anyone is artistically inclined, and would like to create a nice logo for the site, please feel free. Credit will be given (copyright and name in the footer).

 
baloo
baloo's picture

Joined: 2002-09-09
Posts: 19
Posted: Sat, 2002-12-07 06:15

Hi,

I'm getting the following errors:

Parse error: parse error, expecting `','' or `';'' in /home/myurl/www/www/modules/gallery/block-random.php on line 83

I am obviously missing the obvious somewhere. Any pointers would be much appreciated. If it does end up being something really stupid, feel free to call me names :smile:

Here is my modified code:

if (isset($index)) {
$id = $album->getPhotoId($index);
$url = "http://www.myurl.net/";
$url .= "modules.php?set_albumName=".$album->fields["name"];
$url .= "&amp;id=" .$id;
$url .= "&amp;op=modload&amp;name=gallery&amp;file=index&amp;include=view_photo.php";
echo ""
."<a href="$url">"
.$album->getThumbnailTag($index)
."</a>";

 
dmolavi
dmolavi's picture

Joined: 2002-12-05
Posts: 573
Posted: Sat, 2002-12-07 12:48

I apologise.
The following was INCORRECT in my original post (it appears the the forum software strips out backslashes from code text):
<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE>."<a href="$url">"</TD></TR></TABLE><!-- BBCode End -->

You can grab my block-random.php file from <!-- BBCode Start --><A HREF="http://www.prism.gatech.edu/~dm168/block-random.php.gz" TARGET="_blank">here</A><!-- BBCode End -->

 
baloo
baloo's picture

Joined: 2002-09-09
Posts: 19
Posted: Sat, 2002-12-07 15:05

ok, made the corrections.

Now another error:

Fatal error: Failed opening required 'errors/configure_instructions.php' (include_path='.:/usr/local/lib/php') in /home/myrul/www/www/modules/gallery/errors/reconfigure.php on line 10

I have updated this book to 1.3.2 and converted all the albums. I also deleted the Cahe but that didn't help either.

 
dmolavi
dmolavi's picture

Joined: 2002-12-05
Posts: 573
Posted: Sat, 2002-12-07 15:31

hmmm..never got that error. you might want to add some debug echo statements to see if the directories are properly configured, etc. it's probably the GALLERY_BASEDIR value that's incorrect. try hardcoding it (similarly to the block-random.php file, and remember the trailing slash)

 
flasher

Joined: 2002-11-13
Posts: 33
Posted: Sat, 2002-12-07 23:43
Quote:
Warning: Invalid argument supplied for foreach() in /var/www/inflightpictures.com/html/modules/gallery/session.php on line 55

Here is the msg I got above the working pictures ...

Dmolavi, I saw a msg of you, that you had exactly the same error, how did you fix it ?
And that s all ...

Whats wrong ?

 
dmolavi
dmolavi's picture

Joined: 2002-12-05
Posts: 573
Posted: Sun, 2002-12-08 03:31

on that line (and one more line below it), change the HTTP_SESSION_VARS to _SESSION.

 
flasher

Joined: 2002-11-13
Posts: 33
Posted: Sun, 2002-12-08 14:29

All is working great now, thanks, but there is bug left, how to have the gallery to open inside PHPNuke like the random picture instead of the full screen gallery when you clic on the link bellow the random picture ?

 
dmolavi
dmolavi's picture

Joined: 2002-12-05
Posts: 573
Posted: Sun, 2002-12-08 18:44

ok...go <!-- BBCode Start --><A HREF="http://www.prism.gatech.edu/~dm168/block-random.php.html" TARGET="_blank">here</A><!-- BBCode End --> for complete instructions for phpNuke 6.0/Gallery 1.3.2/random-block (including opening pic in nuke and not a new page.)

 
dmolavi
dmolavi's picture

Joined: 2002-12-05
Posts: 573
Posted: Sun, 2002-12-08 18:44

ok...go <!-- BBCode Start --><A HREF="http://www.prism.gatech.edu/~dm168/block-random.php.html" TARGET="_blank">here</A><!-- BBCode End --> for complete instructions for phpNuke 6.0/Gallery 1.3.2/random-block (including opening pic in nuke and not a new page.)

 
flasher

Joined: 2002-11-13
Posts: 33
Posted: Mon, 2002-12-09 10:32

I've found your link and explanation about the random block, so far the clicked picture open in nuke, but what I would like to get is the link of the album from where the picture was taken, shown just below the picture, to open in nuke, and not in a new windows as it is on your site now.

Do you see ?

 
dmolavi
dmolavi's picture

Joined: 2002-12-05
Posts: 573
Posted: Tue, 2002-12-10 13:40

check out the revised code <!-- BBCode Start --><A HREF="http://www.prism.gatech.edu/~dm168/block-random.php.html" TARGET="_blank">here</A><!-- BBCode End -->. Note the addition of some extra code around the caption lines.

 
DC_Xtreme

Joined: 2002-12-10
Posts: 8
Posted: Tue, 2002-12-10 16:28

i get this error when i clcik on a picture in the block, goto my site to see for urself :sad:

Quote:
Fatal error: Cannot redeclare fs_copy() (previously declared in /usr/home/roberts/public_html/modules/gallery/platform/fs_unix.php:22) in /usr/home/roberts/public_html/modules/gallery/platform/fs_unix.php on line 22

can you help ? :sad:

 
DC_Xtreme

Joined: 2002-12-10
Posts: 8
Posted: Tue, 2002-12-10 16:35

Oops double post..ignore this!

 
DC_Xtreme

Joined: 2002-12-10
Posts: 8
Posted: Tue, 2002-12-10 16:36

by the way the revised code you posted contained a parse error..u need a ";" after the album url bit

<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE> change

$albumURL = "http://www.thecribv3.co.uk/"

$albumURL = "http://www.thecribv3.co.uk/";
</TD></TR></TABLE><!-- BBCode End -->

 
dmolavi
dmolavi's picture

Joined: 2002-12-05
Posts: 573
Posted: Tue, 2002-12-10 18:24
Quote:
i get this error when i clcik on a picture in the block, goto my site to see for urself :sad:

>>Fatal error: Cannot redeclare fs_copy() (previously declared in /usr/home/roberts/public_html/modules/gallery/platform/fs_unix.php:22) in /usr/home/roberts/public_html/modules/gallery/platform/fs_unix.php on line 22 <<

can you help ? :sad:

Sorry...unless you have two instances of fs_copy() in that file, i don't know what the problem might be. try "cat * | grep fs_copy" at the command prompt and see if you get any results that indicate multiple declarations.

 
DC_Xtreme

Joined: 2002-12-10
Posts: 8
Posted: Tue, 2002-12-10 19:24

is it because the gallery module + the actual random block are both trying to call it

 
dmolavi
dmolavi's picture

Joined: 2002-12-05
Posts: 573
Posted: Tue, 2002-12-10 20:09

interesting...i'm not having that problem. how did you come to the conclusion that both modules are calling it?

 
Warren
Warren's picture

Joined: 2002-07-24
Posts: 794
Posted: Tue, 2002-12-10 20:38
Quote:
is it because the gallery module + the actual random block are both trying to call it

In a bit of unrelated, I use the Random_Block and also the Gallery_New block. I was sort of the alpha tester for Gallery_New and yes the two blocks clashed with this error or similar. See this thread: <!-- BBCode Start --><A HREF="http://gallery.menalto.com/modules.php?op=modload&amp;name=phpBB_14&amp;file=index&amp;action=viewtopic&amp;topic=1430&amp;10" TARGET="_blank">Latest Gallery Additions block</A><!-- BBCode End -->

 
DC_Xtreme

Joined: 2002-12-10
Posts: 8
Posted: Tue, 2002-12-10 21:04

i did some searching on the error message, i found someone who was having that problems when they had 2 galleries on the server..i know for a fact i only have one, but what iam thinking is that maybe they are both calling the same thing, as if i remove the random block the gallery works fine

 
DC_Xtreme

Joined: 2002-12-10
Posts: 8
Posted: Tue, 2002-12-10 21:12
Quote:
--------------------------------------------------------------------------------

This also causes another error with my existing random block:
>>Fatal error: Cannot redeclare fs_copy() in /home/warren/public_html/newG1/gallery/platform/fs_unix.php on line 22<<
For testing purposes, I deactivated the existing random block and I still get the foreach() error.

--------------------------------------------------------------------------------

This would happen if Random Block is processed _after_ the New Photos block. The reason is that the code in older versions of Random Block wasn't playing nice and was trying to "include" a file even though it was already included by my block

i guess the error in the project and also the solution can be applied to this one?

 
DC_Xtreme

Joined: 2002-12-10
Posts: 8
Posted: Tue, 2002-12-10 22:30

omg fixed that error, changed:
<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE> $GALLERY_BASEDIR = "/usr/home/roberts/public_html/modules/gallery/";
require_once($GALLERY_BASEDIR . "init.php"); </TD></TR></TABLE><!-- BBCode End -->

to

<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE>
$GALLERY_BASEDIR = "/usr/home/roberts/public_html/modules/gallery/";
require_once($GALLERY_BASEDIR . "init.php");
global $GALLERY_NO_SESSIONS;
$GALLERY_NO_SESSIONS = true; </TD></TR></TABLE><!-- BBCode End -->

and that got rid of the error i complained of, now i get

<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE> Warning: fopen("/block-random.cache", "w") - Permission denied in /usr/home/roberts/public_html/modules/gallery/platform/fs_unix.php on line 53
</TD></TR></TABLE><!-- BBCode End -->

i will investigate :smile:

 
DC_Xtreme

Joined: 2002-12-10
Posts: 8
Posted: Wed, 2002-12-11 00:13

ok i fixed that error too, well to a degree..its just a feedback error and doesnt effect the running of gallery or random block, so i echo'd out all error feeback in fs_unix.php by adding an at on the second line of each fnction call, after return

function fs_file_exists($filename) {
return file_exists($filename);

function fs_file_exists($filename) {
return @file_exists($filename);

do this for all if u have the same problem i did

 
dmolavi
dmolavi's picture

Joined: 2002-12-05
Posts: 573
Posted: Wed, 2002-12-11 11:40
Quote:
and that got rid of the error i complained of, now i get

<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE> Warning: fopen("/block-random.cache", "w") - Permission denied in /usr/home/roberts/public_html/modules/gallery/platform/fs_unix.php on line 53
</TD></TR></TABLE><!-- BBCode End -->

you probably just need to chmod / chown the directory with the cache file to allow the user that the webserver runs at to have write permissions.

 
Christoph

Joined: 2002-11-14
Posts: 3
Posted: Fri, 2002-12-13 21:13

Thanks for your guide :smile: I think I found a small mistake in your guide.

Your block-random.php starts with:
---
<
/*
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2001 Bharat Mediratta
---

I think it is supposed to look like this, or? Otherwise it won't work...
---
<?php
/*
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2001 Bharat Mediratta
---

Another small thing is that it took a while till i realized, that if got to replace
$HTTP_SESSION_VARS with $_SESSION. Perhaps you can point this out.

Thanks for your work!

CU
Christoph

 
gabi

Joined: 2002-11-22
Posts: 12
Posted: Fri, 2002-12-13 23:30
Quote:
check out the revised code <!-- BBCode Start --><A HREF="http://www.prism.gatech.edu/~dm168/block-random.php.html" TARGET="_blank">here</A><!-- BBCode End -->. Note the addition of some extra code around the caption lines.

Hi...
I tried the revised code to fix that caption link to open gallery in nuke, but it's still not fixed.
What do I have to add for the caption to point to the same url as the thumbnail?

thanks a lot,
gabi.

 
dmolavi
dmolavi's picture

Joined: 2002-12-05
Posts: 573
Posted: Mon, 2002-12-16 11:43

when i get into work today, i'll zip up the two php files that i have and make them available for download, so that you can see exactly what i have where.

 
dmolavi
dmolavi's picture

Joined: 2002-12-05
Posts: 573
Posted: Mon, 2002-12-16 13:39

Ok...go <!-- BBCode Start --><A HREF="http://www.prism.gatech.edu/~dm168/block-random.php.html" TARGET="_blank">here</A><!-- BBCode End --> for the explanation of what I did, and download the code in a tarball from <!-- BBCode Start --><A HREF="http://www.prism.gatech.edu/~dm168/block-random.tar" TARGET="_blank">here</A><!-- BBCode End -->. This tarball comes directly from my installation. You will have to change appropriate variables as explained in the first link. The code, as it is provided, works to open both the clicked picture and it's album link in the nuke context.