Executive Summary:

A method is outlined that allows a Wordpress blog owner easy access to per post comments. These few simple lines of php can be used in any Wordpress theme when used within the loop.

Full Text:

Delicious Bacon.  Mmmm....

Like delicious bacon, this piece of Wordpress hackery is tasty! Mmmm....

Some of my posts have a lot of comments. I wanted to be able to browse my site and, should I stumble upon a suspect spam comment, be able to easily exorcise it. The method I used to use entailed trying to search for the specific comment in the Wordpress back end. This proved tiresome if there were a lot of spamy comments, especially if there were a lot on one post.

With a little research, some basic PHP I picked up, and a beer I coded up this little ditty which saves me a lot of trouble. Essentially, it provides me with a quick link to the comments of the current post I’m reading. There I can easily check off one or more comments as spam / edit them / do whatever. Simple and easy.

 
 
 
 
< ?php
if (current_user_can('level_10')){  /*if user is an admin, then make the correct link*/ ?>
   <a href="<?php bloginfo('wpurl');?>/wp-admin/edit.php?p=< ?php the_ID(); ?>">Edit Comments</a>
< ?php } /* end of if statement */ ?>

I marked the code up a bit so that hopefully someone starting out with php can use and understand it. Also make sure that if you are trying to cut and paste this into your Wordpress theme you arrange it so the question marks are beside the angle brackets without a space separating them.

Nota bene: the edit comment link only appears up when the admin is logged in.

You can choose where you would like to place this chunk of code, for myself, I added it to the sidebar of the single.php file.

Mr Einstein says Play Nice!
If you’ve ever tried to use the popular image manager plugin or the digital fingerprint plugin at the same time as the immensely popular Adsense Deluxe plugin then you’ll have probably run across a perplexing problem: some buttons won’t show up in the post and page editor. Seemingly, Adsense Deluxe doesn’t play nice with the ButtonSnap Class Library created by Owen Winkler. ButtonSnap makes it relatively easy for plugin authors to insert customized buttons into the WordPress post and page editor regardless of the users editor preference (WYSIWYG vs rich editor). For an example of how this works see the Sawchuk Buttons plugin and the corresponding Tutorial on how to write your own button functions using ButtonSnap.

With hundreds of plugin writers and authors contributing to the WordPress community there is bound to be some conflicts between plugins. The method that the Adsense Deluxe plugin uses to create it’s button in the WordPress post and page editor stops any plugin which uses the ButtonSnap class library from producing it’s own button in the editor. The two just don’t work together.

In order to get around this, I suggest a simple workaround to the Adsense Deluxe plugin until a more suitable solution can be found: disable the part of Adsense deluxe plugin that produces the button in the post editor. Its easy: » Read the rest of the entry..

Typhoid MaryTyphoid Mary (aka Mary Mallon) was was the first identified healthy carrier of typhoid in the US. While she did not die from typhoid, she passed the disease to others who then became infected and died. Throughout most of her life, she denied her role in the deaths of those infected by her. Today the term ‘Typhoid Mary’ has come to mean a carrier of a dangerous disease who is a danger to the public because they refuse to take appropriate precautions.

Kanga.nu is a typhoid mary. This Plone site has a major security vulnerability which allows malicious users to create URL’s on the site that then forward visitors to a new page. Here is how it works:

» Read the rest of the entry..

This post has an inline ad. I simply used this plugin called adsense, and then added a bit of CSS to float the ads to the right. It is very simple. Follow the instructions for editing your adsense information, as written on the plugin’s website. Add the css to make it float. Here is what my plugin now looks like: » Read the rest of the entry..

This code has been updated for K2.

Recently, I showed how to create a dynamic sticky for wordpress. This allows you to keep a post of a certain category at the top of your blog while posts from other categories are ordered as normal below it. You can see it in action here at maxpower. If this is new to you I suggest you read the first post, creating a dynamic sticky for wordpress, for a more indepth explanation of why and what this does. » Read the rest of the entry..