Gossamer Forum
Home : Products : DBMan : Customization :

New short/long display mod

(Page 1 of 2)
> >
Quote Reply
New short/long display mod
A while back, Mart asked about a short/long display mod that would include links so that the user could "page through" the long displays instead of having to go back to the short display to select a record to view. My first response was "You can't do that." My second response was "You can probably do that, but I have no idea how."

Well, it's been fermenting in the back of my mind for a few weeks and I think I have it. So far, it seems to work. In the "long" display, you can have "Previous" and "Next" links at the top and then a link that will take the user back to the search page. It also lists the "record x of n" at the top of the full display.

I made lots of notes on this one and it may be a little easier to understand than the previous mod.

If you're interested, you can pick it up at

http://www.jpdeni.com/dbman/short.txt

Please let me know if you have any questions or if it works for you.


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







[This message has been edited by JPDeni (edited May 27, 1999).]
Quote Reply
Re: New short/long display mod In reply to
The short/long display mod has been the most useful mod of this script. However, correct me if I am wrong (I have no time to try out this latest mod yet), regarding this latest additional feature of viewing one long record at a time with "next" and "previous" links, I thought that if you set your "$db_max_hits" to "1" (one), then you will get the same thing? As for the link back to the search page, the footer already offers such a link, right?

I greatly appreciate what you have done so far, and I stand to be corrected. Thank you.
Quote Reply
Re: New short/long display mod In reply to
Sam, you certainly can set your $db_max_hits to 1 and you will get pretty much the same thing as the long display in my mod. The difference will be that you will also get a list of numbers with links for all the other records (which you may want) and you'll also not get the short display, without manually setting the max_hits on the search form.

The footer offers a link to "List All." The link back to the short display conducts whatever search the user entered on the view_search form. If you want users to only be able to "List All," then you don't need the mod.

Also, the link in the mod takes the user to the page where the current record would be in the short display. (What did she say?!) Let's say you did a search and 40 records were returned, with a max of 10 records per page. You select record 5 on page one of the short display and then page through the long displays until you reach record 15. Then you click the "Return to short display" link. It will take you to page 2 of the short display so you don't have to start over from scratch.

My database is not finished yet, but if you want to see how I've used the short and long display, you can go to
http://www.jpdeni.com/cgi-bin/dbman/db.cgi?db=default&uid=default
to see how it works.

Mart, I looked for the post where you asked for this feature, but I couldn't find it. If I could have found it, I would have posted it there.

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





Quote Reply
Re: New short/long display mod In reply to
Wow, I have been posting some ? about the short/long display in the installation forum. I just took a peek at this Mod and I LIKE it. I will use this for sure...now I just need the table..and I think I will be finished..I am loving this...
Quote Reply
Re: New short/long display mod In reply to
Perfect!!, It works.
I only had to change your -print"...":- in -print qq|...|;-, also the html.pl file needed a "}" in the end. Is there an explanation for that "}"???

But anyway, its great!!!
Quote Reply
Re: New short/long display mod In reply to
If you have quotation marks within a print statement, yes, you do need to change the

print "...";

to

print qq|...|;

I'm not sure where you needed to make the change, though.

Where was the missing } ? I thought I caught all of them, but I could have missed something.

Glad you like it. It seems I do my best programming when I'm asleep, since I just woke up one morning and knew how to do it. I'm sure it had been working on its own in the back of my brain, but finally it came to the forefront. Smile




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





Quote Reply
Re: New short/long display mod In reply to
WHY DON'T YOU TELL ME, I CAN'T WAIT TO TRY!!

THANKS!!
Quote Reply
Re: New short/long display mod In reply to
I don't know, where the missing "}" has to be placed. The script asked for it at the bottom of it's lines, below "1". I wonder, if thats good.

One point of very, very little comment:
In your mod, you speak of a <-- html.pl -- NEW SUBROUTINE! -->
I rather has replace it with my old sub 'html_record_long'. At this time, it is not clear to me yet, what you meant with that 'NEW SUBROUTINE'. You called it '&html_record_long', is this maybe the way to present that replacement??

Anyway, Thank you very very much. Smile Smile
Quote Reply
Re: New short/long display mod In reply to
The "New subroutine" is new to those who are using the short/long display for the first time.

I guess I won't worry about the }, as long as your script works for you. If anyone else has a problem, please let me know.


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





