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

MyBuilder Tech Blog:
Managing Newlines and Unicode within JavaScript and PHP
Dec 28, 2016 @ 16:07:46

On the MyBuilder.com Tech blog Edd Mann has a post sharing some advice about dealing with newlines and Unicode characters in both Javascript and PHP functionality.

We were recently sent a tweet in-regard to a text-area client/server-side length validation not correlating. After some detective work we were able to find two issues that could have caused this to occur. In this post I wish to discuss our findings, and how we resolved each issue.

The first issue they found was newline characters that didn't seem to be there by normal ACSII standards in text-area inputs. They were showing as a single character on the client where it was two on the server, later discovered to be a defined standard in the HTML 5 spec. The second Unicode-related issue was with characters outside of the basic multilingual plane and how Javascript measures its length. The post then explains their solutions to each of the two issues, doing some string replacement and using a different function to get the length of a string.

tagged: newline javascript unicode html5 mbstring length

Link: http://tech.mybuilder.com/managing-newlines-and-unicode-within-javascript-and-php/

MaltBlue.com:
Zend Framework 2 – The New HTML5 Form Fields – Part 2
Jul 12, 2013 @ 18:41:56

Matthew Setter has posted the second part of his look at the HTML5 form support that comes with Zend Framework 2. In this new post, he focuses on a few different fields - month, range, color, week and number.

Owing to the overwhelming popularity of the first post on the new HTML5 fields in Zend Framework 2 here on Malt Blue, it’s only right to have a follow up, covering the other available elements. [...] To really show just how effective using these new elements is, each code snippet had an accompanying screenshot of the element, rendered in iOS on iPhone.

He includes examples for each of the element types including a small screenshot and the code needed to create it. They show how to create the elements and define the custom attributes (like the range for a "Number" field or the date range for a "Week").

tagged: zendframework2 form field html5 series introduction

Link: http://www.maltblue.com/php/html5-form-fields-in-zend-framework-2-part-2

MaltBlue.com:
Zend Framework 2 - The New HTML5 Form Fields
May 29, 2013 @ 14:33:59

Matthew Setter has posted another in his series looking at the Zend Framework v2 and some of its features. In this new post he focuses on the HTML5 form field support that comes bundled with recent versions.

In this tutorial, I’ll be taking you through a few of the new HTML5-specific form elements available in the new Zend Framework 2. We’ll see: how they work, how to use them, so you can also see what they’re like. This will be coupled with a good set of screenshots – so you know what they look like. By the end of this tutorial, you should be well on your way to being able to have fully HTML5 interfaces in your applications.

He starts off by talking about HTML5 elements in general, pointing out a few reasons why to use them, complete with statistics to back them up (of mobile usage where HTML5 can be handy). He focuses specifically on four different elements - the telephone input field, email field, URL field and the date/time selector. He gives examples of each and screenshots of what they look like on a mobile device (iPhone in this case). Complete code is included to create the elements as well.

tagged: tutorial html5 elements zendframework2 introduction screenshot

Link: http://www.maltblue.com/tutorial/zf2-html5-form-field-introduction

Kevin Schroeder's Blog:
Call for webinars (Zend)
Jan 18, 2012 @ 17:50:07

Kevin Schroeder is looking for suggestions. He wants to know what the PHP community wants to hear about in upcoming webinars from Zend.

Just wrapped up a call working on our webinar schedule for the year. We’ve got a bunch of ideas but we’d like to also get your input as well. Yes, I know y’all want ZF2 webinars. We have that down. I would also like to do an HTML5 and mobile webinar but I need an SME (Subject Matter Expert) for that. [...] I would also love to have webinars on how to use various API’s, even if there is not native PHP support. So, what kinds of webinars do you want?

Leave your suggestions in his comments along with one already suggesting a "Why PHP?" checklist of sorts to help encourage companies/employers to go with the language.

tagged: opinion webinar share zend zf2 html5 api

Link:

PHPClasses.org:
Using PHP-GTK to serve Web Applications to HTML 5 Browsers
Oct 27, 2011 @ 14:57:13

On the PHPClasses.org blog today there's a new post showing how you can use PHP-GTK to generate websites, not just the more traditional desktop applications people associate it with.

es, you read it right, GTK+, the Gnome Toolkit library, normally used to create desktop applications, can now be used to serve the same applications via the Web to a browser that supports HTML 5 canvas objects. PHP-GTK is a PHP extension that uses the GTK+ library to build PHP desktop applications. So it can eventually benefit for this GTK library enhancements to build PHP-GTK based applications that can be served over the Web to HTML 5 browsers.

