Tag: WordPress

Execute php code in WordPress posts

I stumbled upon a great WordPress plugin the other day.  It’s called Exec-PHP 4.9 and it was created by a German person by the name of Sören.  His name sounds like a character from Lord of the Rings, but he’s an actual person, not a character.

At least I think so.

The plugin allows you to place PHP code right into a WordPress post, page, or even a widget.  This means that you can create an archive page or a tag cloud page without editing page templates. If you have spent time creating custom page templates to handle specific PHP code, you know how cumbersome this can be, especially when you change your theme and realize that your custom pages are now useless.

I only wish I had stumbled upon this plugin sooner.

Assume nothing

dunce2It’s as though being laid off for nearly three months has made me forget everything I’ve ever known about technology. One of the things I learned a long time ago was to assume nothing. I wish I had remembered that little adage a couple of weeks ago when I made some minor changes to the theme my blog currently uses. I made the changes while using the Firefox web browser and I just assumed that everything looked right in other browsers.

How stupid of me.

It turns out that even though the changes I made to the css style sheet looked fine in Firefox, the changes looked anything but fine in Microsoft’s Internet Explorer. The changes caused my blog to not load correctly in Internet Explorer. When I finally got around to opening my blog with Internet Explorer, I discovered that the entire screen was dark brown, causing the text to be unreadable.

I didn’t know anything was wrong until I posted an email I received the other day from an angry reader that wanted to inform me that he was unsubscribing to my RSS feed because, well, he said he couldn’t read posts.

I didn’t know what this person was talking about, so I asked if anyone else knew. It wasn’t until I read the comments that I knew anything was wrong.

From now on when I make changes to my blog, I’ve going to take a look at the changes not only in Firefox, but Internet Explorer, Google Chrome, and Apple Safari too.

It’s a good thing I’m starting work again on Monday.  Any longer on unemployment and I would probably forget everything I’ve ever known about technology.

In a perfect world, all web browsers would share similar browser compatibility.  Assume nothing.

Sarah Palin exploring legal options against those who try to guess why she is resigning

Sarah Palin, the soon-to-be former governor of Alaska, doesn’t appreciate people guessing why she is resigning.

From the Associated Press via MSNBC:

The abruptness of her announcement and the mystery surrounding her plans has fed widespread speculation. But Palin attorney Thomas Van Flein on Saturday warned legal action may be taken against bloggers and publications that reprint what he calls fraudulent claims.

“To the extent several websites, most notably liberal Alaska blogger Shannyn Moore, are now claiming as ‘fact’ that Governor Palin resigned because she is ‘under federal investigation’ for embezzlement or other criminal wrongdoing, we will be exploring legal options this week to address such defamation,” Van Flein said in a statement. “This is to provide notice to Ms. Moore, and those who re-publish the defamation, such as Huffington Post, MSNBC, the New York Times and The Washington Post, that the Palins will not allow them to propagate defamatory material without answering to this in a court of law.”

Shannyn Moore maintains a blog over at WordPress.com, entitled “Shannyn Morre: Just a Girl from Homer“.  On this blog she writes about politics in Alaska, including the soon-to-be  former governor Sarah Palin.  She also appears somewhat regularly on MSNBC.  Evidently it was one of her TV appearances that raised the anger of Team Palin, not her actual blogging.

From the Anchorage Daily News:

Van Flein, asked why he singled out Moore, said it’s because she went on national television and talked about it. Moore was on with MSNBC’s David Shuster on Friday, the day Palin said she will resign.

“There is a scandal rumor here that there is a criminal investigation into some activities and that’s been rumored for about, I don’t know, probably six weeks or two months,” Moore told him.

She said she’s never seen Palin appear as nervous as she did at the press conference announcing her resignation and “I think she was actually doing damage control for news that’s coming up later.”

Moore said that there was a rumor that there was a criminal investigation into some activities involving the Palins.  She did not say that there was a criminal investigation.  She only said that was a rumor that there was a criminal investigation.  She also followed this up with what she thought Palin was doing by resigning.  She used the word “think” which means that it was merely her opinion.

You can’t sue people over their opinions.  At least not successfully and not in the United States of America.

The problem with what Sarah Palin did by annoncing that she was resigning as governor of Alaska is that it makes absolutely no sense.  A lot of people are trying to come up with a reason why she would do what she did.

I’m going to miss Sarah Palin.

Making the entire header a clickable link

You will notice that when you run your mouse anywhere over my blog’s header that it is one big clickable link. Clicking anywhere on the header that does not have it’s own link takes to directly back to the main page.

It’s an easy hack to accomplish. All you have to do is open the WordPress header.php file in any text editor or the default WordPress editor and insert the following line where you would like this clickable aspect to begin:

