Category: Wordpress

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.

Target Adsense is a plugin for WordPress that provides more control over how google_ad_section targeting is employed on your WordPress blog.

Section targeting allows you to suggest sections of your text and content that you’d like to emphasize or downplay when matching ads to your site’s content. This plugin helps you to emphasize the content you want by employing Google Ad Section Targeting. You may want to use targeting if you feel the Adsense ads on your pages could be more suited to the content. Ads that are more suited are more likely to get clicked on. It follows that profits may increase from using Ad targeting. For more information about targeting please read how to use Adsense Section Targeting to Maximize Profit.

Features: » Read the rest of the entry..

This post was written to support the ‘Adsense Target‘ WordPress Plugin

Introduction:

This article provides a very brief overview of how contextual advertising works and then illustrates how a webmaster using section targeting can have more control over the advertisements served by Google Adsense. Specific recommendations for bloggers are made on how best to use ad section targeting code to maximize profit. » Read the rest of the entry..

A bad Splog that has been entrapped

Using Owen’s fantastic WordPress plugin antileech, I have successfully taken control over new posts appearing on a splog intent on copying them. Instead of getting actual post content, the splog gets a message written by me. Right now that message advocates gambling and buying firearms, two things expressly forbidden by the Adsense TOS (read Fight dirty by entrapping splogs using antiLeech).

If you could publish any message you wanted on a splog that was stealing your content, what would it be?

Rules:

  • The splog removes all markup — no IMG’s and no links.
  • There is a 140 word limit. The splog doesn’t like to post long entries and truncates after about 140 characters.
  • The splog makes new categories based on the categories that the post came from. For example, if I put this post in a category on my blog called ‘eat shit and die’, the splog will make a new category called ‘eat shit and die’ and put whatever message you would like in the post content.
  • Like categories, the splog accepts tags and creates new ones as they come in.
  • The splog takes the real post title, regardless of fake content.
  • The splog takes the real author name (at the time of posting) and links it to the original post.

The overall goal should be to get the splog’s adsense account yanked for violation of terms (see the bulleted list 1/3 down for some ideas on what constitutes a violation in Google’s eyes). Secondary goals are possible as well, one example would be to get the splog booted from their webhost (dreamhost). However, I feel it is important to first make sure that the revenue stream dies. If something else happens along the way, great.

Anyone care to share their splogging revenge fantasy?

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..

When I created the Sawchuk scheme for K2, I wanted a clean minimal theme that emphasized the content that I wrote. I wasn’t concerned with bells and whistles, I just wanted people to easily be able to read this website. WebDesignFromScratch has some great tips for emphasizing readability in webdesign. Those tips combined with a little common sense and style created the current look of Sawchuk.

Sawchuk

However, the big problem with having different text styles available for use when writing posts is that you have to manually type out the class designations. For example, WordPress offers a blockquote button which theme authors can style using CSS. Sawchuk employs three different styles of blockquote each with their own background colour. In order to use these three different styles, the full class must be typed out like so: <blockquote class=”red”> Some text </blockquote>. The blockquote button alone isn’t enough to define the style (class=”red”) of the blockquote wanted.

This is where Owen’s ButtonSnap Class Library comes in. Using it, buttons can be added to the post editing screen for any class / span / element that a theme author / designer can imagine. Here is how its done: » Read the rest of the entry..

Sawchuk

This plugin adds buttons to the WordPress editor that correspond to special classes used in the Sawchuk scheme for K2. K2 is a theme for WordPress that has too many feature to mention here (visit Getk2 for details) other than to say one of the most prominent features is the ability to change the look of K2 completely using only CSS. » Read the rest of the entry..

All bloggers detest spam and splogs. Spammers attempt to co-op your website into advertising for them while stealing your bandwidth, and splogs cut right to the chase by stealing your words and reposting them with their own ads. We’ve got plugins like Akismet, Spam-Karma that stop comment spam while other plugins like AntiLeech and Digital Fingerprint help you fight the rebologging splogs.

All these plugins are great at helping to defend your website from the nefarious types, but the greatest tools in the fight against splogs and spam are elbow grease and a discerning mind.

One thing I know most webmasters (including myself) don’t do enough of is sift through our weblogs. Website logs collected at the server level can tell us a myriad of things but most importantly, they can help us pinpoint who is stealing our bandwidth (via out of control robots and comment spammers) and who is stealing our content. A tiny bit of hard work, the ability to follow directions, some familiarity with excel, and a keen eye for the out of place is all you need to figure out who is stealing from you by looking at your logs. Let me show you. » Read the rest of the entry..