Custom Context Menu AS3
Posted on | March 22, 2012 | 1 Comment
A context menu is a menu that appears when the user does a right mouse click (usually) on the compiled swf. The default context menu that flash player shows comes with a limited set of choices such as ‘Zoom’, ‘Quality’ and playback options.
This post will demonstrate how to customise the context menu using ActionScript3.
Rating System
Posted on | March 21, 2012 | No Comments
Most eCommerce websites have a rating system for their products or services, such as Amazon’s below.
These rating systems provide customers with other customers’ experiences with the particular product or service. But did you know that these ratings can also influence your ranking on search engines, such as Google? And that some search engines even show the ratings in the results pages?
This post will demonstrate some example html showing the average rating based on multiple ratings or reviews.
Redirect website from non www to www
Posted on | March 20, 2012 | 1 Comment
Canonicalisation issues occur when a website is accessible from two different addresses, for example ‘www.your-site.com’ and ‘your-site.com’. The worst that can happen is that your website gets indexed twice, one version gets seen as duplicate content of the other, and your website does not rank as high as it possibly could. On an apache server the fix is fairly simple:
Read more
How to get the optgroup for a multiselect in jQuery
Posted on | March 16, 2012 | No Comments
Imagine you have created a web application for a small grocery shop, and as a free gift for signing up they are letting you have one free piece of fruit or one free punnet of berries. In a notification area you want to indicate to the user what type of gift they have chosen.
Using jQuery you can determine which optgroup a select option belongs to.
Zend_Form – prefix text using decorator
Posted on | March 15, 2012 | No Comments
I want to prefix the form with a title, within the form tags, but above the form elements.
[html]
[/html]
Further more, I do not want to use a view script.
Using Route to set Action in Zend_Form
Posted on | March 14, 2012 | No Comments
First, some definitions:
A form action is the URI to which the form is submitted.
Zend_Form makes it easy for developers to create complex forms that filter and validate the date from a submitted form before returning it to the rest of the application for it to do whatever is needed. In this example we are assuming that you have extended Zend_Form to create your own form class, as opposed to creating a Zend_Form form in your controllers.
A route is how a Zend Framework application takes a URI endpoint (that part of the URI which comes after the base URL) and decomposes it into parameters to determine which module, controller, and action of that controller should receive the request.
And now the problem:
I want to declare the action inside my form file (which extends Zend_Form) instead of in a controller or view, using a route I have created in my bootstrap.
Read more
Canonicalisation and Zend
Posted on | March 12, 2012 | No Comments
Canonicalisation issues occur when a webpage is able to be accessed via both www.yoursite.com/somepage and www.yoursite.com/somepage/, in severe cases this can cause the search engines to effectively index 2 identical copies of your site. Zend routes do not discriminate between pages that end in a slash or not – if a route does end in a slash, then the route removes it. Using a complex regex route it is possible to go to the correct version of the page (either keeping the slash or omitting it), however it is easier to use a canonical tag instead.
Read more
Random Quote Image Generator
Posted on | March 8, 2012 | No Comments
Nearly every forum allows it’s users to have a signature, somewhere the user can post a link to their personal or favourite website as well as quotes and images. This post will go through the steps of combining these last two so that every time the image is reloaded, a random quote is placed onto an image.