Skip to content

Blog Changes: New Themes, New Syntax Plugin, Several Plugins Deactivated

Since I’m reviving the blog, I decided to give it a good going-over, in terms of theme, plugins and other aesthetics / tools I’m using.

The most notable change: I’ve switched from Fluid Blue to F2, both by SriniG. I really like the straightforward, clean appearance of Srini’s templates; when it comes to Web design, I am decidedly minimalist.

I’m inclined to agree with Chris Brogan and Julien Smith, authors of Trust Agents, when they strongly suggest having a personalized blog template. Experience certainly tells me that packaging and logo is vital to building any brand.

Truth be told, I can’t make anything anywhere near as nice as F2, and I’m too cheap to hire someone who could. Maybe, someday, I’ll trade a Web designer, programming for design. If you’re interested, let me know. Anyway, I like the new look, which I’ve hacked a bit, mostly by keeping all the fonts sans-serif.

I’ve also turned off several plugins. As previously noted, WP-PostRatings was not very popular. AskApache Google 404 did not deliver the SEO optimization I expected, and is a bit too ugly out of the box for my taste; I didn’t want to invest the time it would take to make it look pretty.

Global Translator is really just some buttons to use various online translation services. It does provide a local caching mechanism, which is why I installed it in the first place: I wanted to have the search engines index my posts in multiple languages.

But I couldn’t get the cache to work properly, which caused all kinds of 404 errors (which, again, AskApache Google 404 didn’t really help to fix). To top it off, the translation services were translating my code blocks, rendering them useless. Again, I could hack these problems myself, but since visitors can use the same services Global Translator uses, I decided to simply scrap it.

Continue reading ‘Blog Changes: New Themes, New Syntax Plugin, Several Plugins Deactivated’ »

Hacking WP-PluginsUsed To Remove Plugin Version Numbers

One of the greatest contributors to the WordPress plugins repository is Lester “GaMerZ” Chan.

It’s testament to the value of his contributions that his work has not only been duplicated, borrowed and built upon by hundreds of other plugin developers — just search “gamerz” in the WordPress plugins repository to see how many times his name is cited — but many of his ideas and hacks have made their way into the core functionality of WordPress.

I use two of Gamerz’s plugins: WP-PostViews and WP-PluginsUsed. (Until recently, I also used WP-PostRatings, but that was not a popular feature, so I turned it off.) I like them both, but I had concerns about the security of using WP-PluginsUsed.

My concern was not WP-PluginsUsed itself, but the fact that it reported the version numbers of other plugins. Just telling the world that I am using a plugin is bad enough; reporting the specific version number, making it even easier on crackers, seems pointless.

But I believe in giving credit where credit is due, even at the risk of someone trying to exploit this site. I can always deactivate any plugin that has a major security hole. Besides, what plugins one is using generally isn’t difficult to figure out; there tends to be a handful available for any given task, and the ones that work well are often few and far between. You can pretty much just look at a WordPress blog and get a good feel for what plugins it is running.

That said, to keep my peace of mind, I simply commented out the part of WP-PluginsUsed that reveals version numbers.

You can do that either in the plugin editor that’s built into WordPress, or your favorite text editor. Look for the get_plugingsused_data() function, around Line 46:

46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
### Function: WordPress Get Plugin Data
function get_pluginsused_data($plugin_file) {
	$plugin_data = implode('', file($plugin_file));
	preg_match("|Plugin Name:(.*)|i", $plugin_data, $plugin_name);
	preg_match("|Plugin URI:(.*)|i", $plugin_data, $plugin_uri);
	preg_match("|Description:(.*)|i", $plugin_data, $description);
	preg_match("|Author:(.*)|i", $plugin_data, $author_name);
	preg_match("|Author URI:(.*)|i", $plugin_data, $author_uri);
	if (preg_match("|Version:(.*)|i", $plugin_data, $version)) {
		$version = trim($version[1]);
	} else {
		$version = '';
	}
	$plugin_name = trim($plugin_name[1]);
	$plugin_uri = trim($plugin_uri[1]);
	$description = wptexturize(trim($description[1]));
	$author = trim($author_name[1]);
	$author_uri = trim($author_uri[1]);
	return array('Plugin_Name' => $plugin_name, 'Plugin_URI' => $plugin_uri, 'Description' => $description, 'Author' => $author, 'Author_URI' => $author_uri, 'Version' => $version);
}

We’re going to edit the last line of that function, the one that says “return array( … ).” Here’s the replacement line:

64
	return array('Plugin_Name' => $plugin_name, 'Plugin_URI' => $plugin_uri, 'Description' => $description, 'Author' => $author, 'Author_URI' => $author_uri, 'Version' => ''); //$version);

