uShop English (U.S.) for 179!

uStorekeeper English (U.S.) for 149!

 Products
       uTest
       uReserve
       uShop
       uStorekeeper
       uGolf
       uDirectory
       uSignIn
 Tech Support
       Support Policy
       Knowledge Base
            uTest
            uReserve
            uShop
            uStorekeeper
            uGolf
            uDirectory
            uSignIn
       Documentation
       Reference Sites
 Legal
       Software Piracy
       Legal Notices
       Privacy Policy
       Licensing
 Miscellaneous
       Reseller Info
       Contact Us
       Site Map
Changing Search Box in Generated HTML pages

Knowledge Base Lobby : uDirectory Support Conference : Modify uDirectory Scripts
Nov-18-17 11:01 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 www.radiopet.com/CHUBAY.htm 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 udirectory.pl is there a place so that when the html pages are generated it will list keywords as the top search offered..as 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 udirectory.pl 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 Udirectory.pl script.

Paul Abernathy
E-MAIL AUTHOR | TABLE OF CONTENTS

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:

www.radiopet.com/CHUBAY.htm

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
"Hidden".

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 "udirectory.pl" script... just in case.

STEP 2: Open the "udirectory.pl" script with any text editor such as
WordPad.

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
line:

$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
for:

sub search

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

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

Sincerely,
Bill Weiner
Microburst Technologies, Inc.
www.uburst.com
==================================
TABLE OF CONTENTS
                 2. Question
                Author Paul Abernathy on 11-01-2001 at 23:13 (EST)
Bill,

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 search...so 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 www.chubay.com/BUSINESS.html the only real way to do this..like I did by mistake. And second..on my index page or just the www.chubay.com 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
www.radiopet.com
www.chubay.com
TABLE OF CONTENTS

© 2003 Microburst Technologies, Inc.