Perl image database and search
Hi all,
First ever post for me!
I have a knowledge of how to run scripts etc etc so that my web pages function, however, I know little about programming.
What I need is a very simple Perl script that allows visitors to do a key-word search (I can create the search box and submit button etc.) of my uploaded picture library(ies) and return the image(s) in html format. The images to be returned by the search are already thumbnails. It sounds simple but I just don't know how to do it.
Please help
Thanks in advance!
barking spider posted this at 22:13 — 20th April 2004.
They have: 5 posts
Joined: Apr 2004
Just to clarify....
I have a simple key word search form on my site. When someone types in a word and submits it I need to be able to return any images (as thumbnails of the actual image) that match the keyword (none case sesitive). All images are in a single directory. Obviously I need to develop some sort of HTML template that contains the search results. It sounds simple but I just don't know where to begin....help!!
Thanks all
Suzanne posted this at 22:37 — 20th April 2004.
She has: 5,507 posts
Joined: Feb 2000
Actually, it's not all that simple, especially if you aren't familiar with programming.
1. the database should contain a field or fields of keywords, an association between the keywords and the image, an association between the image and the thumbnail
2. these fields should be fulltext or otherwise indexed
3. the script would have to login to the server, return all the fields that have these keywords, then cycle through those resulting rows and display the content
Matching the keyword (single keyword?) is very restrictive and won't return things to the user unless the keyword is either supplied or otherwise known.
Provide an url of where you are working on this for more assistance, as well as sample code?
barking spider posted this at 08:27 — 21st April 2004.
They have: 5 posts
Joined: Apr 2004
Thanks Suzanne. Unfortunately I can't link to my URL yet as I've been developing my site locally using Apache etc..
However, my search script and database might be a little simpler if I explain a bit more.
The images are all pictures of triathlon competitors with a race number. Therefore the image is called 13.jpg (for competitor #13) and can be found in the directory for that sporting event. A visitor to the site only has to type in "13" in the search box to bring up all 13.jpg files in that directory. Instead of returning a link to the filename ideally I would like it to open the thumbnail(s) directly.
A website running a similar search can be found here.
Thanks again if you have any pointers
Suzanne posted this at 15:48 — 21st April 2004.
She has: 5,507 posts
Joined: Feb 2000
That doesn't sound simpler, lol. Photos with multiple "numbers" would be indexed how? Saved as what?
If you're developing it offline, you can export the structure of your database for us to look at.
m3rajk posted this at 19:36 — 23rd April 2004.
They have: 461 posts
Joined: Jul 2003
if the image dir is always the same, why not use php to open the image dir, and if onlyt he ones ih that number will be wanted, and only those with the competitor witht eh tnumber will contain that number, find them by opening the dir, checking the ffilenames. if they contain the substr 13, then you savethe finlename, after you have an array of filenames that match.
POSIX. because a stable os that doesn't have memory leaks and isn't buggy is always good.
barking spider posted this at 21:20 — 29th April 2004.
They have: 5 posts
Joined: Apr 2004
Sorry for not responding sooner. After doing a bit of searching around I've found an off the shelf product that does the job call Eight Image Gallery. The software is freeware and can be modified as seen fit. I now have a fully functioning gallery that I can search, however there is one small problem...
The Perl search engine uses the user input word and returns every image file that matches the word either exactly or partially, e.g. entering '37' into the search returns images '37, 137, 237, 337, 370 etc.... I need to alter the search script so it simply does an exact word match.
I can't seem to paste the cgi script in here because it's too long but it can be downloaded from here.
eightproject.sourceforge.net
Thanks again in advance
barking spider posted this at 21:25 — 29th April 2004.
They have: 5 posts
Joined: Apr 2004
Sorry, cgi script can be downloaded here
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.