Category: Small Tips

Here’s a quick and dirty utility method for type checking an object or an array of objects. [cc escaped=”true” lang=”php”]/** * Ensure the object (or the first item in the * array of objects) is of the specified type * …

PHP Type Checking Read More »

Tagged with: , , ,

The problem If you use MacOS and Chrome browser (recently this has been reported under other browsers and OS as well) you might have experienced an issue when downloading any Microsoft documents like Word, Excel, PoerPoint their file extension is …

Force MS document’s extension and MIME type through .htaccess Read More »

Tagged with: , , , , ,

I am having problems with a dynamically created images.xml being cached in internet explorer. The xml file is used by a flash slideshow player and for different pages on the site, has different images to show. IE isn’t reading the …

Prevent caching of XML files with Apache .htaccess rules Read More »

Tagged with: , , , , , , , , , , , ,

Ever wonder how to create an iframe that fills the entire height (and width) of a page? You probably tried writing something like: [cc lang=”html” escaped=”true”]<iframe width=”100%” height=”100%”></iframe>[/cc] and expected the iframe to fill up whatever it could. The width=100% …

Source Code -> Iframe with 100% Height Read More »

Tagged with: , , ,

Sometimes document structure and layout could be very difficult and complex. To achieve some goals designers tend to use a lot of nested elements in their code and after that style them with CSS. What if you want to see …

Debugging with CSS – outline all elements Read More »

Tagged with: , , , , ,

I see many people are playing around the net with the new CSS3 features. The biggest problem is that some features are still not very well or at all adopted by some browsers. Since Microsoft had officially announced the IE6 …

Rotate element with CSS3 and some tricks Read More »

Tagged with: ,

Working with arrays is very beneficial for every developer in every language. But in different languages some operations are done differently. Very good example is retrieving first key from an associative array in JavaScript. In PHP you could use “foreach“, …

JavaScript – First key from associative array Read More »

Tagged with: , , ,

Joomla provides very useful class called JHTML that can be used to produce different HTML elements saving us time and code. The Joomla team has provided a very useful class loader method “_()” in which we can pass string for …

Generate radio grpoup with JHTML Read More »

Tagged with: , , , ,

If you have a website for sure you have come to the point wondering how to redirect all visitors to the WWW part of the domain. This is small tip explaining in details the actual .htaccess redirect. Enough talking let’s …

Htaccess – redirect domain to WWW Read More »

Tagged with: , , , , ,