Script URL:
Version of script: 1.34
Version of PHP:
Hosting company: powweb.com
Have you searched THIS FORUM for your problem: yes
(if not please do before posting)
If so, what terms did you try: number
Write your message below:
Hi,
First of all let me congratulate you for such a fabulous tool. I am wondering if I can see the total number of posts (apart from the total number of pages) on the Guestbook main page.
I currently have 1.34 version. How can I have the nubmer of entries feature on the guestbool (even better if we can just number the entries).
Thanks in advance,
Srini
How to number the entries in the guestbook.
Hi,
First of all you should upgrade to the latest version, I don't think a lot of people here have v1.34 and can't really help.
In gbook.php version 1.34 on line 124 (an in 1.41 on line 170) you have a variable called. This variable contains the total number of posts, print it out to HTML wherever you want the total number of posts displayed.
First of all you should upgrade to the latest version, I don't think a lot of people here have v1.34 and can't really help.
In gbook.php version 1.34 on line 124 (an in 1.41 on line 170) you have a variable called
Code: Select all
$total
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Hi,
You're welcome. You are invited (but in no way required) to rate GBook or even post a review at
http://php.resourceindex.com/rate?05414
and/or
http://www.hotscripts.com/Detailed/37192.html
Regards,
You're welcome. You are invited (but in no way required) to rate GBook or even post a review at
http://php.resourceindex.com/rate?05414
and/or
http://www.hotscripts.com/Detailed/37192.html
Regards,
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
So open the gbook.php in an editor. Find
It's about line 745. In this function after the line:
copy this:
$all will show the number of entries 
After the line
insert:
So $num is the number of the entry. Let's write it out. You can use it ex. in line
And the comments will be numbered 
Code: Select all
function printEntries($lines,$start,$end)
Code: Select all
$delimiter="\t";
Code: Select all
$file = "entries.txt";
$all = count(file($file));

After the line
Code: Select all
list($name,$from,$email,$url,$comment,$added,$isprivate,$reply)=explode($delimiter,$lines[$i]);
Code: Select all
$num = $all - $i;
Code: Select all
<td class="upper" width="65%"><b>'.$num.'. Comments:</b></td>
