PDA

View Full Version : Customize Search.inc


ehopkins
03-16-2005, 08:00 PM
Hi, I just started creating my Website.
Would someone tell me how to modify the include file for "create a search"?
I have very little knowledge of the language. :o

What I want to do is:
1. Add "check box" search type.
2. Delete/hide the "Defind Search Method".

Thank you.
E-Hopkins

SteveR
03-23-2005, 12:15 PM
I did this for one of my websites:

http://www.planyourmeetings.com/index.php?pr=Search_Hotels_Resorts

It is not checkboxes, but it does have the "Define Search Method" part modified.

I can give you the modified code if you want...let me know.

Why do you want checkboxes in your search? It is hard to say how to modify the code without knowing how you want the search set up. Do you have an example of what you want to do?

ehopkins
03-23-2005, 06:12 PM
Hi SteveR, thank you for your reply.

Your search is simplified and looks good! :)
It would be great if you could provide me the code for the modification.

I want the check box, because I want to give the users a multiple selection for an item.
For example, if the users are searching for registered people with multiple skills, ranges of age, it gives more flexibility.

Ex. Fetch all members who can cook Japanese, Chinese and Mexican cuisine.

But it should be very difficult modify so I will think of other way.
Thanks again for your reply! :)

SteveR
03-23-2005, 11:18 PM
Okay, the code to make your search results look like mine is ready, but I have no idea how to post it...LOL!

It is located in /home/yoursite/public_html/sohoadmin/program/modules/mods_full/database_manager/shared/dbsearch_base.php

Basically, the mods are: Simplify text header for search (looks cleaner), Moved all buttons to align left, Eliminated the "Details" icon and the Sort arrows (which never worked anyway), Made any field information that contained "www" or "@" turn into a live link.

It won't solve all your problems, but it should give you a head start on some of the more annoying issues with the search feature. It's a long bit of code, so I don't want to just post it here; any ideas?

ehopkins
03-24-2005, 05:29 PM
Do you mind sending it to my private E-mail?
puertea.canada@gmail.com

Thank you very much again! :)

SteveR
03-24-2005, 08:39 PM
Email sent...here's some of the changes:

Aligned buttons and number of matching results; around line 560

Commented out "Details" text; around line 578

Commented out "Sort" arrows; around line 586

Commented out "Details Page" column from reults table; around line 599-609

Inserted code to make hyperlink and mailto links in results table active; around line 615
Here's the code:

if (eregi("@", $tmp2)) { $tmp = "<a href=\"mailto:$tmp2\">$tmp2</a>"; }
if (eregi("www", $tmp2)) { $tmp = "<a href=\"http://$tmp2\" target=\"_blank\">$tmp2</a>"; }
echo "<TD ALIGN=LEFT VALIGN=MIDDLE BGCOLOR=$BGCOLOR class=smtext>$tmp</TD>\n";
}

Changed text in the search selection page; around line 732


I think that's it, but I may have missed something. Just back up your original dbsearch_base.php and copy the one I sent you to your folder. Then build a new search and check it out.

Hope this helps.

-Steve

ehopkins
04-22-2005, 06:51 PM
Hi again!

I wonder if the whole "search" process can be skipped.

The process I want is just simple. A member logs in, see the registration detail and edit it.
Because soholaunch needs to set up the "search table" object AFTER signing in/logging in a site page, it gives the registered members chance to search for other members' registration anonymously.

ex. ONLY the member him/herself can SEE and EDIT his/her registration detail.

E Hopkins :)
Toronto