CSS Image Filtering

To Do: insert example of grayscale effect and explore trimming the edges using “clip” since the blur bleeds outside the actual confines of the image.

Here is an example of applying a blur effect to an image with css on hover:

To get this to work in Firefox we need to add an SVG filter:



<svg version=”1.1″ xmlns=”http://www.w3.org/2000/svg”>
<filter id=”blur”>
<feGaussianBlur stdDeviation=”3″ />
Saved as a file called blur.svg, our CSS changes to:

img.blur {
width:367; height:459px;
filter: url(blur.svg#blur);
-webkit-filter: blur(3px);
filter: blur(3px);


Styling Checkboxes With CSS Only

styling checkboxes

Styling Checkboxes – Why?

The base checkbox styling leaves a lot to be desired. With designs becoming more and more beautiful, why shouldn’t your checkboxes reflect that?

This method uses CSS and fonts to style checkboxes without having to resort to javascript or image files. Font family selection can affect the output. Styling checkboxes is a somewhat hazy field, but it’s getting better!

Note: It’s important to have the “id” of the checkbox match the “for” attribute of the label to get this to work

<input id=”example-checkbox” type=”checkbox” />
<label for=”example-checkbox”> Example checkbox</label>


input[type="checkbox"] {
    display: none;

input[type="checkbox"] + label:before {
    content: '\00a0'; /* non-breaking space */
    display: inline-block;
    width: 1.3em;
    height: 1.3em;
    font-size: 1em;
    font-family: 'Arial Unicode MS';
    border: 1px solid #999999;
    color: #30BB02;
    text-align: center;
    cursor: pointer;
    -webkit-border-radius: 3px
input[type="checkbox"]:checked + label:before {
    content: '\2714'; /* check mark */

Demo: https://jsfiddle.net/jungalist/hcm0at3h/

Don’t use @@Identity

Don’t use @@Identity to select the ID of the newly inserted record, use scope_identity() instead.

@@Identity returns the most recently created identity for your current connection. When you first use it, it might be fine, but if someone adds a trigger that causes another identity to be created, that one will be the one which is returned.

INCOMPLETE – Parsing XML with SimpleXML and PHP

More reference: http://www.sitepoint.com/parsing-xml-with-simplexml/

Given the XML:

Sample Account Name
Test User


Event Number One

Another Event

Hockey Game

Perhaps this was entered into a textarea on a form and we have read it it into a variable. We can access the various data nodes using SimpleXML:

$oXML = new SimpleXMLElement($_POST['textarea_name']); // comes from our fictitious form

//This accesses the Calendar Dates Node. We could have obtained the general account info (Name, Client) using $AccountNode = $oXML->Account;
$DatesNode = $oXML->CalendarDates;

foreach($DatesNode->CalendarDate as $date)
    foreach($EventsNode->Event as $event)
    echo date("g:i A",strtotime($event->StartingAt)) . "
"; echo $event->Name . "
"; } }

But what if we have to get the XML from somewhere else?

$durl = 'http://somelink.com/calendars/calendarname.xml';
$sXML = download_page($durl);
$oXML = new SimpleXMLElement($sXML);

Stopping the WordPress Spam

Post comment settings off, but comments for post “” are appearing in email.

Trying: updating WP_posts to – SET comment_status=”closed”; since this site is receiving no new posts.

Maybe it is trackback spam – try disabling that
Can remove or exit(): wp-comments file in root

Nov 19: Updating WP_Posts has effectively stopped all spam from the blog in question.

Update Jan 6, 2014: Another blog (WIQ) with a spam problem did not respond to the db update step. This blog had a custom login functionality (Theme My Login).

The process involved adding some code which logged the registration ip and page used for registration:

update_user_option( $user_id, ‘registration_ip’, $_SERVER[‘REMOTE_ADDR’] . ‘::ms-functions.php’, true );

The code was place anywhere that signup code existed (searched files for “wp_create_user( “) This revealed that a page was being hit by signup bots which was not being used in the legitimate signup process. After that it was a matter adding <?php exit(); ?> to the top of that page.

Nice Simple Lightbox

Too often jquery plugins suffer from the Windows mentality of “do everything for everyone” which leaves them bloated and confusing. Sometimes you just wanted something nice and simple to perform a task quickly out of the box. I was looking for a lightbox like that when I came across Lightbox_me by Buck Wilson.

Quick and clean and does what you want it to!