This repository has been archived by the owner. It is now read-only.
Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
51 lines (25 sloc) 2.62 KB

Craft Webmention Client Plugin

This project is no longer maintained. For a newer (and better!) Craft webmention plugin, check out Matthias Ott's Webmention Plugin for Craft CMS.

This plugin for the Craft CMS allows you to send webmentions to other websites. From the IndieWebCamp wiki:

Webmention is a modern update to Pingback, using only HTTP and x-www-urlencoded content rather than XMLRPC requests.

This plugin provides a client for sending notifications to others that your entry has mentioned a URL on the receiver's website. More information on the webmention protocol can be found at http://webmention.org/.

Installation

To install the Webmention Client plugin, do the following:

  1. Move the webmentionclient folder to your craft/plugins folder.
  2. In the Craft control panel, go to Settings > Plugins and install the Webmention Client plugin.

That's it!

Usage

Create a new "Webmention (targets)" Field

First, create a new field and select "Webmention (targets)" as the Field Type. In the example screenshot above, we're using "Mentioned URLs" as the field's name.

After creating the new field, add it to the Field Layout for one or more of your site's Entry Types.

Create a new entry

In your newly-created field ("Mentioned URLs" above), add the URLs–one per line—mentioned in the entry's body field (or fields). When you save the entry, the plugin will detect webmention support for each URL and send a notification as necessary.

In the example screenshot above, the URL http://adactio.com/journal/6495/ is referenced in the body and added to the list of mentioned URLs below. When this entry is saved, the plugin will ping that URL, looking for a webmention endpoint. If one is found, the plugin will send a webmention to that endpoint, notifying Jeremy that someone has referenced his work.

Acknowledgments

The core functionality of this plugin is based heavily on Aaron Parecki's mention-client-php.

Additionally, the plugin makes use of the following utility methods:

Finally, many thanks to Trevor Davis for his Craft plugin development expertise.