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 listing with same name ?

Knowledge Base Lobby : uDirectory Support Conference : uDirectory Configuration Questions
Dec-13-17 09:50 AM EST
Original Message
Multiple listing with same name ?
Author Chris Bannister on 04-03-2001 at 20:39 (EST)
I have just purchased the deluxe version and have set it up and customized it to meet my needs. I It work very well, exept the problem I have is this:-
The use of my directory is for job listings. The name of my first field and title for each listing above the description field is "Job title". When I try to enter a title such as " chef " if a listing is allready in the database in the same category with this title, which offcourse it would be as there would be many jobs with the same job title. I get the reply " Multiple listing , allready exists ! How can I format my directory so that it will execpt multiple listings in the same category with the same title ? Somebody please help !
E-MAIL AUTHOR | TABLE OF CONTENTS

Table Of Contents
  RE: Multiple listing with same name ? Bill Weiner, 2001-04-05 20:55:37 (1)
            "RE: Multiple listing with same name ?" Chris Bannister, 2001-04-06 09:44:22 (2)
                 RE: Multiple listing with same name ? Bill Weiner, 2001-04-09 21:15:36 (3)
                           RE: Multiple listing with same name Bill Weiner, 2001-04-11 05:08:42 (5)
                                Original Message Chris Bannister, 2001-04-11 09:36:05 (6)

Messages In This Discussion
         1. RE: Multiple listing with same name ?
        Author Bill Weiner on 04-05-2001 at 20:55 (EST)
uDirectory Deluxe requires that each listing has a unique value entered in the "Main Field".

Here are two suggestions to get around this:

OPTION 1: If you specify your listings with Main Field to be the "Job Title", then you would need to adapt some notation to make the Job Title unique. As an example, you could append some unique identifier on the Job Title like this:

Chef (Pos. 12345)
Chef (Pos. 12346)
Chef (Pos. 12347)
etc.

Or maybe just append the "need date" or "posting date" onto the Job Title like this:

Chef (04-05-2001)
Chef (06-01-2001)
Chef (06-08-2001)
etc.

(You get the idea.)

OPTION 2: As another option, you can configure your listings so that the "Main Field" is actually just a position identifier, such as "POS. 12345" or "POS 7573839". This would give you a way to specify a unique "Main Field" for each listing... and then you could use one of the other configurable fields (such as Field 1) as the actual "Job Title".

Note: Choosing option 2 would cause any of your current listings to get messed up. So don't choose that option if you have many listings that you don't want to re-do.
TABLE OF CONTENTS
                 2. "RE: Multiple listing with same name ?"
                Author Chris Bannister on 04-06-2001 at 09:44 (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..
TABLE OF CONTENTS
                         3. RE: Multiple listing with same name ?
                        Author Bill Weiner on 04-09-2001 at 21:15 (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.
4|4|Multiple listing with same name |Chris Bannister|agent_james@hotmail.com|05:54:16|04/10/2001|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
                                         5. RE: Multiple listing with same name
                                        Author Bill Weiner on 04-11-2001 at 05:08 (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
                                                 6. Original Message
                                                Author Chris Bannister on 04-11-2001 at 09:36 (EST)
Thanks once again Bill. It works fine as usual..Great support.
TABLE OF CONTENTS

© 2003 Microburst Technologies, Inc.