Vertical length of 'View Guestbook' page

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
hptschupp
Posts: 3
Joined: Tue Jan 09, 2007 5:45 am

Vertical length of 'View Guestbook' page

Post by hptschupp »

Script URL: http://www.hanspetertschupp.com/guestbook.htm
Version of script: latest
Hosting company: Inmotionhosting
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

Write your message below:

Guest book works fine in all regards. Excellent script!

Question: How can I change the 'vertical length' of the 'View Guestbook Page'. I assume after a certain number of posts or a certain number of text lines it will change to a new page...1 2 3 etc. Which parameter determines the vertical lenght before it switches to a new page?

Hanspeter Tschupp
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

Hello Hanspeter,

In the gbook.php file is coded that a page contains 10 postings and then creates a new page.

Greetings,
Henrie
hptschupp
Posts: 3
Joined: Tue Jan 09, 2007 5:45 am

Post by hptschupp »

Thanks Henrie,

let's say I only want 3 postings per page, what would I have to change? I assume it will be somwhere here:
$page=gbook_isNumber($_REQUEST['page']);
if ($page>0) {
$start=($page*10)-9;$end=$start+9;
} else {
$page=1;$start=1;$end=10;
}

$lines=file($settings['logfile']);
$total = count($lines);

if ($total > 0) {
if ($end > $total) {$end=$total;}
$pages = ceil($total/10);
I tried to change the $end=10 from 10 to 3 but I assume there are other places which need a change so the page change-over works correctly. Just changing this value restricts it to 3 postings per page, but the page change-over is not happening when more than 3 posts are present.

Could you help?
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

Hello Hanspeter,

See the following topics:
viewtopic.php?t=464
and
viewtopic.php?t=527

Greetings,
Henrie
hptschupp
Posts: 3
Joined: Tue Jan 09, 2007 5:45 am

Post by hptschupp »

Excellent Henrie. That was a great help.

Thanks.

Hanspeter Tschupp
Post Reply