Human Injection Laboratories

Textpattern Webmention Plugin

Description

This plugin for Textpattern 4.6.2 implements a receiver for the webmention specification. Webmention is a simple technology to notify any URL when you link to it on your site. For more information about Webmentions see https://indiewebcamp.com/webmention.

Download

Manual

Basic Usage

The first part of this plugin is the receiver shs_webmention_receive(). It accepted request to the URL-path webmention.php in your textpattern installation. This requests must submit a source and a target parameter. With this parameters the receiver creates a new comment in the database.

If the target of a mention is a article list (searchresult, category listing ec.) the comment is attached to a hard coded dummy article (ID 84). Please change this ID.

The source is checked for a link to the target. Also it checks the type of the webmention. The following values in class or rel attributes are checked:

Second part of the plugin is a Tag (<txp:shs_webmention_discovery />). This tag generates the Markup and HTTP header for the endpoint discovery. Please use it in you page template to activate Webmention on you site.

Tags and Attributes

txp:shs_webmention_discovery

Generates Markup for webmention endpoint discovery. There are no attributes for this tag.

<txp:shs_webmention_discovery />
<link rel="webmention" href="http://human-injection.de/webmention.php"/>

TODO

License

Own Source Code

This software (without included parts, see below) is licensed under the following GPL license:

* Copyright 2014, 2016, 2018 Sebastian Spautz
	 *
	 * Textpattern Webmention Plugin is free software: you can redistribute it and/or modify
	 * it under the terms of the GNU General Public License as published by
	 * the Free Software Foundation, either version 3 of the License, or
	 * any later version.
	 *
	 * This program is distributed in the hope that it will be useful,
	 * but WITHOUT ANY WARRANTY; without even the implied warranty of
	 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	 * GNU General Public License for more details.
	 *
	 * see http://www.gnu.org/licenses/.
	

Inserted Source Codes

This Plugin use some code from https://gist.github.com/adactio/6484118.

ChangeLog