Syntax Highlighting!

Finally, I have beautiful syntax highlighting for the code snippets I put on my blog entries! Doing this is incredibly painful with TinyMCE, especially with tag-based code, because it would try to mess with the code.

Maybe I'll actually blog about specific code examples more often now, because I'll know I won't have the hurdle of wrangling with TinyMCE.

So now I can post beauteous code snippets like this:

<cfparam name="url.PerID" default="0">
<cftry>
    <cfscript>
        cfcurl="http://site.com/ws/person.cfc?wsdl";
        p=CreateObject("webservice",cfcUrl);
    </cfscript>
    <p>Hello, <cfoutput>#p.getName(url.PerID)#.</cfoutput></p>
    <cfcatch type="any"><cfoutput>#cfcatch.message#</cfoutput></cfcatch>
</cftry>

This is all thanks to the WordPress plugin by Amit Gupta over at iGeek.info called iG:Syntax Hiliter. You might note that it doesn't support ColdFusion out of the box. However, this plugin uses the GeSHI syntax highlighter, which does in fact support ColdFusion. So, as Adam Fortuna points out, getting ColdFusion syntax rendering is as easy as getting the cfm.php file from the GeSHI package and dropping it into iG:Syntax Hiliter's geshi directory.

After that, there may be some tweaking or style alterations you may want to make, but after activating the plugin, you're basically done. Thanks Amit!

User Profile Problems in WP Fixed By Disabling Cache

Jenny had a post about how WordPress caching seems to mess everything up, at least in WP v2.0.2. Disabling the cache fixed a very serious error that was bringing the site down.

As it turns out, I was having a heck of a time with user management on a fresh WordPress install. When I initially logged in as Administrator, I immediately changed the default password, but then the new password wouldn't work. After several attempts, it finally accepted the new password. Later, I tried making other changes to the profile, and they just wouldn't take. But then later, some of the changes would start showing up. Very odd and perplexing.

Well, caching issues usually do cause very odd behavior. Sure enough, I disabled the caching, and everything was fine. And to further verify that this is a valid solution, if you look inside the ~/wp-content/cache directory, there are two user-oriented cache subdirectories: "users" and "userlogins". WordPress v2.0.2 apparently doesn't handle the caching very well when updating user information.

I Love Spam Karma

Wow. While I was on vacation, Spam Karma kind of freaked out in some way and was no longer functioning. As a result, I was left with the default WordPress comment moderation facilities.

Thank goodness for the default WordPress spam blocking functionality! Even though it left over 400 spam comments to moderate for Nazin and over 200 to moderate for my personal site (over the course of a week), at least it caught them and prevented them from appearing on the site itself!

My email client checks my accounts every 5 minutes, and on every refresh, it would pull down about 5 new comment moderation messages. That means that by yesterday, my site was getting comment spam or trackback spam once every minute during parts of the day. That is incredible.

You know, comment spam seems like a logical step for spammers, but you have to admit that the Trackback Spam, or Sping, is absolutely vile in an irritatingly clever way.

When you reach this level of blog spam, you realize how helpful services like Spam Karma are, and how incomplete CAPTCHA is as a solution to spam. It was never meant to be a total blog spam solution, but some people flog it as such. I used to be one of them. And now I'm glad I have Spam Karma. Except for its glitch (which I think was database related, not actually a fault of Spam Karma), it has had a 100% success rate for positive and negative spam identification.

Spam Protection

As a side point, I really, really, really need to get CAPTCHA for the blog comment posting.

Sure, the existing spam protection prevents spam comments from being visible. The stupid spammers can never figure out that gobs of links give away the fact that it's spam.

Or I could use a spam service like Akismet. Either Akismet or Nio's Anti Spam Image plugin is what it shall be.

UPDATE: Okay, and when it's all said and done, I went with Spam Karma 2. They seemed pretty good. We'll see how things turn out.

  Theme Brought to you by Directory Journal and Elegant Directory.