phpDVDProfiler
Welcome, Guest. Please login or register.
September 09, 2010, 05:14:25 AM

Login with username, password and session length
Search:     Advanced search
5341 Posts in 713 Topics by 852 Members
Latest Member: aimlesswondering
* Home Help Search Login Register
+  phpDVDProfiler
|-+  phpDVDProfiler
| |-+  Gallery (Moderator: SH84)
| | |-+  Directory case issue
« previous next »
Pages: [1] Print
Author Topic: Directory case issue  (Read 2074 times)
johnd
Super VHS
***
Posts: 65



View Profile WWW
« on: September 23, 2007, 06:59:43 PM »

Sorry in advance about the length of this:

I don't use the gallery feature often myself, but in the process of writing the docs I tend to try everything to see how it works. When I tried the gallery feature, I got nothing but the "cover missing" image. Clicking on a "cover missing" image showed the correct full cover image. Looked in the "Thumbnails" directory on the server. Everything was there as expected. Noticed that the directory on the server was called "Thumbnails", with a capital "T". Changed it to "thumbnails" and the gallery now showed the correct set of images.

Ran the rsync script. "thumbnails" directory was removed and replaced with a "Thumbnails" directory!

The problem is that the install of DVDProfiler, or creation of a new database, creates a directory called "Images", and a subdirectory called "Thumbnails". Note the capitalisation. Since rsync creates an exact copy of the DVDProfiler "Images" directory, it creates the thumbnail directory as "Thumbnails", or removes the "thumbnails" directory and recreates it as "Thumbnails". Looking at the gallery script shows that it requires the directory to be called "thumbnails".

The obvious fix is to rename the DVDProfiler directory from "Thumbnails" to "thumbnails". This does not affect DVDProfiler, as Windows cares not a jot about case, but is hardly an elegant solution.

Suggestions?
« Last Edit: September 23, 2007, 07:02:08 PM by johnd » Logged

SH84
Moderator
Super VHS
*****
Posts: 66


101261175
View Profile WWW
« Reply #1 on: September 23, 2007, 07:08:42 PM »

I'll add a variable for the directory name...
Until then, you could edit the gallery.php (lines 114 & 117).
Logged


Download phpDVDProfiler: http://www.tfintzel.de/dvdprofiler/
fredlooks
HVD (Holographic Versatile Disc)
*****
Posts: 1019



View Profile WWW
« Reply #2 on: September 24, 2007, 08:14:10 AM »

It isn't just the gallery, 'thumbnails' with lower-case 't' is hard-coded in many places. It just falls back to scaled images in other places. This tends to make the tumbs displayed look poor. I'll add a variable that can be set to the name of the thumbs directory....
Logged

ajm
Administrator
Blu-Ray
*****
Posts: 998



View Profile WWW
« Reply #3 on: September 24, 2007, 08:32:46 AM »

As loads of places will need changing to use the new variable for the thumbnails directory, you could make it try and find the directory automatically instead.

The bigger job is changing the 1000's of references however. Could be a project in itself Sad
Logged


fredlooks
HVD (Holographic Versatile Disc)
*****
Posts: 1019



View Profile WWW
« Reply #4 on: September 24, 2007, 08:44:59 AM »

Not really. grep thumbnails *.php|wc -l returns 46 lines, and at least 11 of them are comments ... the only files affected are functions.php, gallery.php, index.php, imagedata.php and the old getimages.php.

Not as bad as I thought at all ...
Logged

ajm
Administrator
Blu-Ray
*****
Posts: 998



View Profile WWW
« Reply #5 on: September 24, 2007, 08:48:20 AM »

I'm shocked ws.php isn't in the list. Although, its code probably just got moved to functions.php.
Logged


fredlooks
HVD (Holographic Versatile Disc)
*****
Posts: 1019



View Profile WWW
« Reply #6 on: September 24, 2007, 08:54:03 AM »

Yup. all the references to thumbnails in ws.php were in resize_jpeg() which got moved to functions.php
Logged

Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!