Turn your Blogroll into a Google CSE

A WordPress plugin I’ve written with the co-operation of the kind folks at the Libraries Interact blog makes it possible to take links listed in your Blogroll, using the Links Manager, and create a Google Custom Search Engine (CSE) automatically.

Please note that while the plugin is released under the terms of the GPL, using the Google Custom Search Engine service means that Google assumes you agree to their terms of service.

Features of the plugin include:

  • Grouping links into categories
  • Distinguishing between links that are considered “live” and those that “abandoned”
  • Control over the text displayed to the user for various user interface elements
  • Managing the colour of elements in the CSE search results display
  • Using the Farbtastic library to provide an easier way to select colours
  • The URL for the XML Google CSE specification is changed whenever a link is added, edited or deleted, ensuring that the most up to date list of links is always used by the Google CSE

The plugin is currently in use by the Libraries Interact blog to power the list of blogs on the Aussie Library Blogs page.

The source code for the plugin is available under the terms of the GPL from the WordPress Plugins website.

New in Version 1.1

  • Improved error handling for the options form
  • Tweaked some areas of the code to support WordPress 2.5

Known Issues

  • The Google CSE search box will not work if you’re not using permalinks

Installation Instructions

Installing the plugin takes a number of steps. They are:

  1. Creating your link categories
  2. Adding your links to the categories
  3. Uploading & Activating the plugin
  4. Configuring the plugin

Also on this page is a list of known issues.

Creating your link categories

For the plugin to work you’ll need at least one link category. This link category will contain those links that you want to be included in the Google CSE. You can associate the plugin with was many categories as you wish. As an example the Libraries Interact blog groups the list of Australian library blogs into “Personal Blogs” and “Corporate Blogs”.

The plugin can also work with two additional categories. These categories are designed to differentiate between “live” links and “abandoned links”. For example this means that the Google CSE can contain blogs that may still contain useful information and yet have been abandoned. The list of links can then be sorted to remove abandoned links if a user is only looking for blogs that have been updated recently.

Creating and managing link categories is undertaken using the Links Manager feature of WordPress.

Adding your links to the categories

Once the link categories have been created you need to add your links to those categories. You add links to the blogroll and the categories in the normal way using the Links Manager feature of WordPress. Ensure that:

  1. The links you want to include in the Google CSE are in the appropriate category
  2. If you’re differentiating between live and abandoned links ensure that the links are also in these categories

An example of the way the table of links in the Links Manager will look is outlined in the screen shot below.

Link Manager Screenshot

(Clink the image for a larger version)

Uploading & Activating the plugin

  1. Download the plugin archive
  2. Unzip the files into a temporary location
  3. Upload the blogroll-google-cse directory into your wp-content/plugins directory
  4. Login to the administrative section of your WordPress blog
  5. Click the Plugins link on the main menu bar
  6. Click the Activate for the Blogroll to Google CSE plugin

Configure the plugin

  1. Click on the Options link on the main menu bar
  2. Click on the Blogroll Google CSE link on the secondary menu bar
  3. Select the link categories that should be included under the Link Category Options heading
  4. If there are “live links”
    1. Select the category containing the live links under the Live Link Category heading
  5. If there are “abandoned links”
    1. Select the category containing the abandoned links under the Abandoned Link Category heading
  6. Adjust the settings under the User Interface Elements heading
  7. Adjust the settings under the Google CSE Options heading
  8. Adjust the colours of elements of the search results using the colour wheel under the Google CSE Colours heading
  9. Change the Miscellaneous search results display options
  10. Enter the URL of the page that displays the list of links and the search box into the URL of the Search Page text field under the Search and Results Page URLs heading
  11. Enter the URL of the page that displays the search results into the URL of the Results page text field under the Search and Results Page URLs heading
  12. Click the Update Options button

Known Issues

  1. If you find that links are appearing in the blogroll section of your theme and you don’t want them to. You can either:
    1. Change the visible status to “no”
    2. Edit the theme, so the call to the “wp_list_bookmarks” template tag excludes the category (or categories) you’ve put your links into

If you have any questions, queries or comments about this plugin, please contact me by leaving a comment or emailing me at techxplorer@gmail.com.

8 Responses to “Turn your Blogroll into a Google CSE”

  1. Updated Aussie Library Blogs page | Libraries Interact Says:

    [...] Aussie Library Blogs page. The page is now built dynamically created using a WordPress plugin that I’ve created with the assistance of the other THALI members. This new way of managing the list of Aussie Library [...]

  2. Turn your WordPress blogroll into a Google CSE « Tech Explorer Says:

    [...] kind folks at the Libraries Interact website. You can read more about the plugin by visiting the Blogroll to Google CSE project page on my [...]

  3. Download the Blogroll to Google CSE plugin « Tech Explorer Says:

    [...] 2008 — techxplorer I posted the other day here, at the Libraries Interact blog, about the Blogroll to Google CSE plugin. I can now proudly say that the plugin code has been uploaded to the WordPress Plugins [...]

  4. Updated Blogroll to Google CSE Plugin « Tech Explorer Says:

    [...] I uploaded a new version of the Blogroll to Google CSE plugin. You can read all about the plugin here on my website, or download it from the WordPress Plugins [...]

  5. The Best Blogging Software (WordPress) + The Top 60 WordPress Plugins | Midas Oracle .ORG Says:

    [...] Blogroll to Google CSE 1.1 » techxplorer (url) A plugin to manage links in the blogroll that are searched using a Google CSE. [...]

  6. This blog turned two years old yesterday « Tech Explorer Says:

    [...] such as AJAX in my development work. I’ve also recently released my first WordPress plugin, WordPress Blogroll to Google CSE, and I’m working on another with the kind people at the Libraries Interact [...]

  7. My Today’s Diigo 06/24/2008 « Rif.wp memo Says:

    [...] Turn your Blogroll into a Google CSE « Tech Explorer [...]

  8. My Today’s Diigo 06/24/2008 « Rif.webmemo Says:

    [...] Turn your Blogroll into a Google CSE « Tech Explorer [...]

Leave a Reply