Hi, thanks for looking at our project!
We are an auto classifieds web site. The web site’s search feature is run by a very simple perl script (search.cgi, attached) which queries the vehicle data that is contained in a tab-delineated, text flatfile database (not sql). The script returns results into an HTML “match template”, or a “nomatch” page if there are no results. The query is passed through the search URL. It’s very simple.
You can see an example of how this currently works by going to http://www.autopages.com/ and typing an automotive search term into the search box at the top.
Here’s what we need — we would like to to add several new capabilities to this search script:
1.) a “sort by” feature at the top of search results, that allows users to sort results by year, price, etc.
2.) Links for search results pages. In other words, if there are 32 records found in a search, and results are returned 10 per page, the results page should be able to have links to page 2 (results 11-20), page 3 (results 21-30), and page 4 (results 31-32). On any given page, the current page number should be displayed as a non-link, and the other pages should be displayed as links. This is something very typical, of course.
3.) If any vehicle in the search results contains “F” in column 11 of its record in the database, an icon should be displayed on that record in the search results. Any record that does not contain “F” in column 11 should not display this icon.
4.) Finally, we would like to have an “add to favorites” feature. Every record displayed in the search results should have a link that, when clicked, causes it to be added to a “favorites” list for that site user. We would like to do this the simple way, with cookies, NOT with a login system. There should be a “favorites” page that can be accessed through a link, and on this “favorites” page, the listings should contain links that allow them to be removed from the favorites list.
So, that’s it — those are the four things we need.
IMPORTANT NOTE:
I realize that all of this can be done easily by simply replacing the search script with a new one — there are hundreds of scripts with these features already written, and available for free. However, what we need is for OUR script to be modified with these new features. The reason for this is that, although it’s simple, our script contains many small functions that are customized to our site and very important — for example, it rewrites photo URLs, constrains overflow text, reformats prices, etc.
So, it’s important to us to retain our current script. We just want these new features added on to our current one. So please, no replacement scripts.
The attached archive (files.zip) contains the search script (search.cgi), the setup file (setup.pl), the database (database.exm) and the match template, so you can see how it all works. It’s very simple.
Please let me know if you have any questions … thanks!