Whenever I’m developing a responsive site or app, I sometimes get confused as to which breakpoint range I am currently viewing, to then effect changes to a particular file. So I thought that whilst working up through the minimum size breakpoints, following mobile first principles, it would be nice to have a notification on the screen that told me what the current / last breakpoint was that had been met.
There are various ways of validating dates in PHP or MySql, sometimes however you may just need to check if a given string is a valid MySql date string, outside of a form validator. One way to achieve this is to use a regular expression, the simple utility function below will accept a string and return true if it’s a valid MySql date.
A useful function to generate a random string of a given length in php. The character source set is predefined, but can also be explicitly set. Can have multiple use cases, for example a unique identifier in an application or a handy utility for say a random password generator.
As of Internet Explorer 10 conditional comments are no more, but what if you have an edge case where you really need to specifically target IE10. An .ie10 CSS class at the top level would still be really useful.
The other day I had a request from a client that wanted a list of all products in their store, that didn’t have any related product links. The list was required so that they could then login to the Magento admin and add related items to each of the products, ultimately …
I came across a very irritating bug in Google Chrome the other day where the form Chrome autocomplete feature adds a yellow background to the input fields, making the design for my pretty app, look rather ugly. After a quick investigation I discovered that there is…
There are various ways of retrieving a Magento category attribute, however depending on how it’s stored in the database you can’t always rely on the same method each time. This snippet will show you how to get the value of any Magento category attribute.
The Magento contacts page is a standalone module: Mage_Contacts, however unlike categories, CMS pages or products, when it comes to the contacts page you are pretty limited by what you can edit from the admin area.
The WordPress WYSIWYG content editor helpfully wraps embedded images with paragraph tags, this is kind of nice as the vertical spacing that you’ve applied to your paragraphs in your typography style guide, will then of course then be applied to your inline images….
WordPress admin settings only allow you to define the number of posts per page once for blog posts, this is then applied globally to all post types which is sometimes not desirable.
Page 1 of 2