<div onclick="location.href='http://bentcorner.com/';" style="cursor: pointer;">

It’s imperative the you also insert a </div><!--end clickable area--> where you want this clickable area to stop being clickable. Otherwise, not only will the rest of your blog be one huge clickable link back to the main page, the remaining formatting will be off.

It’s always a good idea to make a back-up of header.php before you start messing with it. Of course, you will also want to change ’bentcorner.com’ to the url of your own blog, that is unless you want your blog’s header area to be a clickable link to my blog. That would just be crazy.

Troubleshooting a WordPress slowdown

wordpressI noticed this morning that my blog was talking an overly excessive amount of time to load. The page would begin to freeze as soon as the first post’s title would appear on the screen. Even when I would try to load just a single post, the load time would exceed over 20 seconds.

It’s been my experience that most slowdowns in WordPress can be attributed to a plugin. To find out if a problem is coming from a plugin, go to the WordPress Manage Plugins page and temporarily bulk deactivate all plugins, then try reloading your blog. If it now loads quickly, you know the slowdown is coming from a plugin.

How then do you find out which plugin is causing the slowdown?

Go back to the WordPress Manage Plugins page and bulk activate half of your installed plugins, leaving the other half deactivated. Try reloading your blog. If it is loading slow again, you know the guilty plugin was in the group of plugins you just activated. If instead your blog is still loading quickly, you know it’s in the group of plugins that are still deactivated.

When I tried this, my blog was still loading quickly. I went to the deactivated plugins and activated them one by one, reloading my blog in a another browser window. It wasn’t until I reactivated the Related Websites plugin that I experienced a slow down. I went back and deactivated it and resumed reactivating the remaining plugins, hitting the refresh button in another other browser window each and every time.

When I verified that none of the other plugins was causing my blog to load slowly, I once again reactivated Related Websites. Once again, it slowed everything down.

This confirmed that it was the Related Websites plugin that was causing the slow down. Once I knew this, I was able to uninstall it permanently.

Custom Query String 2.9

I wanted to limit the number of posts that appear on the front page to four posts, but wouldn’t limit the number of posts that appear on the archive pages to only four posts. Since only the titles are displayed on the archive pages, I wanted those to show 100 posts. The normal default WordPress does not allow you to do this. If you want only four posts to show on the front page, you will only show four posts on every other page too.

I found a plugin that allows me to do this, Custom Query String 2.9. It does exactly what good plugins do: it works exactly like it’s supposed to.

Upgrade to WordPress 2.6.2 or your blog might die!

Well, maybe it wont die, but it might get hacked.  This upgrade fixes a security flaw in WordPress that allows blogs with open registration to have anyone’s password reset to a new random password.  That means you wont be able to log on to your own blog because you wont know what the new password is.

The individual that reset your password wont know what it is ether, so this security flaw is mostly just simply annoying.  The problem is that there is also a problem with the randomness of the randown password generator used by WordPress.  It turns out that it’s not so random afterall. [WordPress Blog]

WordPress 2.6.1 released

The people that make WordPress, the world’s most popular blogging platform, have released the newest version, WordPress 2.6.1.  I just performed the upgrade and everything went without a hitch.  Not that I know really what a hitch actually is.

Back when I had this blog hosted on GoDaddy, upgrading WordPress was always a nightmare.  Problems I attributed to WordPress were in all actuality problems with GoDaddy. I can’t stress enough to people that GoDaddy should be avoided like a three-day old hotdog at 7-11. Not only did hosting my blog there cause a whole host of difficulties (i.e. feeds not working), the interface at GoDaddy was a pain in the ass. It was as though they designed the interface to subject you to as much advertising as they could. I was constantly having to go from one window to another window to do the most basic things.

I would encourage anyone needing blog hosting service to look no further then AQHost. They are cheap, easy to use, and they are quick to reply to any question of concern.

WordPress sucks with the intensity of 1,000 suns

Not that I really know how intense 1,000 suns are, but I can imagine. I’m just getting tired of dicking with WordPress.

Yesterday I had a problem that resulted with nothing but the header image loading. I ended up fixing it be reloading WordPress 2.5. So far, so good. I would like to upgrade to the latest build of WordPress, version 2.5.1, but when I do just that, the RSS feed to my blog dies. Why? Who knows. I’ve read on the WordPress forums about other people having the same problem, but I haven’t read anything that solves the problem. It’s just another one of those WordPress “mysteries”.

Read the full article »

WordPress 2.5 released

The newest version of everyone’s favorite blogging platform is now available as a free download. I told myself I wasn’t going to upgrade anymore until I was certain it was bug free. For some reason this morning I felt like living life on the edge and decided to spice things up by doing the upgrade.

So far, so good.

