Change DOCTYPE

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
dernier_recours
Posts: 66
Joined: Mon 2. May 2005, 17:33
Location: Canada
Contact:

Change DOCTYPE

Post by dernier_recours »

I would like to change the DOCTYPE from

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
to

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
because it seems that HTML 4.01 Transitional corrupts the rendering with IE6.

Which file should I edit?

Thanks!
User avatar
pico
Posts: 2595
Joined: Wed 28. Jul 2004, 18:04
Location: Frankfurt/M Germany
Contact:

Post by pico »

Hi

you will find this in index.php
but if you use XHTML Strict you will not be happy - cause phpWCMS is not generating Strict XHTML-Code.

If you got Problems with
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
there must be something wrong in your Template and/or in Article. If there is everything 'clean', you will get a valid HTML 4.01 Page - maybe some 'Warnings' but it will be rendered by all Browsers.
Lieber Gott gib mir Geduld - ABER BEEIL DICH
Horst - find me at Musiker-Board
dernier_recours
Posts: 66
Joined: Mon 2. May 2005, 17:33
Location: Canada
Contact:

Post by dernier_recours »

Thanks for the answer!

I see... The problem is that the page is a valid HTML 4.01 Transitional, but renders strange margins on IE. If I change the doctype to XHTML strict, everything renders perfect, but the site is not valid... :?

If you have two minutes to take a look:

http://www.dernier-recours.org/
User avatar
pico
Posts: 2595
Joined: Wed 28. Jul 2004, 18:04
Location: Frankfurt/M Germany
Contact:

Post by pico »

Hi

try to change in index.php ~Line 162
from

Code: Select all

$content['page_start']  = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">';
to

Code: Select all

	$content['page_start']  = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">';
Lieber Gott gib mir Geduld - ABER BEEIL DICH
Horst - find me at Musiker-Board
dernier_recours
Posts: 66
Joined: Mon 2. May 2005, 17:33
Location: Canada
Contact:

Post by dernier_recours »

Solved. Pico, you're a genious!!!
:P :P :P

Thanks!
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

dernier_recours wrote:Solved. Pico, you're a genious!!!
:P :P :P

Thanks!
He has *EARNED* his wisdom :wink:

... like his signature says:
Diese Software gibt es GESCHENKT, aber NICHT umsonst !
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hi,

have a look at this: http://www.w3.org/TR/html401/
and for your problem: http://www.w3.org/TR/html401/sgml/loosedtd.html

Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
Kosse
Posts: 1066
Joined: Thu 9. Sep 2004, 12:08
Location: Brussels, Belgium
Contact:

Post by Kosse »

Thx guys, will try that as well, cose all those fancy AJAX moo.fx and others rollover candies only work with XHTML DOC TYPES...
and then phpwcms gets nervous ;)

Cheers
gtz
Posts: 4
Joined: Sun 26. Feb 2006, 21:46
Location: Wuppertal, Germany

Post by gtz »

Hello Kosse,

can you confirm this with the Doctype and AJAX?

If you look at the examples at http://script.aculo.us/, there are full Doctypes according to xhtml, some are just in a shortcut written way and some are even in basic HTML 4.

Gruß,
Götz
User avatar
Kosse
Posts: 1066
Joined: Thu 9. Sep 2004, 12:08
Location: Brussels, Belgium
Contact:

Post by Kosse »

gtz wrote:Hello Kosse,

can you confirm this with the Doctype and AJAX?

If you look at the examples at http://script.aculo.us/, there are full Doctypes according to xhtml, some are just in a shortcut written way and some are even in basic HTML 4.

Gruß,
Götz
Hi gtz,

as far as I know for moo.fx you need to set to XHTML otherwise it won't ork, as for other AJAX snippets, dunno but as you said, a lot of them require XHTML as DOCTYPE.

Cheers
mmm
Posts: 70
Joined: Sun 17. Apr 2005, 18:33

Post by mmm »

should that means, the phpwcms doesn´t work correctly on XHTML 1.0? so all templates i have to write in HTML 4.01?

b.r.
manuel
User avatar
Kosse
Posts: 1066
Joined: Thu 9. Sep 2004, 12:08
Location: Brussels, Belgium
Contact:

Post by Kosse »

mmm wrote:should that means, the phpwcms doesn´t work correctly on XHTML 1.0? so all templates i have to write in HTML 4.01?

b.r.
manuel
Hi Manuel, it "works" with XHTML 1.0, means you can see your pages fine but... with some content parts it doesn't VALIDATE (in W3C stricto senso)

As for moo.fx it needs, as pointed two posts ago, that you change the DOC TYPE, OG doesn't recommend it, but yet again it's because it is semanticly incorrect, but not like you won't see your site.

Cheers
mmm
Posts: 70
Joined: Sun 17. Apr 2005, 18:33

Post by mmm »

ok.

but i think, its better to optimize my site on html 4.01. so i would need the info, where i get access to this meta-tag "description", because my meta-tag description is written in xhtml... in index.php i can´t find the description-meta....

b.r.
manuel
User avatar
Kosse
Posts: 1066
Joined: Thu 9. Sep 2004, 12:08
Location: Brussels, Belgium
Contact:

Post by Kosse »

mmm wrote:ok.

but i think, its better to optimize my site on html 4.01. so i would need the info, where i get access to this meta-tag "description", because my meta-tag description is written in xhtml... in index.php i can´t find the description-meta....

b.r.
manuel
Around line 153...

Code: Select all

	$content['page_start']  = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">';
	$content['page_start'] .= "<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">";
but you can also change it elsewhere (can't remember where though)
Cheers
User avatar
anthony.abraira
Posts: 99
Joined: Sun 11. Sep 2005, 07:42
Location: Mars Hill, NC
Contact:

where can i change doc type in 1.2.8

Post by anthony.abraira »

hey folks,

This little fix made css programming easier than the one that is currently set to my CMS 1.2.8 Right now the doc type reads:

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
How can I change this in the new version. I think it has been moved.
"The trick is living without an answer."
Post Reply