Download the PHP package mattrothenberg/webmentions without Composer

On this page you can find all versions of the php package mattrothenberg/webmentions. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package webmentions

Webmentions

Statamic webmentions overview

According to the W3C Webmentions are an open web standard for conversations and interactions across the web, a powerful building block used for a growing distributed network of peer-to-peer comments, likes, reposts, and other responses across the web.

Popular across the IndieWeb as a means of enabling cross-site conversations, webmentions allow individuals to inform, and be informed by, other websites about activities and publications on websites and across social media platforms. In practice most people use webmentions in conjunction with services like webmention.io and Bridgy.


Jump to sectionInstallationTemplatingWidget set-upTroubleshootingFurther (includes an example set-up)


Installation

This add-on is for websites built with Statamic.

Installation is as normally recommended by Statamic:

Add a link tag to your website, making sure to update the <domain.tld> bit:

Assuming you have signed up with webmention.io and added your domain, this tag will work. It is the same tag available directly from your webmention.io account.

Templating

On your statamic site, use the {{ webmentions }} tag passing the appropriate URL. A more detailed explanation follows but as a quick example the following tag works on a reused blog post template:

This add-on also provides a length modifier that outputs the number of webmentions for the given url. For this and other template tags, see the example set-up.

Statamic webmentions add-on screenshot

Widget (New in v2!)

This add-on provides a control panel widget. There are two steps to enable it, both standard Statamic procedures:

Save your API key

Head to your webmention.io settings and copy your API key.

Next, add a value your .env file like so:

Set up your widget

In the config file located at config/statamic/cp.php add your widget:

If you already have a few widgets set up, you can of course skip the 'widgets => [ ], block and just add the webmentions block for this add-on. The 'limit' value is optional and defaults to 7 if not provided i.e. the widget will display the seven latest webmentions.

Webmentions widget

Rather than display a feed as is, widget offers a few links: a link to the webmention itself, a link to your post with which the webmention interacts, and a link to edit that post for convenience if you should need it.

The recommended 'width' value is 50 although the widget works at any other width. The widget will display a helpful blue NEW marker if you have any webmentions within the last 3 days.

Troubleshooting

Blank page following widget set-up

If you set up your widget locally and pushed to your production server please run composer update.

If you set up your widget on production—you daredevil—or if you did so locally but forgot to add your API key, check that your .env file has the proper API set-up.

Got any suggestions for common problems? Please let me know or edit this section and submit a pull request.

Further

The following payload is sent via webhooks:

This means you can use, for example with Statamic Antlers, the following tags directly:

And you can use the following author-specific tags within an {{ author }} ... {{ /author }} block:

Note that although the {{ name }} and {{ url }} tags appear in both places, as shown in the sample payload above, they contain different pieces of information.

Example set-up

As a live example, check out the webmentions on this webpage where the implementation looks something like this:

The {{ nocache }} ... {{ /nocache }} block is not necessary if you are not using Statamic caching.


This add-on was originally created by Matt Rothenberg.


All versions of webmentions with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ^7.2
simplepie/simplepie Version ^1.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mattrothenberg/webmentions contains the following files

Loading the files please wait ....