I just upgraded to phpix2 to phpix3 and I am having a problem. It looks like a minor bug in the php code. The thumbnails work fine but when I click on them, it attempts to open the picture with the default resolution defined in the config file. But, it doesn't pass the value of that varible into the URL like phpix2 did. See the URL below - notice the "dispsize=&" part. It should be "dispsize=512&".
If I manually put in a number like 512 in the URL, it works fine. I will try and look through the code when possible but I don't have time now so if someone else could check it out - that would be great!
BTW: I love how simple and easy phpix makes it to share my photos. Thanks for your work.
Mark
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, I had some time to debug my issue and I was able to correct it. I followed the trail of the disp_size variable back to the config.inc file. Here is how it goes on my system. The variable default_size is defined in config.inc. When the main page is called (index.php), it has an include for common.inc which in turn has an include for config.inc. So, $default_size gets read in first from the config.inc, then in common.inc, if $disp_size is blank, $disp_size is set equal to $default_size. This is all good. Then it returns to index.php which then wipes out that work but executing this line:
$dispsize = $_GET['dispsize'];
which blanks the variable again. If I comment out this line, everything works as I desire. I think the intent of this time was to retain the size selected in the view.php by the user if they return back to the index.php (thumbnail/folder view). Assuming it is, I think this can be accomphlished by changing the line to :
if ($_GET['dispsize'] <> '') $dispsize = $_GET['dispsize'];
Please let me know if you have any questions. I thought it was weird that I was the only one reporting this problem. Perhaps my php config is different than most. I am using a recently build fedora core 1 system with a standard apache/php install done from the OS install.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I just upgraded to phpix2 to phpix3 and I am having a problem. It looks like a minor bug in the php code. The thumbnails work fine but when I click on them, it attempts to open the picture with the default resolution defined in the config file. But, it doesn't pass the value of that varible into the URL like phpix2 did. See the URL below - notice the "dispsize=&" part. It should be "dispsize=512&".
http://server/phpix/view.php?album=Sample%20Album&pic=A-10.jpg&dispsize=&start=0&picindex=0
If I manually put in a number like 512 in the URL, it works fine. I will try and look through the code when possible but I don't have time now so if someone else could check it out - that would be great!
BTW: I love how simple and easy phpix makes it to share my photos. Thanks for your work.
Mark
Ok, I had some time to debug my issue and I was able to correct it. I followed the trail of the disp_size variable back to the config.inc file. Here is how it goes on my system. The variable default_size is defined in config.inc. When the main page is called (index.php), it has an include for common.inc which in turn has an include for config.inc. So, $default_size gets read in first from the config.inc, then in common.inc, if $disp_size is blank, $disp_size is set equal to $default_size. This is all good. Then it returns to index.php which then wipes out that work but executing this line:
$dispsize = $_GET['dispsize'];
which blanks the variable again. If I comment out this line, everything works as I desire. I think the intent of this time was to retain the size selected in the view.php by the user if they return back to the index.php (thumbnail/folder view). Assuming it is, I think this can be accomphlished by changing the line to :
if ($_GET['dispsize'] <> '') $dispsize = $_GET['dispsize'];
Please let me know if you have any questions. I thought it was weird that I was the only one reporting this problem. Perhaps my php config is different than most. I am using a recently build fedora core 1 system with a standard apache/php install done from the OS install.
Thanks for that, I will include the fix in the next release
Cheers
David