Archive for the 'wordpress plugins' Category

Comment avatars link plugin 1.0

Simple hack to make the avatars displayed as part of the comment to link to the site of the comment author.

Requirements: wordpress 2.5+

Installation: Download it, unzip and upload it to your plugins directory and activate it. No configuration is needed.

License: Do with it whatever you want, just don’t blame me…

Fancy editor for the text widget

The wordpress text widget is wrongly named as it is actually an HTML widget, capable of hosting not only plain text, but also HTML markup.

People who know basic html can easily use it in the text widget, but the advice given to the casual user was “write what you want in the post editor, go to the HTML tab, and copy the HTML to the widget”. For those people this plugin brings the editor right into the text widget.

As the image above indicates, the fancy editor allows you to change the foreground and background color of a text, its size, make text bold, italic, underlined or with a strike through, and lets you insert links and images.

Since the plugin do not make any change in the text you enter, you can turn off the plugin at any point in time without losing your data. After turning the plugin off you will simply see the raw HTML when editing the widget.

Requirements:

Wordpress 2.5

Installation:

Download this file, unzip it, and upload the fancytextwidget directory into the plugins directory of your blog. Now go to the plugin management panel, and activate it.

License: BSD.

Landingsites++, offer internal search results for people arriving from search engines

When search engine display relevant results from your blog, they usually display only the highest ranked page matching the search terms. People coming from the search engine, take a look at the page, and if they do not find what they are looking for, they might leave without ever having any clue that your blog contains more information which is relevant to to what he is searching for.

The original landing sites plugin by the undersigned offered a way to show to the visitor referred by a search engine a list of post which might be of an interest to him. Landingsites++ is a rewrite of that plugin with added administration functionality and some changes in its operation.

How does it work:

When a visitor enters the site, the plugin inspects the URL of the page which had referred him to the site. If the URL contains a parameter which resembles a google search (contains a “q” parameter) then the plugin displays in a configurable place a list of posts which have an exact match with the search terms used by the visitor. If there are more relevant post results then the plugin is configured to show, it can be configured to offer a full internal search for the search term.

Configuration options:

The configuration option are accessible from the admin window under the options/landing sites++/

  • Welcome message - The message which gives the visitor some idea of what is the meaning of the links which follow it. Two special strings can be used to insert the name of the search engine and the search terms, and the message can formatted using HTML tags.
  • Link formatting - By using HTML tags it is possible to format how the links will be shown.
  • Internal Search referral - Use to configure the use and display of the automatic referral to the internal search
  • Maximal number of result to display - The maximal number of links to related posts to show
  • Placement - where to place the list of link, at the top the page or its bottom. Neither should be selected if you intend to manually change your theme.

Deficiencies:

  • The plugin requires that the blog is hosted on a system which uses MYSQL 4.1 and above. Since this is the minimal requirement for wordpress 2.2, I guess it should not be a problem.
  • Most popular search engines use the “q” convension, but not all of them. In case there is a search engine you realy need to support which do not follow this convention, it should be easy to change the mk_landingsites_get_delim function to support it.
  • The parsing of the search is very naive and assumes that each word in the search terms should match. the plugin do not attempt to understand any of the options which can be used when searching with a search engine.
  • The internal search being done searches only the titles and posts. Comments are not being searched.
  • The placement configuration options work only with themes which are compatible with the recomended wordpress 2.0 loop structure. If it does not work for you, you will have to edit the theme.

How to manually change the theme to support the plugin functionality

The easiest way is to place the following line

<?php mk_landingsites_startloop(); ?>

wherever you want the list of links to appear.

If you need more control then that, you may use the following functions:

  • mk_landingsites_get_referer(). Return the search site from which the visitor was referred.
  • mk_landingsites_get_terms(). It reurns an empty string if the blog was not referred from a search engine, or the search term if it did.
  • mk_landingsites_internal_search($terms, $limit). Returns an array of results for searching after $terms , with a maximum of $limit results. The array contains up to $limit arrays of results, sorted by their relevance. Each array contains an ‘ID’ of the post, its ‘post_title’ and ‘post_content’.

Installation:

Download this file, and upload it to your wordpress plugins directory (or even better create an mk_landingsites directory under the plugins directory and upload the file to there).

In the administration window change the plugin setting and activate it.

License:

Free for use, and modification for personal and not for profit usage.

You may not redistribute the code.

DieOnSpam version 2.0 released

The DieOnSpam anti spam wordpress plugin blocks comments spam based on the language in which the comment is written, with any comment in english being treated by default as spam. For the full rational behind this plugin please read the initial version page.
Version 2.0 provides the following enhancments over the original version:

  • Bug fix
  • Comments from commentators which previously had posted a comment which was approved, are not being filtered by this plugin. Think of it as if the first approved comments served as kind of registration.
  • An option to control whether an english comment with no links with no links in it should be filtered, was added. This might be useful if you are running a bilingual blog, and your comment spam usually contains links.

