Gossamer Forum
Home : Products : DBMan : Customization :

Search results in html

Quote Reply
Search results in html
I would like to have my results show in a page like this http://www.invisiongrafix.com/...r/bus_businesses.htm

When I add a table to the html.pl it prints with each record. I need the results to show within a table. I can use an iframe but would prefer to alter html.pl if possible.
Quote Reply
Re: [rdub] Search results in html In reply to
You need to look at your html page and figure out where you want your dbman output to go. You will have something like
  • html code at the top of the page
  • DBMan output
  • html code at the bottom of the page


The "user-friendly" file is specifically designed to handle this situation. Put the "html code at the top of the page" into sub html_page_top and the "html code at the bottom of the page" into sub html_page_bottom.


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
Quote Reply
Re: [JPDeni] Search results in html In reply to
The way the site pages are set up there is a table with various and oft changing graphics at the top, the bottom and both sides. Also, links on the left.
Quote Reply
Re: [rdub] Search results in html In reply to
If you change the html page, then you'll also have to change the html.pl file.

Unless you want to try to use SSI with DBMan. If so, I'm sure someone else will be willing to help you, because that's something I know nothing at all about.


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
Quote Reply
Re: [JPDeni] Search results in html In reply to
Don't mind changing the html.pl file. Do I just move this up to where I want the results to show within the table?

# Go through each hit and convert the array to hash and send to
# html_record for printing.
for (0 .. $numhits - 1) {
print "<P>";
&html_record (&array_to_hash($_, @hits));
}
if ($db_next_hits) {
print "<br><$font>Pages: $db_next_hits</font>";
}

print qq|

Quote Reply
Re: [rdub] Search results in html In reply to
No.

Use the "user-friendly html.pl" file. Make your changes to the subroutines I mentioned above.

I'm thinking that we are talking about two completely different things here and not understanding each other. Can you explain exactly what you want to do?


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
Quote Reply
Re: [JPDeni] Search results in html In reply to
Here is what I have now. The search results show below all of my html. I would like it to appear within the body of the page. For instance, where it says Businesses in Idyllwild.

http://www.invisiongrafix.com/...records=View+Records

Am I going in the wrong direction?

user: admin
password: admin
Quote Reply
Re: [rdub] Search results in html In reply to
I just inherited this site. I need to work within the existing look if possible.
Quote Reply
Re: [rdub] Search results in html In reply to
If you want your results to be just after "Businesses in Idyllwild," then copy all of the html code from your page that's above that place and put it in the subroutine for the page top. Copy all of the html code from your page that's below that place and put it in the subroutine for the page bottom. Your search results should fit right in the middle.

You really want to get rid of that frame on your page. I think that may be your biggest problem.


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
Quote Reply
Re: [JPDeni] Search results in html In reply to
What about the images that run down both sides of the page? There will be graphics down both sides. It is like a table with 3 cells across and one at the top and one at the bottom. I need the results in the center cell. If I do it as you suggested I'll lose the cells (graphics) an each side. If I can do this I can get rid of the iframe idea.
Quote Reply
Re: [rdub] Search results in html In reply to
I don't think you will. Your results will end up in the middle of the page. The table cells will start in the "page top" subroutine and end in the "page bottom" subroutine, with the search results in the middle.

The best thing I can suggest is that you give it a try. Keep a copy of your html.pl file that you have now and then try what I suggested. If it doesn't work, all you have to do is put back the other one and you're no worse off than you were before. If it does work, then you've got it. You can't lose. :-)


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
Quote Reply
Re: [JPDeni] Search results in html In reply to
Sorry, I don't see a subroutine for the page top and page bottom.
Quote Reply
Re: [rdub] Search results in html In reply to
Are you using the "user-friendly html.pl" file? The subroutines are in there. I rewrote the html.pl file so it would be easier to alter the structure of the page.

The file is at http://www.jpdeni.com/dbman/Mods/html_pl.txt


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
Quote Reply
Re: [JPDeni] Search results in html In reply to
OK. I think I've got it. Now I need to move my export to excel and mass mail mod to the user friendly html.pl. Is this correct?
Quote Reply
Re: [rdub] Search results in html In reply to
There shouldn't be too much to do. Only do one thing at a time, though, and test it before you do something else. That way if there's a problem it'll be easier to pin down.


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.