Download the PHP package dnadesign/silverstripe-audio-definition without Composer

On this page you can find all versions of the php package dnadesign/silverstripe-audio-definition. 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 silverstripe-audio-definition

Keywords text + audio definition for SilverStripe

Introduction

This modules provides an interface to associate foreign words, within a content area, with an audio description and optional text definition. By Default, this module ships with the necessary interfaces for translating Te Reo Maori words and expressions via the https://maoridictionary.co.nz API.

Requirements

Installation

How to

Create Definitions

In the CMS, open the Audio Definition interface, and click on Add New. Type in the terms (could be one or more words) and select the language they are in (by default, only option is Maori).

If you are using an API and it is set up correctly, the Link to Audio file and Text Definitions should be populated upon saving. If no API is provided, you can add Text Definitions manually.

Insert definitions in a content area

This module adds a button to the default Silverstripe text editor (currently TinyMCE 6) allowing a user to insert a shortcode which renders the audio definition. To add the shortcode, select the word you wish to associate with the definition, click on the audio defnintion button and select the correct term. If the selected text matches any of the audio definition term, it will be selected by default.

Customise definition appearance

By default, the rendered definition is a span with the correct lang attribute set. In addition, if an audio file is supplied, a button will precede the word which will play the audio when clicked.

It is recommended that you override the DNADesign\AudioDefinition\AudioDefinition template to suit you needs. For instance, you could add the text definition in a tooltip displayed when a user hovers over the word.

As an example, this is the markup you could use with tippy.js

Add different languages/translators

If you would like to add a different language to choose from when creating a definition, you can add a new locale to the AudioDefinition sources via the config:

A translation service is optional. If you choose to use one, you can create a new service which must implement DNADesign\AudioDefinition\Services. This class must define a method getDefinitionAndAudio which returns an array that must contain:

Extensions

Context Extension

Some languages can have multiple text definitions for the same word depending on the context. To tag different text definitions with keywords that depict a context, activate the context extension for the locale as follows:

Once activated, users can create contexts in the Audio Definition > Contexts tab, then tag text definitions with one or more contexts. This won't have an influence on the way the definitions are displayed out-of-the-box, but if you implement a way of displaying the text definitions, then these can be filtered by context.

Note: if at least one text definition is tagged with a context, the wysiwyg dropdown will give the choice of word with a context. If a word is required to display all definitions, then each definition will need to be tagged with the "default" context.

Note: if you add the context config before running dev/build after installing the module, you will need to run dev/build twice for all the tables to be created.

NOTES

Icons made by Pixel perfect from www.flaticon.com


All versions of silverstripe-audio-definition with dependencies

PHP Build Version
Package Version
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 dnadesign/silverstripe-audio-definition contains the following files

Loading the files please wait ....