URL: http://www.uburst.com/cgi-bin/dcforum/dcboard.cgi
Forum: udir_script_mod
Thread Number: 17
[ Go back to previous page ]

Original Message
""Click HERE to view your listing shows wrong page.""

Posted by Frank [fgwhite@earthlink.net] on at 02:39 PM
When someone adds a listing the results pages says "Click HERE to view your listing." Unless the listing comes up on the first page in the category the listing is not shown.

Can this be changed to search for the listing so that the listing will come up as a search result? If so, I'd like to have hack, if this issue has not already been addressed.


Table of contents

Messages in this discussion
"RE: Click HERE to view your listing shows wrong page."
Posted by Bill Weiner on at 06:41 AM
That would problably require modifying the "display_thankyou" subroutine. I'll look at it later today and see what I can come up with.

"RE: Click HERE to view your listing shows wrong page."
Posted by Bill Weiner on at 06:31 AM
I took a look at the "display_thankyou" subroutine and I believe this would be the easiest way to modify that subroutine such that a search for the new/modified listing is performed:

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

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

STEP 3: Do search on the following line:

sub display_thankyou

(This will get you to the start of the relevant subroutine).

STEP 4: About 21 lines into that subroutine, you will see a line with the following text in it:

$gHtml_url . $link_page . "\#" . $main_link

STEP 5: Replace that text (not the whole line - just the above text), with the following text:

"$script_url\?command=search\&search_field=KEY\&search_words=$m_field\&category_file=$cat_file"

(yes, put double-quotes around it)

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


"Thanks Bill"
Posted by Frank [fgwhite@earthlink.net] on at 01:41 PM
It works like a charm.