Gossamer Forum
Home : Products : DBMan : Customization :

10 hits per page with the short viewing

Quote Reply
10 hits per page with the short viewing
Can't we determine the number of hit per page
or is it 10 obligatory?

What should we change in the friendly html.pl
to get pages with an hundred of Hits ?

Thank you in advance
Quote Reply
Re: 10 hits per page with the short viewing In reply to
Change the $db_max_hits variable in the .cfg file.

$db_max_hits = 10;

Change to

$db_max_hits = 100;

Quote Reply
Re: 10 hits per page with the short viewing In reply to
How can you be so fast ?

Thank you very much
Quote Reply
Re: 10 hits per page with the short viewing In reply to
It works perfectly now

Thanks again
Quote Reply
Re: 10 hits per page with the short viewing In reply to
I have a question that relates to the hits per page configuration...One of my clients would like to show ALL RECORDS (not spanning) with the option for end users to choose the following selections for "Records Per Page":

10
25
100
All

He would like to have a drop-down menu of these options. I know that I can change the $db_max_hits variable, but I was wondering if anyone has converted the blank field for "records per page" to a drop-down menu. In addition, if anyone has customized their script to include a set of values for the drop down menu, I would greatly appreciate it if you would share your codes with us.

(I know it is strange request because as all good web programmers and designers know showing a large database at one time on one scrolling screen is NOT effective. But what are ya gonna do when clients demand mods...not ask, but demand.)

Smile

TIA.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited July 12, 1999).]
Quote Reply
Re: 10 hits per page with the short viewing In reply to
In sub search options, include

Code:
open (DB, "<$db_file_name") or &cgierr("unable to open db file: $db_file_name.\nReason: $!");
if ($db_use_flock) { flock(DB, 1); }
@lines = <DB>;
close DB;

$number_of_records = scalar(@lines);

print qq|
<SELECT NAME="mh">
<OPTION>10
<OPTION>25
<OPTION>100
<OPTION value="$number_of_records">All
</SELECT>
|;


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





Quote Reply
Re: 10 hits per page with the short viewing In reply to
Thanks, Carol! I will test that to see if it works! I hope my client appreciates it.

Works like a charm!

Thanks, Carol. While I was initially reluctant to implement this mod, I see the benefit in some of my other projects at the College, particularly the Class Schedules. By allowing people to see all the records in a certain class, they can print out one page versus clicking on multiple pages and then printing out those pages.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited July 13, 1999).]