This topic is locked
[SOLVED]

 Issue with Thumbnails

12/30/2011 12:18:51 PM
PHPRunner General questions
J
Jepsen author

I have an issue with thumbnails in the latest PHPR Build
I click for show thumbnail but it is just impossible for me to make it work
There have been issues with x-box in previous versions of PHPR. But this time the x-box works, just not the thumbnails.
Anyone have experienced this problem / having a fix?

C
cgphp 12/30/2011

Could you be more clear about your problem? What doesn't work?

J
Jepsen author 12/30/2011



Could you be more clear about your problem? What doesn't work?


Christian
In visual editor I make the field an image
I give the paths to where the image is located
I click for show Thumbnail
I click for show in x-box
What happens is that the application shows the image, not the thumbnail of the image. When i click on the image, i pops up in the x-box.
So visual editor simply ignores my request to see the thumbnail and shows the full image instead.

Sergey Kornilov admin 12/30/2011

You need to make sure thumbnails are in fact generated. Probably this is an issue with PHP setup on the server and GD extension is not installed.
If you need more help post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.

J
Jepsen author 12/30/2011



You need to make sure thumbnails are in fact generated. Probably this is an issue with PHP setup on the server and GD extension is not installed.
If you need more help post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.


Dear Admin
The database i am updating now is 6 years old and was first generated eith PHPR 3.0. There are approx 4800 photos in the base and exactly as many thumbnails. And I checked that they are there ofcourse. It all works in 5.3 but I cannot make it work in 6.0.
Here is an example from the same database, on the same server using the same photos but in PHPR 5.3: http://www.vaabenhistoriskselskab.dk/arma-dania/_md_genstande_view.php?editid1=3791
set-up is the same execpt for the PHPR 6.0.

Sergey Kornilov admin 12/30/2011

How do you want us to help you?

J
Jepsen author 12/31/2011



How do you want us to help you?


Hei Sergey
I hoped that you could either tell me that there is a bug in PHPR 6.0 related to thumbnails or tell me that there is a change in the way you set up image display (change from PHPR 5.3) that I have overlooked so the error is mine. I do a lot of small events in my application and it could well be some unintended clash between some built in functionality in PHPR and my events. One of my new things in the current application is that I rename all uploads by applying the following event prior to upload:

global $pageObject;

$time = time();

$names = Array();

foreach( $pageObject->filesToMove as $key=>$file)

{

$name = $time . $key;

$ext = strrchr($file->destFilename, '.');

$names[] = $name.$ext;

$file->destFilename= $name.$ext;

$pageObject->filesToSave[$key]->destFilename= "th".$name.$ext;

}

for ($i = 1; $i <= 7; $i++) {

if ($values["foto_".$i]!="") {

$values["foto_".$i] = array_shift($names);

}

}


It actually works perfectly and renames both the image and its thumbnail for anything between 1 to 7 uploaded images in the same record.
If nobody else have problems using thumbnails the problem is most likely related to something I do. However, 6.0 is so young that maybe nobody found the bug yet. So my mission is to find out if this problem is down to PHPR 6.0 or something I do wrong.
And happy new year to you and the users of this forum.

C
cgphp 1/1/2012

Make sure the "URL prefix" option in the "View as" setting of the image is set in the right way. If "files" is the folder where you save the uploaded files, the "URL prefix" value should be

files/
J
Jepsen author 1/1/2012

Christian
Thanks for your advice. I am making all uploads to a upload directory and I am using relative path like this:

/uploads/db_gradstegn/


Every database have its own sub-folder for uploads in the uploads/ folder.
Triggered by your proposal I just tried one more thing:
Use of absolute Path. (http://www.arma-dania.dk/uploads/db_gradstegn/)

And voila, everything works. Can you believe it, my thumbnails do not work with relative path, but they work with absolute. But the application finds the images with both relative and absolute.
Bug or not, no more relative path :-)

J
Jepsen author 1/1/2012

Further to my conclusion above
Further testing indicates that it is not that simple.
The following relative path is not accepted: (relative to root)
/uploads/db_gradstegn/
But this relative path works: (one level up)
../uploads/db_gradstegn/
I am still not sure if it's a bug in PHPR 6.0 or if it is something in my server setup.
However, if I use the relative path relative to web root in PHP it works.
It is a bit important as I learnt when i started testing. Even though my application appeared to work when I used the absolute address, i realised that I was unable to upload files as the wrapper cannot write with what appear to be an external address.
I can now make it work, but I still don't fully understand this problem

C
cgphp 1/1/2012

But this relative path works: (one level up)

../uploads/db_gradstegn/


Is it outside the phprunner project folder? This would make sense.

J
Jepsen author 1/1/2012

Christian
According to the PHPR manual, /xxxxx/ relates to server root and not project root.
Anyway, here is a link to the public front end of my application: http://www.arma-dania.dk/public/timeline/_md_genstande_list.php
Click on the images on the list page to open the records for viewing.
Thanks for your help.