phpBB writes XHTML instead of HTML 4.01. How to change?

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
User avatar
Bachsau
Registered User
Posts: 61
Joined: Tue Dec 21, 2004 12:00 pm
Location: Germany

phpBB writes XHTML instead of HTML 4.01. How to change?

Post by Bachsau »

In situations, where phpBB has to write automatic code, e.g. in user posts or such things, it writes XHTML attributes. I want to change that, and make phpBB write the fully supported HTML 4.01. But i can't find the PHP-Files responsible for this.

So what do I have to change?
CLee
Registered User
Posts: 511
Joined: Fri Nov 23, 2001 2:42 pm

Post by CLee »

Why not change your template to be XHTML 1.0 complient instead. It would be far easier.
Carlos Myers
A+, Network+
Member - Star Wars Roleplaying Club
User avatar
Bachsau
Registered User
Posts: 61
Joined: Tue Dec 21, 2004 12:00 pm
Location: Germany

Post by Bachsau »

The World is not ready for XHTML. The right mime type for this doesn't work with IE, furthermore there are problems with style sheets.

Sorry, but I don't want to know, what alternatives I have. ;)

I just want to know, where to change the Code. 8)
User avatar
Bachsau
Registered User
Posts: 61
Joined: Tue Dec 21, 2004 12:00 pm
Location: Germany

Post by Bachsau »

Nobody knows? :(
flogger12
Registered User
Posts: 14936
Joined: Tue Nov 25, 2003 2:13 am

Post by flogger12 »

you would probably have to change just about every php file and tpl file in the script.
what exactly have you found that doesn't work in IE? I would think if it was a wide spread problem, that more people would have found it. I don't and never would use IE except to confirm that the reason certain web pages don't work is because they are written using front page. So, if you could give examples, it would help.



robert
CLee
Registered User
Posts: 511
Joined: Fri Nov 23, 2001 2:42 pm

Post by CLee »

I think it is because IE won't render the page when the content type is set to 'application/xhtml+xml'. But since XHTML 1.0 can be legally sent with the content type set to 'text/html', it is a moot point.
Carlos Myers
A+, Network+
Member - Star Wars Roleplaying Club
User avatar
Bachsau
Registered User
Posts: 61
Joined: Tue Dec 21, 2004 12:00 pm
Location: Germany

Post by Bachsau »

Yes, it works with text/html, but the problems with style sheets persist... :?

I don't care of changing some PHP files, i would do it, if I could find out, what is to change...
Cyber Dog
Registered User
Posts: 5
Joined: Tue Mar 29, 2005 2:45 pm

Post by Cyber Dog »

My problem is that my phpBB installation seems to be confused...it mixes XHTML and HTML. I'm not using a modded version, it just seems to be coded this way. For example, the main page is <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">, yet it has many XHTML excaped objects (< />). And yet it's not entirely XHTML either, for example the meta tags are NOT escaped. It seems sloppy if you ask me.
flogger12
Registered User
Posts: 14936
Joined: Tue Nov 25, 2003 2:13 am

Post by flogger12 »

Bachsau wrote: Yes, it works with text/html, but the problems with style sheets persist... :?

I don't care of changing some PHP files, i would do it, if I could find out, what is to change...


what problem with style sheets
please be specific if you want some help here.

robert
espicom
Registered User
Posts: 17905
Joined: Wed Dec 22, 2004 1:14 am
Location: Woodstock, IL

Post by espicom »

what problem with style sheets
please be specific if you want some help here.


Internet Explorer is not CSS2 compliant. It's barely CSS1. Microsoft has promised that IE will become CSS2.1 compliant, but CSS2.1 isn't a complete spec yet.
Jeff
Fixing 1016/1030/1034 Errors | (obsolete link) | MySQL 4.1/5.x Client Error | phpBBv2 Logo in ACP
Support requests via PM are ignored!
"To be fully alive is to feel that everything is possible." - Eric Hoffer
CLee
Registered User
Posts: 511
Joined: Fri Nov 23, 2001 2:42 pm

Post by CLee »

What does that have to do with whether to use HTML 4.01 or XHTML 1.0?
Carlos Myers
A+, Network+
Member - Star Wars Roleplaying Club
Cenobitez
Registered User
Posts: 118
Joined: Tue Aug 31, 2004 1:05 pm

Post by Cenobitez »

Cyber Dog wrote: My problem is that my phpBB installation seems to be confused...it mixes XHTML and HTML. I'm not using a modded version, it just seems to be coded this way. For example, the main page is <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">, yet it has many XHTML excaped objects (< />). And yet it's not entirely XHTML either, for example the meta tags are NOT escaped. It seems sloppy if you ask me.


There are plenty or PAID alternative outs there that are not so sloppy you know.
Cenobitez
Registered User
Posts: 118
Joined: Tue Aug 31, 2004 1:05 pm

Post by Cenobitez »

Bachsau wrote: Yes, it works with text/html, but the problems with style sheets persist... :?

I don't care of changing some PHP files, i would do it, if I could find out, what is to change...


I worked out you would have to know EXTENSIVE Html and edit about 200 tpl, php files, and maybe take you a few weeks.

You would have to RE-WRITE the WHOLE of PHPBB front end, i just did a search for <br /> thru the phpbb folder on my server there was 200+ files matched, so MONUMENTAL task me closer to what you have to do.
Cyber Dog
Registered User
Posts: 5
Joined: Tue Mar 29, 2005 2:45 pm

Post by Cyber Dog »

Cenobitez wrote: There are plenty or PAID alternative outs there that are not so sloppy you know.


Oh I'm well aware, and if I had any intention of paying for a BB I would be using something else.

I just find it strange that they claim compliance on the features page, yet in reality its not compliant with either standard.

I'd actually be happy to contribute some time cleaning up the code, but despite being open source I havn't really found a method for contributing to the project itself.
djr32
Registered User
Posts: 76
Joined: Fri Mar 07, 2003 10:49 am
Location: Cambridge, UK
Contact:

Post by djr32 »

It should be possible to get rid of most of the offending tags without too much trouble - essentially do a search-and-replace on every file ("<br />" --> "<br>", and I'm sure there's a unix command that'll do this recursively for your entire forum directory). <img /> might be more of a pain - would replacing " />" with ">" everywhere be safe? Only one way to find out...

You'll probably not find much enthusiasm for the task simply because most of the world is moving towards xhtml (the Olympus dev board at area51 almost validates as xhtml transitional, for example) , and almost every html 4.01 parser treats "<br />" as equivalent to "<br>". But don't let me discourage you!
Locked

Return to “2.0.x Support Forum”