Gossamer Forum
Home : Products : DBMan : Customization :

New short/long display mod

(Page 2 of 2)
> >
Quote Reply
Re: New short/long display mod In reply to
Thank you JPD, it works.
----------
Greetings,
Mart
Quote Reply
Re: New short/long display mod In reply to
I would like to use the new short/long mod, I have been using the older short/long mod - what do I need to do to implement the new mod?

My html.pl is at:

http://cocoahighalumni.com/html_pl.txt
Quote Reply
Re: New short/long display mod In reply to
I am just now implementing dbman, and in thinking about how to set it up, decided I needed something along the lines of what the long/short display will do, and discovered this discussion.

It appears you'r modifying others html.pl Given at this point I have yet to make any modifications, is it possible to get a generic copy of the long/short "user friendly" html.pl

Thanks in advance.
Quote Reply
Re: New short/long display mod In reply to
Yep. It's at http://www.jpdeni.com/dbman/short.txt

The form and record display subroutines are exactly as are in the demo.

One thing to be careful of, though. You can't use autogenerate with this file, except for the form. You'll have to define your own html_record and html_record_long.

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





Quote Reply
Re: New short/long display mod In reply to
Thanks for working on the html.pl file. Doesn't seem to work for me or I misunderstand what is supposed to happen.
My understanding:
We set a search criterion and get a list of results(short) then we click on an item to see full details. OK -- this works fine in the view, view success routines.

2. The new fix was to allow the same thing to happen from the modify and delete forms. That is , we get a short list of items for consideration of modification, then we can click on an item in the list to see it's details before deciding to select and item for modification (or deletion).

This part isn't working -- can't see the details when clicking on an item in the short list.

I'm wondering if the mod got made in the file you had for me at your web site? Don't see anything different in the html.pl file.
Quote Reply
Re: New short/long display mod In reply to
Paul, look in your html_modify_form subroutine and see if you can find the following code:

Code:
if (($db_total_hits == 1) | | ($maxhits == 1)) {
print qq|
<p><$font>
If you would like to modify this Inn's data, select the button and then press "Modify Record":</font>
|;
%tmp = &array_to_hash(0, @hits);
print qq|<INPUT TYPE=RADIO NAME="modify" VALUE="$tmp{$db_key}">|;
&html_record_long(&array_to_hash(0, @hits));
}
else {
print qq|
<p><$font>
Check which Inn's data you wish to modify and then press "Modify Inns":<br>
Your search returned <b>$db_total_hits</b> matches.</font>
|;

if ($db_next_hits) { print "<br><$font>Pages: $db_next_hits</font>"; }

$i = 1;
print "<table>";
for (0 .. $numhits - 1) {
%tmp = &array_to_hash($_, @hits);
print qq|<TR><TD valign=top><INPUT TYPE=RADIO NAME="modify" VALUE="$tmp{$db_key}"></TD>|;
&html_record (%tmp);
print "</tr>";
++$i;
}
print "</table>";
if ($db_next_hits) { print "<br><$font>Pages: $db_next_hits</font>"; }
}

If you don't see exactly that code, go pick up the file again. Be sure that you use the new file and not your old one.



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





Quote Reply
Re: New short/long display mod In reply to
I JPD,
Maybe you've notice it yourself, but in the mod you have to change in 'html_add_succes' the rule --&html_record(&get_record($in{$db_key}));-- in --&html_record_long(&get_record($in{$db_key}));--, that will make it a perfect mod, am I right???
Quote Reply
Re: New short/long display mod In reply to
HI JPD,
Maybe you've notice it yourself, but in the mod you have to change in 'html_add_succes' the rule --&html_record(&get_record($in{$db_key}));-- in --&html_record_long(&get_record($in{$db_key}));--, that will make it a perfect mod, am I right???
Quote Reply
Re: New short/long display mod In reply to
Well, it's not perfect, because some people are still having problems with it. (To those who have written, I'm trying to figure out the problem.)

Thanks for mentioning the bug. Someone else did mention it and I've fixed it. But I appreciate being told. Smile



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





Quote Reply
Re: New short/long display mod In reply to
Thanks Carol -- somehow the wrong file got loaded on my site -- your mod was great.

Is there some way to keep a master mod of these modifications with annotations as to changes? It seems like some mods are made as bug discoveries and others are modifications for specific uses -- this is just a suggestion but may help people keep upto date and in sync.

Thanks again
Quote Reply
Re: New short/long display mod In reply to
I don't know how, Paul.

When I'm writing the instructions for a mod, I always have to keep in mind that many people don't have basic understanding of Perl (like remembering to close off a print statement) and that just about everyone will have made changes already to their scripts which I can't anticipate. When I made this change, I couldn't be sure which original html.pl file someone had (whether they used "user-friendly" or not). I would have had to write separate mod instructions for those with "user-friendly," those who were using the original html.pl file, those who had used the "short" display before (both types) and those who didn't.

I really need to be able to write for those who are basically on the "same page" as I'm on. Or, I can just write a new file and people can paste their own modifications into the new file.

My suggestion is that each user mark their own modifications so that, when a new mod comes up or a new version of DBMan is realeased, they will be able to transfer their work to the new one.

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





> >