HTML code showing in title bar?

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
Heidi
Posts: 3
Joined: Fri Dec 14, 2012 3:07 am

HTML code showing in title bar?

Post by Heidi »

Hi, can someone please help? I'm using an image instead of text for the title of my guestbook at the top of the page - a similar post on how to do this is here: viewtopic.php?f=7&t=3628

Problem is, my code is showing up in the title bar as the title of the page, even though it shouldn't, as my website title has the correct title and the image is used under guestbook title. Can someone please help me fix this?

Here is the link to my guestbook: http://ghosthuntergirls.com/guestbook/gbook.php
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Re: HTML code showing in title bar?

Post by Klemen »

Seems fine here - did you manage to fix it or am I missing something?
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
Heidi
Posts: 3
Joined: Fri Dec 14, 2012 3:07 am

Re: HTML code showing in title bar?

Post by Heidi »

I can still see it on my end, in both IE and Firefox. Look up at the top of the page where it displays the name of the webpage you're viewing.

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

Re: HTML code showing in title bar?

Post by Henrie »

Klemen, you are indeed missing something. Somehow the image code is added to the <title> tag of the page.

Code: Select all

<title><img src="/images/banners/GHGBanner1.jpg"></title>
I think Heidi used the $settings['gbook_title']="My guestbook"; inside the settings.php file.

Because the text from $settings['gbook_title']="My guestbook"; is also used in notification mails, it is best to not put the image code there, but just put a guestbook title in text there.

To put the image in the guestbook title instead of the simple text, you can best edit the file overall_header.php which can be found in templates/default/.
There you can find line 30

Code: Select all

<h1 align="center"><?php echo $settings['gbook_title']; ?></h1>
Change it to

Code: Select all

<h1 align="center"><img src="/images/banners/GHGBanner1.jpg"></h1>
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.
Heidi
Posts: 3
Joined: Fri Dec 14, 2012 3:07 am

Re: HTML code showing in title bar?

Post by Heidi »

A-HA! Thank you Henrie!!!! :D

That fixed it right up. Thanks so much for the help!
Post Reply