Tag Archive for 'WordPress'

Forcing DISQUS To Sync With Wordpress

DISQUS is a pretty good service which makes it easier for people to comment and track their contributions under a single profile across multiple sites. To use it with Wordpress you install a plugin which is supposed to sync comments between itself and your local database. Whether it was a problem with the plugin or something I did I’m not sure but unfortunately something went wrong last night and I ended up with my local Wordpress database containing duplicates of all my comments (not good).

Having first disabled the plugin I tried to restore my comments from the previous days backup but unfortunately due to a character encoding issue that didn’t work either and I was left in an even bigger mess! Using the import feature of the DISQUS plugin didn’t seem to do much good either as only about 1/5 of my comments were being synced back to Wordpress and there didn’t seem to be a way to force it do the rest.

After contacting their very helpful support people I managed to find a rather unorthodox solution which I thought I’d share in case anyone else comes across the same problem. The following assumes that all your comments were successfully imported into DISQUS prior to any problems and that now you want to sync them back into Wordpress (it’s also not for the technologically faint of heart!) -

  1. Disable the DISQUS plugin and backup your Wordpress database (essential).
  2. Create a new empty wp_comments table in your Wordpress database by running this SQL script (e.g. mysql -uusername -ppassword databasename < wp_comments_table.sql). This drops the old one before creating the new version. If you’re not familiar with MySQL commands there are plenty of reference guides available online.
  3. Re-activate the DISQUS plugin. If you click “Import” under the “Advanced Options” tab of the plugin you may see some/all of your comments re-sync but in my experience this didn’t work fully.
  4. You’ll notice that every time you visit a post that it syncs any comments back to the Wordpress database. This is fine, but if you have hundreds or even thousands of posts it’s going to take a long time. You could wait for Google to re-index those pages but that usually takes weeks or months so the quicker way is to use a tool to crawl your site automatically. I used Xenu’s Link Sleuth (free) which is designed to find broken links but by running it over your site will also trigger the sync for each post.
  5. Depending on your host you will probably want to change the rate at which you crawl the site otherwise you may get timeout errors. I found that by setting Xenu’s Link Sleuth to 10 parallel threads was the optimum speed (you can find the setting under “More options”). You may also want to exclude certain directories such as /wp-content/ to reduce the crawl time.
  6. Sit back and wait for the crawl to complete. You’ll notice all your comments begin to appear back in your Wordpress database, the number of which can be seen under the main dashboard :)

Your millage may vary with the above and I hold no responsibility for any adverse effects but hopefully it may be of help. Apparently the latest version of the plugin (2.02) fixes the duplication issue I experienced.

Enjoyed this post? Please subscribe to my RSS feed to stay up to date.

Semantic Services

If you’re a blogger or have any interest in semantic/content management technologies then you may be interested in a couple of new services which have recently launched with the aim of making content creation easier by automatically suggesting contextually relevant images, links, articles and tags which you may like to include.

Tagaroo

Tagaroo is based on an initiative called Calais by Thomson Reuters to “connect the world’s content by providing automated metadata services“. The video below sums the concept up pretty well -

It has an extremely slick and easy to use UI which sits neatly below the post editor on the Wordpress write page, suggesting tags and images as you type.

Underlying the interface the magic is carried out using “natural language processing and machine learning algorithms to extract the people, organizations, companies, geographies and events hidden within it”. To do this it connects to Calais via a free API (registration required). Pictures come from Flickr with a CC license.

My tests have found it pretty reliable and an extremely quick way tag your posts using a standard global taxonomy. At the moment the plugin is only available for Wordpress and Drupal however a number of other tools are currently under development.

Zemanta

Described as “a brilliant product for lazy or otherwise time-focused bloggers“, Zemanta is similar in many respects to Tagaroo, although perhaps a little more mature in its functionality (it’s European after all!). The video below shows how it works -

The tool uses its own database of content (indexed from over 300 “top media sources”) in order to suggest related pictures, links, articles and tags. It has a clean UI which integrates well with whatever backend you use and is offered either as a plugin for all the major platforms; WordPress, Blogger, TypePad and LiveJournal, or as a browser extension for IE or Firefox.

As someone who frequently links to Wikipedia in my posts I’ve found the link suggestion component an especially easy and quick way to insert these references with virtually no effort. Although the interface for picture insertion isn’t quite as nice as Tagaroo, Zemanta is currently my plugin of choice.

Yahoo also have a competing offering although it’s restricted to Yahoo content only so I’ve not taken time to review it.

Implications

Whether you call it Web 3.0, the Semantic Web or the Giant Global Graph I think these sorts of services are an important step towards the automated inference of knowledge from information. When we reach the point where machines can “understand” the content which they are parsing the implications are massive. Aside a whole herd of near-term applications I can also imagine scenarios in the not-so-distant future where every piece of content on the web is automatically linked to everything else which is relevant to it without the need for human interaction - Wikipedia without the editors or boundaries (or inherant bias?).

Enjoyed this post? Please subscribe to my RSS feed to stay up to date.