Aliso the Geek

A coder in love with WordPress

Blog

Themejack is now open for business!

Themejack logoFor all y’all that have been following the Themejack news, you already know this. For those who don’t, here it is:

Themejack has launched!

It’s been in the works for a very long time. Ever since I started working on my own theme framework over a year ago, my husband Jim and I have been planning to open a premium theme shop. We love theme design and development, and I hope it shows through in the quality of our products.

I’ve been handing out coupon codes like crazy (much to the surprise of my business partner) so here’s a special Aliso the Geek offer to get you the grand opening discount: Enter the coupon code TJALISO15 and get $15 off of your purchase. All the launch coupons are good through September 18, 2011.

Also, Cody is on sale while I build another sweet feature for it, which should be done in a little over a week. It’s $20 off right now, which puts the sale price at $39. (Combine that with the coupon, and it’s over 50% off!)

The best part: Themejack Gives Back

I saved the best for last. When Themejack sells 1,000 themes, we’re donating $10,000 to three different charities: Child’s Play, The Humane Society, and The WordPress Foundation. Every theme purchase earns one vote for the charity that matters most to you. When we hit the 1,000 theme mark, the votes will be tallied up and the donation will be divided among the charities. $6,000 to the charity with the most votes, $3,000 for second place, and $1,000 for the third. Every charity gets something, no matter what.

For any of that to happen, though, we need to sell 1,000 themes. So help us out, buy a theme, and vote for a charity! (I mean, come on! Cody is only $24 with the coupon!)

Blog

Where the hell have I been?

Hi all; Aliso here. As some of you have surely noticed, I’ve been somewhat absent from my own blog lately. I’ve also been incommunicado to some extent—my sincere apologies to anyone who has sent me a message and been waiting for a response.

Let me explain.

In the past month, a lot has been going on. I was fired from my job at Brave New Media, and I got a job as a software engineer at The Nerdery in Bloomington, MN. I just finished my first week as a Nerdery Nerd, and it’s even more amazing than I ever thought it would be. I won’t go into detail on the Brave New Media situation—people close to me know what happened, and anyone who is curious should feel free to ask. It wasn’t exactly amicable and I don’t want to go spouting things on my blog until I can be completely objective about it. (Even then, I might not “spout” anything about the matter. We’ll see.)

Anyway, the new job is so fantastic, awesome and wonderful that it warrants a whole other post that I’m sure I’ll write this weekend. I just wanted to give a quick hello and explain my recent lack of blog-posty goodness.

Blog

An Upstanding Solution

Photo of my temporary standing desk arrangement

Standing Desk 1.0 Beta

I’ve read a lot lately about how sitting for prolonged periods of time every day can shorten your life. While I’m skeptical, it seems like common sense that sitting down all the time just isn’t good for you. As programmers, we know what it feels like to only get out of our chairs once every few hours (on a good day).

An idea that seems to be making the rounds right now is using a standing desk on a regular basis instead of a normal one. It’s intriguing, and I’ve thought about it for a while now… I figure it’s time to give it a shot, at least for a few days.

Since this is something I’m not entirely sure about, I’m using the “cheap-as-free” standing desk conversion kit. It consists of a plastic bin I store cables in, a black box to provide a mousing surface (it’s the box that Final Cut Studio used to come in) and a book to put under the keyboard since the lid of the bin has raised edges. My iMac does a great job of tilting up to a comfortable angle without having to set the computer on top of something.

This may not last, or it may be completely awesome and cause me to look for a more permanent (and probably non-free) solution. We’ll see what happens!

For those that have read the articles on sitting making you 54% more likely to have a heart attack, please remember that’s 54% more than whatever risk you already have. So if you have a 1% risk normally, sitting all day puts you at 1.54%. Don’t freak out. Fear sells news.

Blog

Customize admin menu colors in WordPress 3.2 (the easy way)

The updates to the admin UI in WordPress 3.2 are pretty great. I love the new interface. The only thing I didn’t love was the loss of the blocky header and footer of the admin section—that was the easiest and fastest way to customize the look of the admin area for client’s sites (or for fun). With the admin menu being separated from the rest of the page in version 3.2, though, I can customize the colors of that instead, and it still looks pretty darn slick.

Customized admin menu screenshot

It looks simple enough, but when you take a closer look at the CSS (or just at the menu itself) you realize there are lots of different elements colors need to be applied to:

  • Menu background
  • Menu header borders
  • Menu header link text
  • Separators
  • Selected background
  • Selected header borders
  • Selected header link text
  • Selected header text shadow

