Hi There,
Anyone tried to use this plugin? I've been trying to use it, and even with a stock installation of zenphoto 1.3.1.1 (which is the version this was designed for), it doesn't work. When enabled, it blocks all pictures from being shown (not just the unpublished).
I'm trying to figure out since it's unsupported, but any help or clues are appreciated
Comments
$imageObj->exists = $imageObj->getShow();
If I comment this out, I can see all the images, but that defeats the purpose of the script. So probably need to make a change to this line, still trying to figure out what is wrong.
Sbillard, this info is very much appreciated, I was trying to figure out where the 'show' value comes from, now I know
For some strange reason, show is always returning the same value, no matter what photo I try to display. I will check further in the database and also see if I can somehow trace the workflow.
I thought maybe it was taking the value of one photo that is unpublished, but even setting all photos as visible has no effect.
yes, with admin I can see all fine, just logged out doesn't work for all photos
I reinstalled everything from scratch (1.4 and latest nightly build), didn't change any stock settings (except enabled the no_show), but no luck.
I got a warning during install about magic_quotes_gpc, maybe that's the culprit. Talking to my host now to get that fixed, let's see if that's the reason
Perhaps you shoud dump the $imageObj variable as a debugging tool to see if a) show is indeed true when it should not be and b) that the function is being called with the correct image object.
[edit] dump the variable after that statement so we also see the results of the statement.
http://carlosfelicio.com/teste/schoolhouse5.gif.php
Any ideas on how to get the values from images instead of album? I tried to disable the album filter (and just keep image filter), but it still catches the album values.
The dump does indicate that the "show" value is 1 for this image. (The dump is indeed of the image.) I am not sure what you mean that the values are all coming from the album, though. How do you determine that?
Basically what I did, inside of no_show.php, I added var_dump($imageobj) to the following function:
function no_show_hideImage
That's how I get the output on the image now showing the values. How do I determine that the values are actually coming from the album and not from the image?
I looked at other values (like hitcounter), one image has a value of 22 and the other 15, but somehow I get hitcounter value of 11 for all images. I tracked down this number to the album.
I also always get "1" for the "show" value, no matter what I set on the images. Then, the next test, I changed the value on the album, and voilá, the number also changed on var_dump.
All of this still don't solve the mistery why all the photos won't display if I have no_show enabled. For the test above, I had to comment out this line:
$imageObj->exists = $imageObj->getShow();
Now, I ran var_dump again with the line above enabled, and what happens is pretty interesting.
Show has either a value of 1 or 0, but exists has either a value of true or false (according to var_dump). When I try to assign show to exists with the statement above, exists instead becomes NULL, that's why all images never display for unlogged users no matter what the value of show is.
I think this 2nd part of the issue I can fix by changing the way no_show.php works, instead of assigning the value directly in one statement, I can use if statements to either change the value of exists to true or false.
For the 1st part of the issue (filter getting values from album instead of image), I'm a bit clueless
I also disabled magic_quotes_gpc, and tested this with other versions (1.3.1.1., 1.4, latest nightly build), there were significant changes in class-image.php between these, but for some reason I still get the same behavior.
Is this just happening on my server or others have the same?
I noticed from the var_dump some values get assigned correctly, from the image (like title, filename), and these are declared on class-image.php. Maybe if I add these others to class-image (hitcounter, show, commentson, etc), would they work as well?
Thanks,
Carlos
Essentially, the image object was not fully setup when the filter was called resulting in some data items (show in particular) not yet being available.
Also note that depending on your PHP version you may get "deprecated" errors on the no_show plugin calls to checkAlbumPassword(). If so, remove the "&" form the $hint parameter