They actually changed much of the interface. The look is totally different. The dashboard used to be a sloppy, confusing place. Now it is much more streamlined. Everything seems to be set up in a much more user-friendly manor. Of course you wont ever see this unless you are a WordPress user. The actual blog looks the same. The actual blog acts the same. At least from what I can tell so far.

It appears that the ability to embed YouTube videos is built right into the platform, making the use of third-party plugins unnecessary.  With prior WordPress versions, you would have to post in the non-visual editor mode to post a YouTube video.  Otherwise the WYSIWYG editor would botch the YouTube formating.  I wont know for certain until I try to embed a video, but it looks like I should be able to do it.

If you are a WordPress user and you are wondering about doing the 2.5 upgrade, by all means do it.

Comment moderation is for asshats

If there is one thing I hope 2008 brings is an end to comment moderation. You read an interesting blog post and you decide to leave a comment. You put your thoughts down in the most coherent way that you can, making sure your grammar is correct and your spelling is right. You then type in the series of fuzzy letters and numbers appearing on the screen to prove that you are not a robot. Why is it that a robot can be programed to drive around on the surface of Mars and send back photos but it can’t be programed to type “er57z” when it appears on the screen?

You then press Enter and wait for your comment to appear. Instead of seeing the comment you just posted, you see a message that says something like this:

Your comment has been submitted and will be viewable once it is approved

Why must my comment be approved? I typed in the short string of fuzzy numbers and letters proving that I was not a robot. Why then do I have to have my comment approved?

I just don’t see the point. Why do some bloggers do this? What are they afraid people are going to say? Are they worried that they are going to be called a derogatory name or that a disparaging thing is going to be said about their blog? If so, it’s time to grow up. Stop being such a pussy. Either let people leave comments or don’t. Don’t insist on micromanaging each little thing someone has to say. It’s pathetic.

The thing I hate the most about bloggers that insist on approving comments is that they never inform you ahead of time that they will need to approve your comment. They could save everyone a whole bunch of time by letting that fact be known ahead of time. Not only do I not what to leave a comment if it must first be approved, I don’t want to read comments left by other readers. If the comment section doesn’t truly reflect what other readers are thinking, I don’t want to waste my time reading it.

Problems with WordPress syndication

A while back I noticed a problem with my rss feed. I initially blamed Feedburner. My blog wasn’t always updating on the syndication side of things. I would write a new post and it wouldn’t always show up in the feed. I ended up removing Feedburner and just going with the syndication built right into WordPress.

I thought that fixed it. I was wrong.

I noticed a couple of days ago that Bent Corner was no longer showing up on Comic Web Blog Updates. It’s a site that you can go to and see a list of blogs dedicated to comic books. When one of the blogs listed with the site posts a new blog post, the blog along with the title of the new post is shown on the site. It’s a good way to keep up with what’s going on in the comic book blogosphere.

I noticed that the Comic Web Blog Updates website was still using my old Feedburner feed to get updates. I emailed the administrator and asked if he could update to the new WordPress feed. I got a response that evening saying that he tried to run the new feed through a feed validator and it came back as an invalid feed. What?