Intallation instructions:

Save this file, and upload it to your plugins directory. In your blog admin panel, enter the options/dieonspam window, configure the error message to be displayed for comments detected to be spam, and whether english comments without links are to be considered to be spam, and finally activate the plugin.

Upgrading from previous version:

Nothing special to do, just upload the file and check the new option.

page views - a page access statistics gathering plugin

The aim of this plugin is to try and give an accurate account of how actual people are using the site, to a count of people which read the site (by using an aggressive method to exclude all of the bots), which article they have read, and from where they had been referred to the site. Logged-in users, which are usually the blog owner and writers, are excluded as well.
The GUI supplies information on which pages were read, with a clear identification of posts, home page, empty and non existing pages, category pages, author pages, and archive pages. For each page there is information the referrer to the page when the information is known. Other information made available is the external referrers to the site (an aggregate of the per page information), the type of bots reading the site, and the type of browsers being used to read the site.

Instead of the traditional way of identifying bots and browsers by their user-agent string, a method which required having a list of all the user-agents in the world which should be updated any time a new bot or browser is introduced, the plugin identifies bots by their behavior. Bots are usually not “interested” in styling information and therefore if a page load session loads a styling CSS file, it is probably a browser otherwise its a bot. This method is not 100% accurate since there are browsers like lynx which are text only browser, but their use is insignificant.

License: Free for personal use, and for non-profit organizations. Redistribution of this software is not allowed.

Installation: Download this zip file. Extract its content, and transfer the “pageviews” directory and its content to the wp-content/plugins directory of your wordpress installation. Now go to the plugins page in your wordpress administration section, and activate the plugin.

Usage: To view the statistics, go to the administration section, select the dashboard menu and the “page views” sub-menu. The default view shows the most popular pages at the last 24 hours, you can change this settings whenever you need to.

To do in the next releases:

  • Improve the look of the GUI
  • Group browsers by their manufactures
  • Explicitly identify search terms which directed visitors to the site
  • Provide widget to display the number of visitors

DieOnSpam version 1.0 released

There is a newer version 2.0 over here.

The DieOnSpam plugin inspects the commited comment, and if the comment do not contain at least one non english character, it is assumed to be spam and is entirely ignored, and a message is returned to the user (in the rare case it is not a spam bot) which says that there has to be at least one non english character at the comment.

The 1.0 version introduce changes related to localization and personalization of the initial release. Now it is possible to specify the error message which is displayed, and the error can be formatted with HTML tags. The options window use to change this setting is fully localizable.

Installation instructions:

Under your plugins directory create a dieonspam directory and copy this file to it, then enter the options/dieonspam window in the blog administration and configure the error message to be displayed, and finally activate the plugin.

Creating a localization:

A pot file is available if you want to create a localized version for this plugin option window.

DieOnSpam - yet another anti spam plugin

At my hebrew blog I use Akismet as my anti-spam utility. Akismet works very well in identifying spam, and has a low ratio of false positives. The problem with Akismet is that because of the false positives you have to check all the comments marked as spam by it. In bad spam days there can be many comments to inspect which is annoying by itself.

I have made some research into other anti-spam technologies, starting with renaming the php file which handles commenting and ending with the spamkarma2 plugin which is supposed to end all spam. Somewere in the research process I had realized a very basic fact of spam. All of the spam is in english. Since my blog is in hebrew and all the comments to the blog are in hebrew as well, it was only the logical thing to do to develope a plugin which blocks comments which are written entirely in english.

The plugin inspects the commited comment, and if the comment do not contain at least one non english character, it is assumed to be spam and is entirely ignored, and a message is returned to the user (in the rare case it is not a spam bot) which says that there has to be at least one non english character at the comment.

I have no idea if this logic can be applied to other Latin languages which have a common character set with english.

There is a newer version 2.0 right over here.

excerpt manager plugin

This is probably one of the most useless plugins ever written, but I had an itch I needed to scratch.

The aim of the plugin is to control the amount of text send in the rss feed, and the amount of text displayed on pages which display multiple posts.

RSS: By default if you do not specify an excerpt to be used, and you do not insert the “more” tag into your post, wordpress will send exactly 55 words in the feed, which usually cause a fragment of a paragraph to be send. Not a very user friendly feature.

The plugin sends in the rss full paragraph. You can configure the amount of words to be used as a guideline to the number of paragraphs to send. If the guidline breaks a paragraph before its middle point, the paragraph is not sent; otherwise the full paragraph is sent.
Multiple posts: Much like the RSS feed, there is no way to control the excerpt used by wordpress themes which show excerpt of posts on multi posts pages. And much like the in the RSS feed the plugin gives you control on the amount of text displayed as the excerpt.

Sounds interesting? give it a try. Save it from here, put it into your plugins directory, and activate it.

This plugin was strongly inspired by the following great code.