Quote Reply
Re: New short/long display mod In reply to
No, it's just the clicking on the record for the long display, what makes the script confuse.... Frown
Quote Reply
Re: New short/long display mod In reply to
I've got a serious problem with this mod, maybe it's a typo or something but:
When I will delete or modify some record, I have the screen, lets say 'delete' , with 10 short records in my screen. When I clicked one of the records, to see the long version, I get another short record, and the script says that there are a number of pages, that there are records to delete, so the number of records became number of pages, and when I clicked that one, the screen refresh, but not the long version was showed up. I search on this, but at this time without any succes.

I looked at the defenition of the link of the record. It ends with '...&delete_form=1&ID=*&nh=14&mh=1', and I notice, that every record has that same link. What is wrong, I hope you see this.
Quote Reply
Re: New short/long display mod In reply to
I see what you mean. I was really just concerned about the viewing and making a table out of the records for deleting. I didn't think about clicking on the record to see the long display.

How do you want it to work? There are a number of ways I could change it, but I might as well start with the way you want it.

Do you want to be able to delete the record from the long display?

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





Quote Reply
Re: New short/long display mod In reply to
Glad you see, I was realy worried.
For the way, I want it to work, depend from the options, what is possible. I think, in the first place, the records must be deleting from the short (first screen for the registered user) way. If it's not much work, it suits the programm, if it has the option, that you could delete the record from the long display. I wonder, for my learning process, if this problem has to do with '%tmp'??
I'll wait for the answer.
Thanks Smile,
Mart.
Quote Reply
Re: New short/long display mod In reply to
Okay. I'll make it so you can modify or delete records from the long display. I'll have some time today before I hear back from some clients, so I can work on it. I'll post it here when the new mod is ready.


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





Quote Reply
Re: New short/long display mod In reply to
No, I meant in the first place, that the records must be delete or modify from the short display and secondly, if it is not much extra work from the long display, OK?? Smile
Quote Reply
Re: New short/long display mod In reply to
Yes. From both the short and the long. Modifying and deleting from the short display isn't a problem, is it? I'm able to.



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





Quote Reply
Re: New short/long display mod In reply to
I'm working on it, but I had to take a break.

The new mod will be the entire "user-friendly html.pl" file, with the changes for short/long in it. It was too confusing to figure out where to tell you to make the changes.


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





Quote Reply
Re: New short/long display mod In reply to
Can you make that changes bold or something??
It's very complicated for me to rewrite three html.pl's Frown
Thanks anyway

--------
Mart
Quote Reply
Re: New short/long display mod In reply to
Well, I don't think it's as confusing to update your html.pl file as it is to write the mod in the first place and to try to figure out what people already have in their files that you have to account for.

However, if you will place your html.pl file in an accessible directory, I'll pick it up and make the changes for you. This offer is for anyone who has used the short/long mod in the past week and wants the new, updated version of it. Just let me know where it is.

Please do not send your files to me by email.


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





Quote Reply
Re: New short/long display mod In reply to
I've post it on http://www.autorandstad.nl/html_pl.txt

Maybe you can look at any unuseful <table>, <tr>, <td> or <center> start or end -tags. It give some problems in Netscape 4.0. It won't give the heathersometimes, also the -terug- button refuse sometimes.

Thanks,
Greetings,

-----------
Mart.
Quote Reply
Re: New short/long display mod In reply to
I have your script uploaded on my site at http://www.jpdeni.com/Marthtml_pl.txt

I'm afraid I can't help you with the "terug" button. I don't know anything about Javascript. (I think that's Javascript, anyway.)

I did fix a couple of the table tags that I saw problems with, although I can't be certain I found them all.


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





Quote Reply
Re: New short/long display mod In reply to
 Smile
Quote Reply
Re: New short/long display mod In reply to
I'll try to get to it tomorrow.




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





Quote Reply
Re: New short/long display mod In reply to
I'd like to take you up on your offer wherein you will modify the long/short display for those posting the html.pl file in an accessible directory.

I'm interested in the same exact thing as mart -- that is to be able to delete or modify from the short display but also be able click on the item and see it in the long version prior to deleting or modifying.

My file is paul_html.pl.txt and is at
http://192.41.11.48/paul_html.pl.txt

Thanks in advance.
Quote Reply
Re: New short/long display mod In reply to
Okay, guys. Your scripts are on my site.

Mart, it's the same URL as before -- http://www.jpdeni.com/Marthtml_pl.txt

Pablo, yours is at http://www.jpdeni.com/paul_html_pl.txt

Of course, I couldn't check them to make sure they work, but I did check them for syntax errors.

If you have any trouble, let me know.

And if anyone else used the new mod last week and would like to update it to the revised new mod, speak up now. The offer is ending very soon.


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





> >