Using Flip to Clean Up PHP Files

April 16, 2009 · Posted in Nerdy Stuff · Comment 

Here’s another handy tool for editing .php files for WordPress themes. I suppose this could be used for any .php files, but editing WordPress themes is where I generally encounter this problem. The problem being .php files created by other people using some sort of Windows editor (ie. Notepad). These files can be extremely ugly to look at and a headache to edit.

Thankfully, there is a nice and easy way to fix this. While in the directory for whatever theme you are working on type the following command:
flip -u *.php
You may also want to do this for the style sheet. The code for this would be as follows:
flip -u style.css
It is best to specify which files you want to fix, rather than do a wild card flip (such as flip -u *). Doing a wild card flip could alter the code in files that don’t require changing which could then screw up the code in those files causing you to have a very bad day.

WordPress 2.7 – Image Uploader Problem

December 29, 2008 · Posted in Nerdy Stuff · Comment 

After uploading an image using the Image Uploader, the radio buttons for the different picture sizes were grayed out and unselectable. The only option available was full size. The other issue that I noticed was that there were also no sizes displaying beneath the radio buttons and the full size was appearing as 0×0.

The WordPress Forums are full of questions with people having various problems with the new Image Uploader. They range from permissions, missing files and Flash 10 incompatibility. None of which solved my problem.

I was finally able to solve this issue by disabling all of the plug-ins. After disabling all of the plug-ins I uploaded an image and the radio buttons were working perfectly. I reactivated my plug-ins one by one rechecking that the Image Uploader was working after each plug-in was reactivated. By this process of elimination I was able to find my culprit; podPress 8.8 by Dan Kuykendall. Since I am not even using this particular plug-in, I just left it deactivated.

This issue was making me absolutely crazy, so I hope this helps anyone else out.

Framing Gallery2 Into WordPress

February 4, 2008 · Posted in Nerdy Stuff · 1 Comment 

Here we go on another adventure in the world of websites and code that I know nothing about. One of the major features that I wanted to add to this site was to have my gallery embedded or at least appear to be embedded. There is a plug-in called WPG2 which does exactly that – properly. You may want to go ahead and check it out before you read any further. My method simply adds the gallery via an iframe. It does not integrate the gallery with WordPress.

I started by creating a new page and pasting a bit of code from another site that had an iframe. This is the snippet of code that I copied and pasted:
<p><iframe src="http://YourGalleryURLHere" id="searchFrame" frameborder="0" height="1030" width="725"></iframe></p>
You can adjust the height and width to make the iframe fit into your theme. And depending on your theme, some of you may be done at this point. My theme, however, was not so accommodating. The right sidebar was in the way.
Read more

WordPress and Adding Line Breaks – a Hack

January 9, 2008 · Posted in Nerdy Stuff · 24 Comments 

I came across the issue of adding a line break on one of my pages. This page contains an iframe, which may or may not be the root of the problem. My goal was to have a couple of lines of text, space, camera image, space, and a couple more lines of text. I finally got there, but it took a little Googling. I tried using the regular tags; <br> and <br />, but they didn’t work. The original code for the iframe had the image being aligned to the left. By deleting the align code I was able to get the second line of text to move to the bottom of the frame. I still wanted an extra space under the camera image. After Googling for line breaks I stumbled on A Truth Seeker’s blog and copied this little snippet of code:
<br clear="none" />
That did the trick. I’m calling this a hack since I didn’t really bother with too much research. I just tried stuff until I got my line break. I’m also a lazy html’er. I only learn code when I want to do something. Please feel free to add your comment, especially if you know what the correct solution should be.

(Edit 1/14/09: Deleted the link to the Harley Cam. Sadly, that page no longer exists.)
(Edit 7/9/2010: Deleted the link to the Truth Seeker’s blog. It apparently no longer exists.)