Gossamer Forum
Home : Products : DBMan : Customization :

print only specific field, as a search result ?

Quote Reply
print only specific field, as a search result ?
Hi,
Anyone know ?

Can it be printed only specific fields, as first search result ?

When we search the db, all of the fields are printed.

I hope the reault can be viewed by two steps.

First, printed 2 or 3 fields only - Let's call "simple search result".
Second, view all of the fields by clicking a link like "view all fields" from "simple search result" page.

Is it possible ?

Please help.
Thank you in advance.


------------------
Quote Reply
Re: print only specific field, as a search result ? In reply to
I haven't looked at that mod since I made the new one. I'll see if I can find the error when I have time.


------------------
JPD





Quote Reply
Re: print only specific field, as a search result ? In reply to
You could use my "short/long" display mod, which is available at
http://www.jpdeni.com/dbman/short.txt

This is a replacement for the html.pl script and allows you to set a "short" display -- a limited number of fields -- which is displayed if more than one record is returned from a search. The short display has a link to a "long" display, which has all the fields, but there is only one record per page.

------------------
JPD





Quote Reply
Re: print only specific field, as a search result ? In reply to
Thank you very mcuh JPDeni

I will try your modification.
It looks good.

However,
I'm not sure whether I can handle it or not because I modified my html.pl file a lot especially to Korean.

I tried to compare two html.pl files (original and your mod). but they are quitely different.

It will take me much time.
Quote Reply
Re: print only specific field, as a search result ? In reply to
There is an older modification that I wrote which might suit you better. It's in the resources center here at Gossamer Threads -- http://www.gossamer-threads.com/scripts/resources/Detailed/35.html

It isn't as good, but it might not take you as much time to work with.


------------------
JPD





Quote Reply
Re: print only specific field, as a search result ? In reply to
Dear JPDeni

Your mod meets error.
Refferenced;
http://www.gossamer-threads.com/...ces/Detailed/35.html

With this modification my browser tries to download the file.

I guess there is something wrong.

I Created a subroutine -- html_record_short
and changed field name.
Then, in html_view_success, I added and replaced according to your direction.

Please, check your mod again

Thank you
Quote Reply
Re: print only specific field, as a search result ? In reply to
Can you make your html.pl file available so I can see it? Copy it to a web-accessible directory -- one where you would put html files -- and rename the file to html_pl.txt. Then come back here and tell me where I can look at it.


------------------
JPD





Quote Reply
Re: print only specific field, as a search result ? In reply to
The url is

http://factory.co.kr/tmp/html_pl.txt
Quote Reply
Re: print only specific field, as a search result ? In reply to
I thought this might be the case from what you said, but I wanted to be sure.

You didn't put in everything that the mod says to. From the mod at http://www.gossamer-threads.com/scripts/resources/Detailed/35.html

Quote:
Create your html_record to be an entire page. Include all of the html tags, from

&html_print_headers;
print qq|<html><head><title>.. through </body></html>|;

The reason the browser tries to download the file is that you're missing the line

&html_print_headers

in your sub html_record. You need to make an entire page out of this subroutine in order for it to work.

(To anyone else reading this, it truly is better to use the mod that's on my site.)


------------------
JPD





Quote Reply
Re: print only specific field, as a search result ? In reply to
Thank you JPD

It works now.

Quote Reply
Re: print only specific field, as a search result ? In reply to
Dear JPD,

Here is little problem.

With adding this on.
Quote:
Create your html_record to be an entire page. Include all of the html tags, from
&html_print_headers;
print qq|<html><head><title>.. through </body></html>|;
At every single records on "delete" and "modify" page to choose one record to work, "<html><head><title>..</body></html> is printed.
It looks very bed

Do you have any solution for this ?

Thank you.
Quote Reply
Re: print only specific field, as a search result ? In reply to
Yep. Use the new short/long display mod. That's why I wrote it.


------------------
JPD





Quote Reply
Re: print only specific field, as a search result ? In reply to
Do you mean this ?

http://www.drizzle.com/~hall/dbmod/short.txt