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
Multiple listings again...

Knowledge Base Lobby : uDirectory Support Conference : uDirectory Configuration Questions
Nov-24-17 02:32 AM EST
Original Message
Multiple listings again...
Author Chris Bannister on 04-07-2001 at 20:10 (EST)
Thanks for the suggestion Bill. I had thought this actually but as it is not me that will enter the details but the companies that visit my site I find this 2 complicated for them to follow..and how would they know the number that was used previoulsy ? Is there anyway for me to adjust the script in the cgi file so that it will exept more than one lisiting of the same name. Would very much appreciate your help on this as this job listings page is critical to my site strategy. Thanks in advance..
E-MAIL AUTHOR | TABLE OF CONTENTS

Table Of Contents
  RE: Multiple listings again... Bill Weiner, 2001-04-09 21:16:56 (1)
            Multiple listing with same name Chris Bannister, 2001-04-10 05:54:31 (2)
                 RE: Multiple listing with same name Bill Weiner, 2001-04-11 05:07:39 (3)
                      "RE: Multiple listing with same name" Chris Bannister, 2001-04-11 09:41:48 (4)

Messages In This Discussion
         1. RE: Multiple listings again...
        Author Bill Weiner on 04-09-2001 at 21:16 (EST)
Due to the way uDirectory uses the "Main Field" as the unique identifier to locate listing records during listing modifications, listing deletions, linking searches, and listing links... that field will have to remain unique.

If you are willing to configure one of the other fields to be the "Job Title", however, you could then use the "Main Field" as a unique identifier (ie. a unique listing id). I will provide some instructions below on how to modify uDirectory deluxe so that the "Main Field" is automatically set with a random identifier at the time the listing is added:

STEP 1: Make a backup of your current udirectory.pl script... just in case.

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

STEP 3: Do a search on the following line:

sub create_new_listing_form

(This will get you to the start of the subroutine that generates the "Add Listing" form).

STEP 4: Two lines into that subroutine, you will see the following line:

local ( $category_options, $i, $cur_field, $option_name, $options_html );

STEP 5: Immediately AFTER that line, add the following 4 lines:

local ( $random_number, $random_id);
srand(time &pip; $$);
$random_number = int(rand(10000000));
$random_id = sprintf("POS %09d",$random_number);

(NOTE: The &pip; in the above code should appear as a vertical bar ... it's just that this forum doesn't let me posted that special character properly).

STEP 6: About 48 lines further down in that subroutine, you will see a line containing the following text:

NAME="MAIN_FIELD"

STEP 7: Change that text to:

NAME="MAIN_FIELD" VALUE="$random_id"

STEP 8: Save the file (as TEXT if your editor asks) ... and try it out!

NOTE: With the above changes, the "Main Field" will treated as more of a "Position Id" rather than a "Job Title". You should use one of the other configurable fields as the "Job Title".

So try these changes out and see if that will work for you.
TABLE OF CONTENTS
                 2. Multiple listing with same name
                Author Chris Bannister on 04-10-2001 at 05:54 (EST)
Bill, Your last idea can work very well for my requirments. I've followed your instructions and it's working well. Thanks again very much for your help.
I do have 1 final question for you , then I'll leave you in peace ! I have now made field 1 my job title....As this is the main field of interest , I need to make it bold ? How can I do this ?
TABLE OF CONTENTS
                         3. RE: Multiple listing with same name
                        Author Bill Weiner on 04-11-2001 at 05:07 (EST)
Great! I'm glad that's working out for you. As for making field 1 bold, try making this modification to the uDirectory Deluxe script:

STEP 1: Make a backup of your current udirectory.pl script... just in case.

STEP 2: Open your "udirectory.pl" file with any text editor such as WordPad.

STEP 3: Do a search on the following line:

$new_listing .= $gFields[$i] . "< br> n";

(NOTE that there should NOT be spaces after the < and > signs in the above line... I just had to add the spaces in order for those special symbols to show up in this forum.)

STEP 4: Replace that line with the following lines:

if ($i == 0)
{
$new_listing .= "< B> " . $gFields[$i] . "< /B> < br> n";
}
else
{
$new_listing .= $gFields[$i] . "< br> n";
}

STEP 5: Save the file (as TEXT if your editor asks)... and try it out!
TABLE OF CONTENTS
                                 4. "RE: Multiple listing with same name"
                                Author Chris Bannister on 04-11-2001 at 09:41 (EST)
Thanks once again Bill. It works fine as usual..Great support.
TABLE OF CONTENTS

© 2003 Microburst Technologies, Inc.