What this does is replace the version number for each plugin with an empty string; it has the same practical effect, through the rest of the plugin’s code, as never having reported the version of the plug-in.

Note that I also could have commented out lines 54, 55, 56 and 58, and left Line 64 intact. That, too, would have set the value of the version for each plugin to an empty string. I opted for the solution above because it is most elegant.

I distribute all code under the GNU GPL.

Grouping Your WordPress Blog Comments By Type: Comments, Trackbacks And Pingbacks

First, my apologies for the extended period of time off I took from this blog. There’s no great scandal behind the break I took; my health and humor are just fine. As Technorati notes, somewhere around 95 percent of blogs haven’t been updated in three months; I just kind of fell into that groove. But I’m back on task now, and hope to post something every day again.

Part of the benefit of blogging is getting comments and other sorts of feedback. Quality feedback is a huge help to bloggers; I want to know that what I have said actually resonates — or, failing that, at least whether what I wrote actually works for most people.

I also like having clear links within my posts that interrelate various posts on a topic: Not only links to earlier postings, but especially links to later posts, that may build on a theme.

WordPress, thankfully, is built around a fairly robust commenting system. In addition to now supporting threaded comments (that is, you can see a “ladder” of comments and replies to comments), WordPress can also handle pingback and trackback links.

Out of the box, WordPress commingles comments, trackbacks and pingbacks, by order of most recent to least recent. That’s fine, but I like the idea of grouping post feedback by type: Namely, I want to give precedence to comments left specifically on the blog, with external and internal hyperlinks grouped together, after the comments.

With a little hacking of the comments.php script in your theme, you can easily break your trackback / pingback links out from your comments, and place them either before or after your comments.

Continue reading ‘Grouping Your WordPress Blog Comments By Type: Comments, Trackbacks And Pingbacks’ »

Blog Update: New Anti-Spam Plugin May Block Legitimate Comments

As this blog has gotten more popular and, as a result, started ranking well with Google, the spamming here has become incessant — to the point where faithful, reliable, old Akismet alone isn’t good enough.

Akismet has caught nearly 16,000 spam comments here in just under three years, and only accidentally labeled three comments as spam (see details, PDF). So sure, I could just purge the Akismet moderation queue every time I log in to the admin section.

But I don’t like the idea of visitors here possibly being labeled as spammers, without being told, no matter how unlikely that is to happen. And because of the way WordPress stores comments, emptying the Akismet moderation queue leaves a lot of MySQL overhead.

So I’ve decided to use WP-SpamFree to augment Akismet. And what that means to you is, if you disable JavaScript and cookies, or visit this site via a proxy server, you cannot comment here.

Continue reading ‘Blog Update: New Anti-Spam Plugin May Block Legitimate Comments’ »

MSDN Northeast Roadshow: Sept. 24 in Augusta, ME

The MSDN Roadshow returns to Augusta, ME and the Central Maine Commerce Center’s Florian Auditorium on Sept. 24, from 1 p.m. – 6 p.m. (That’s a later start than recent roadshows, because directly before it, there’s a TechNet event about Windows 7 and Remote Desktop.)

MSDN Roadshows are a chance for Microsoft evangelists — namely, Chris Bowen and Jim O’Neil — to describe new technologies, demonstrate how to program in Microsoft languages and platforms, and generally share the word about what’s new and on Microsoft’s mind at the moment.

Among the issues to be discussed at this roadshow is Windows 7. Without question, Chris and Jim know their stuff, and you’ll definitely walk away from this event with a better knowledge of Microsoft technologies — if not some of the loot they give out at every event (fully-functional copies of Windows Vista, Visual Developer 2008 Professional, Microsoft Press books and peripherals having been offered in the past as door prizes).

Florian Auditorium and the Central Maine Commerce Center are in the former SCI Systems / Digital Equipment plant off Civic Center Drive. I have a public Google Map of the location.

If Augusta or the date are not convenient for you, Chris and Jim are doing the same agenda in Manchester, NH; Rochester, NY; Troy, NY; Waltham, MA and Farmington, MA. Chris Bowen details it all on his blog.

New URL For ASP.NET Demos: dougv.net

The process of retiring / removing my Yahoo!-related handle continues. The latest step: a new URL for ASP.NET demos, which are hosted on another server.

From here on out, my ASP.NET demos will be hosted at dougv.net. This replaces the former URL, dhvrm.com.

I’ll leave dhvrm.com running for a while, but please correct your bookmarks as that domain is subject to removal at any time without further notice.