Giter Club home page Giter Club logo

ayacoo-soundcloud's Introduction

TYPO3 Extension ayacoo_soundcloud

1 Features

  • Soundcloud audios can be created as a file in the TYPO3 file list
  • Soundcloud audios can be used and output with the text with media element
  • Update metadata via filelist action or command

2 Usage

2.1 Installation

Installation using Composer

The recommended way to install the extension is using Composer.

Run the following command within your Composer based TYPO3 project:

composer require ayacoo/ayacoo-soundcloud

And as database fields are added, the DB Analyzer must also be run once.

2.2 TypoScript settings

Privacy

With plugin.tx_ayacoosoundcloud.settings.privacy = 1 you can ensure that the IFrame is built with data-src instead of src. If you need more options to influence the HTML, you can use a PSR-14 event.

2.3 Hints

Output

For the output, the HTML is used directly from Soundcloud.

SQL changes

In order not to have to access the oEmbed interface permanently, four fields are added to the sys_file_metadata table

3 Developer Corner

3.1 ModifySoundcloudOutputEvent

If you want to modify the output of the Soundcloud HTML, you can use the ModifySoundcloudOutputEvent.

EventListener registration

In your extension, extend Configuration/Services.yaml once:

Vendor\ExtName\EventListener\SoundcloudOutputEventListener:
  tags:
    - name: event.listener
      identifier: 'soundcloud/output'
      event: Ayacoo\AyacooSoundcloud\Event\ModifySoundcloudOutputEvent
<?php

namespace Vendor\ExtName\EventListener;

use Ayacoo\AyacooSoundcloud\Event\ModifySoundcloudOutputEvent;

class SoundcloudOutputEventListener
{
    public function __invoke(ModifySoundcloudOutputEvent $event): void
    {
        $output = $event->getOutput();
        $output = str_replace('src', 'data-src', $output);
        $event->setOutput($output);
    }
}

3.2 Backend Preview

In the backend, the preview is used by TextMediaRenderer. For online media, this only displays the provider's icon, in this case soundcloud. If you want to display the thumbnail, for example, you need your own renderer that overwrites Textmedia. An example renderer is available in the project. Caution: This overwrites all text media elements, so only use this renderer as a basis.

You register a renderer in the TCA Configuration/TCA/Overrides/tt_content.php with $GLOBALS['TCA']['tt_content']['types']['textmedia']['previewRenderer'] = \Ayacoo\AyacooSoundcloud\Rendering\SoundcloudPreviewRenderer::class;

Documentation: https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/ContentElements/CustomBackendPreview.html

4 Administration corner

4.1 Versions and support

AyacooSoundcloud TYPO3 PHP Support / Development
2.x 12.x 8.1 - 8.3 features, bugfixes, security updates
1.x 11.x 7.4 - 8.0 bugfixes, security updates

4.2 Release Management

ayacoo_soundcloud uses semantic versioning, which means, that

  • bugfix updates (e.g. 1.0.0 => 1.0.1) just includes small bugfixes or security relevant stuff without breaking changes,
  • minor updates (e.g. 1.0.0 => 1.1.0) includes new features and smaller tasks without breaking changes,
  • and major updates (e.g. 1.0.0 => 2.0.0) breaking changes which can be refactorings, features or bugfixes.

4.3 Contribution

Pull Requests are gladly welcome! Nevertheless please don't forget to add an issue and connect it to your pull requests. This is very helpful to understand what kind of issue the PR is going to solve.

Bugfixes: Please describe what kind of bug your fix solve and give us feedback how to reproduce the issue. We're going to accept only bugfixes if we can reproduce the issue.

5 Thanks / Notices

  • Special thanks to Georg Ringer and his news extension. A good template to build a TYPO3 extension. Here, for example, the structure of README.md is used.
  • Thanks also to b13 for the online-media-updater extension. Parts of it were allowed to be included in this extension.

6 Support

If you are happy with the extension and would like to support it in any way, I would appreciate the support of social institutions.

ayacoo-soundcloud's People

Contributors

ayacoo avatar

Watchers

 avatar  avatar

Forkers

t3easy

ayacoo-soundcloud's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.