 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Sameer Borate's Blog: Adding HTML5 'Canvas' element to Wordpress
by Chris Cornutt April 08, 2010 @ 11: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.
voice your opinion now!
wordpress canvas html5 element tutorial
Matthew Weier O'Phinney's Blog: Creating composite elements
by Chris Cornutt April 14, 2009 @ 10:25:53
Based on an example in a previous blog post (seen here) Matthew Weier O'Phinney wanted to clear a few things up on the "date of birth" element he had mocked up in his Zend_Form example.
In my last post on decorators, I had an example that showed rendering a "date of birth" element [...]. This has prompted some questions about how this element might be represented as a Zend_Form_Element, as well as how a decorator might be written to encapsulate this logic. Fortunately, I'd already planned to tackle those very subjects for this post!
To be able to use the element in its current state the key lies in the setValue method. More correctly in the overriding of the setValue method. He includes an example class that is smart enough to use that custom form element. It has get and set methods for each of the date fields (month/day/year) and the set/getValue methods that can interact using them. He wraps this all up inside a form decorator and creates an instance of the Date element to help create and handle the properties it has.
voice your opinion now!
create composite element date zendform decorator custom
Jani Hartikainen's Blog: Complex custom elements in Zend_Form
by Chris Cornutt October 23, 2008 @ 12:09:55
In this new post Jani Hartikainen shows a quick and easy method for creating a custom form element in your Zend Framework application. His example is a custom time element.
The alternatives would be creating custom view helpers to output the custom form elements, and using the viewscript decorator. Creating a custom view helper would also require a custom form element class, and it would be a bit tricky. [...] I think the viewscript approach is the most flexible and simplest to implement, so I chose to go with that.
His example defines a time field made up of three drop down lists, one each for hours, minutes and seconds. Included is the code to make the element (including a regular expression for validation) and the view script to display it.
voice your opinion now!
zendform zendframework complex custom element time tutorial
Neil Garb's Blog: Compound elements with Zend_Form
by Chris Cornutt July 17, 2008 @ 11:13:03
In a recent entry to his blog, Neil Garb shows his method for creating compound elements in a Zend_Form object in your Zend Framework website.
Zend_Form can save you a lot of time. It almost completely abstracts away the most boring and error-prone aspects of developing secure and standards-compliant HTML forms. But one thing it doesn't do out of the box is compound elements, such as three-field dates. In this post I'll show you the easiest way to do this ZF-style.
He goes through the creation of the sample controller, an example of a custom element (the multiple date drop-downs he mentioned) and how to handle the validation in a "Zend Framework way" via an isValid call.
voice your opinion now!
compount element zendform zendframework
Tiffany Brown's Blog: Turn text files into pull down menus
by Chris Cornutt February 27, 2008 @ 09:35:00
Tiffany Brown shares a quick function she whipped up to create dropdown menus from the contents of a newline separated text file (or files).
I developed this PHP function for a project I'm working on. I'm posting it here in case I need it again, or in case you find it handy.
The function turns each line into an option tag making defining custom menus based on the contents of dynamically-given text files easy.
This could also be easily adapted to create navigations menus at the top of your pages with a few modifications to the HTML tags being used and some CSS to change the look of the list.
voice your opinion now!
text file dropdown menu form element navigation css
Tilllate Blog: Caching of Dynamic Data Sets
by Chris Cornutt December 05, 2007 @ 10:29:00
On the Tilllate Blog, there's a new post discussing the use of caching in applications, specifically for dynamic data.
Consider you have a set of data that is changing dynamically for each page request and you need to cache that data the fastest way possible. You can't cache dynamic and unpredictable data as a whole, can you? Hence, we would put each data entry into cache separately to be able to fetch it separately and dynamically. But this means bombing your cache infrastructure with with requests.
They break it up into a few different topics - caching text elements on the page, two-tiered caching (grouping cached items), incremental caching and cache versioning. They don't share an example of their code unfortunately, but they do mention something about a possible contribution to the Zend_Cache component of the Zend Framework.
voice your opinion now!
caching dynamic data text element incremental versioning cache caching dynamic data text element incremental versioning cache
|
Community Events
Don't see your event here? Let us know!
|