Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SmartyCode.com:
Serving XHTML in Zend Framework App
Apr 27, 2009 @ 07:55:39

On the SmartyCode.com site, there was a new article posted recently looking at making the output of your Zend Framework application XHTML compliant.

Serving XHTML is often misunderstood by php developers. Frontend engineers simply include the XHTML doctype to their documents, without actually serving document as XHTML. This triggers majority of the browsers to treat such pages as 'tag-soup'. [...] This front controller plugin's code mostly takes concepts from the excellent article by Keystone Websites, but implements in Zend Framework environment in an object-oriented way.

The code works as a plugin to the controller and runs a few checks on the contents of the data being pushed out (dispatchLoopShutdown) and returns the correct header information (DOCTYPE, language attribute) in the correct XHTML format for the data. When the plugin is registered, all it takes is a call to the "doctype()" method to output the correct information.

tagged: zendframework xhtml doctype serve format plugin controller

Link:

Rob Allen's Blog:
Top Tip: XHTML with Zend Form Elements
May 29, 2008 @ 12:01:50

Rob Allen has posted a quick tip of how to use the Zend_Form component of the Zend Framework to correctly render XHTML compliant output.

When you render a Zend_Form, the elements will render to HTML compliance rather than XHTML compliance, even if you have < ?php echo $this->doctype('XHTML1_STRICT');?> at the top of your layout script. Practically, this means that all the input elements do not end in "/>". To resolve this, you need to call the doctype() view helper prior to rendering your form.

He includes an example of the doctype call (on a view object) to tell the script to output in the "XHTML1_TRANSITIONAL" format.

tagged: zendform zendframework component xhtml render transitional

Link:

Developer Tutorials Blog:
Designing and Coding a Wordpress Theme From Scratch
Apr 29, 2008 @ 11:17:18

The Developer Tutorials blog has posted a series they've worked up to show bloggers out there running WordPress how to create a custom theme from scratch:

In this multi-part series I'll detail how to create and design a Wordpress theme from nothing more than your imagination using Photoshop, CSS, XHTML and PHP.

Here's the list so far:

  • Part 1 - getting the tools and an overall layout idea
  • Part 2 - splitting it up to make the layout parts
  • Part 3 - converting the Photoshop template to XHTML
  • Part 4 - cleaning up the XHTML and doing some styling with CSS
  • Part 5 - how to preload some images with Javascript to make the page load faster
  • Part 6 - creating the WordPress-specific markup
  • Part 7 - working up the PHP functionality
  • Part 8 - integrating PHP into the template
  • Part 9 - marking up the "framework" of the site (header/footer/sidebar)
  • Part 10 - adding additional files like a links page and changing the posting template
  • Part 11 (?) - deploying the theme out to the public view
tagged: series tutorial wordpress photoshop xhtml convert layout theme custom

Link:

Nick Halstead's Blog:
Programming Tips #7 & #8
Dec 11, 2007 @ 09:32:00

Nick Halstead has posted two more programming tips in his series - this time they cover "non-coding" and "XHTML analytics:

The first, tip #7, was written up by Jonathan Holland. He talks about a method of using metrics software that works correctly with XHTML syntax. His example script basically does a dynamic add to the page when it's loaded to put the script tag in after the validation has taken place.

The next tip, #8 (written by Dordea Cosmin), looks at "non coding" types of things you can do to help work towards success in your company. These sorts of things include diplomacy, being friendly, and continuing education.

tagged: programming tip xhtml metrics noncoding diplomacy education programming tip xhtml metrics noncoding diplomacy education

Link:

Nick Halstead's Blog:
Programming Tips #7 & #8
Dec 11, 2007 @ 09:32:00

Nick Halstead has posted two more programming tips in his series - this time they cover "non-coding" and "XHTML analytics:

The first, tip #7, was written up by Jonathan Holland. He talks about a method of using metrics software that works correctly with XHTML syntax. His example script basically does a dynamic add to the page when it's loaded to put the script tag in after the validation has taken place.

