@copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html A sermon distributor that links to Dropbox. /----------------------------------------------------------------------------------------------------------------------------------*/ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\Layout\LayoutHelper; use TrueChristianChurch\Component\Sermondistributor\Site\Helper\SermondistributorHelper; use VDM\Joomla\Utilities\StringHelper; use VDM\Joomla\Utilities\ArrayHelper; // No direct access to this file defined('JPATH_BASE') or die; $random = StringHelper::random(5); if (isset($displayData['script']) && ArrayHelper::check($displayData['script'])) { $script = array(); $script[] = 'jQuery(document).ready(function(){'; $script[] = 'new jPlayerPlaylist({'; $script[] = 'jPlayer: "#jquery_jplayer_list_'.$random.'",'; $script[] = 'cssSelectorAncestor: "#jp_container_list_'.$random.'"'; $script[] = '}, [ {'; $script[] = implode('}, {', $displayData['script']); $script[] = '} ], {'; $script[] = 'swfPath: "'.$displayData['swfPath'].'",'; $script[] = 'supplied: "'.implode(', ', $displayData['supplied']).'",'; $script[] = 'wmode: "window",'; $script[] = 'useStateClassSkin: true,'; $script[] = 'autoBlur: false,'; $script[] = 'smoothPlayBar: true,'; $script[] = 'keyEnabled: true'; $script[] = '}); });'; // get the document $document = Factory::getDocument(); // add script to document header $document->addScriptDeclaration(implode("\n", $script)); } ?>