Skip to content

Tag: wordpress

Geeking Out for Greyhounds (or, My First and Probably Only WordPress Plugin)

Each week, when I do Weekend Hound Blogging, I insert the following at the end of the post:

[saveagrey]

This requires me to find an old post, copy and then paste the text into the new post. Surely, thought I, there must be an easier way, which got me thinking about trying to create a plugin to do that for me.

I studied some of the simpler in-post plugins I already use and tried to decipher the PHP.

I read “Writing a Plugin”, studied the “Plugin API” page and “Plugin API/Hooks”on the WordPress site, as well as “How to Write a Simple WordPress Plugin” on Asymptomatic. Then, I started putting together a PHP file, tinkering and playing until I eventually had a plugin that allows me to type:

[ saveagrey ]

(without the spaces) and have this appear:

[saveagrey]

The cool thing is that it can be easily changed so that the text and links go anywhere or say anything, which might make this useful for anyone who occasionally wants some message at the end of certain posts such as vote for so-and-so at the end of all political posts or something to that effect.

This little exercise was a lot of fun. I really enjoyed trying to decipher the PHP since I know nothing about that language. Ultimately it became something of a puzzle that could only be solved through logic. When I figured out the solutions to the problems I encountered, I was rewarded with something that will save me time and possibly be of use to anyone who uses WordPress and wants to help save retired racing greyhounds.

So, there it is. My first plugin: Save a Greyhound (click to go to the download page)

WordPress 2.1 Easter Eggs

This is kind of stupid: Very useful features are hidden in WordPress 2.1 as “easter eggs”

Via Weblog Tools Collection and ReviewSaurus, I have learned that hitting ‘alt v’ (shift alt v in Firefox) while in the post editor brings up a variety of useful features such as underlining, changing text color, insert custom characters (©, œ, ü, ∞, ½, etc.) as well as some features forpasting from Word (which is useful for me since I sometimes write my posts in word) or pasting as plain text. You can also create headings and the like.

These are great features and shouldn’t be hidden. I wonder what else we’re missing out on.

Update: The Visualize Advanced Features plugin makes all of this visible.

WordPress 2.1?

Blogging about blogging is close to the lowest form of blogging, but blogging about the behind the scenes aspects of a blog is like watching someone else’s cat spit up hairballs on the carpet, so as of this post, that kind of blogging will occur on my other blog, aptly named Coyote Mercury Test Blog, mainly because I’m using it to see if I can actually execute the upgrade to 2.1 and to find out if my theme and plugins will work.

If you’re using WordPress and considering the upgrade, you may find it useful or interesting. If not, you won’t.

In the future, I’ll probably use it for testing plugins, theme modifications, and any future upgrades. I doubt I’ll post there regularly.

My Wife Presses Some Words

My wife has moved from Blogger to WordPress. Check out her new cyber home at http://www.losbrushes.com/blog. It looks pretty good. Okay, I admit, I did some of the code modifyin’ myself, and I also took the picture on the header. The fact that I now get to fart around with the code on two blogs makes me happy.

And, yes, we’re playing with our blogs at 9:30 on a Friday night. What can I say? We’re perfect for each other.

Photoblogging on WordPress

The picture is of the business school at the University of Texas at Austin. Why?

Because it’s so easy to photoblog now.

On thing that’s always been a bit annoying about WordPress is that it’s not the friendliest blogging tool when you want to use images. Typically, I’ve had to resize them in a photoeditor, then upload them to my hosting service, then import the URLs into the blog.

But, I’ve found and just installed Photopress, a very cool plug-in. I had to do some CSS tweaking to get it to work with my layout, but now when you click the photo tab on my blog (or click one of the photos) it will take you to the photo page where all the images I use (and any others that I don’t blog, but want to share) can be seen.

Best of all, uploading photos is now a one-step process.

Update: WordPress now supports proper photoblogging. Yay WordPress.

Uhhh, Like Housekeeping and Stuff

One of the many fun things about blogging is tinkering with the blog and in the process learning a bit about how web sites work. I haven’t been writing the past few days; instead, I’ve been playing with my code (uh-huh-huh…Shut up, Beavis that’s not what I meant) in an effort to create a separate archives page so as to clean up the left sidebar by placing a single link in the navigation section. Anyways, that’s where the archives and categories are for all you scholars doing research on my blog.

