21 May

Seen – Monitor bot activity on your WordPress blog

watchlist Seen is a WordPress plugin that shows when and which bots visit your blog. This can be useful to see if a page ever gets visited by bots (so you can adjust robots.txt or so) or simply to amuse yourself if you are obsessed with what is happening with your blog (everyone knows you are).

Additionally, you can get a better understanding of how fast a page gets indexed by search engines and how fast it gets reindexed after you have modified the page. I found it interesting to note what’s the general strategy of different bots, now I know Yahoo really keeps visiting the pages and GoogleBot just very rarely visits older pages (but indexes new pages really quickly).

The plugin uses some simple heuristics to decide if a visiting user agent is a bot and puts it in a list of suspected bots (along with data of which pages it visited and when). You can then remove all the user agents that are not bots. Basically, This means you don’t need to manually add any bots at all, you simply weed out the false alerts. Of course, you can explicitly specify bots by their user agent string or host address.

Installing and using Seen

unindexedAfter installing the plugin (extract the zip file in wp-content/plugins/ and activate the plugin) data will be automatically recorded. You can monitor what is happening directly from on the Dashboard (there will be two new widgets, a list of bots on the watchlist and a list of unindexed pages). Also, if you go to Dashboard > Seen you can see more detailed lists and also the suspected bots list. I think it’s all quite self-explaining. Hint: you can click the star to add bots to the watchlist — clicking the yellow star will remove them.

In the options you can combine bots (i.e. when two or more entries have a differing user agent string but really are the same bot), delete them and edit them. The different categories are there so you can e.g. put Technorati bot in “Search engine (blogs)” which makes Seen not care if the bot has seen the latest comments. You can also categorize bots as “Browser” which means their data will be hidden as it probably won’t interest you.

Seen 0.5.1 (Supports WP 2.7 thru 2.8)

What’s new in 0.5.1

See comment #2 below.

Note: This is not yet 1.0 quality but it should work OK. By downloading and installing the plugin, you acknowledge no responsibility lays on the plugin author.

01 Mar

Use Macross to automate common WordPress post content

Here’s a macro plugin for WordPress I made. It features useful features for advertising, e.g. limiting the maximum amount of displayed ads.

macro view

What are macros?

A macro is a bit of text inside a post that, when displayed, will be substituted with other text. It simplifies editing of post and also provides a convenient way to insert repeating content.

Macros are useful for various uses:

  • Adding common content shared by multiple posts/pages
    • Post headers, footers and navigation between a series of posts
    • License disclaimers
    • Advertising inside post content (much more effective than leaving the ads outside the content)
  • Simplifying complex layout by hiding unnecessary formatting, e.g. adding an image with a caption using only a short macro
  • Quickly changing information on multiple pages, e.g. disclaimers, important notifications


  • Configurable via the WordPress control panel system
  • Automatically limits the number of injected macros (useful for e.g. Adsense whose TOS states you can only have three instances per page)
  • Can be extensively controlled depending of page type (archive page, home page, single post etc.)

How it works

The macros are used by inserting text inside HTML comments when writing the post. Below is an example of a macro:


The macro looks like the above code when editing the post but when viewing the post (or page) it will be substituted with a Google Adsense advert (given that you have defined the macro).

Parameters can be used inside macros as follows. The first example is the text inside a post and the second is the macro defined on the Macross options page (with the name “image_with_caption”).

<--image_with_caption "image.jpg" "A photo I took last summer"-->
<p><img src="$1" alt="$2" /><br/>$2</p>

This macro will insert the text “A photo I took last summer” as the alt attribute for the tag and add it as a caption below the image.

You can use macros in a page template by using the expand_macro($name,$echo=true) function. This will also increment the counters. Here is the above example reinterpreted using expand_macro:

<?php expand_macro('image "image.jpg" "A photo I took last summer"'); ?>

By cleverly using macro priority (a lower priority macro gets injected first) you can use macros inside other macros. In combination with macro display options (i.e. if the macro is enabled for content, excerpts or feeds) you can use the same macro to expand into different text depending on where it is used.

Installation and configuration

Unzip the contents of macross.zip in your WordPress plugin directory and activate the plugin from Options > Plugins. Go to Options > Macross to create a macros. Counters work so that each successive macro injection increments the counter. If any of the specified counters for a macro exceeds the maximum value, the macro simply will not epand (also, none of the counters will be incremented).

The checkboxes next to a macro specify on which pages the macro will work. The first colum (Hook) tells Macross whether to expand the macro when actions the_content() or the_excerpt() is called. The third option enables the macro for the expand_macro() function. The rest of the checkboxes specify a page type, as returned by is_page(), is_single() and other conditional WordPress tags.


Yes, the following is done with a macro, too. ;)


  • Another macro plugin Originally, I wanted to use this, but found it cumbersome to edit macros. Also, it doesn’t have a counter/limiter system