Page 1 of 1

Vertical length of 'View Guestbook' page

Posted: Tue Jan 09, 2007 5:58 am
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

Posted: Tue Jan 09, 2007 5:04 pm
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

Posted: Wed Jan 10, 2007 4:13 am
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?

Posted: Wed Jan 10, 2007 5:14 pm
by Henrie
Hello Hanspeter,

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

Greetings,
Henrie

Posted: Thu Jan 11, 2007 2:57 am
by hptschupp
Excellent Henrie. That was a great help.

Thanks.

Hanspeter Tschupp