www.uburst.com www.uburst.com

"Multiple listing with same name ?"

Go back to the LobbyClick here to Go Back to Main ListingClick here to see helpClick here to Search the Forum

uDirectory Configuration Questions
Forum Type: Public
Moderator: edmunds
Time Zone: EST
Printer Friendly Format
Original Message
 
"Multiple listing with same name ?"
Posted by Chris Bannister on Apr-03-01 at 08:39 PM (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 !
Click to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents

 Table of Contents

RE: Multiple listing with same name..., Bill Weiner, Apr-05-01, (1)
"RE: Multiple listing with sam..., Chris Bannister, Apr-06-01, (2)
RE: Multiple listing with same name..., Bill Weiner, Apr-09-01, (3)
Multiple listing with same name , Chris Bannister, Apr-10-01, (4)
RE: Multiple listing with same name, Bill Weiner, Apr-11-01, (5)
Original Message , Chris Bannister, Apr-11-01, (6)

 

 
Click here to goto Click here to goto the Lobby
Messages in this discussion
 
1 . "RE: Multiple listing with same name ?"
Posted by Bill Weiner on Apr-05-01 at 08:55 PM (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.

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
2 . ""RE: Multiple listing with same name ?""
Posted by Chris Bannister on Apr-06-01 at 09:44 AM (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..
Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
3 . "RE: Multiple listing with same name ?"
Posted by Bill Weiner on Apr-09-01 at 09:15 PM (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 | $$);
$random_number = int(rand(10000000));
$random_id = sprintf("POS %09d",$random_number);

(NOTE: The | 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.

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
4 . "Multiple listing with same name "
Posted by Chris Bannister on Apr-10-01 at 05:54 AM (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 ?
Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
5 . "RE: Multiple listing with same name"
Posted by Bill Weiner on Apr-11-01 at 05:08 AM (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!

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
6 . "Original Message "
Posted by Chris Bannister on Apr-11-01 at 09:36 AM (EST)
Thanks once again Bill. It works fine as usual..Great support.
Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents


Archive This Thread: Admin and Moderator OnlyRemove This Thread: Admin and Moderator Only
Click here to goto Click here to goto the Lobby

 

 

 

 

 

 

 

 

 

 

 

 
Questions or problems regarding this bulletin board should be directed to Webmaster
©1997-1999 by DCScripts. All rights reserved.