PHP Classes

File: engine/modules/core/media/media.qtags.inc

Recommend this page to a friend!
  Classes of Aldo Tripiciano   Quanta CMS   engine/modules/core/media/media.qtags.inc   Download  
File: engine/modules/core/media/media.qtags.inc
Role: Example script
Content type: text/plain
Description: Example script
Class: Quanta CMS
Manage content that works without a database
Author: By
Last change:
Date: 5 years ago
Size: 1,401 bytes
 

Contents

Class file image Download
<?php

/**
 * Implements qtag PLAYLIST.
 *
 * Create a list of HTML5 playable audio files.
 *
 * @param Environment $env
 * The Environment.
 *
 * @param string $target
 * The qtag's target.
 *
 * @param array $attributes
 * The qtag's attributes.
 *
 * @return string
 * The rendered qtag.
 */
function qtag_PLAYLIST($env, $target, $attributes) {
 
$dirlist = new PlayList($env, $target, 'playlist', array('sortbytime' => 'desc') + $attributes);
  return
$dirlist->render();
}

/**
 * Implements qtag AUDIO.
 *
 * Render a playable audio file.
 *
 * @param Environment $env
 * The Environment.
 *
 * @param string $target
 * The qtag's target.
 *
 * @param array $attributes
 * The qtag's attributes.
 *
 * @return string
 * The rendered qtag.
 */
function qtag_AUDIO($env, $target, $attributes) {
  return
'<audio src="' . $target . '" preload="auto" controls><p>Your browser does not support the audio element.</p></audio>';
}

/**
 * Implements qtag ALBUM.
 *
 * Render an Album of audio files.
 *
 * @param Environment $env
 * The Environment.
 *
 * @param string $target
 * The qtag's target.
 *
 * @param array $attributes
 * The qtag's attributes.
 *
 * @return string
 * The rendered qtag.
 */
function qtag_ALBUM($env, $target, $attributes) {
 
$dirlist = new Album($env, $target, 'album', array('sortbytime' => 'desc') + $attributes);
  return
$dirlist->render();
}