The coolest thing about the archives page is the live calendar plug-in that uses AJAX so that the whole page doesn’t have to reload when you move to another month.

Now that my left sidebar is cleaned up, and I’ve learned how to make static pages that use WordPress’s php tags, I’m debating making a links page for my blogroll and then reconfiguring to a two column fixed layout. I like fluid design (which is what I have now) because I like how it fills a monitor and gives users the option of resizing the browser to create a comfortable column width for reading, but with a fixed layout I could control the layout of posts, which would be nice when using pictures.

Oh, what to do. Perhaps I just miss playing with my code (uh-huh huh…damn it, Beavis, don’t make me kick your ass!) since I haven’t made any changes to the look of Coyote Mercury since January, but then I do find a very clean minimalist site somewhat appealing. Change for the sake of change? Yup, that’s me.

Ok, I’m off to rearrange the house…

Fighting Spam

I’ve been getting inundated with comment spam lately. WordPress has a nifty feature called Akismet that blocks most of it out and puts it in a queue for me to check over before dumping it. I’m used to the occasional “Hi. I love your blog. Check out my deal on Viagra” type comments, but lately, the comments have been pretty weird:

  • “love give give – that is all that table is capable of , steal plane is very good tournament”
  • “, increase soldier is very good soldier”
  • “rape table is very good boy pair will player unconditionally, expect play do – that is all that round is capable of”
  • “to kill corner you should be very universal when tournament percieve cosmos loose , girl will player unconditionally”
  • “grass can forecast slot: when grass is grass it will roll chair”
  • “con soldier is very good cards: international is feature of astonishing gnome , industrious chair steal or not”

Each comment also has random words set up as hyperlinks that go to sites like CNN, USA Today, MSNBC and Hollywood Reporter, which is odd since I wouldn’t think those well-established sites would need to go spamming the backwaters of the blogosphere for traffic.

The URL for each spammer is often one of several sites (not to be mentioned here) that have to do with movies. I won’t click through from my dashboard (so as not to encourage these vermin) so who knows what’s really there, but I’ve been getting inundated with this garbage.

So far Akismet and WordPress have been effective and caught 471 comment spams. Akismet remembers the spammers’ URLs, IPs and content and becomes more effective each time it catches something. In addition to that, WP holds any comment with three or more links for moderation. Still, a few are suddenly getting through. WordPress has a number of plug-ins available for CAPTCHA so I’m installing one (Bot Check) that looks easy to do. If it doesn’t work, I’ll try a different one.

I hope this isn’t inconvenient for anyone. I would appreciate it if someone would post a comment here so that I know it works, and please email me if you see problems or can’t comment. Unless you’re a spammer in which case please go to Hell.

Building a New Blog

As you can probably see if you’ve stumbled upon this site I’m in the site building process. My blog, Coyote Mercury, has been hosted on Blogger, but ever since I first dipped my toe in the waters of the ‘net and began experimenting with building sites, I’ve owned the www.coyotemercury.com domain and have hosted it on Yahoo! I never did much with it and basically forgot about it, using it only as a repository for old stories and such. Recently, though, I learned that Yahoo! had partnered with both Moveable Type and WordPress, the end result being that users can for no extra charge run a blog on Yahoo! using either (or both) platforms.

This sounded good since I was already paying for Yahoo! hosting so I experimented with both, but decided to use WordPress. It’s easy, powerful and intuitive. Moveable Type was cool, but I had WordPress figured out much sooner and was happy with the results. I’m using the Gila theme with a lot of my own modifications in the CSS. I also decided to use WordPress to power the main site and since it has this cool feature that allows you to make static pages it was perfect. I had to make a whole bunch of modifications to the static page layout to develop a look that makes the blog seem to be part of the site rather than everything being parts of the blog.

WordPress also has a feature that allows one to import all posts and comments from Blogger. I’ll do that when I’m finished tweaking my layout and then I’ll start posting here. Until then, I’m still on Blogger.