Php Sqlite Hashgallery
First, I just want to say this is the 6th time I have posted this project. For the love of god and all good things on earth, PLEASE PLEASE PLEASE if you don’t understand what I want, then don’t bother bidding. I give ridiculous amounts of description, I give code examples, I give database outlines, I give you databases!! I have no idea how it’s possible that bidders of a project, given all that, can still not bother coding to my specifications. If you are illiterate and cannot read specifications or cannot follow them, then please don’t bother bidding on this project because I am a programmer, I will look over the code, I will see if you lying to me.
The last time I posted this, someone asked me to select them, and I did, and then they didn’t reply for 3 days. I just don’t get it.
If however, you are a programmer who cares about quality and following client specifications, I reward such things. I will be more than happy to pay a bonus for fast service and beautiful code.
It seems very strange to me that people will bid on projects that they do not intend to fulfill. My time is valuable as is yours, so please don’t waste both our times if you don’t intend to complete the project on time and to my specifications.
Hashgallery
I started on it, but do not have time to finish it, and so I have code snippets as well as detailed description of the project.
Basically, a barebones gallery based on the unique concept that the files will be renamed to their SHA1 values and thus, the file will carry with it, the innate knowledge of its own link name.
The folders are virtual folders, living in a sqlite database, with reference pointers to the files themselves.
So a file named “DSC_0001.jpg” might have a SHA1 hash value of 091E01046BCCA9829BCB9DCBC47F583880FF8AE6 and thus renamed to “091E01046BCCA9829BCB9DCBC47F583880FF8AE6.jpg”. This then becomes the permalink to the file. In this way, no matter what happens, to the name of the file, you can always regenerate this hash by hashing the file itself, thus even with a completely meltdown of the server or db, the permalinks will never die.
Because hash values are 0~9, A~F, 16 directories are created:
/0
/1
/2
…
/E
/F
Each file will live in the directory of the first letter of the hash.
So as per the previous example, the file with the name “091E01046BCCA9829BCB9DCBC47F583880FF8AE6.jpg” will live in the /0 directory.
So now the permalink for this image is:
http://www.example.com/hashgallery/091E01046BCCA9829BCB9DCBC47F583880FF8AE6.jpg
HOWEVER, using mod_rewrite on Apache, it will be turned into:
http://www.example.com/hashgallery/0/091E01046BCCA9829BCB9DCBC47F583880FF8AE6.jpg
(Note the extra /0 directory)
The reason for doing this is that down the road, it is possible to slice up the HD into 16 parts, or any other types of divisions.
This gallery will be primarily designed for use in conjunction with blogs, so a permalink is important.
References to the files themselves then, will not go through a db, only file maintenance will, this make it so that the db is not a bottleneck.
Unlike gallery2, which died on me when the albums got really big, this gallery will be able to support hundreds of thousands of images. Using a php program called ultratree, a file directory tree is created in php with only 1 db query.
The gallery will allow for bulk .zip file upload, or individual file upload. Folder creation and subfolder creation, folder movement etc.. It will also allow for sorting of images via DHTML like
http://www.dhtmlgoodies.com/index.html?whichScript=floating_gallery
I would like the db interface though to be abstracted to support other db’s in the future.
php code snippets available and included.
More detailed description included in the description file.
I would like the first db used to be sqlite3.
http://www.sqlite.org
As I am a programmer, any and all questions I am able to answer. I am even able to answer code optimizations.
I originally had a skeleton sample running on one of the servers, but the server has been decommissioned but I have taken a screen recording to give a rough idea. I’ve also attached the database that I used, and the sample source code that I used.
Please take a look at the entire attached package. I’ve got a screen mockup, an avi, a detailed description, a visio diagram, a sample db, and sample source code.
There should be a configuration page of minimal items which are configurable such as thumbnail size (using the GD library of php).
The app also allows for ftp’ing to a specified directory and then batch processing.
If you have read this far, and think you will bid on this project, search on freshmeat.net or someone online, send me a copy of some other gallery and pray I won’t find out (like the first guy who bid on this project) then you are sadly mistaken.
Thank you for taking your time and interest in the project.
I can give you a link to where the previous programmer ended.


