Archive for June, 2007

Thumbnail Quality

Tuesday, June 12th, 2007

I have played with some configuration settings (imagecreatetruecolor (GD Library 2.0) set to default), and with the size of the thumbnail resizing in the HTML (although I controlled this from the Admin area - set all to width of 130), and the results are dramatically improved. However, in the early days, we had some glitches with photo uploads, in that the upload of large photos was not completed and a blank page returned. One of the attempts to fix this involved changing the imagecreatetruecolor (GD Library 2.0) setting to manual override.

However, further tests on 12 June found that the upload of photos caused a white screen to occur (blank page returned instead of image added page) with a large 950 kb test file, irrespective of whether I had the GD Library set to default or manual override. So I have turned it back on. It works fine with normal-sized photos. Maybe we are being over-generous by offering a 1 MB upload. Perhaps that should be 200 kb?

However, further tests on 12 June found that the upload of photos caused a white screen to occur (blank page returned instead of image added page) with a large 950 kb test file, irrespective of whether I had the GD Library set to default or manual override. So I have turned it back on. It works fine with normal-sized photos. Maybe we are being over-generous by offering a 1 MB upload. Perhaps that should be 200 kb?My bet is that the image problem is more likely to do with bandwidth and timeouts. I found a really in-depth article on what could cause image problems at:

https://geodesicsolutions.com/products/geohelp/index.php?x=&mod_id=2&id=128

In short, it could be that the PHP script is timing out while waiting for a 1 MB file to upload. The PHP script timeout is 30 seconds. I reckon 1 MB on my cable connection (which is asymmetrical - fast downloads but slow uploads) would take round about that time. Further, the current chloekirkhope.com server seems to be on a quite slow connection, so even superfast at this end may be superslow at the other! And on top of that, the article says the performance of the server has an impact. Large graphics take quite a while to thumbnail, so it could be timing out for that reason too.

When it goes on the live server, we may get (a) better connection speed, (b) better server performance, and (c) possibly better GD Library handling.

In summary, I think we should leave it as the “default” setting (ie, lovely thumbnails), but consider changing the limit from 1 MB to something smaller. (That’s just one setting change, and one Help text change (http://www.chloekirkhope.com/admin/index.php?a=14&b=10&l=22).) Then, we’ll see how it goes on the production server.

Changing Photo Title

Tuesday, June 12th, 2007

I’ve changed the help (instructions for image collection form) so that it explains that to change a photo title, you’ll need to delete the photo and add it again with the corrected title.

The change was on http://www.chloekirkhope.com/admin/index.php?a=14&b=10&c=167&l=22.

Unfinished Listings

Tuesday, June 12th, 2007

The way it works is that a cookie containing a “session number” is created when the user logs in for the very first time. When the user revisits using the same PC and same browser, that same session number is retrieved from the cookie. Now, when a user starts a listing, that listing’s details are stored in the database against the user’s session number. When the user logs off using the sign off button, that record (of the unfinished listing) is deleted. However, if the user just closes the browser without formally logging off, the listing’s details remain. It is the retrieved whenever the user next logs in.

In short, the problem lies in users not logging off, but just closing the browser. The fix may be to delete any record with a matching session number when the user logs in. That might cause a new issue, though, in that if the user session times out while he or she is looking for a photo, for example, then the partially complete listing will be gone.

I have modified the classified_sell_class.php and index.php files so that when a interrupted listing is found, a JavaScript function is injected into the page. I added the referenced JavaScript function to hw_ua.js, which we previously “included” on each page. (Can’t remember what for! To display the Help panels, perhaps?)

Anyway, the JavaScript displays an alert box warning that it’s an interrupted listing. When the user OKs the alert box, the script sets a cookie so that the alert is not shown again for that browser session. In other words, when the browser is closed, the cookie is lost. That way, when the user next opens the browser and goes to add a new listing, the alert re-displays. 

 

US Dates

Tuesday, June 12th, 2007

The issue of US date formats raised itself in the add listing area for the auctions, and where the auction start and auction end dates were displayed. In the add listing area, the dropdown for the months now shows the month names rather than the month number, and the order is day month year. Changes were made to the classified_sell_class.php and index.php code to change the text.