Manuel starts by explaining a bit about what PHP-GTK (and GTK+) is and a recent update to GTK+ that allows it to generate output to different backends - Wayland (direct graphics rendering) and Broadway (HTML5 canvas support). There's no example code to go along with the post, but there's a good description of how the output of an X Windows session could be pulled in and displayed in a browser (see this video for a cool example using GIMP and Broadway).

tagged: phpgtk html5 gtk application xwindows backend wayland broadway

Link:

Yahoo Developer Network:
'Tis the season for developers' calendars
Dec 06, 2010 @ 21:36:16

On the Yahoo Developer Network a new post talks about some of the developer "advent" calendars that have popped up around the web - including the PHP Advent.

Christmas is upon us. Developers are embracing the spirit of sharing their knowledge and wisdom, while taking the opportunity to look back and recollect what 2010 brought us in terms of new technologies and ideas. A number of "advent" calendars started posting their blog-a-day-till-Dec-24th. Here are some for your reading pleasure while you kick back with a glass of wine by the fireplace.

Also on the list are: the 24 Ways (general web dev), the Perl Advent, Web Performance Calendar and the HTML5 Advent. Be sure to check out the comments for more calendars!

tagged: developer calendar advent perl performance html5

Link:

ProDevTips.com:
Multiple File Uploads with XHR and PHP
Oct 26, 2010 @ 15:08:53

New on ProDevTips.com there's a quick tutorial that includes a snippet of code showing you how to upload larger images with the help of HTML5 and this Ajax uploder.

So the jQuery / Flash multiple file uploader has not really been working when it comes to heavy duty stuff "Flash player has crashed" is a common scenario after some six < 2MB pictures, problem is, it needs to be able to handle up to 50 of them. Therefore I decided to check out the HTML5 alternatives and eventually found a really good one. I did have to make some modifications to make the solution fit with my own scenario and I detail them below.

He talks about some minor modifications he made to the code (like adding in watermarks) and includes the code for the new "uploadImages()" function that will handle the upload, build a thumbnail and output a result to send back to the uploader for a pass or a fail on the status.

tagged: multiple file upload tutorial html5 ajax

Link:

Sameer Borate's Blog:
Adding HTML5 'Canvas' element to Wordpress
Apr 08, 2010 @ 16:22:14

WordPress users that have been interested to explore some of what HTML5 has to offer should check out the latest post from Sameer Borate. He shows how to embed a HTML5 Canvas element you can use to make a "drawable" area of your page. You can test to see if your browser supports it by scrolling to the end of the post.

Only if partially, but HTML 5 is slowly getting increased support from various browsers. Some of the HTML 5 features like ‘canvas’ and ‘video’ are supported by browsers like Firefox, Safari, Google Chrome and Opera. [...] The Canvas element consists of a drawable region defined in HTML on which you can dynamically draw graphics and animations using Javascript. The canvas API provides a nice set of drawing functions to play with.

His example detects to see if the browser has canvas support (using Modernizr), creates a div container to hold the region and creates a Javascript to define the canvas as a 520 by 220 pixel box. The animation should be loaded automatically.

tagged: wordpress canvas html5 element tutorial

Link:

Kae Verens' Blog:
multiple file uploads using HTML5
Dec 29, 2009 @ 15:57:05

Kae Verens has come up with a tutorial using a feature of HTML5 - multiple file uploads.

As a response to a reported bug where Chrome was taking ages to load up a flash multiple-file uploader, I’ve updated KFM to use HTML5’s multiple-file input box where possible.

The code examples in the post show how to use a square bracket ("[]") set in the name of a file upload field, how they're handled on the PHP side and how they can be accessed in the FILES superglobal.

tagged: html5 multiple file upload

Link:

Padraic Brady's Blog:
Zend Framework Book: Surviving The Deep End - Chapter 10 Released!
Sep 09, 2009 @ 15:42:21

Padraic Brady has released the latest chapter from his "Zend Framework: Surviving the Deep End" online book - chapter 10, a look at Zend_View, Zend_Layout, HTML5 and working with CSS in the YUI.

The new chapter explores setting up the example blog application's web design using Zend_View and Zend_Layout. I also spend some time exploring HTML 5, the future standards update for HTML. [...] The web design itself makes use of the Yahoo! User Interface Library's CSS components.

He's also posted the source code divided up by the different chapters. You can find out more about the book and read the contents so far on the book's website: Survivethedeepend.com.

tagged: zendframework book zendview zendlayout html5 yui

Link:


Trending Topics: