Got Gallery 1.3.2/phpNuke6.0 and Random block working WITHOU
dmolavi
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&file=article&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 ). |
|
Posts: 19
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 .= "&id=" .$id;
$url .= "&op=modload&name=gallery&file=index&include=view_photo.php";
echo ""
."<a href="$url">"
.$album->getThumbnailTag($index)
."</a>";
Posts: 573
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 -->
Posts: 19
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.
Posts: 573
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)
Posts: 33
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 ?
Posts: 573
on that line (and one more line below it), change the HTTP_SESSION_VARS to _SESSION.
Posts: 33
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 ?
Posts: 573
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.)
Posts: 573
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.)
Posts: 33
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 ?
Posts: 573
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.
Posts: 8
i get this error when i clcik on a picture in the block, goto my site to see for urself :sad:
can you help ? :sad:
Posts: 8
Oops double post..ignore this!
Posts: 8
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 -->
Posts: 573
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.
Posts: 8
is it because the gallery module + the actual random block are both trying to call it
Posts: 573
interesting...i'm not having that problem. how did you come to the conclusion that both modules are calling it?
Posts: 794
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&name=phpBB_14&file=index&action=viewtopic&topic=1430&10" TARGET="_blank">Latest Gallery Additions block</A><!-- BBCode End -->
Posts: 8
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
Posts: 8
i guess the error in the project and also the solution can be applied to this one?
Posts: 8
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:
Posts: 8
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
Posts: 573
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.
Posts: 3
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
Posts: 12
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.
Posts: 573
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.
Posts: 573
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.