coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: Jr. tristan on August 20, 2006, 12:13:46 PM

Title: An empty space displayed on top of the page
Post by: Jr. tristan on August 20, 2006, 12:13:46 PM
I have integrated Viper guestbook to my cpg 1.4.8. see it >here<. (http://www.dnvision.net/guestbook.php)
It all works fine except an empty space displays on top just over the menu with /guestbook.php.
On the other hand, no such problem was noted on main page.

When I replace my custom-edited template.html to the original one, the problem was resolved.
I figure it out that it was due to my custom-edited template.html being saved in utf-8 format (becoz my gallery is bilingual).

Can anybody give solution for me to remove such ugyly empty space?
Title: Re: An empty space displayed on top of the page
Post by: Gizmo on August 20, 2006, 01:03:08 PM
When I look at your source, on the first line I see this "" before the doctype declaration. Check your template.html to see if this there and if so remove it.
Title: Re: An empty space displayed on top of the page
Post by: Jr. tristan on August 20, 2006, 01:32:43 PM
Quote from: Gizmo on August 20, 2006, 01:03:08 PM
When I look at your source, on the first line I see this "" before the doctype declaration. Check your template.html to see if this there and if so remove it.

I have searched through my template.html. I do not find such "".
Would it be the problem of Notepad?
Title: Re: An empty space displayed on top of the page
Post by: Gizmo on August 20, 2006, 02:08:59 PM
Are you saving the files as simple text format? Are you confusing Wordpad with Notepad?
Title: Re: An empty space displayed on top of the page
Post by: Jr. tristan on August 20, 2006, 03:31:57 PM
Quote from: Gizmo on August 20, 2006, 02:08:59 PM
Are you saving the files as simple text format? Are you confusing Wordpad with Notepad?

First of all, Thank you for your fast reply.
I redo and then upload, it still doesn't work. and I could be quite sure that I am using Notepad.
Title: Re: An empty space displayed on top of the page
Post by: Sami on August 20, 2006, 03:35:41 PM
- as gizmo said you have error on your custom theme
- zip your theme and put it here we will look in to it
Title: Re: An empty space displayed on top of the page
Post by: Gizmo on August 20, 2006, 04:33:49 PM
Since the only page affected is the Guestbook, I'm not sure it's a theme issue. Check your guestbook.php file and maybe the admin.php file located in the guestbook directory to see if that string of characters show up. Use a tool like Windows Grep to search your directory for this string.

Also, disabling right-clicking is lame.
Title: Re: An empty space displayed on top of the page
Post by: Nibbler on August 20, 2006, 04:42:10 PM
The guestbook is using ISO-8859-1. UTF-8 content can't be displayed correctly on an ISO-8859-1 page.
Title: Re: An empty space displayed on top of the page
Post by: Nibbler on August 20, 2006, 04:47:34 PM
The charset is hardcoded into your template

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

Change that to

<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
Title: Re: An empty space displayed on top of the page
Post by: Joachim Müller on August 20, 2006, 09:34:14 PM
Quote from: Jr. tristan on August 20, 2006, 01:32:43 PM
Would it be the problem of Notepad?
Yes: the funny chars are called "Byte Order Mark (http://en.wikipedia.org/wiki/Byte_Order_Mark)" (aka BOM). They don't get displayed in notepad. They mistakenly make it into the file if you edit utf-8 files with an editor that doesn't handle utf-8 encoded files properly. Notepad probably is the culprit. I use "Replace in Files (http://www.emurasoft.com/replall/)" by Emurasoft to mass-remove the BOM from many files at once.
Title: Re: An empty space displayed on top of the page
Post by: Gizmo on August 20, 2006, 10:32:28 PM
I'll chalk this one up to a learning experience for myself. Thanks guys.
Title: Re: An empty space displayed on top of the page
Post by: Tranz on August 20, 2006, 11:58:15 PM
In the guestbook admin, you can change the encoding. See if that helps.
Title: Re: An empty space displayed on top of the page
Post by: Jr. tristan on October 23, 2006, 03:18:23 PM
Quote from: GauGau on August 20, 2006, 09:34:14 PM
Yes: the funny chars are called "Byte Order Mark (http://en.wikipedia.org/wiki/Byte_Order_Mark)" (aka BOM).

;D Well. The problem was resolved after the template.html was created once again by EmEditor Free (http://www.emeditor.com/modules/download2/). There is an option check box for no entering any BOM. Now, I used this program instead of Notepad.

Thank you for the kind assistance from all of you. :D