Archive for the ‘Blog Hacks’ Category

NoOldSpamLinks: With User Interface.

Monday, June 18th, 2007

Following Andy Beard’s suggestion, I created a user interface for my NoOldSpamLinks plugin. I thought it would take a month, but creating the interface was easier than I expected. The user interface lets you easily add or delete links from the plugin. I’ve tested it at my three blogs, and it seems to work fine. But, testing at only three blogs means “less than beta”. Still, if you are brave, and would like to try the plugin, I’m posting it!

What does the plugin do: This plugin lets the user create a blacklist of links which will be tagged “nofollow” after 10 days. The “nofollow” is added in the articles themselves and comments.

Reasons why you might want to use it:

  • There may be site you once liked linking and giving page-rank juice, but now you’d like to make the links nofollow so the search engines count those votes for the site. You can now make all back-links to that link on posts older than 10 days “nofollow”. Once you do, you will stop contributing to that site’s high page rank. Any new links you post to that site will remain “follow” for 10 days.
  • If you are running the “DoFollow” plugin, you may be getting regular site visitors who post borderline comments. They may not be bad enough for you to want to delete the comments, but you may want to “nofollow” that particular link, thus depriving it of link juice. Now you can. Those link will automatically nofollow when the post associated with the comment is more than 10 days old.

To use the plugin:

  • Download NoOldSpamLinks Ver. zero.3
  • Save it with the extension ‘.php’.
  • Upload to your plugin directory; activate. The plugin is ready to accept links.
  • To add links, visit your WordPress admin panel. Click “Options”; find “NoOldSpamLinks” in the submenu. Click. You will be asked to add a link. Add one (the http:// is not required.) Click add.

As with all plugins: Back up your database before installing. (You should backup regularly anyway.) Also, if you have a problem using any plugin with recent installations of WordPress, just delete the plugin from the plugin directory.

Let me know if you have any trouble.

NoOldSpamLinks Plugin

Thursday, June 14th, 2007

Have you ever wished you could easily switch a whole bunch of old links in your blog to “nofollow”? For whatever reason? Because you discovered a blogger you’d frequently linked was a Republican. Or Democrat? Or maybe you used to link JohnChow but are upset to learn he is now charging visitors for links at his site?

So, you figured, “Charge me for links? I’ve been giving him free links! It’s my freely given links that gives him his PR=6! If he’s charging people, I want to take them all back!”

Hey, if you were a bit put out by Chow’s action, you are in good company!(1, 2, 3, 4 5, 6 and 7)

Unfortunately, you may also have thought it was too much of a hassle to go back through your old blog articles and find all the links to that hungry capitalist blogger (or the Democrat or Republican!) So, you did nothing.

Well, no more!

Today, after a few conversations at forums, I was inspired to write first plugin. I call it “NoOldSpamLinks”; it’s for WordPress blogs. No, it’s not thoroughly tested. I finished it, and tested it at my blog. It works at my blog. It doesn’t do anything very fancy, so presumably it will work at yours.

(Would you like proof that the plugin works? Visit my first post. It’s more than 10 days old; you’ll see the ‘nofollows’. )

If you install NoOldSpamLinks in your plugin folder and activate it, it will change all links to JohnChow’s blog that are older than 10 days to ‘nofollow’.

I bet you are wondering why 10 days? Well, that’s my evil scheme!

By giving follows for a brief time, you can be sure that the your blog will be listed as linking to those domains on services like Technorati because they won’t be able to tell the difference between your link and other links. That will ensure a person who is looking for reactions to the blog post you link can find your post. But, if you prefer a different period of time, you can change that.

Don’t have anything against John Chow, but know another site you’d like to delink? You may also edit the domain names on your blacklist. Add or subtract, but do make sure there is at least 1 domain in the list. Otherwise, deactivate the plugin.

  1. Get the plugin by clicking NoOldSpamLinks. The page should open: Copy the code and paste it into a text editor. Name it NoOldSpamLinks.php. Save.
  2. If you wish to customize, find the number of days, and change it from 10 to the time you prefer. Find the list of domains, delete or add as you wish. Save the edited file.
  3. Upload to your plugins directory and activate. You can check and see that all old links pointing to your list of domain names are now set to ‘nofollow’.

You know… it’s too bad this is a new blog with only 10 visits a day. I’d love zillions to learn of this, install it and see how fast a PR6 can fall!



June 14 Edited to reflect the way this really works.

Don’t lose Money: Hide the Sponsored Tag!

Wednesday, June 13th, 2007

Want to make more money with sponsored posts?

Remember, I told you how to remove the Kontera ads automatically from sponsored ads by editing your WordPress template? Editing the template lets you conveniently run Kontera ads on a blog runs sponsored ads. But, to use that trick, you need to create a “Sponsored” category.

Some advertisers won’t let you show the post is sponsored, which means you can’t let that category display on that sponsored post.

So, what’s a gal to do? Edit her template some more!

My knitting blog, which has been accepted in PayPerPost, used to show every tag including the “Sponsored” tag. But I changed that by looking up the appropriate WordPress template tags and coding a bit of logic to suppress display of the “Sponsored” category in a list of tags.

Below, you’ll find PHP code to create a string of tags that omits the category ‘Demo’ (rather than ‘Sponsored’); the tags will display this way:

/* ========Code to omit 'Demo' from listed tags. ========
You can edit three lines.

Edit your links to match your categories.
For the purpose of demonstrating this, I won't show tags called "Demo".
*/
$preCatName='‘;
$omitTag=”Demo”;
// don’t edit below this.

$tagString=”Tags: “;
$iFirst=0;

foreach((get_the_category()) as $cat) {
if($cat->cat_name !=$omitTag ) {
if(0<$iFirst) $tagString .=', ';
$catName = $cat->cat_name;
$tagString .= $preCatName.”. strtolower($catName).”. $postCatName.”.$catName .’
‘;
$iFirst++;
}
}
$tagString .=’.';
if(0<$iFirst){ echo($tagString);}
// ========== End listing tags without 'Demo'.
?>

If you compare these tags to the ones running at the top of my post, you’ll see the ‘Demo’ tag is gone. Beauty!

Here’s the code (comment in blue):
<?php
/*

Edit three lines.
My categories look like this:
<a href="http://www.yourblog.com/blog/category/cat_name/" rel="category tag"> 
For the purpose of demonstrating this, I won't show tags called "Demo".

*/
$preCatName='<a href="http://www.yourblog.com/blog/category/';
$postCatName='" rel="category tag">';
$omitTag="Demo";
// don't edit below this.

$tagString="Tags: ";
$iFirst=0;

foreach((get_the_category()) as $cat) {   
if($cat->cat_name !=$omitTag ) {  

if(0<$iFirst) $tagString.=', ';
$catName = $cat->cat_name;
$tagString.=$preCatName.''.strtolower($catName).''.$postCatName.''.$catName.'</a>';
$iFirst++;
}
}
$tagString .='.';
if(0<$iFirst){ echo($tagString);}
?>



Use this in your WordPress template and make more money!