Author Archives: cwillett

PHPReboot: Faster, better. But will it stick?

by  • October 11, 2011 • Uncategorized

PHPReboot is a rewrite of PHP with Native support for XML, SQL like syntax, XQuery, less syntax and lots of other things to make it faster and remove the clutter. Yes it makes it less like PHP, but it’s also better IMHO. Question is, will developers buy into it? We shall see. Sounds great in theory. Check it out for yourself:

http://code.google.com/p/phpreboot/

Dropdown menu/carousel: conflict and resolve

by  • October 8, 2011 • Uncategorized

I had a dropdown menu on another site that was above a carousel, but when selecting it, it would go behind the carousel. This is a problem I’ve encountered with z-index before and I thought I’d post the solution here. I basically used the agile carousel (js) on my homepage and the built-in wordpress dropdown menu in my top nav. And no matter how high I set the z-index on the downdown menu, as soon as the carousel rotated, it would appear on top (or in front of) the menu.

The solution lies in wrapping the carousel in a div and making sure that div has these properties:
display: block;
position: relative;
z-index: 0;

That’s because when the various divs in the carousel have their z-indexes adjusted up and down by javascript, those z-indexes are relative to the page; unless you wrap it in a div and give it the properties above. This way the div’s z-indexes are relative to it’s container. Without all three it will not work. Now the z-index of the dropdown menu only need be higher than the carousel’s highest z-index. But it probably wouldn’t hurt to just set it to 99999.

Elastic Search ftw?…

by  • September 15, 2011 • Uncategorized

A co-worker turned me on to this fine replacement for Sphinx. Instead of indexing everything it indexes ad-hoc. It’s RESTful, built on Lucene, and uses JSON and CURL to grab search results. Sounds shiny! And I can’t wait to test it out!

www.elasticsearch.org

Killer New HTML5 UI

by  • September 13, 2011 • Uncategorized

This is really slick and beats the crap out of jQuery UI. Check out the examples and get crack-a-lackin’!

http://www.kendoui.com/

Recursively delete all .svn directories

by  • September 9, 2011 • Uncategorized

I love this link, because I rarely need to do this, thus I forget it every time I need it.

Every once in a while I need to copy a directory from one site or repos to another and before I can commit it, I need to remove all the svn directories recursively throughout the folder. This link describes perfectly how to do that:

http://www.anyexample.com/linux_bsd/bash/recursively_delete__svn_directories.xml

Strip tags and punctuation

by  • September 8, 2011 • Uncategorized

I needed to remove all html tags and punctuation from a wordpress post title to pass into a bing search module today and this little regex bit along with strip_tags() did the job:

$title = preg_replace('/[^a-zA-Z0-9-\s]/', '', strip_tags(get_the_title()));

Wheeee!