No include_once for footer.txt in Gbook 1.7

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
hite-site
Posts: 2
Joined: Mon Aug 24, 2009 6:12 am

No include_once for footer.txt in Gbook 1.7

Post by hite-site »

Script URL: http://teresajames.com/gbook/gbook.php
Version of script: 1.7
Hosting company: http://godaddy.com
URL of phpinfo.php: http://teresajames.com/info.php
URL of session_test.php: http://teresajames.com/page1.php
What terms did you try when SEARCHING for a solution:
include_once footer.txt

Write your message below:

I just installed GBook 1.7 and my footer.txt contents are not included in the code generated by gbook.php. I can find the include_once for header.txt in /gbook/templates/default/overall_header.php, but I cannot find an include_once for footer.txt. Have I missed some new implementation requirement? Please advise.

Regards,

Page Hite
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

Hello Page,

I think you have discovered an error in the guestbook. Because after testing it i could not get the text in the footer.txt file to show either.

I think the error is in the overall_footer.php file included in the templates/default folder.

The code in the overall_footer.php is now

Code: Select all

<div class="clear">&nbsp;</div>

<div align="center" class="gbook_bottom">
<?php echo $settings['pages_top']; ?>
</div>

<!--NOSPAM BANNER -->
<?php 
if ($settings['show_nospam'])
{
	?>
	<div id="gbook_no_spam" class="gbook_no_spam" align="center"><a href="http://www.phpjunkyard.com/tutorials/guestbook-spam.php" <?php echo $settings['target']; ?>><img src="<?php echo $settings['tpl_path']; ?>images/no_spam.gif" width="223" height="94" border="0" alt="Stop Guestbook SPAM" title="Stop Guestbook SPAM" /></a></div>
	<?php
}
?>
<!--NOSPAM BANNER END -->

</body>
</html>
I think it should be

Code: Select all

<div class="clear">&nbsp;</div>

<div align="center" class="gbook_bottom">
<?php echo $settings['pages_top']; ?>
</div>

<!--NOSPAM BANNER -->
<?php 
if ($settings['show_nospam'])
{
	?>
	<div id="gbook_no_spam" class="gbook_no_spam" align="center"><a href="http://www.phpjunkyard.com/tutorials/guestbook-spam.php" <?php echo $settings['target']; ?>><img src="<?php echo $settings['tpl_path']; ?>images/no_spam.gif" width="223" height="94" border="0" alt="Stop Guestbook SPAM" title="Stop Guestbook SPAM" /></a></div>
	<?php
}
?>
<!--NOSPAM BANNER END -->

<!--CUSTOM FOOTER -->
<?php
include_once 'footer.txt';
?>
<!--CUSTOM FOOTER END -->

</body>
</html>
And even if this is not the way Klemen has meant the code to be. This way it works correctly.

What remains is for Klemen to fix the code to show the footer.txt contents in the new version.

Greetings,
Henrie
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.
hite-site
Posts: 2
Joined: Mon Aug 24, 2009 6:12 am

Post by hite-site »

Thanks for taking a look at it. I eventually gave up on using header.txt and footer.txt and just modified overall_header.php and overall_footer.php to meet my needs. In the case of the header, it was just easier to get all the scripts and links where they needed to be in the head section.

Regards,

Page Hite
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Right, the code is missing and the one posted by Henrie is correct one to use. Sorry for that, I already updated the download files.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image 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
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

hite-site wrote:In the case of the header, it was just easier to get all the scripts and links where they needed to be in the head section.
I understand what you mean. I noticed this missing too. It has been asked a lot of times to be able to add code to the <head> ... </head> section of GBook. For example by using an additional htmlhead.txt file.
But now with the overall_header.php file it is also not so hard to do.
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.
Post Reply