Access Pages Without the PHP Extension Using .htaccess

There are a number of ways to make “clean URLs” work on your site, but this one is pretty straight forward.  It allows you to access /any-page.php by simply going to /any-page.  Just place the following into your .htaccess file (and make sure that mod_rewrite is enabled):

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php

The nice thing about this is that it doesn’t affect querystrings.  With this solution, both of these URLs are effectively the same:


http://example.com/page.php?id=123

http://example.com/page?id=123

Of course, the caveat is that you don’t have “clean querystrings”, but it’s a reasonable trade-off between “clean” and configuration.

Posted in PHP, Web Servers | Leave a comment

Surreal CMS No Longer on UserVoice

We would like to inform the Surreal CMS community that as of today, December 13th 2011, we will no longer be accepting feedback through our UserVoice account.  This isn’t to say that we don’t want or value your opinions, it just means that we want to hear them from you directly.  Continue reading

Posted in News & Updates, Surreal CMS | Leave a comment

TinyMCE Table Dropdown Plugin

If you’ve ever used TinyMCE for table editing, you’ll know that the experience isn’t usually a good one.  To prevent clutter, most developers configure the toolbar to have just the Insert/Edit Table button, which isn’t nearly enough to do anything useful with tabular data.  In fact, TinyMCE’s table plugin has 12 tools (i.e. buttons) available for working with tables.  The problem is they take up a lot of real estate.  They make an otherwise simple toolbar very intimidating and unintuitive for novice users.  The fact of the matter is, most people who use TinyMCE may not even need to work with tables, so those extra 12 buttons will just be in their way. Continue reading

Posted in News & Updates | 1 Comment

Detecting Mobile Devices with JavaScript

While I understand and value the concept of feature detection over browser detection, sometimes the need for knowing whether or not we’re dealing with a mobile device arises.  For in-depth device checking, you can rely on a complex library such as The MobileESP Project.  But for simpler applications, the following snippet can be useful. Continue reading

Posted in JavaScript | 2 Comments

Redirecting to and from the WWW Subdomain with HTACCESS

Here are a few snippets that will come in handy if you ever need to redirect www.example.com to example.com or vice versa.  There are a number of similar methods out there, but I prefer these as you don’t need to modify anything between development and production. Continue reading

Posted in Web Servers | Leave a comment

The Simple Image Class for PHP

If you love working with PHP but hate the GD library, you’ll love the Simple Image PHP class we’re releasing today. This class takes the headache out of dealing with images and features over 20 useful methods.

Continue reading

Posted in PHP | Leave a comment

The jQuery Notification Plugin

Today we’re releasing another jQuery plugin that was born of necessity.  It’s a small, but incredibly useful notification system inspired by both Growl and the volume/mute notifications that can be seen in iOS. Continue reading

Posted in News & Updates | 1 Comment

How to Delete a Tag on GitHub

In the world of Git, tags are very useful for keeping track of your project’s version history. A lot of folks will argue that you shouldn’t delete tags, but there are real-world examples in which tags need to be deleted.  That said, it’s both a good and a bad thing that GitHub hasn’t built the ability to delete tags into it’s web app. Continue reading

Posted in Git | Leave a comment

jQuery MiniColors (a color selector for input controls)

While developing Tranquility CMS, we found the need for a simple jQuery-based color picker.  What we wanted was something very simple, preferably something that piggy-backed an input control.  While we found an extensive number of color picker plugins available, we failed to find any that were simple and compact enough for our needs (except for perhaps ColourMod, which is neither jQuery-based nor open-source).

Thus, jQuery MiniColors was born.  A simple, compact color picker that complements a text or a hidden input control. Continue reading

Posted in News & Updates | 39 Comments

jQuery SelectBox Plugin

While it is possible to use CSS to style SELECT elements, browser support and appearance will vary greatly depending on platform and browser.  In our search for a solid, customizable replacement for these finicky controls, we turned up only a handful of possible options that we ultimately weren’t thrilled with for one reason or another. Thus, today we’re introducing a new jQuery plugin that replaces standard SELECT elements so you can customize them entirely using CSS.  We even threw in some extra features for added usability. Continue reading

Posted in JavaScript, jQuery | 50 Comments