Sure enough, he was right. If you submit the regular built-in WordPress feed (http://www.bentcorner.com/feed/) to one of the feed validators, you will get a “Server returned HTTP Error 404: Not Found” error. You would think with an error such as this, the feed wouldn’t work at at. You would be wrong. The feed seemed to work. I could subscribe to it and see a list of the last 10 posts.

I tried everything. I reinstalled WordPress. I tried deactivating all of my plugins. I tried using different themes. I scoured the WordPress forums. A lot of help that turned out to be. I tried everything I could think of. I spent the majority of Friday night and much of the following morning working on this problem. I couldn’t figure out what was wrong.

I then stumbled upon something strange. Though none of the built-in syndication feeds for posts would validate, the built-in feed for comments (http://www.bentcorner.com/comments/feed/) validated fine. I couldn’t come up with the reason why the feed for comments worked, but the feeds for posts did not.

I then stumbled onto something that seemed to fix the problem. If I tried using the entire syndication php file, it worked.

I don’t know why this is happening and frankly, I’m way past even caring. I do know that I wish I had never decided to move from Blogger to WordPress. I didn’t decide to create a blog so I could spend hours troubleshooting problems. WordPress requires too much work.

More about WordPress 2.3

I’ve already written about my frustrations with the newest upgrade to WordPress, Version 2.3. I haven’t really changed my mind. If anything my level of frustration has only increased.

Most of my frustrations center around how the new version handles tagging. It heavily incorporates the use of tags. In the process, it makes many popular tagging plugins incompatible. Tagging plugins such as Ultimate Tag Warrior. I used that particular plugin for my tagging and I really loved it. Now it doesn’t work. Not only can I not tag new posts with the plugin, none of the existing posts that were tagged with Ultimate Tag Warrior have tags now.

They are now tag-free. Now if I want these posts to have tags, I must go and edit each and every post and ad tags.

Not only are most of these older posts tag-free, They don’t have categories either. While upgrading WordPress, I had an option of converting existing categories to tags. This is what I read Convert Categories to Tags screen:

Howdy! This converter allows you to selectively convert existing categories to tags. To get started, check the checkboxes of the categories you wish to be converted, then click the Convert button.

Keep in mind that if you convert a category with child categories, those child categories get their parent setting removed, so they’re in the root.

I screwed up and pressed the button. It didn’t occur to me that when I converted categories to tags, I would be deleting the categories from existing. That’s precisely what happened. All of my existing posts (over 300) were left without an assigned category. Why couldn’t WordPress convert categories to tags and leave categories intact? I now have over 300 posts labeled as “Posted in Uncategorized”. I now have to go and manually edit each and every post if I want to change this.

Upgrading sucks.

WordPress version 2.3 blows

The WordPress folks have released the newest version of the popular blogging platform, Version 2.3 “Dexter”. They named it after saxophonist Dexter Gordon. How appropriate that they would name it after a man that blew for a living.

Version 2.3 blows.

The new version does away with Categories and instead incorporates the use of “Tags”. Too bad these royally farks up just about every plugin and every theme available for WordPress. My normal theme will no longer work. Most of my favorite plugins now produce database errors. Even the default WordPress theme was producing errors.

If I didn’t know any better, I would guess that the people of MovableType helped with the development of this new version of WordPress. This new version makes changing over to MovableType look like a good idea. Granted, none of my favorite plugins work with MovableType, but they aren’t working with WordPress now either.

Blogging woes

I decided last weekend to move my blog from AQHost to GoDaddy. I was becoming extremely frustrated over the fact that the server my blog was hosted on was increasing going down and becoming not available. When I woke up Saturday morning and tried to access my blog, it was down. I had enough.

It took longer to get my account on GoDaddy up and running then I thought it would. It takes them a while before you are actually allowed to fully access your site and do things. Like upload files.

When I was finally allowed to install WordPrefect and import my blog, something went wrong. All of my categories were goofed up and all my links were gone. I went from 25 categories to over 1,800. Most were just random words seemingly picked from the æther. I actually tried to manually delete them. It wasn’t until I realized that not only did I not have any more links, I couldn’t even add links. It was then I decided I needed to just uninstall WordPress and delete the MySQL database and start over. Once I did that, I installed WordPress and then imported my blog.

It worked. I should have done it sooner.

Site Meter is placing spyware cookies on user websites

I thought something was wrong with my blog. I noticed that load times seemed to have slowed down slightly. I thought it might have been because of a few of the WordPress plugins I was using. I tried deactivating some of them to see if that helped. It didn’t.

I then read a story on Digg. It pointed to a post on the StatCounter blog about “another” website counter service that was putting malware junk on people’s machines. They wouldn’t come out and actually say which service was doing this, but it was fairly obvious they were referring to Site Meter.

I decided to clean out my browser’s cookies and test Site Meter. I use Firefox, so I went Tools>Options>Privacy and selected Show Cookies. I then selected Delete All Cookies. I selected Close to save what I had just done and then reloaded my blog in Firefox.

Spyware

I should have had NO cookies. Instead, my browser immediately had four (4) new Specificclick spyware cookies. Just by simply reloading my blog.

Needless to say, I won’t be using Site Meter any longer.

Color Cop

I was looking for software that would allow me to hover my mouse pointer over an area of the screen and give me the hexadecimal code for that specific color. I used to have a small program that did this, but a computer crash a while back caused it to go the place where ones and zeros go when they die. I didn’t have it backed up and I couldn’t remember the name of it. It was just something I clicked on my desktop to find the color of something.

I looked on Google for something like it, but I never found anything that fit the bill. I was fairly picky in my requirements. I wanted it to be free, easy to use, and I wanted it to give me the hexadecimal code in a format that I could cut and paste. I finally found what I was looking for. It’s called Color Cop.

Normally I don’t want anything to do with anything with the word “cop” in it. For this software, I will make an exception.

Give it a try if you are looking for something like this.

Cross platform fonts

Not all fonts are recognized or supported by all operating systems. The following fonts are good for Windows, Mac, and Linux/UNIX.

  • Andale Mono
  • Arial
  • Arial Black
  • Comic Sans MS
  • Courier New
  • Georgia
  • Impact
  • Times New Roman
  • Trebuchet MS
  • Verdana

If you incorporate any of these fonts into the CSS style sheet of your website, it will have the same look across all platforms. Windows, Mac OS, UNIX, and fake UNIX (Linux). At least it will look more similar then if you called for a font only used by one platform.