mediadreams/md_mastodon

Show data from Mastodon social network via API.

Installs: 107

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:typo3-cms-extension

dev-master 2024-09-04 10:01 UTC

This package is auto-updated.

Last update: 2024-10-04 10:08:59 UTC


README

With this extension you are able to show Mastodon toots on your TYPO3 website. It will collect data via the API and display it as a Mastodon social wall.

Screenshots

Example of Mastodon social wall: Screenshot detail

Requirements

  • TYPO3 v11.5 | v12.4

Installation

  • Install the extension by using composer (composer req mediadreams/md_mastodon) or the extension manager

  • Include the static TypoScript of the extension

  • Configure the extension by setting your own Typoscript constants

  • plugin.tx_mdmastodon_api.settings.includeCss
    Include standard CSS styles for a masonry-layout if the items (toots).

Template layouts

You are able to configure template layouts in TsConfig:

tx_mdmastodon_api {
  templateLayouts {
    1 = First layout
    2 = Second layout
  }
}

Usage

Create a new entry of type Mastodon configuration

  1. Select module List
  2. Select a page where to store the record (can be any page)
  3. Click the button Create new record
  4. In the section Mastodon social networking API click Mastodon configuration

Now you are able to configure a Mastodon feed, which you want to show on the website.

Step 1-3: Screenshot detail

Step 4: Screenshot detail

Configure the feed

  • Title
    This is for internal use only. It is needed, in order to select the feed in the plugin.
  • Base Api URL
    The Mastodon base api URL, like https://mastodon.social/api/v1/. You can leave this empty, if you have configured a default URL in typoscript constant plugin.tx_mdmastodon_api.settings.apiUrl.
  • Api token
    Mastodon API token. You can leave this empty, if you have configured a default API token in typoscript constant plugin.tx_mdmastodon_api.settings.apiToken.
    ATTENTION: Make sure, that you have given the appropriate rights to your Mastodon application, when generating the API key.
  • Api method
    Select the Mastodon API method.
  • Only media
    Show only statuses with media attached.
  • Update frequency
    Decide how often the feed should be updated (number in seconds).
  • Import date (read only)
    Date of last update.
  • Data (read only)
    JSON response of the API call.

Create scheduler task

  • Select module Scheduler
  • Click the button Add task
  • In field Class select Execute console commands
  • Choose a Frequency. Note: This can be set for example to 5 minutes and the respective Mastodon feed will be updated, as set in the configuration of the feed (field Update frequency).
  • In field Schedulable Command. Save and reopen to define command arguments choose mdmastodon:import
  • Save

Create Plugin to show entries

  • Select module Page
  • Select the page where to show the Mastodon feed
  • Create new content element of type General Plugin
  • Switch to tab Plugin and select Mastodon
  • In field Mastodon configuration find the configuration, which you have created in the step before
  • Decide, how many entries to show be setting a value in field Limit
  • Save

ATTENTION

Be aware, that the feed needs to be imported by running the scheduler task before it can be displayed by the plugin!

Bugs and Known Issues

If you find a bug, it would be nice if you add an issue on Github.

THANKS

Thanks a lot to all who make this outstanding TYPO3 project possible!

The TYPO3 project - inspiring people to share!