March 3rd, 2008

I didn't know the ?> closing tag was optional with PHP code only files, either. I did know about white space following the end tag. Probably every PHP developer knows about the white space following the end tag problem.

What header? What ******** header!?

Other useful stuff on PHP best practices at the Drupal site, with more detail on omitting the end tag.

Question to those who know Drupal: how is it on supporting XHTML? Both published and consumed via comments?

Comments
1
Elaine - 6:12 pm March 3, 2008

I'm dipping my toes back in the drupal waters, and my first outing (the homepage at least) is quite happy to be XHTML, altho I haven't tried any funny business with mime types, and it doesn't take comments.

What I would like to do is to find a module or something that runs a validator on the stuff I enter in as content. There probably is one, probably easy to find. (I am continuously boggled by the sheer scope of Drupal modules.)

2
Elaine - 6:13 pm March 3, 2008

Also, the wordpress validation (?) totally choked on the (self/work-) link I was going to put in there. I'm absurdly proud of how it's turning out, so: https://www.twinstarcu.com/youth/

3
Shelley - 7:47 pm March 3, 2008

Sorry about the validation. It's one of the things I'm currently tweaking.

The site looks good. It's based in Drupal? I'm thinking I should put up a test site, see if this might be a better option for some of my site content.

4
maki - 9:12 pm March 3, 2008

Out of the box, without any contributed modules and using one of the default templates, Drupal validates as XHTML 1.0 Strict. Most popular contributed templates and, more importantly modules, don't cause a problem either. Up to version 5.x, it did suffer from overly nested DIV element syndrome (especially in block/sidebar elements), but 6.x seems to have alleviated that to some extent. Comment input formats can be specified and controlled by you as much as you like, so they aren't a problem.

As far as inline SVG goes, I don't think it is supported by default, though I haven't tested it myself. There is a Drawing module (http://drupal.org/project/drawing) that has an SVG toolkit, and a Graphing and SVG working group (http://groups.drupal.org/graphing-svg) .

For what it's worth, I converted all of my sites from Movable Type to Drupal about 2 years ago, and haven't looked back. (For various reasons WordPress was never a good fit for me.) It's not for everyone, but it fits my tweaking tendencies perfectly. I also find the template format and the API quite intuitive, but of course YMMV. The community is also very helpful. (And none of my working Drupal sites validate at the moment because I haven't put in the effort to stamp out the minor errors. It's not Drupals' fault though, it's mine.)

5
Shelley - 9:19 pm March 3, 2008

maki, thanks for the comments. I definitely think it's time to install a copy and give it a shot. I must admit to being very impressed with the polish of the module environment. And the SVG toolkit is more than I can resist.

6
Elaine - 10:56 am March 4, 2008

Yep, that's Drupal. I was particularly happy to make something that didn't look like a typical Drupal site. (Not to pick on them, but the biggest local blog — http://olyblog.net — looks like a Drupal site IMHO.)

Version 6 is light years ahead of the last version I used (4.7); set up was easier, theming was easier. Moving from a test folder to a production folder was easy. I even had to upgrade once in the middle of my project, and that took about 20 minutes altogether, less than half of that with the site unavailable.

Something that impressed me: they recommend storing all your custom themes and modules in a folder apart from the "core", so you can keep a copy easily when you upgrade the rest of the installation.

I'm still happy with WordPress for my own site, and for tiny or blog-only sites in general, but I think Drupal definitely holds its own for anything more complicated.

Thanks to all those who have contributed to the discussion. Comments are now closed, but you can contact the author of the post directly.