Download the PHP package sgkirby/sendmentions without Composer

On this page you can find all versions of the php package sgkirby/sendmentions. 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 sendmentions

🛑 This project has been archived and is no longer maintained. Feel free to fork it or build something awesome on top of it – it's MIT-licensed, so you're pretty free to do whatever you fancy. As-is, the archived version has not been tested beyond Kirby 3.3; it probably has severe issues beyond version 3.5 and likely won't work with PHP 8.

Kirby 3 Sendmentions

The plugin can be set up to send Webmentions to all URLs linked from a page's content. This notifies the receiving sites that they have been linked to, and allows them to display these, if desired. If the target site does not provide a webmention endpoint, sending a pingback is attempted instead. As an additional option, the plugin can also request all linked pages to be archived on archive.org (option disabled by default; see Options below).

Most websites that receive webmentions will not only verify the link, but parse the source page in order to determine post title, author info etc. Therefore, using the appropriate microformat markup - h-entry for blog posts - in your templates is strongly recommended.

The defaults and settings parameters have changed significantly from previous versions (0.x, before June 2020). When updating to the most recent version, changes to blueprints and config settings are required; the most significant change is that the new version is off by default and has to be activated for specific templates, to ensure better control over data flows.

NB. This plugin only covers outgoing webmentions (notifying other websites linked in your content). Receiving webmentions from other sites and displaying them in page templates requires a separate solution, such as Kirby 3 Commentions.

Installation

Composer

Git submodule

Download

Download and copy this repository to /site/plugins/kirby3-sendmentions.

Setup

The plugin has to be activated for specific template types by defining their names in site/config/config.php as follows:

If you want to also send the optional archivation requests to archive.org, set up the applicable template names in similar manner (this currently only works for templates the plugin has been activated for):

To display and manage the sending of mentions for a page in the Panel (technically optional, but highly recommended for better control), add the following to the according blueprint in site/blueprints/pages:

The panel section presents a small counter of sent mentions (from left to right: successfully sent webmentions, sent pingbacks, sites with no compatible enpoint, links archived on archive.org) as well as a switch to override the default setting whether pings are sent on publish/update or not:

Clicking on the cog wheel icon opens a dialog field that provides a detailed list of sent pings; while clicking on an archived item leads to the archived copy on archive.org, notifications to webmention/pingback targets can be retriggered by clicking the refresh icon:

By default, publishing or updating a page (of a template type that the plugin has been activated for) does not automatically trigger the sending of notifications. Instead, "ping on publish" and "ping on update" can be activated for every page individually. To change the global default - i.e. auto-trigger the notifications for all templates (and allow to deactivate them individually) - set one or both of the following variables to true:

Sending webmentions and pingbacks at the time of publishing/updating a page leads to a significant delay in the panel (with a dozen or more links in an article, the UI may seem "frozen" for minutes, as polling all the linked pages can take a long time). To avoid this, the plugin's default is asynchronous processing using a queue backlog. In order to purge the queue, a cronjob should regularly call the URL https://<YOUR-SITE-URL>/sendmentions-processqueue?token=<YOUR-TOKEN>.

The secret token key is set up using the following config variable; it has to consist of at least 10 alphanumeric characters and may NOT include any of the following: & % # + nor a space sign :

N.B. Any attempt to trigger the queue process before you set a valid secret in your config.php will lead to an error.

For the time being, the plugin still supports setting up the synchronous sending of notifications (this will likely be removed in a later version). This is strongly discouraged due to the poor user experience, but you may disable the asynchronous queue and cronjob setup by setting this variable:

In case your site uses virtual pages: If virtual pages are not created through the Kirby panel (e.g. virtual pages generated from a database or CSV file), the sending of webmentions needs to be triggered separately by calling this function with the according Kirby Page object as variable:

Options

The plugin can be configured in your site/config/config.php:

Option Default Description
sgkirby.sendmentions.templates [] By default, no webmentions are sent for any pages; to activate the sending for specific templates, add the template names to this variable.
sgkirby.sendmentions.archiveorg [] Linked URLs are only sent to archive.org for the templates specified in this array (need to be templates contained in the templates array).
sgkirby.sendmentions.pingOnPublish false If set to true, publishing a page triggers sending notification by default (can be overriden on a per-page-basis in the panel).
sgkirby.sendmentions.pingOnUpdate false If set to true, updating an already published page triggers sending notification by default (can be overriden on a per-page-basis in the panel).
sgkirby.sendmentions.synchronous false [To be deprecated] If set to true, notifications are sent immediately rather than stored in a queue to be purged with a cronjob. This leads to a UI freeze in the panel for pages with many links and is not advisable.
sgkirby.sendmentions.secret The secret token to authenticate the cronjob trigger URL. An alphanumeric string of at least 10 characters and NOT including & % # + nor a space sign .

Features

Plugin features

Roadmap/Ideas

Requirements

Kirby 3.3+

Credits

Inspiration and code snippets from:

Included vendor libraries:

License

Kirby 3 Sendmentions is open-sourced software licensed under the MIT license.

Copyright © 2020 Sebastian Greger

It is discouraged to use this plugin in any project that promotes the destruction of our planet, racism, sexism, homophobia, animal abuse, violence or any other form of hate speech.


All versions of sendmentions with dependencies

PHP Build Version
Package Version
Requires getkirby/composer-installer Version ^1.1
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 sgkirby/sendmentions contains the following files

Loading the files please wait ....