uShop English (U.S.) for 179!

uStorekeeper English (U.S.) for 149!

 Tech Support
       Support Policy
       Knowledge Base
       Reference Sites
       Software Piracy
       Legal Notices
       Privacy Policy
       Reseller Info
       Contact Us
       Site Map
Changing Search Box in Generated HTML pages

Knowledge Base Lobby : uDirectory Support Conference : Modify uDirectory Scripts
Jul-18-18 10:27 AM EST
Original Message
Changing Search Box in Generated HTML pages
Author Paul Abernathy on 10-30-2001 at 22:02 (EST)
Bill or Edmunds,

My question is to the generated HTML on the results pages. On my main page of the website you will notice the search box was altered by me to have Keywords as the top search listing and as you are aware on the generated html pages the search box has Business Name or Title in my case..what I want to know is in the is there a place so that when the html pages are generated it will list keywords as the top search this is much better than a business name or title of a website. I know I can do each text page listed in the listings folder but it would be so much easier to be able to find where it does this in the and just modify it so the top search is not the business name but a description or keywords text box as I have on my site..check it out..I know it can be done just not sure where the HTML generated info is on the script.

Paul Abernathy

Table Of Contents
  RE: Changing Search Box in Generated HTML pages Joseph Pishgar, 2001-11-01 13:52:05 (1)
            Question Paul Abernathy, 2001-11-01 23:13:11 (2)

Messages In This Discussion
         1. RE: Changing Search Box in Generated HTML pages
        Author Joseph Pishgar on 11-01-2001 at 13:52 (EST)
Our lead developer had this to say:

Hello Paul,

From looking at your page at:

It looks like you have Field 1 on the "Configure Listings" form set to
"Keywords" and you have the "Display" preference for that field set to

If you would like "Field 1" to always appear at the top of the "Search By"
drop-down menu, the you would need to modify the "create_html_page" as
described below:

STEP 1: Make a backup of your "" script... just in case.

STEP 2: Open the "" script with any text editor such as

STEP 3: Do a search on the following line.... in order to get to the start
of the "create_html_page" subroutine:

sub create_html_page

STEP 4: About 39 lines into that subroutine, you will see the following

$field_selections = "<select name="search_field">n";

Directly AFTER that line, add this line:

$field_selections .= "<option value="F01">Keywords</option>n";

STEP 5: About 6 lines down further in that subroutine, you will see the
following line:

for ($j = 1; $j <= 20; $j++)

Change that line to:

for ($j = 2; $j <= 20; $j++)

STEP 6: Save the script (as TEXT if your editor asks) and try it out!

NOTE: Offhand I'm not sure, but you may also have to make similar changes
to the "search" subroutine... in which case, you would start by searching

sub search

... and then perform the same mods described above.

Good luck!.... And let me know if you have any problems.

Bill Weiner
Microburst Technologies, Inc.
                 2. Question
                Author Paul Abernathy on 11-01-2001 at 23:13 (EST)

I did the above and noticed that I left out the period in the string before the = in the follwing:

$field_selections.=",option Value="F01">Keywordsn";

I by mistake left out the period between selctions and the = symbol...HOwever, to my amazement it allowed ALL the selections to be searched in ONE that makes the search more like a real search of all the listings..but the down side is it lists multiple listings of the same site.. My Question is:

Is there a way to search all the fields in one search yet only bring back one listing per....or the way I have it now at the only real way to do I did by mistake. And second..on my index page or just the page I was able to change the search to keywords on top by just copy and paste a search box from a generated HTML page..but is there a way to have a search box that can search all of the listings in the listings folder without them having to choose a search by option.

Paul Abernathy

© 2003 Microburst Technologies, Inc.