Archive for August, 2011

Images Cut Off in the WordPress Image Editor

So, I’ve just spent the last half hour tracking down this annoying bug in WordPress ūüėõ

I’m really glad I use an outdated theme (or at least one without custom header support) so I could track this puppy down.

I have been working on building a theme that is a child theme of good ‘ol 2010 (2011 wasn’t out when I started building :()

I uploaded a portrait image and noticed it got cut off in the image editor like so:

The editor’s will really need to be able to adjust that thumbnail image, so I went digging around and found that a theme called “Modfolio” had this exact same problem.¬† So, I figure, it’s gotta be something with the theme.¬† Especially since I didn’t get a whole lot of results…if it was a core issue and everyone was seeing this then I would assume there would be a lot more complaints.

I switched around from my child theme, to 2010, and even 2011, but the same error kept popping up :/¬† Then I figured I’d check it out in my blog here.¬† I’m currently using a slightly modified version of Uchilla theme – which hasn’t been updated in ages.¬† And lo-and-behold the image is coming up fine and dandy in the editor.¬† I could be wrong on this, but I believe the only file in a theme that can mess with the admin side of things is the functions.php file.¬† So I just kept hacking away at it until I found the bit of code that was causing me grief.

It’s lines 117 & 188 in the functions file for 2010:

define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyten_header_image_width', 940 ) );
define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyten_header_image_height', 198 ) );

That was somehow adding a constraint to the editor preview and for me simply commenting out those two lines did the trick :)¬† I did have to re-upload all the affected images though…

I don’t know what effect that might have on the custom headers…I’m not using them myself so it wasn’t an issue for me.

Permalink » No comments

Try Ruby

I’m trying to come to grips with Ruby on Rails, and the website Try Ruby was suggested to me.

It was a really impressive online tutorial set-up as a user prompt.¬† I really appreciate that it’s one Ruby tutorial that doesn’t require me to be download and installing packages willy-nilly to get started ūüėõ¬† It’s extremely newbie-friendly and is well written and utilizes some light humor to help you get through it :)¬† I think the last chapter was a bit clumsy…but may have just had one too many typos along the way.

Regardless, I’d say the “15 minute” bit is no lie and well worth the time if you’re trying to get better acquainted with Ruby or RoR such as myself.

Permalink » No comments

Free seamless patterns

Subtle Patterns is a lovely site featured some really great seamless patterns.¬† Best of all they’re commercial free so no worries about plugging these into your designs :)

The patterns are all fairly muted.¬† Nothing really crazy.¬† They’re very well made and look professional.¬† I was really happy to find this site, and I’m planning on using some of their textures in future designs.¬† Light textures like these are a great way to add a little more interest and depth to a piece of design without going overboard.

Plus patterns are “in” right now, and it’s always fun to be trendy ūüėČ

Permalink » No comments

350s gallery

I randomly made this little webpage to showcase a lot of 350×200 openers I made for online articles :)

It’s a pretty simple script built on top of jquery:

<style type="text/css">
body {
<script type="text/javascript">
      height = $(window).height();
        width = $(window).width();
        percent = e.clientY * 100 / height;
        move = ($("#box").height()-height) * percent / 100;
        percent2 = e.clientX * 100 / width;
        move2 = ($("#box").width()-width) * percent2 / 100;

The CSS hides the scrollbars and removes the default margins from the body.

Then the Javascipt adds an event handler that will fire every time the mouse moves on top of a div – which is always since the page is pretty much just one giant div.¬† After that it determines what percent of the window you cursor is currently sitting at, and then translates that to the same percentage of the size of that giant div and scrolls the window accordingly.¬† So regardless of the size of the window you’ll be able to move it around to see all the contents of the div.

Scroll around the box below to see the random goodness:

Permalink » No comments