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:
- in-reply-to
- u-in-reply-to
- u-like-of
- u-repost-of
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
- Get Informations from Source (microformats ec.)
- Implement Frontend to send Webmentions
- Make it configurable
- Follow redirects
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
- 0.4.1: Declare local variables to avoid PHP notices
- 0.4.0: Register the custom tag to avoid a warning in debug mode of Textpattern
- 0.3.0: Checks Type of webmention (reply, like, repost or simple link)
- 0.2.2: Refactoring code
- 0.2.0: Updates existing webmentions instead of generating dublicates
- 0.1.1: Fix a simple bug
- 0.1.0: First Release