How to customize the header and footer.txt files

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
mgarcia
Posts: 4
Joined: Mon Mar 23, 2009 4:36 am

How to customize the header and footer.txt files

Post by mgarcia »

Script URL:
Version of script:1.6
Hosting company: self
URL of phpinfo.php:http://galina.mgarcia.com.au/phpinfo.php
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

Write your message below:

I wish to customise the header.txt file to reflect my own style.

I have added the code I want and saved the file as a .txt file as per the instructions within the readme file quote

"You may edit header.txt and footer.txt files to add your own header and footer to the links page. You will have to use full image URLs in the code. For example instead of <IMG SRC="images/image.jpg" ... > use <IMG SRC="http://www.yourdomain.com/images/image.jpg" ... >! Same goes for any Javascripts or CSS files if you are calling them from within the header or footer."

I am unable to change the visual of the web page when I use the following code -

include_once '/gbook/header.txt';

Header resides within the gbook directory.

What am I doing wrong?

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

Post by Henrie »

I am unable to change the visual of the web page when I use the following code -

include_once '/gbook/header.txt';
You should not need to include this code yourself. It is already present (as include_once 'header.txt'; inside the gbook.php file. So if you edited the gbook.php file and added or change the include_once line, please remove it or change it back to the original value (even easier, upload the original gbook.php file from the zip file again).

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.
mgarcia
Posts: 4
Joined: Mon Mar 23, 2009 4:36 am

Post by mgarcia »

Thanks Henrie, I did in fact amend the header.txt file, I did not change the original code it is as it was "include_once '/gbook/header.txt';"


Regards
mgarcia
Posts: 4
Joined: Mon Mar 23, 2009 4:36 am

Post by mgarcia »

mgarcia wrote:Thanks Henrie, I did in fact amend the header.txt file, I did not change the original code it is as it was "include_once '/gbook/header.txt';"


Regards
I am still looking to resolve this question...could it be that the suffix is .txt should it be something else like .htm any other reason it is not finding the file to include?
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

Hmm, in gbook.php version 1.6 line number 1082 is

Code: Select all

include_once 'header.txt';
If in your version of GBook you say it is
include_once '/gbook/header.txt';
you should change it to the code i mentioned before. Or better upload the original gbook.php included in the zip-file you downloaded from phpjunkyard.com.

The header.txt (the extension is correct as .txt) can not be found because with '/gbook/header.txt' gbook.php will look in place other than where header.txt file is located

Example.
include_once 'header.txt'; looks for header.txt file here:
http://galina.mgarcia.com.au/gbook/header.txt
The faulty code include_once '/gbook/header.txt'; looks (like i said before) for header.txt file in a place other than where header.txt file is located.

Also, the text you have included in header.txt file is
"hello"
. This text will not display because of the quotes. Try using some valid html like <p>Hello</p>

Goodluck,
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.
mgarcia
Posts: 4
Joined: Mon Mar 23, 2009 4:36 am

Post by mgarcia »

Thanks for the help I have resolved as per ur tip. Now I just have to work out how to get the display as I would like it.
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

Glad you got it working.

Succes with editing the code in the header.txt file.

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.
Post Reply