first commit
This commit is contained in:
73
components/com_jce/editor/extensions/aggregator/audio.php
Normal file
73
components/com_jce/editor/extensions/aggregator/audio.php
Normal file
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
|
||||
* @license GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* JCE is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License or
|
||||
* other free or open source software licenses
|
||||
*/
|
||||
defined('JPATH_PLATFORM') or die;
|
||||
|
||||
class WFAggregatorExtension_Audio extends WFAggregatorExtension
|
||||
{
|
||||
/**
|
||||
* Constructor activating the default information of the class.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(array(
|
||||
'format' => 'video',
|
||||
));
|
||||
}
|
||||
|
||||
public function display()
|
||||
{
|
||||
$document = WFDocument::getInstance();
|
||||
$document->addScript('audio', 'extensions/aggregator/audio/js');
|
||||
}
|
||||
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getParams()
|
||||
{
|
||||
$plugin = WFEditorPlugin::getInstance();
|
||||
|
||||
return array(
|
||||
'controls' => (int) $plugin->getParam('aggregator.audio.controls', 1),
|
||||
'loop' => (int) $plugin->getParam('aggregator.audio.loop', 0),
|
||||
'autoplay' => (int) $plugin->getParam('aggregator.audio.autoplay', 0),
|
||||
'muted' => (int) $plugin->getParam('aggregator.audio.mute', 0)
|
||||
);
|
||||
}
|
||||
|
||||
public function getEmbedData($data, $url)
|
||||
{
|
||||
$params = $this->getParams();
|
||||
|
||||
$default = array(
|
||||
'controls' => 1,
|
||||
'loop' => 0,
|
||||
'autoplay' => 0,
|
||||
'muted' => 0
|
||||
);
|
||||
|
||||
foreach($params as $name => $value) {
|
||||
if ($default[$name] === $value) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($value !== '') {
|
||||
$data[$name] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
$data['src'] = $url;
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
40
components/com_jce/editor/extensions/aggregator/audio.xml
Normal file
40
components/com_jce/editor/extensions/aggregator/audio.xml
Normal file
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" ?>
|
||||
<extension version="3.4" type="plugin" group="jce" method="upgrade">
|
||||
<name>WF_AGGREGATOR_AUDIO_TITLE</name>
|
||||
<version>2.9.32</version>
|
||||
<creationDate>01-11-2022</creationDate>
|
||||
<author>Ryan Demmer</author>
|
||||
<authorEmail>info@joomlacontenteditor.net</authorEmail>
|
||||
<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
|
||||
<copyright>Copyright (C) 2006 - 2022 Ryan Demmer. All rights reserved</copyright>
|
||||
<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
|
||||
<description>WF_AGGREGATOR_AUDIO_DESC</description>
|
||||
<files>
|
||||
<filename>audio.php</filename>
|
||||
<folder>audio</folder>
|
||||
</files>
|
||||
<fields name="audio">
|
||||
<fieldset name="aggregator.audio">
|
||||
<field name="controls" type="yesno" default="1" label="WF_AGGREGATOR_AUDIO_CONTROLS" description="WF_AGGREGATOR_AUDIO_CONTROLS_DESC">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
|
||||
<field name="loop" type="yesno" default="0" label="WF_AGGREGATOR_AUDIO_LOOP" description="WF_AGGREGATOR_AUDIO_LOOP_DESC">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
|
||||
<field name="autoplay" type="yesno" default="0" label="WF_AGGREGATOR_AUDIO_AUTOPLAY" description="WF_AGGREGATOR_AUDIO_AUTOPLAY_DESC">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
|
||||
<field name="mute" type="yesno" default="0" label="WF_AGGREGATOR_AUDIO_MUTE" description="WF_AGGREGATOR_AUDIO_MUTE_DESC">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</fields>
|
||||
<plugins></plugins>
|
||||
</extension>
|
||||
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@@ -0,0 +1,2 @@
|
||||
/* jce - 2.9.32 | 2022-11-01 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2022 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
|
||||
WFAggregator.add("audio",{params:{},props:{autoplay:0,loop:0,controls:1,mute:0},setup:function(){$.each(this.params,function(k,v){$("#audio_"+k).val(v).filter(":checkbox, :radio").prop("checked",!!v)})},getTitle:function(){return this.title||this.name},getType:function(){return"audio"},isSupported:function(v){return!1}});
|
||||
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2009-2022 Ryan Demmer. All rights reserved
|
||||
* @license GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* JCE is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License or
|
||||
* other free or open source software licenses
|
||||
*/
|
||||
defined('JPATH_PLATFORM') or die;
|
||||
|
||||
class WFAggregatorExtension_Dailymotion extends WFAggregatorExtension
|
||||
{
|
||||
/**
|
||||
* Constructor activating the default information of the class.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(array(
|
||||
'format' => 'video',
|
||||
));
|
||||
}
|
||||
|
||||
public function display()
|
||||
{
|
||||
$document = WFDocument::getInstance();
|
||||
$document->addScript('dailymotion', 'extensions/aggregator/dailymotion/js');
|
||||
$document->addStyleSheet('dailymotion', 'extensions/aggregator/dailymotion/css');
|
||||
}
|
||||
|
||||
public function isEnabled()
|
||||
{
|
||||
$plugin = WFEditorPlugin::getInstance();
|
||||
|
||||
return $plugin->checkAccess('aggregator.dailymotion.enable', 1);
|
||||
}
|
||||
|
||||
public function getParams()
|
||||
{
|
||||
$plugin = WFEditorPlugin::getInstance();
|
||||
|
||||
return array(
|
||||
'width' => $plugin->getParam('aggregator.dailymotion.width', 480),
|
||||
'height' => $plugin->getParam('aggregator.dailymotion.height', 270),
|
||||
);
|
||||
}
|
||||
|
||||
public function getEmbedData($data, $url)
|
||||
{
|
||||
$params = $this->getParams();
|
||||
|
||||
$default = array(
|
||||
'width' => 480,
|
||||
'height' => 270
|
||||
);
|
||||
|
||||
foreach($params as $name => $value) {
|
||||
if (isset($default[$name]) && $value === $default[$name]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($name === 'width' || $name == 'height') {
|
||||
$data[$name] = $value;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" ?>
|
||||
<extension version="3.4" type="plugin" group="jce" method="upgrade">
|
||||
<name>WF_AGGREGATOR_DAILYMOTION_TITLE</name>
|
||||
<version>2.9.32</version>
|
||||
<creationDate>01-11-2022</creationDate>
|
||||
<author>Ryan Demmer</author>
|
||||
<authorEmail>info@joomlacontenteditor.net</authorEmail>
|
||||
<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
|
||||
<copyright>Copyright (C) 2006 - 2022 Ryan Demmer. All rights reserved</copyright>
|
||||
<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
|
||||
<description>WF_AGGREGATOR_DAILYMOTION_DESC</description>
|
||||
<files>
|
||||
<filename>dailymotion</filename>
|
||||
<folder>dailymotion</folder>
|
||||
</files>
|
||||
<fields name="dailymotion">
|
||||
<fieldset name="aggregator.dailymotion">
|
||||
<field name="enable" type="yesno" default="1" label="WF_LABEL_EXTENSION_ENABLE" description="WF_LABEL_EXTENSION_ENABLE_DESC">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field name="width" type="number" default="400" class="input-small" label="WF_LABEL_WIDTH" />
|
||||
<field name="height" type="number" default="225" class="input-small" label="WF_LABEL_HEIGHT" />
|
||||
</fieldset>
|
||||
</fields>
|
||||
<plugins></plugins>
|
||||
</extension>
|
||||
@@ -0,0 +1 @@
|
||||
#dailymotion_player_size{width:150px!important}#dailymotion_player_size_custom{width:65px!important}
|
||||
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@@ -0,0 +1,2 @@
|
||||
/* jce - 2.9.32 | 2022-11-01 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2022 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
|
||||
WFAggregator.add("dailymotion",{params:{width:480,height:270,autoPlay:!1},props:{autoPlay:0,start:0},setup:function(){$("#dailymotion_autoPlay").prop("checked",this.params.autoPlay),$("#dailymotion_player_size").on("change",function(){var v=parseInt(this.value,10);$("#dailymotion_player_size_custom").toggleClass("uk-hidden",!!this.value),v&&($("#width").val(v),$("#height").val(Math.round(9*v/16)))}),$("#dailymotion_player_size_custom").on("change",function(){var v=parseInt(this.value,10);v&&($("#width").val(v),$("#height").val(Math.round(16*v/9)))})},getTitle:function(){return this.title||this.name},getType:function(){return"iframe"},isSupported:function(v){return"object"==typeof v&&(v=v.src||v.data||""),!!/dai\.?ly(motion)?(\.com)?/.test(v)&&"dailymotion"},getValues:function(src){var self=this,data={},args={},id="";src.indexOf("=")!==-1&&$.extend(args,Wf.String.query(src)),$("input[id], select[id]","#dailymotion_options").each(function(){var k=$(this).attr("id"),v=$(this).val();k=k.substr(k.indexOf("_")+1),$(this).is(":checkbox")&&(v=$(this).is(":checked")?1:0),k.indexOf("player_size")===-1&&self.props[k]!==v&&""!==v&&(args[k]=v)});var m=src.match(/dai\.?ly(motion\.com)?\/(embed)?\/?(swf|video)?\/?([a-z0-9]+)_?/);m&&(id=m.pop()),src="https://www.dailymotion.com/embed/video/"+id;var query=$.param(args);return query&&(src=src+(/\?/.test(src)?"&":"?")+query),data.src=src,$.extend(data,{frameborder:0,allowfullscreen:"allowfullscreen"}),data},setValues:function(data){var self=this,src=data.src||data.data||"",id="";if(!src)return data;var query=Wf.String.query(src);$.each(query,function(key,val){return self.props[key]==val||void(data["dailymotion_"+key]=val)}),src=src.replace(/&/g,"&");var m=src.match(/dai\.?ly(motion\.com)?\/(embed)?\/?(swf|video)?\/?([a-z0-9]+)_?/);return m&&(id=m.pop()),data.src="https://www.dailymotion.com/embed/video/"+id,data},getAttributes:function(src){var args={},data=this.setValues({src:src})||{};return $.each(data,function(k,v){"src"!=k&&(args["dailymotion_"+k]=v)}),$.extend(args,{src:data.src||src,width:this.params.width,height:this.params.height}),args},setAttributes:function(){},onSelectFile:function(){},onInsert:function(){}});
|
||||
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (c) 2009-2022 Ryan Demmer. All rights reserved
|
||||
* @license GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* JCE is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License or
|
||||
* other free or open source software licenses
|
||||
*/
|
||||
defined('_WF_EXT') or die('RESTRICTED');
|
||||
?>
|
||||
<div class="uk-form-row uk-grid uk-grid-small">
|
||||
<label for="dailymotion_autoPlay" title="<?php echo JText::_('WF_AGGREGATOR_DAILYMOTION_AUTOPLAY_DESC') ?>"
|
||||
class="tooltip uk-form-label uk-width-1-5"><?php echo JText::_('WF_AGGREGATOR_DAILYMOTION_AUTOPLAY') ?></label>
|
||||
<div class="uk-width-4-5">
|
||||
<div class="uk-form-controls uk-width-1-5">
|
||||
<input type="checkbox" id="dailymotion_autoPlay" />
|
||||
</div>
|
||||
|
||||
<label for="dailymotion_start" title="<?php echo JText::_('WF_AGGREGATOR_DAILYMOTION_START_DESC') ?>"
|
||||
class="tooltip uk-form-label uk-width-1-5"><?php echo JText::_('WF_AGGREGATOR_DAILYMOTION_START') ?></label>
|
||||
<div class="uk-form-controls uk-width-1-5">
|
||||
<input id="dailymotion_start" type="number" value="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-form-row uk-grid uk-grid-small">
|
||||
<label class="uk-form-label uk-width-1-5"
|
||||
title="<?php echo JText::_('WF_AGGREGATOR_DAILYMOTION_SIZE'); ?>"><?php echo JText::_('WF_AGGREGATOR_DAILYMOTION_SIZE'); ?></label>
|
||||
|
||||
<div class="uk-form-controls uk-width-4-5">
|
||||
<select id="dailymotion_player_size">
|
||||
<option value="320"><?php echo JText::_('WF_AGGREGATOR_DAILYMOTION_SIZE_SMALL'); ?></option>
|
||||
<option value="480"><?php echo JText::_('WF_AGGREGATOR_DAILYMOTION_SIZE_MEDIUM'); ?></option>
|
||||
<option value="560"><?php echo JText::_('WF_AGGREGATOR_DAILYMOTION_SIZE_LARGE'); ?></option>
|
||||
<option value=""><?php echo JText::_('WF_AGGREGATOR_DAILYMOTION_SIZE_CUSTOM'); ?></option>
|
||||
</select>
|
||||
|
||||
<input type="number" id="dailymotion_player_size_custom" class="uk-hidden uk-margin-small-left" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
76
components/com_jce/editor/extensions/aggregator/video.php
Normal file
76
components/com_jce/editor/extensions/aggregator/video.php
Normal file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
|
||||
* @license GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* JCE is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License or
|
||||
* other free or open source software licenses
|
||||
*/
|
||||
defined('JPATH_PLATFORM') or die;
|
||||
|
||||
class WFAggregatorExtension_Video extends WFAggregatorExtension
|
||||
{
|
||||
/**
|
||||
* Constructor activating the default information of the class.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(array(
|
||||
'format' => 'video',
|
||||
));
|
||||
}
|
||||
|
||||
public function display()
|
||||
{
|
||||
$document = WFDocument::getInstance();
|
||||
$document->addScript('video', 'extensions/aggregator/video/js');
|
||||
}
|
||||
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getParams()
|
||||
{
|
||||
$plugin = WFEditorPlugin::getInstance();
|
||||
|
||||
return array(
|
||||
'width' => $plugin->getParam('aggregator.video.width', ''),
|
||||
'height' => $plugin->getParam('aggregator.video.height', ''),
|
||||
|
||||
'controls' => (int) $plugin->getParam('aggregator.video.controls', 1),
|
||||
'loop' => (int) $plugin->getParam('aggregator.video.loop', 0),
|
||||
'autoplay' => (int) $plugin->getParam('aggregator.video.autoplay', 0),
|
||||
'muted' => (int) $plugin->getParam('aggregator.video.mute', 0)
|
||||
);
|
||||
}
|
||||
|
||||
public function getEmbedData($data, $url)
|
||||
{
|
||||
$params = $this->getParams();
|
||||
|
||||
$default = array(
|
||||
'controls' => 1,
|
||||
'loop' => 0,
|
||||
'autoplay' => 0,
|
||||
'muted' => 0
|
||||
);
|
||||
|
||||
foreach($params as $name => $value) {
|
||||
if ($default[$name] === $value) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($value !== '') {
|
||||
$data[$name] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
$data['src'] = $url;
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
39
components/com_jce/editor/extensions/aggregator/video.xml
Normal file
39
components/com_jce/editor/extensions/aggregator/video.xml
Normal file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" ?>
|
||||
<extension version="3.4" type="plugin" group="jce" method="upgrade">
|
||||
<name>WF_AGGREGATOR_VIDEO_TITLE</name>
|
||||
<version>2.9.32</version>
|
||||
<creationDate>01-11-2022</creationDate>
|
||||
<author>Ryan Demmer</author>
|
||||
<authorEmail>info@joomlacontenteditor.net</authorEmail>
|
||||
<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
|
||||
<copyright>Copyright (C) 2006 - 2022 Ryan Demmer. All rights reserved</copyright>
|
||||
<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
|
||||
<description>WF_AGGREGATOR_VIDEO_DESC</description>
|
||||
<files>
|
||||
<filename>video.php</filename>
|
||||
</files>
|
||||
<fields name="video">
|
||||
<fieldset name="aggregator.video">
|
||||
<field name="controls" type="yesno" default="1" label="WF_AGGREGATOR_VIDEO_CONTROLS" description="WF_AGGREGATOR_VIDEO_CONTROLS_DESC">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
|
||||
<field name="loop" type="yesno" default="0" label="WF_AGGREGATOR_VIDEO_LOOP" description="WF_AGGREGATOR_VIDEO_LOOP_DESC">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
|
||||
<field name="autoplay" type="yesno" default="0" label="WF_AGGREGATOR_VIDEO_AUTOPLAY" description="WF_AGGREGATOR_VIDEO_AUTOPLAY_DESC">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
|
||||
<field name="mute" type="yesno" default="0" label="WF_AGGREGATOR_VIDEO_MUTE" description="WF_AGGREGATOR_VIDEO_MUTE_DESC">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</fields>
|
||||
<plugins></plugins>
|
||||
</extension>
|
||||
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@@ -0,0 +1,2 @@
|
||||
/* jce - 2.9.32 | 2022-11-01 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2022 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
|
||||
WFAggregator.add("video",{params:{},props:{autoplay:0,loop:0,controls:1,mute:0},setup:function(){$.each(this.params,function(k,v){$("#video_"+k).val(v).filter(":checkbox, :radio").prop("checked",!!v)})},getTitle:function(){return this.title||this.name},getType:function(){return"video"},isSupported:function(v){return!1}});
|
||||
92
components/com_jce/editor/extensions/aggregator/vimeo.php
Normal file
92
components/com_jce/editor/extensions/aggregator/vimeo.php
Normal file
@@ -0,0 +1,92 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2009-2022 Ryan Demmer. All rights reserved
|
||||
* @license GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* JCE is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License or
|
||||
* other free or open source software licenses
|
||||
*/
|
||||
defined('JPATH_PLATFORM') or die;
|
||||
|
||||
class WFAggregatorExtension_Vimeo extends WFAggregatorExtension
|
||||
{
|
||||
/**
|
||||
* Constructor activating the default information of the class.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(array(
|
||||
'format' => 'video',
|
||||
));
|
||||
}
|
||||
|
||||
public function display()
|
||||
{
|
||||
$document = WFDocument::getInstance();
|
||||
$document->addScript('vimeo', 'extensions/aggregator/vimeo/js');
|
||||
}
|
||||
|
||||
public function isEnabled()
|
||||
{
|
||||
$plugin = WFEditorPlugin::getInstance();
|
||||
|
||||
return $plugin->checkAccess('aggregator.vimeo.enable', 1);
|
||||
}
|
||||
|
||||
public function getParams()
|
||||
{
|
||||
$plugin = WFEditorPlugin::getInstance();
|
||||
|
||||
return array(
|
||||
'width' => $plugin->getParam('aggregator.vimeo.width', 400),
|
||||
'height' => $plugin->getParam('aggregator.vimeo.height', 225),
|
||||
|
||||
'color' => (string) $plugin->getParam('aggregator.vimeo.color', ''),
|
||||
'loop' => (int) $plugin->getParam('aggregator.vimeo.loop', 0),
|
||||
'autoplay' => (int) $plugin->getParam('aggregator.vimeo.autoplay', 0),
|
||||
'intro' => (int) $plugin->getParam('aggregator.vimeo.intro', 0),
|
||||
'title' => (int) $plugin->getParam('aggregator.vimeo.title', 0),
|
||||
'byline' => (int) $plugin->getParam('aggregator.vimeo.byline', 0),
|
||||
'portrait' => (int) $plugin->getParam('aggregator.vimeo.portrait', 0),
|
||||
'fullscreen' => (int) $plugin->getParam('aggregator.vimeo.fullscreen', 1),
|
||||
'dnt' => (int) $plugin->getParam('aggregator.vimeo.dnt', 0),
|
||||
);
|
||||
}
|
||||
|
||||
public function getEmbedData($data, $url)
|
||||
{
|
||||
$params = $this->getParams();
|
||||
|
||||
$default = array(
|
||||
'width' => 560,
|
||||
'height' => 315,
|
||||
'controls' => 1,
|
||||
'loop' => 0,
|
||||
'autoplay' => 0,
|
||||
'rel' => 1,
|
||||
'modestbranding' => 0,
|
||||
'privacy' => 0
|
||||
);
|
||||
|
||||
foreach($params as $name => $value) {
|
||||
if (isset($default[$name]) && $value === $default[$name]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($name === 'width' || $name == 'height') {
|
||||
$data[$name] = $value;
|
||||
continue;
|
||||
}
|
||||
|
||||
$query[$name] = $value;
|
||||
}
|
||||
|
||||
if (!empty($options)) {
|
||||
$data['query'] = http_build_query($options);
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
69
components/com_jce/editor/extensions/aggregator/vimeo.xml
Normal file
69
components/com_jce/editor/extensions/aggregator/vimeo.xml
Normal file
@@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" ?>
|
||||
<extension version="3.4" type="plugin" group="jce" method="upgrade">
|
||||
<name>WF_AGGREGATOR_VIMEO_TITLE</name>
|
||||
<version>2.9.32</version>
|
||||
<creationDate>01-11-2022</creationDate>
|
||||
<author>Ryan Demmer</author>
|
||||
<authorEmail>info@joomlacontenteditor.net</authorEmail>
|
||||
<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
|
||||
<copyright>Copyright (C) 2006 - 2022 Ryan Demmer. All rights reserved</copyright>
|
||||
<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
|
||||
<description>WF_AGGREGATOR_VIMEO_DESC</description>
|
||||
<files>
|
||||
<filename>vimeo.php</filename>
|
||||
<folder>vimeo</folder>
|
||||
</files>
|
||||
<fields name="vimeo">
|
||||
<fieldset name="aggregator.vimeo">
|
||||
<field name="enable" type="yesno" default="1" label="WF_LABEL_EXTENSION_ENABLE" description="WF_LABEL_EXTENSION_ENABLE_DESC">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field name="width" type="number" default="400" class="input-small" label="WF_LABEL_WIDTH" description="WF_AGGREGATOR_VIMEO_WIDTH_DESC" />
|
||||
<field name="height" type="number" default="225" class="input-small" label="WF_LABEL_HEIGHT" description="WF_AGGREGATOR_VIMEO_HEIGHT_DESC" />
|
||||
|
||||
<field name="color" type="color" size="10" default="" label="WF_AGGREGATOR_VIMEO_COLOR" description="WF_AGGREGATOR_VIMEO_COLOR_DESC" />
|
||||
|
||||
<field name="intro" type="yesno" default="0" label="WF_AGGREGATOR_VIMEO_INTRO" description="WF_AGGREGATOR_VIMEO_INTRO_DESC">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
|
||||
<field name="portrait" type="yesno" default="0" label="WF_AGGREGATOR_VIMEO_PORTRAIT" description="WF_AGGREGATOR_VIMEO_PORTRAIT_DESC">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
|
||||
<field name="title" type="yesno" default="0" label="WF_AGGREGATOR_VIMEO_INTROTITLE" description="WF_AGGREGATOR_VIMEO_INTROTITLE_DESC">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
|
||||
<field name="byline" type="yesno" default="0" label="WF_AGGREGATOR_VIMEO_BYLINE" description="WF_AGGREGATOR_VIMEO_BYLINE_DESC">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
|
||||
<field name="autoplay" type="yesno" default="0" label="WF_AGGREGATOR_VIMEO_AUTOPLAY" description="WF_AGGREGATOR_VIMEO_AUTOPLAY_DESC">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
|
||||
<field name="loop" type="yesno" default="0" label="WF_AGGREGATOR_VIMEO_LOOP" description="WF_AGGREGATOR_VIMEO_LOOP_DESC">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
|
||||
<field name="fullscreen" type="yesno" default="1" label="WF_AGGREGATOR_VIMEO_FULLSCREEN" description="WF_AGGREGATOR_VIMEO_FULLSCREEN_DESC">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
|
||||
<field name="dnt" type="yesno" default="0" label="WF_AGGREGATOR_VIMEO_DNT" description="WF_AGGREGATOR_VIMEO_DNT_DESC">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</fields>
|
||||
<plugins></plugins>
|
||||
</extension>
|
||||
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@@ -0,0 +1,2 @@
|
||||
/* jce - 2.9.32 | 2022-11-01 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2022 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
|
||||
WFAggregator.add("vimeo",{params:{width:480,height:480,embed:!0},props:{color:"",autoplay:0,loop:0,fullscreen:1,dnt:0},setup:function(){$("#vimeo_embed").toggle(this.params.embed),$.each(this.params,function(k,v){$("#vimeo_"+k).val(v).filter(":checkbox, :radio").prop("checked",!!v)})},getTitle:function(){return this.title||this.name},getType:function(){return"iframe"},isSupported:function(v){return"object"==typeof v&&(v=v.src||v.data||""),!!/vimeo(.+)?\/(.+)/.test(v)&&(!/\/external\//.test(v)&&"vimeo")},getValues:function(src){var self=this,data={},args={},id="";if(src.indexOf("=")!==-1&&$.extend(args,Wf.String.query(src)),$("input, select","#vimeo_options").not("#vimeo_embed").each(function(){var k=$(this).attr("id"),v=$(this).val();k=k.substr(k.indexOf("_")+1),$(this).is(":checkbox")&&(v=$(this).is(":checked")?1:0),self.props[k]!=v&&""!==v&&("color"===k&&"#"===v.charAt(0)&&(v=v.substr(1)),args[k]=v)}),args.clip_id)id=args.clip_id;else{var id="",hash="",matches=/vimeo\.com\/([0-9]+)\/?([a-z0-9]+)?/.exec(src);if(matches&&tinymce.is(matches,"array")){var id=matches[1];matches.length>2&&(hash=matches[2])}id+=hash?"?h="+hash:""}src="https://player.vimeo.com/video/"+id;var query=$.param(args);return query&&(src=src+(/\?/.test(src)?"&":"?")+query),data.src=src,$.extend(data,{frameborder:0}),0!==args.fullscreen&&$.extend(data,{allowfullscreen:!0}),data},setValues:function(data){var self=this,src=data.src||data.data||"",id="";if(!src)return data;var query=Wf.String.query(src);if(src=src.replace(/&/g,"&"),/moogaloop.swf/.test(src))data.vimeo_embed=!0,id=query.clip_id,delete query.clip_id,delete data.clip_id,$.each(["portrait","title","byline"],function(i,s){delete data["show_"+s]});else{var id="",hash="",matches=/vimeo\.com\/(?:\w+\/){0,3}((?:[0-9]+\b)(?:\/[a-z0-9]+)?)/.exec(src);if(matches&&"array"==$.type(matches)){var params=matches[1].split("/"),id=params[0];2==params.length&&(hash=params[1]),id+=hash?"/"+hash:""}}return $.each(query,function(key,val){return self.props[key]===val||("color"==key&&"#"!==val.charAt(0)&&(val="#"+val),"autoplay"==key&&(val=parseInt(val,10)),void(data["vimeo_"+key]=val))}),src="https://vimeo.com/"+id,$.each(data,function(key,val){/^iframe_(allow|frameborder|allowfullscreen)/.test(key)&&delete data[key]}),data.src=src,data},getAttributes:function(src){var args={},data=this.setValues({src:src})||{};return $.each(data,function(k,v){"src"!=k&&(args["vimeo_"+k]=v)}),$.extend(args,{src:data.src||src,width:this.params.width,height:this.params.height}),args},setAttributes:function(){},onSelectFile:function(){},onInsert:function(){}});
|
||||
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2009-2022 Ryan Demmer. All rights reserved
|
||||
* @license GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* JCE is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License or
|
||||
* other free or open source software licenses
|
||||
*/
|
||||
defined('_WF_EXT') or die('RESTRICTED');
|
||||
?>
|
||||
<div class="uk-form-row uk-grid uk-grid-small">
|
||||
<label for="vimeo_color" title="<?php echo JText::_('WF_AGGREGATOR_VIMEO_COLOR_DESC') ?>"
|
||||
class="tooltip uk-form-label uk-width-1-5"><?php echo JText::_('WF_AGGREGATOR_VIMEO_COLOR') ?></label>
|
||||
|
||||
<div class="uk-form-controls uk-width-1-5">
|
||||
<input type="text" id="vimeo_color" class="color"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="uk-form-row uk-grid uk-grid-small">
|
||||
|
||||
<label for="vimeo_intro" title="<?php echo JText::_('WF_AGGREGATOR_VIMEO_INTRO_DESC') ?>"
|
||||
class="tooltip uk-form-label uk-width-1-5"><?php echo JText::_('WF_AGGREGATOR_VIMEO_INTRO') ?></label>
|
||||
<div class="uk-form-controls uk-width-4-5">
|
||||
<input type="checkbox" id="vimeo_portrait" />
|
||||
<label for="vimeo_portrait" title="<?php echo JText::_('WF_AGGREGATOR_VIMEO_PORTRAIT_DESC') ?>"
|
||||
class="tooltip uk-margin-right"><?php echo JText::_('WF_AGGREGATOR_VIMEO_PORTRAIT') ?></label>
|
||||
|
||||
<input type="checkbox" id="vimeo_title" />
|
||||
<label for="vimeo_title" title="<?php echo JText::_('WF_AGGREGATOR_VIMEO_INTROTITLE_DESC') ?>"
|
||||
class="tooltip uk-margin-right"><?php echo JText::_('WF_AGGREGATOR_VIMEO_INTROTITLE') ?></label>
|
||||
|
||||
<input type="checkbox" id="vimeo_byline" />
|
||||
<label for="vimeo_byline" title="<?php echo JText::_('WF_AGGREGATOR_VIMEO_BYLINE_DESC') ?>"
|
||||
class="tooltip"><?php echo JText::_('WF_AGGREGATOR_VIMEO_BYLINE') ?></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="uk-form-row uk-grid uk-grid-small">
|
||||
<label for="vimeo_special"
|
||||
class="uk-form-label uk-width-1-5"><?php echo JText::_('WF_AGGREGATOR_VIMEO_SPECIAL') ?></label>
|
||||
<div class="uk-form-controls uk-width-4-5">
|
||||
|
||||
<input type="checkbox" id="vimeo_autoplay"/>
|
||||
<label for="vimeo_autoplay" title="<?php echo JText::_('WF_AGGREGATOR_VIMEO_AUTOPLAY_DESC') ?>"
|
||||
class="tooltip uk-margin-right"><?php echo JText::_('WF_AGGREGATOR_VIMEO_AUTOPLAY') ?></label>
|
||||
|
||||
<input type="checkbox" id="vimeo_loop"/>
|
||||
<label for="vimeo_loop" title="<?php echo JText::_('WF_AGGREGATOR_VIMEO_LOOP_DESC') ?>"
|
||||
class="tooltip uk-margin-right"><?php echo JText::_('WF_AGGREGATOR_VIMEO_LOOP') ?></label>
|
||||
|
||||
<input type="checkbox" id="vimeo_fullscreen" checked="checked"/>
|
||||
<label for="vimeo_fullscreen" title="<?php echo JText::_('WF_AGGREGATOR_VIMEO_FULLSCREEN_DESC') ?>"
|
||||
class="tooltip"><?php echo JText::_('WF_AGGREGATOR_VIMEO_FULLSCREEN') ?></label>
|
||||
|
||||
<input type="checkbox" id="vimeo_dnt" />
|
||||
<label for="vimeo_dnt" title="<?php echo JText::_('WF_AGGREGATOR_VIMEO_DNT_DESC') ?>"
|
||||
class="tooltip"><?php echo JText::_('WF_AGGREGATOR_VIMEO_DNT') ?></label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
91
components/com_jce/editor/extensions/aggregator/youtube.php
Normal file
91
components/com_jce/editor/extensions/aggregator/youtube.php
Normal file
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2009-2022 Ryan Demmer. All rights reserved
|
||||
* @license GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* JCE is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License or
|
||||
* other free or open source software licenses
|
||||
*/
|
||||
defined('JPATH_PLATFORM') or die;
|
||||
|
||||
class WFAggregatorExtension_Youtube extends WFAggregatorExtension
|
||||
{
|
||||
/**
|
||||
* Constructor activating the default information of the class.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(array(
|
||||
'format' => 'video',
|
||||
));
|
||||
}
|
||||
|
||||
public function display()
|
||||
{
|
||||
$document = WFDocument::getInstance();
|
||||
$document->addScript('youtube', 'extensions/aggregator/youtube/js');
|
||||
}
|
||||
|
||||
public function isEnabled()
|
||||
{
|
||||
$plugin = WFEditorPlugin::getInstance();
|
||||
|
||||
return $plugin->checkAccess('aggregator.youtube.enable', 1);
|
||||
}
|
||||
|
||||
public function getParams()
|
||||
{
|
||||
$plugin = WFEditorPlugin::getInstance();
|
||||
|
||||
return array(
|
||||
'width' => $plugin->getParam('aggregator.youtube.width', 560),
|
||||
'height' => $plugin->getParam('aggregator.youtube.height', 315),
|
||||
|
||||
'controls' => (int) $plugin->getParam('aggregator.youtube.controls', 1),
|
||||
'loop' => (int) $plugin->getParam('aggregator.youtube.loop', 0),
|
||||
'autoplay' => (int) $plugin->getParam('aggregator.youtube.autoplay', 0),
|
||||
'rel' => (int) $plugin->getParam('aggregator.youtube.related', 1),
|
||||
'modestbranding' => (int) $plugin->getParam('aggregator.youtube.modestbranding', 0),
|
||||
'privacy' => (int) $plugin->getParam('aggregator.youtube.privacy', 0),
|
||||
);
|
||||
}
|
||||
|
||||
public function getEmbedData($data)
|
||||
{
|
||||
$params = $this->getParams();
|
||||
|
||||
$default = array(
|
||||
'width' => 560,
|
||||
'height' => 315,
|
||||
'controls' => 1,
|
||||
'loop' => 0,
|
||||
'autoplay' => 0,
|
||||
'rel' => 1,
|
||||
'modestbranding' => 0,
|
||||
'privacy' => 0
|
||||
);
|
||||
|
||||
$options = array();
|
||||
|
||||
foreach($params as $name => $value) {
|
||||
if (isset($default[$name]) && $value === $default[$name]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($name === 'width' || $name == 'height') {
|
||||
$data[$name] = $value;
|
||||
continue;
|
||||
}
|
||||
|
||||
$options[$name] = $value;
|
||||
}
|
||||
|
||||
if (!empty($options)) {
|
||||
$data['query'] = http_build_query($options);
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
57
components/com_jce/editor/extensions/aggregator/youtube.xml
Normal file
57
components/com_jce/editor/extensions/aggregator/youtube.xml
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" ?>
|
||||
<extension version="3.4" type="plugin" group="jce" method="upgrade">
|
||||
<name>WF_AGGREGATOR_YOUTUBE_TITLE</name>
|
||||
<version>2.9.32</version>
|
||||
<creationDate>01-11-2022</creationDate>
|
||||
<author>Ryan Demmer</author>
|
||||
<authorEmail>info@joomlacontenteditor.net</authorEmail>
|
||||
<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
|
||||
<copyright>Copyright (C) 2006 - 2022 Ryan Demmer. All rights reserved</copyright>
|
||||
<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
|
||||
<description>WF_AGGREGATOR_YOUTUBE_DESC</description>
|
||||
<files>
|
||||
<filename>youtube.php</filename>
|
||||
<folder>youtube</folder>
|
||||
</files>
|
||||
<fields name="youtube">
|
||||
<fieldset name="aggregator.youtube">
|
||||
<field name="enable" type="yesno" default="1" label="WF_LABEL_EXTENSION_ENABLE" description="WF_LABEL_EXTENSION_ENABLE_DESC">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field name="width" type="number" default="560" class="input-small" label="WF_LABEL_WIDTH" description="WF_AGGREGATOR_YOUTUBE_WIDTH_DESC" />
|
||||
<field name="height" type="number" default="315" class="input-small" label="WF_LABEL_HEIGHT" description="WF_AGGREGATOR_YOUTUBE_HEIGHT_DESC" />
|
||||
|
||||
<field name="controls" type="yesno" default="1" label="WF_AGGREGATOR_YOUTUBE_CONTROLS" description="WF_AGGREGATOR_YOUTUBE_CONTROLS_DESC">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
|
||||
<field name="related" type="yesno" default="1" label="WF_AGGREGATOR_YOUTUBE_RELATED" description="WF_AGGREGATOR_YOUTUBE_RELATED_DESC">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
|
||||
<field name="loop" type="yesno" default="1" label="WF_AGGREGATOR_YOUTUBE_LOOP" description="WF_AGGREGATOR_YOUTUBE_LOOP_DESC">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
|
||||
<field name="autoplay" type="yesno" default="0" label="WF_AGGREGATOR_YOUTUBE_AUTOPLAY" description="WF_AGGREGATOR_YOUTUBE_AUTOPLAY_DESC">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
|
||||
<field name="privacy" type="yesno" default="0" label="WF_AGGREGATOR_YOUTUBE_PRIVACY" description="WF_AGGREGATOR_YOUTUBE_PRIVACY_DESC">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
|
||||
<field name="modestbranding" type="yesno" default="0" label="WF_AGGREGATOR_YOUTUBE_MODESTBRANDING" description="WF_AGGREGATOR_YOUTUBE_MODESTBRANDING_DESC">
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</fields>
|
||||
<plugins></plugins>
|
||||
</extension>
|
||||
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@@ -0,0 +1,2 @@
|
||||
/* jce - 2.9.32 | 2022-11-01 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2022 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
|
||||
WFAggregator.add("youtube",{params:{width:560,height:315,embed:!0},props:{rel:1,autoplay:0,controls:1,modestbranding:0,enablejsapi:0,loop:0,playlist:"",start:"",end:"",privacy:0},setup:function(){$.each(this.params,function(k,v){$("#youtube_"+k).val(v).filter(":checkbox, :radio").prop("checked",!!v)})},getTitle:function(){return this.title||this.name},getType:function(){return $("#youtube_embed:visible").is(":checked")?"flash":"iframe"},isSupported:function(v){return"object"==typeof v&&(v=v.src||v.data||""),!!/youtu(\.)?be(.+)?\/(.+)/.test(v)&&"youtube"},getValues:function(src){var id,self=this,data={},args={},type=this.getType(),query={},u=this.parseURL(src);u.query&&(query=Wf.String.query(u.query)),$.extend(args,query),src=src.replace(/^(http:)?\/\//,"https://"),$(":input","#youtube_options").not("#youtube_embed, #youtube_https, #youtube_privacy").each(function(){var k=$(this).attr("id"),v=$(this).val();return!k||(k=k.substr(k.indexOf("_")+1),$(this).is(":checkbox")&&(v=$(this).is(":checked")?1:0),void(self.props[k]!=v&&""!==v&&(args[k]=v)))}),src=src.replace(/youtu(\.)?be([^\/]+)?\/(.+)/,function(a,b,c,d){return d=d.replace(/(watch\?v=|v\/|embed\/)/,""),b&&!c&&(c=".com"),id=d.replace(/([^\?&#]+)/,function($0,$1){return $1}),"youtube"+c+"/"+("iframe"==type?"embed":"v")+"/"+d}),id&&args.loop&&!args.playlist&&(args.playlist=id),src=$("#youtube_privacy").is(":checked")?src.replace(/youtube\./,"youtube-nocookie."):src.replace(/youtube-nocookie\./,"youtube."),"iframe"==type?$.extend(data,{allowfullscreen:!0,frameborder:0}):$.extend(!0,data,{param:{allowfullscreen:!0,wmode:"opaque"}}),$(".uk-repeatable","#youtube_params").each(function(){var key=$('input[name^="youtube_params_name"]',this).val(),value=$('input[name^="youtube_params_value"]',this).val();""!==key&&""!==value&&(args[key]=value)});var q=$.param(args);return q&&(src=src+(/\?/.test(src)?"&":"?")+q),data.src=src,data},parseURL:function(url){var o={};return url=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(url),$.each(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(i,v){var s=url[i];s&&(o[v]=s)}),o},setValues:function(data){var self=this,id="",src=data.src||data.data||"",query={};if(!src)return data;var u=this.parseURL(src);if(u.query&&(query=Wf.String.query(u.query)),src="https://"+u.host+u.path,src.indexOf("youtube-nocookie")!==-1&&(data.youtube_privacy=1),query.v)id=query.v,delete query.v;else{var s=/\/?(embed|v)?\/([\w-]+)\b/.exec(u.path);s&&"array"===$.type(s)&&(id=s.pop())}return $.each(query,function(key,val){try{val=decodeURIComponent(val)}catch(e){}return"autoplay"==key&&(val=parseInt(val,10)),"playlist"==key&&val==id||("wmode"==key||(self.props[key]===val||(data["youtube_"+key]=val,void delete data[key])))}),src=src.replace(/youtu(\.)?be([^\/]+)?\/(.+)/,function(a,b,c,d){var args="youtube";if(b&&(args+=".com"),c&&(args+=c),args+="/embed",args+="/"+id,u.anchor){var s=u.anchor;s=s.replace(/(\?|&)(.+)/,""),args+="#"+s}return args}).replace(/\/\/youtube/i,"//www.youtube"),$.each(data,function(key,val){/^iframe_(allow|frameborder|allowfullscreen)/.test(key)&&delete data[key]}),data.src=src,data},getAttributes:function(src){var args={},data=this.setValues({src:src})||{};return $.each(data,function(k,v){"src"!==k&&(args["youtube_"+k]=v)}),args=$.extend(args,{src:data.src||src,width:this.params.width,height:this.params.height})},setAttributes:function(){},onSelectFile:function(){},onInsert:function(){}});
|
||||
@@ -0,0 +1,111 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (c) 2009-2022 Ryan Demmer. All rights reserved
|
||||
* @license GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* JCE is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License or
|
||||
* other free or open source software licenses
|
||||
*/
|
||||
defined('_WF_EXT') or die('RESTRICTED');
|
||||
?>
|
||||
<div class="uk-form-row uk-grid uk-grid-small">
|
||||
<div class="uk-width-4-10">
|
||||
<input type="checkbox" id="youtube_controls" checked />
|
||||
<label for="youtube_controls" title="<?php echo JText::_('WF_AGGREGATOR_YOUTUBE_CONTROLS_DESC') ?>" class="tooltip">
|
||||
<?php echo JText::_('WF_AGGREGATOR_YOUTUBE_CONTROLS') ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="uk-width-6-10">
|
||||
<input type="checkbox" id="youtube_loop" />
|
||||
<label for="youtube_loop" title="<?php echo JText::_('WF_AGGREGATOR_YOUTUBE_LOOP_DESC') ?>" class="tooltip">
|
||||
<?php echo JText::_('WF_AGGREGATOR_YOUTUBE_LOOP') ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-form-row uk-grid uk-grid-small">
|
||||
<div class="uk-width-4-10">
|
||||
<input type="checkbox" id="youtube_autoplay" />
|
||||
<label for="youtube_autoplay" title="<?php echo JText::_('WF_AGGREGATOR_YOUTUBE_AUTOPLAY_DESC') ?>" class="tooltip">
|
||||
<?php echo JText::_('WF_AGGREGATOR_YOUTUBE_AUTOPLAY') ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="uk-width-6-10">
|
||||
<input type="checkbox" id="youtube_privacy" />
|
||||
<label for="youtube_privacy" title="<?php echo JText::_('WF_AGGREGATOR_YOUTUBE_PRIVACY_DESC') ?>" class="tooltip">
|
||||
<?php echo JText::_('WF_AGGREGATOR_YOUTUBE_PRIVACY') ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-form-row uk-grid uk-grid-small">
|
||||
<div class="uk-width-4-10 uk-grid uk-grid-collapse">
|
||||
<input type="checkbox" id="youtube_modestbranding" checked />
|
||||
<label for="youtube_modestbranding" title="<?php echo JText::_('WF_AGGREGATOR_YOUTUBE_MODESTBRANDING_DESC') ?>" class="tooltip">
|
||||
<?php echo JText::_('WF_AGGREGATOR_YOUTUBE_MODESTBRANDING') ?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="uk-width-6-10 uk-grid uk-grid-collapse">
|
||||
<label for="youtube_rel" class="uk-form-label uk-width-1-5 tooltip" title="<?php echo JText::_('WF_AGGREGATOR_YOUTUBE_RELATED_DESC') ?>">
|
||||
<?php echo JText::_('WF_AGGREGATOR_YOUTUBE_RELATED') ?>
|
||||
</label>
|
||||
|
||||
<select id="youtube_rel">
|
||||
<option value="1">
|
||||
<?php echo JText::_('WF_AGGREGATOR_YOUTUBE_RELATED_ALL') ?>
|
||||
</option>
|
||||
<option value="0">
|
||||
<?php echo JText::_('WF_AGGREGATOR_YOUTUBE_RELATED_CHANNEL') ?>
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="uk-grid uk-grid-small">
|
||||
<label for="youtube_start" title="<?php echo JText::_('WF_AGGREGATOR_YOUTUBE_START_DESC') ?>" class="tooltip uk-form-label uk-width-2-10">
|
||||
<?php echo JText::_('WF_AGGREGATOR_YOUTUBE_START') ?>
|
||||
</label>
|
||||
|
||||
<div class="uk-form-controls uk-width-2-10">
|
||||
<input type="number" id="youtube_start" />
|
||||
</div>
|
||||
<div class="uk-width-6-10">
|
||||
<label for="youtube_end" class="uk-form-label uk-width-2-10" title="<?php echo JText::_('WF_AGGREGATOR_YOUTUBE_END_DESC') ?>" class="tooltip">
|
||||
<?php echo JText::_('WF_AGGREGATOR_YOUTUBE_END') ?>
|
||||
</label>
|
||||
<div class="uk-form-controls uk-width-3-10">
|
||||
<input type="number" id="youtube_end" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="uk-grid uk-grid-small">
|
||||
<label for="youtube_playlist" class="uk-form-label uk-width-1-5" title="<?php echo JText::_('WF_AGGREGATOR_YOUTUBE_PLAYLIST_DESC') ?>" class="tooltip">
|
||||
<?php echo JText::_('WF_AGGREGATOR_YOUTUBE_PLAYLIST') ?>
|
||||
</label>
|
||||
<div class="uk-form-controls uk-width-4-5">
|
||||
<input type="text" id="youtube_playlist" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="uk-form-row uk-grid uk-grid-small">
|
||||
<label for="youtube_params" class="uk-form-label uk-width-1-5 hastip" title="<?php echo JText::_('WF_AGGREGATOR_YOUTUBE_PARAMS_DESC'); ?>"><?php echo JText::_('WF_AGGREGATOR_YOUTUBE_PARAMS'); ?></label>
|
||||
<div class="uk-width-4-5" id="youtube_params">
|
||||
<div class="uk-form-row uk-repeatable">
|
||||
<div class="uk-form-controls uk-grid uk-grid-small uk-width-9-10">
|
||||
<label class="uk-form-label uk-width-1-6"><?php echo JText::_('WF_LABEL_NAME'); ?></label>
|
||||
<div class="uk-form-controls uk-width-1-3">
|
||||
<input type="text" name="youtube_params_name[]" />
|
||||
</div>
|
||||
<label class="uk-form-label uk-width-1-6"><?php echo JText::_('WF_LABEL_VALUE'); ?></label>
|
||||
<div class="uk-form-controls uk-width-1-3">
|
||||
<input type="text" name="youtube_params_value[]" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-form-controls uk-margin-small-left">
|
||||
<button type="button" class="uk-button uk-button-link uk-repeatable-create"><i class="uk-icon-plus"></i></button>
|
||||
<button type="button" class="uk-button uk-button-link uk-repeatable-delete"><i class="uk-icon-trash"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
Reference in New Issue
Block a user