PDA

View Full Version : Database help needed



melaniejk
06-30-2004, 12:37 PM
Hello.
I have just started a free gravestone photo project. It is to be a resource for people researching their ancestors.

The site is located at:
http://www.ancestralbranches.com/tombstones/gravestones.html

People are starting to send in lots of photos.
It would be helpful to have a database setup while this project is still new before it gets out of control.

I would like something similiar to:
http://iowagravestones.org/

I was told the script wouldn't be to difficult to make. But, I don't have any idea how to do it.
My host doesn't support Cold Fusion. But, it does support PHP.

So, would anyone be willing to make this work for me in exchange for some great links to their web site?
I would really appreciate it.

My home page is a PR7 and I have many internal pages with PR6 and PR5. I also have 3 other sites where I can put your link (1 is a dating theme the others genealogy).



Thank you.

ronniethedodger
07-09-2004, 05:59 PM
First you will need software to handle uploading and handling of graphics files. One that comes to mind is Gallery v 1.4.3-pl1 (http://gallery.sourceforge.net/) which is an SourceForge project that is over 4 years old.

Gallery can interface with some other CMS software such as Nuke 5.0+, NSN-nuke, Post-nuke, Geek Log, phpBB2, Mambo. I think Mambo may be the closest to what you have in mind. This does not mean that you cannot easily fit this in with other CMS too. You will have to find one that you will feel comfortable with, then mod it to include Gallery.

Visit OpenSourceCMS (http://opensourcecms.com/) for more details on Gallery and the above CMS.

That is pretty much the easy part. What you are going to want to focus on is Search. You will have to keep that in mind when you blend the two together and how easily you can integrate some kind of Search system into it as well. This will require some modifying or additional coding to effect it. I would look to the people behind Gallery and the CMS you will be choosing - they all have excellent support forums and will be able to guide you from there.

cyanide
07-10-2004, 08:55 AM
I echo ronniethedodger's recommendation.
That's one of the best gallery scripts I've come across.

It does take a little bit to set up and configure and knowledge of some php is helpful

compusolver
07-10-2004, 11:34 AM
I post this only after hesitating a good bit because Ronnie always has good advice, however..

I have written several apps for uploading, storing and displaying images - all without any special library files or supporting software, just using PHP / MySQL.

I haven't taken particular notice whether my server has any special libraries installed, (you can check at: http://www.smbizhosting.com/phpinfo.php) but I only use PHP commands and everything is straight-forward and simple.

PHP will even trim images if they are not the right size and can create thumbnail images "automagically".

I don't like to use special supporting code or libraries when they aren't necessary.

As for helping - I've currently got more work than I want already and am thinking of taking on another developer, but I'm sure there are plenty of capable people here who will offer.



<?php
// (this is just a small part of some image code)
//
$thumbnail = imagecreate($dest_w,$dest_h);
$photo=imagecreatefromjpeg($imgfile);

imagecopyresized($thumbnail,$photo,$dest_x,$dest_y ,$src_x,$src_y,$dest_w,$dest_h,$src_w,$src_h);

// ensure that original is within size limits
if(($src_w > $dest2_w) || $src_h > $dest2_h) {
$srcfinal = imagecreate($dest2_w,$dest2_h);
imagecopyresized($srcfinal,$photo,$dest_x,$dest_y, $src_x,$src_y,$dest2_w,$dest2_h,$src_w,$src_h);
imagejpeg($srcfinal,$imgfile,75);
chmod ($imgfile, 0766);
imagedestroy($srcfinal);
}

imagedestroy($photo);

imagejpeg($thumbnail,$thumbname,50);
chmod ($thumbname, 0766);

imagedestroy($thumbnail);
?>

ronniethedodger
07-10-2004, 08:47 PM
Very nice compusolver, that is a sweet piece of coding.

Just for clarity on this, is this part of the GD library that comes with the newer versions of PHP? If so, I would imagine that it would have to be installed on the Host's server as well.

Out of curiosity, does the image functions for jpeg allow for different quality settings as well? And can it also crop images too? I have not really looked too deep into this at all, and might as well grab you while you are here! ;0)

compusolver
07-12-2004, 01:12 PM
Ronnie,

Sorry for the delay, for some reason I am no longer getting email notifications from this forum.

You can see what is installed on the server via the phpinfo link at: http://www.smbizhosting.com/phpinfo.php and it does show GD is installed.

The commands are included in the standard PHP manual, to the best of my knowledge, this is all standard.

Quality is set via a parameter:
imagejpeg($srcfinal,$imgfile,75);
(the 75 is the quality parameter I'm using there).

I love that it can create thumbnail images on the fly. It can also do charts, text, etc.

I do believe it can crop, but its been a year or so since I last read up on all this and I haven't attempted a crop programmatically because I haven't run into a situation calling for it.

It would have to be a special case, because unlike Java, PHP can't "see" what is in the image and would be cropping blindly. OK I take that back. You COULD have PHP do a binary read on the image and write your own functions to "see" the image, I guess.

ronniethedodger
07-12-2004, 06:16 PM
PHP may not be able to read the image, but the visitor sure could ... and with a little bit of JavaScript, you could feasibly allow them to supply those coords to feed back to the server.

I would imagine with the differences in browsers, it may be a little tricky to develop a usable click-and-drag outlining of the crop. That would be perfect for uploading graphics and prepping them for publication purposes.


Sorry for the delay, for some reason I am no longer getting email notifications from this forum.

I know. Me too. I know of several others who are not getting them either. (Newsletter is okay though, different mail server) They are supposed to be working on it -- but I think they have their IP for the mail server in a number of spam databases. Last I checked there were several of them.

wipeout
07-13-2004, 12:16 AM
Hi melanie,

I am very familiar with the scripts you are asking for. I had to alter them for my web page.

I could set up a database for you and the upload for the photo's also.

Basically the same tech as on my page.


http://www.sasdating.com

melaniejk
07-14-2004, 01:03 PM
Hi everyone.
Sorry, for the delay in response. I didn't get an email telling me there was a response so I figured no one responded.

Thank you all for your suggestions. I'm going to read them over a bit more and then respond to them.

melaniejk
07-14-2004, 02:06 PM
Hi.
Well, Ronnie thanks for that info on different software I'd need. That is all over my head though.

I think going the straight PHP route is easiest.
Someone over at another forum I belong to offered to help later this week. He's helped me before with PHP (submit form) so I'm hoping it will work out.

Also, I would like to upload the images myself. I don't want visitors to be able to upload them to the database. I'd like to keep control over it.

Well, I let you guys know if it works out or if I run into some trouble. I think it's wonderful that you all responded to my thread. I wish I had seen the messages earlier.

Thanks again.
Melanie