The next tip, #8 (written by Dordea Cosmin), looks at "non coding" types of things you can do to help work towards success in your company. These sorts of things include diplomacy, being friendly, and continuing education.

tagged: programming tip xhtml metrics noncoding diplomacy education programming tip xhtml metrics noncoding diplomacy education

Link:

Derick Rethans's Blog:
HTML name attribute deprecated
Oct 23, 2007 @ 12:52:00

Derick Rethans has pointed out a "gotcha" that was passed along to him (somewhat incorrectly) about the "name" attribute being deprecated in XHTML 1.0.

Just now somebody on IRC was claiming that the "name" attribute in HTML - the one that is used to give form input fields a name to be used in $_GET and _$POST in PHP is in fact deprecated. [...] But if you read correctly, it's only for the elements: a, applet, form, frame, iframe, img, and map.

For the official information, check out the section of the new spec dealing with this transition.

tagged: name attribute xhtml deprecated element name attribute xhtml deprecated element

Link:

Derick Rethans's Blog:
HTML name attribute deprecated
Oct 23, 2007 @ 12:52:00

Derick Rethans has pointed out a "gotcha" that was passed along to him (somewhat incorrectly) about the "name" attribute being deprecated in XHTML 1.0.

Just now somebody on IRC was claiming that the "name" attribute in HTML - the one that is used to give form input fields a name to be used in $_GET and _$POST in PHP is in fact deprecated. [...] But if you read correctly, it's only for the elements: a, applet, form, frame, iframe, img, and map.

For the official information, check out the section of the new spec dealing with this transition.

tagged: name attribute xhtml deprecated element name attribute xhtml deprecated element

Link:

PHPBuilder.com:
Review: Rapid PHP 2007
Jul 20, 2007 @ 11:18:00

PHPBuilder.com has a review posted today of a piece of PHP development software - RapidPHP 2007:

Of the many editors available for creating (X)HTML, CSS, JavaScript, and PHP pages, several combine a few different yet compatible languages. Some include support and a few manage to make it work seamlessly. RapidPHP 2007 belongs in the latter category.

They walk through the list of features (including a PHP syntax checker) and include a screenshot of the PHP function hints in action. The reviewer also talks about the support for other languages it has - the (X)HTML editor and CSS style sheet editor.

tagged: rapidphp editor review css xhtml function hint rapidphp editor review css xhtml function hint

Link:

PHPBuilder.com:
Review: Rapid PHP 2007
Jul 20, 2007 @ 11:18:00

PHPBuilder.com has a review posted today of a piece of PHP development software - RapidPHP 2007:

Of the many editors available for creating (X)HTML, CSS, JavaScript, and PHP pages, several combine a few different yet compatible languages. Some include support and a few manage to make it work seamlessly. RapidPHP 2007 belongs in the latter category.

They walk through the list of features (including a PHP syntax checker) and include a screenshot of the PHP function hints in action. The reviewer also talks about the support for other languages it has - the (X)HTML editor and CSS style sheet editor.

tagged: rapidphp editor review css xhtml function hint rapidphp editor review css xhtml function hint

Link:

Paul Jones' Blog:
The Stenhouse CSS Framework and Solar
Jul 20, 2007 @ 08:47:00

Paul Jones talks about an aspect of the Solar framework (Solar_App_Bookmarks) and its inclusion in the Stenhouse CSS Framework:

Solar comes with a reference application, Solar_App_Bookmarks. As I outlined in an earlier post about views and layouts in Solar, the bookmarks application is extended from Solar_App_Base. The Base package holds all the layouts, and those layouts are what I want to talk about in this entry. Solar_App_Base comes packaged with the Stenhouse CSS Framework.

Paul briefly introduces the framework and includes example code - an XHTML scaffold, main layout files and some layout partials to show the framework in use.

tagged: solar framework stenhouse css xhtml layout solar framework stenhouse css xhtml layout

Link: