Comments Page "Number of Entries" lost
Comments Page "Number of Entries" lost
Version of script: 1.7
Since making several modifications to my guestbook with Henrie's assistance, i've now noticed the Number of Entries has disappeared from the top of my comments page.
I've also searched the forum for the answer as encouraged but after reading over the four pages that came up with 'number of entries' in the search box, they only answered changing the number of entries to the comments page, hence my question: how do i restore the number of entries at the top of my comments page?
Since making several modifications to my guestbook with Henrie's assistance, i've now noticed the Number of Entries has disappeared from the top of my comments page.
I've also searched the forum for the answer as encouraged but after reading over the four pages that came up with 'number of entries' in the search box, they only answered changing the number of entries to the comments page, hence my question: how do i restore the number of entries at the top of my comments page?
To All UALs (Unreliable Arrogant Liars), Go Play On The Motorway
Re: Comments Page "Number of Entries" lost
You're probably missing this code in the "overal_header.php" template file:
Code: Select all
<span class="gbook_entries_top"><?php echo $settings['number_of_entries']; ?> <?php echo $settings['number_of_pages']; ?></span>
<br class="clear" />
<?php echo $settings['pages_top']; ?>
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
Re: Comments Page "Number of Entries" lost
checked the overall_header.php and all the code is there KlemenKlemen wrote:You're probably missing this code in the "overal_header.php" template file:Code: Select all
<span class="gbook_entries_top"><?php echo $settings['number_of_entries']; ?> <?php echo $settings['number_of_pages']; ?></span> <br class="clear" /> <?php echo $settings['pages_top']; ?>
To All UALs (Unreliable Arrogant Liars), Go Play On The Motorway
Re: Comments Page "Number of Entries" lost
Try deleting this from your settings file and see if you get any error messages in the guestbook:
Instead paste this code in the settings file
Code: Select all
ini_set('display_errors', 0);
ini_set('log_errors', 1);
Code: Select all
error_reporting(E_ALL);
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
Re: Comments Page "Number of Entries" lost
deleting and replacing that code came up with the following errors:
Notice: Undefined index: number_of_guestbook_entries in /home/vhosts/cmafit.co.cc/CMA Fotography/GuestBook/templates/default/overall_header.php on line 44
Notice: Undefined offset: 9 in /home/vhosts/cmafit.co.cc/CMA Fotography/GuestBook/gbook.php on line 1095
yet line 44 of the overall_header reads: <span class="gbook_entries_top"><?php echo $settings['number_of_guestbook_entries']; ?> <?php echo $settings['number_of_pages']; ?></span>
and line 1095 of gbook.php: ';
Notice: Undefined index: number_of_guestbook_entries in /home/vhosts/cmafit.co.cc/CMA Fotography/GuestBook/templates/default/overall_header.php on line 44
Notice: Undefined offset: 9 in /home/vhosts/cmafit.co.cc/CMA Fotography/GuestBook/gbook.php on line 1095
yet line 44 of the overall_header reads: <span class="gbook_entries_top"><?php echo $settings['number_of_guestbook_entries']; ?> <?php echo $settings['number_of_pages']; ?></span>
and line 1095 of gbook.php: ';
To All UALs (Unreliable Arrogant Liars), Go Play On The Motorway
Re: Comments Page "Number of Entries" lost
I'm not sure how modified your guestbook is, but you will need to find the issue within your code. Most likely $settings isn't set as global within a function of yours. Before calling the template file within gbook.php try adding
Code: Select all
global $settings, $lang;
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
Re: Comments Page "Number of Entries" lost
sorry Klemen but i'm a virgin phper who was ran over by a car so some things needs to be spelt out to me now. pls clarify where to add global $settings, $lang;, to the overall_header or the settings.php???
To All UALs (Unreliable Arrogant Liars), Go Play On The Motorway
Re: Comments Page "Number of Entries" lost
Open gbook.php and find
Just ABOVE that code you should have
Code: Select all
require_once($settings['tpl_path'].'overall_header.php');
Code: Select all
global $settings, $lang;
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
Re: Comments Page "Number of Entries" lost
cAdams,
You should make a backup of the file you are working on to change before making any changes. Name it filename.php.bak1 or so.
And keep that one for backup in case a changed file is not working anymore after your changes. You can than copy back the backup file and overwrite the changed file and try again.
It is impossible for us to see the changes you made because php files are processed by your server so we can only see the output and have to guess what is wrong with the code.
You should make a backup of the file you are working on to change before making any changes. Name it filename.php.bak1 or so.
And keep that one for backup in case a changed file is not working anymore after your changes. You can than copy back the backup file and overwrite the changed file and try again.
It is impossible for us to see the changes you made because php files are processed by your server so we can only see the output and have to guess what is wrong with the code.
I do not monitor the Gbook forums regularly anymore since I do not use the Gbook script myself anymore for a long time. But it helped me a lot in learning to understand php.
Re: Comments Page "Number of Entries" lost
i do have that code above require_once($settings['tpl_path'].'overall_header.php'); Klemen
i also always keep the originals files i work on Henrie so i may need to ftp the original gbook.php and re-do all the modifications from scratch
i also always keep the originals files i work on Henrie so i may need to ftp the original gbook.php and re-do all the modifications from scratch

To All UALs (Unreliable Arrogant Liars), Go Play On The Motorway
Re: Comments Page "Number of Entries" lost
I mean after a small change that is working, backup your file before making the next change. So that you do not have to start all over again.cAdams wrote:i also always keep the originals files i work on Henrie so i may need to ftp the original gbook.php and re-do all the modifications from scratch
I do not monitor the Gbook forums regularly anymore since I do not use the Gbook script myself anymore for a long time. But it helped me a lot in learning to understand php.
Re: Comments Page "Number of Entries" lost
In that case the problem is hidden somewhere in your customizations and not something we can "guess" as we have no idea how your file looks like.
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