And to account for minimized menus with pop-out submenus:

  • Pop-out menu headers
  • Pop-out menu borders
  • Pop-out menu header link text
  • Selected pop-out menu header
  • Selected pop-out menu link text

I went through and customized all of these things with simplistic colors (#069, etc.) and ended up with a pretty sweet menu. Then I wanted to change the color scheme, and I realized there were a zillion (24 actually) places I needed to change colors to make that happen.

This is by no means impossible, but it’s kind of a pain in the ass. So I did some Googling and found a great PHP script to generate CSS color variations from one base color. I had to modify the script a little (I don’t have PEAR installed on my dev server) but I ultimately got it to work.

Here’s the beginning of the stylesheet, so you can see how it works:

<?php
header( 'Content-type: text/css' );
require_once( '_inc/csscolor.php' );

$base = new CSS_Color( '3B4C7A' );
$selected = new CSS_Color( 'BB7101' );
?>
/* @group Admin Menu Coloring
----------------------------------------------- */

/* Background color of entire menu */
#adminmenuback, #adminmenuwrap, #adminmenu .wp-submenu .wp-submenu-head {
	background: #<?php echo $base->bg['0']; ?>;
}

First I’m tricking the browser into thinking this PHP file is really a CSS file. I’m sneaky like that. Then I’m including the modified color script.

Next I define two colors: “base” for the overall menu look and “selected” for the current menu header.

From here on out, I can use those two variables to print variations of the original color. The script returns a “bg” component (the background color) and a “fg” component (the foreground color – white or black, depending on the shade of the background). You can go from -5 to +5 in range (see the original script’s website for a great visual example). This worked GREAT.

If you want to download the whole package (CSS/PHP file + CSS_Color class file), here you go:

WordPress 3.2 Admin Menu Custom Colors

To use it in your theme, put both of the files (admin-menu.css.php and csscolor.php) in your theme folder, and add this code to your functions.php file:

add_action( 'admin_print_styles', 'atg_slick_menu_style' );
function atg_slick_menu_style() {
	wp_register_style( 'slick-admin-menu', get_bloginfo( 'stylesheet_directory' ) . '/admin-menu.css.php' );
	wp_enqueue_style( 'slick-admin-menu' );
}
Blog

Picking apart XML feeds and namespaces with PHP and SimpleXML

XML feeds to PHPI love parsing XML feeds in PHP. It makes virtually anything that has an RSS or Atom feed completely accessible to my programming. YouTube video feeds, blog feeds, even Facebook Walls. I’ve used SimplePie a lot to make combined social media feeds at work, and SimplePie provides a pretty simple way to access data from custom namespaces. Recently, though, I had to work with namespaces without SimplePie, and I’d never done it before. It’s not a secret or anything, but there’s a really great way to do it with just two lines of code. Continue reading

Blog

Show a user’s order history on “My Account” in Cart66

This isn’t a full tutorial, just some code for people to use.

I’m working on a site that’s using Cart66 for their online store. Unfortunately, Cart66 doesn’t come with a function or shortcode for displaying a logged-in user’s purchase history. I made a somewhat comprehensive “My Account” page that does just that. Continue reading

Blog

I’m going to WordCamp Chicago!

WordCamp Chicago attendee badgeA couple of days ago, my plane tickets were purchased and my hotel reservation was made. I’m headed to WordCamp Chicago!

Brave New Media, the company I work for, is sending me along with our other (awesome) developer, Jerry Kramer.

I’ll definitely be tweeting throughout the event, and you can expect a post or two on my blog. I’ll also be writing on the Brave New Media blog—that stuff will be less technical, and my blog will be more developer-oriented. Follow me @alisothegeek if you want to hear all the juicy details as events unfold!

Aside

For those who don’t know about the antispambot() function in WordPress, it automatically obfuscates email addresses so it’s safe to use mailto: links. It turns email@example.com into &#101;&#109;a&#105;&#108;&#64;e&#120;&#97;mp&#108;e.c&#111;m . Cool, huh?

Blog

Introducing Bolts, a WordPress Parent Theme

BoltsI could endlessly tinker with Bolts, adding one more feature or making one more change before release, but then it would never reach 1.0. So, without further adieu, here it is:

Bolts 1.0

It’s not perfect, but nothing ever is. Please enjoy using it, and I welcome any and all feedback!

The fact that Bolts is launch-able means that Themejack is that much closer to being a reality. Keep an eye on themejack.net, because Bolts will ultimately live there. Once Themejack is launched, I’ll probably submit this to the WordPress theme repository!