acf
This commit is contained in:
59
plugins/fields/acfvideo/acfvideo.php
Normal file
59
plugins/fields/acfvideo/acfvideo.php
Normal file
@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2020 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Form\Form;
|
||||
|
||||
JLoader::register('ACF_Field', JPATH_PLUGINS . '/system/acf/helper/plugin.php');
|
||||
|
||||
if (!class_exists('ACF_Field'))
|
||||
{
|
||||
Factory::getApplication()->enqueueMessage('Advanced Custom Fields System Plugin is missing', 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
class PlgFieldsACFVideo extends ACF_Field
|
||||
{
|
||||
/**
|
||||
* The form event. Load additional parameters when available into the field form.
|
||||
* Only when the type of the form is of interest.
|
||||
*
|
||||
* @param Form $form The form
|
||||
* @param stdClass $data The data
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 3.7.0
|
||||
*/
|
||||
public function onCustomFieldsPrepareDom($field, DOMElement $parent, Form $form)
|
||||
{
|
||||
if (!$fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Self Hosted Videos accept relative paths which won't pass the "url" validation
|
||||
if ($field->fieldparams->get('provider') != 'SelfHostedVideo')
|
||||
{
|
||||
$this->validate = 'url';
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->validate = null;
|
||||
$fieldNode->setAttribute('validate', '');
|
||||
}
|
||||
|
||||
return parent::onCustomFieldsPrepareDom($field, $parent, $form);
|
||||
}
|
||||
}
|
||||
36
plugins/fields/acfvideo/acfvideo.xml
Normal file
36
plugins/fields/acfvideo/acfvideo.xml
Normal file
@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<extension type="plugin" version="3.7.0" group="fields" method="upgrade">
|
||||
<name>ACF_VIDEO</name>
|
||||
<description>ACF_VIDEO_DESC</description>
|
||||
<author>Tassos Marinos</author>
|
||||
<creationDate>August 2023</creationDate>
|
||||
<copyright>Copyright (C) 2019 Tassos Marinos. All rights reserved.</copyright>
|
||||
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
|
||||
<authorEmail>info@tassos.gr</authorEmail>
|
||||
<authorUrl>www.tassos.gr</authorUrl>
|
||||
<version>1.0</version>
|
||||
<scriptfile>script.install.php</scriptfile>
|
||||
<files>
|
||||
<filename plugin="acfvideo">acfvideo.php</filename>
|
||||
<filename>script.install.helper.php</filename>
|
||||
<filename>version.php</filename>
|
||||
<folder>fields</folder>
|
||||
<folder>params</folder>
|
||||
<folder>tmpl</folder>
|
||||
<folder>language</folder>
|
||||
</files>
|
||||
<config>
|
||||
<fields name="params">
|
||||
<fieldset name="basic" addfieldpath="/plugins/system/nrframework/fields">
|
||||
<field name="enable_previewer" type="nrtoggle"
|
||||
label="ACF_VIDEO_ENABLE_PREVIEWER"
|
||||
description="ACF_VIDEO_ENABLE_PREVIEWER_DESC"
|
||||
checked="true"
|
||||
/>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</config>
|
||||
<media folder="media" destination="plg_fields_acfvideo">
|
||||
<folder>img</folder>
|
||||
</media>
|
||||
</extension>
|
||||
56
plugins/fields/acfvideo/fields/acfvideo.php
Normal file
56
plugins/fields/acfvideo/fields/acfvideo.php
Normal file
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2020 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Form\Field\TextField;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\CMS\Plugin\PluginHelper;
|
||||
use Joomla\Registry\Registry;
|
||||
|
||||
class JFormFieldACFVideo extends TextField
|
||||
{
|
||||
/**
|
||||
* Renders the input field with the video previewer.
|
||||
*
|
||||
* @return string The field input markup.
|
||||
*/
|
||||
protected function getInput()
|
||||
{
|
||||
$provider = (string) $this->element['provider'];
|
||||
|
||||
$xml = '
|
||||
<field name="' . $this->fieldname . '"
|
||||
type="TFVideoInput"
|
||||
provider="' . ($provider) . '"
|
||||
previewer_enabled="' . ($this->isPreviewerEnabled() ? 'true' : 'false') . '"
|
||||
/>
|
||||
';
|
||||
|
||||
$this->form->setField(new SimpleXMLElement($xml));
|
||||
$field = $this->form->getField($this->fieldname, null, $this->value);
|
||||
$field->name = $this->name;
|
||||
$field->id = $this->id;
|
||||
|
||||
return $field->getInput();
|
||||
}
|
||||
|
||||
private function isPreviewerEnabled()
|
||||
{
|
||||
$plugin = PluginHelper::getPlugin('fields', 'acfvideo');
|
||||
$params = new Registry($plugin->params);
|
||||
|
||||
return $params->get('enable_previewer', '1') === '1';
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,78 @@
|
||||
; @package Advanced Custom Fields
|
||||
; @version 2.8.8 Pro
|
||||
;
|
||||
; @author Tassos Marinos - http://www.tassos.gr/joomla-extensions
|
||||
; @copyright Copyright (c) 2019 Tassos Marinos. All rights reserved.
|
||||
; @license http://www.tassos.gr
|
||||
|
||||
PLG_FIELDS_ACFVIDEO_LABEL="ACF - Video"
|
||||
ACF_VIDEO="Fields - ACF Video"
|
||||
ACF_VIDEO_DESC="Enter a video from YouTube, Vimeo, Dailymotion, Facebook, or even self-hosted videos."
|
||||
ACF_VIDEO_VALUE_DESC="Enter a video URL."
|
||||
ACF_VIDEO_PROVIDER="Provider"
|
||||
ACF_VIDEO_PROVIDER_DESC="Select which provider to use to display the video."
|
||||
ACF_VIDEO_WIDTH="Video Width"
|
||||
ACF_VIDEO_WIDTH_DESC="Set the video's width."
|
||||
ACF_VIDEO_HEIGHT="Video Height"
|
||||
ACF_VIDEO_HEIGHT_DESC="Set the video's height."
|
||||
ACF_VIDEO_AUTOPLAY="Autoplay"
|
||||
ACF_VIDEO_AUTOPLAY_DESC="Set whether the video will automatically start to play when the player loads."
|
||||
ACF_VIDEO_AUTOPAUSE="Autopause"
|
||||
ACF_VIDEO_AUTOPAUSE_DESC="Set whether the video will be auto paused when it goes outside the viewport."
|
||||
ACF_VIDEO_CLOSED_CAPTIONS="Closed Captions"
|
||||
ACF_VIDEO_CLOSED_CAPTIONS_DESC="Enable to make closed captions to be shown by default, even if the user has turned captions off."
|
||||
ACF_VIDEO_COLOR="Color"
|
||||
ACF_VIDEO_COLOR_DESC="Set the color that will be used in the player's video progress bar to highlight the amount of the video that the viewer has already seen."
|
||||
ACF_VIDEO_COLOR_RED="Red"
|
||||
ACF_VIDEO_COLOR_WHITE="White"
|
||||
ACF_VIDEO_CONTROLS="Controls"
|
||||
ACF_VIDEO_CONTROLS_DESC="Set whether the video player controls are displayed."
|
||||
ACF_VIDEO_DISABLE_KEYBOARD="Disable Keyboard Shortcuts"
|
||||
ACF_VIDEO_DISABLE_KEYBOARD_DESC="Enable to make the player to not respond to keyboard controls."
|
||||
ACF_VIDEO_START="Start Time"
|
||||
ACF_VIDEO_START_DESC="Specify the time, measured in seconds from the start of the video, when the player will start playing the video."
|
||||
ACF_VIDEO_END="End Time"
|
||||
ACF_VIDEO_END_DESC="Specify the time, measured in seconds from the start of the video, when the player will stop playing the video."
|
||||
ACF_VIDEO_FULLSCREEN="Fullscreen"
|
||||
ACF_VIDEO_FULLSCREEN_DESC="Set whether to allow the video to be played in fullscreen mode."
|
||||
ACF_VIDEO_LOOP="Loop"
|
||||
ACF_VIDEO_LOOP_DESC="Set whether the player will repeatedly play the video."
|
||||
ACF_VIDEO_MODESTBRANDING="Modest Branding"
|
||||
ACF_VIDEO_MODESTBRANDING_DESC="Enable to prevent the YouTube logo from displaying in the control bar. Note that a small YouTube text label will still display in the upper-right corner of a paused video when the user's mouse pointer hovers over the player."
|
||||
ACF_VIDEO_REL="Related Videos"
|
||||
ACF_VIDEO_REL_DESC="Enable to show related videos when playback of the initial video ends."
|
||||
ACF_VIDEO_PRIVACY_MODE="Privacy-Enhanced Mode"
|
||||
ACF_VIDEO_PRIVACY_MODE_DESC="When you turn on privacy-enhanced mode, YouTube won't store information about visitors on your website unless they play the video."
|
||||
ACF_VIDEO_YOUTUBE="YouTube"
|
||||
ACF_VIDEO_DAILYMOTION="DailyMotion"
|
||||
ACF_VIDEO_VIMEO="Vimeo"
|
||||
ACF_VIDEO_FACEBOOK="Facebook"
|
||||
ACF_VIDEO_SELF_HOSTED_VIDEO="Self-Hosted Video"
|
||||
ACF_VIDEO_MUTE="Mute"
|
||||
ACF_VIDEO_MUTE_DESC="Whether to mute the video or not"
|
||||
ACF_VIDEO_COVER_IMAGE_TYPE="Cover Image Type"
|
||||
ACF_VIDEO_COVER_IMAGE_TYPE_DESC="Select the cover image type."
|
||||
ACF_VIDEO_COVER_IMAGE="Cover Image"
|
||||
ACF_VIDEO_SELECT_COVER_IMAGE="Select Cover Image"
|
||||
ACF_VIDEO_SELECT_COVER_IMAGE_DESC="Select a custom cover image."
|
||||
ACF_VIDEO_NO_COVER_IMAGE="No Cover Image"
|
||||
ACF_VIDEO_AUTO_COVER="Auto (From video provider)"
|
||||
ACF_VIDEO_CUSTOM="Custom"
|
||||
ACF_VIDEO_TITLE="Display Title"
|
||||
ACF_VIDEO_TITLE_DESC="Choose whether to display the title of the video, only if the owner allows it."
|
||||
ACF_VIDEO_BYLINE="Display Byline"
|
||||
ACF_VIDEO_BYLINE_DESC="Choose to display the video's byline, only if the owner allows it.<br><br>The byline is everything that is displayed right under the title. In most occassions it's the creator's username."
|
||||
ACF_VIDEO_PORTRAIT="Display Portrait"
|
||||
ACF_VIDEO_PORTRAIT_DESC="Choose to display the creator's portrait, only if the owner allows it."
|
||||
ACF_VIDEO_VIMEO_COLOR="UI Color"
|
||||
ACF_VIDEO_VIMEO_COLOR_DESC="Pick a color for the video's UI <br><br> This color will be used for the title, the byline and the player controls."
|
||||
ACF_VIDEO_PIP="Picture In Picture"
|
||||
ACF_VIDEO_PIP_DESC="Enable to show the picture-in-picture button in the control bar."
|
||||
ACF_VIDEO_FACEBOOKVIDEO_INCLUDEPOST="Include Post"
|
||||
ACF_VIDEO_FACEBOOKVIDEO_INCLUDEPOST_DESC="Enable to include the text from the Facebook post associated with the video, if any. Only available for desktop sites."
|
||||
ACF_VIDEO_FACEBOOKVIDEO_SHOWCAPTIONS="Show Captions"
|
||||
ACF_VIDEO_FACEBOOKVIDEO_SHOWCAPTIONS_DESC="Enable to show captions (if available) by default. Captions are only available on desktop."
|
||||
ACF_VIDEO_PREVIEW_VIDEO="Preview video"
|
||||
ACF_VIDEO_ENABLE_PREVIEWER="Enable Previewer"
|
||||
ACF_VIDEO_ENABLE_PREVIEWER_DESC="Set whether to enable the previewer upon finishing typing a URL when editing an item (article, contact, user, etc...)."
|
||||
ACF_VIDEO_TYPE_A_PROVIDER_VIDEO_URL="Type a%s video URL..."
|
||||
@ -0,0 +1,9 @@
|
||||
; @package Advanced Custom Fields
|
||||
; @version 2.8.8 Pro
|
||||
;
|
||||
; @author Tassos Marinos - http://www.tassos.gr/joomla-extensions
|
||||
; @copyright Copyright (c) 2019 Tassos Marinos. All rights reserved.
|
||||
; @license http://www.tassos.gr
|
||||
|
||||
ACF_VIDEO="Fields - ACF Video"
|
||||
ACF_VIDEO_DESC="Enter a video from YouTube, Vimeo, Dailymotion, Facebook, or even self-hosted videos."
|
||||
@ -0,0 +1,78 @@
|
||||
; @package Advanced Custom Fields
|
||||
; @version 2.8.8 Pro
|
||||
;
|
||||
; @author Tassos Marinos - http://www.tassos.gr/joomla-extensions
|
||||
; @copyright Copyright (c) 2019 Tassos Marinos. All rights reserved.
|
||||
; @license http://www.tassos.gr
|
||||
|
||||
PLG_FIELDS_ACFVIDEO_LABEL="ACF - Vídeo"
|
||||
ACF_VIDEO="Campos - ACF Vídeo"
|
||||
ACF_VIDEO_DESC="Ingrese un vídeo de YouTube, Vimeo, Dailymotion, Facebook o incluso vídeos auto hospedados."
|
||||
ACF_VIDEO_VALUE_DESC="Introduzca una URL de vídeo."
|
||||
ACF_VIDEO_PROVIDER="Proveedor"
|
||||
ACF_VIDEO_PROVIDER_DESC="Seleccione qué proveedor usar para mostrar el vídeo."
|
||||
ACF_VIDEO_WIDTH="Ancho del vídeo"
|
||||
ACF_VIDEO_WIDTH_DESC="Establezca el ancho del vídeo."
|
||||
ACF_VIDEO_HEIGHT="Altura del vídeo"
|
||||
ACF_VIDEO_HEIGHT_DESC="Establezca la altura del vídeo."
|
||||
ACF_VIDEO_AUTOPLAY="Auto-reproducción"
|
||||
ACF_VIDEO_AUTOPLAY_DESC="Establezca si el vídeo comenzará a reproducirse automáticamente cuando se cargue el reproductor."
|
||||
ACF_VIDEO_AUTOPAUSE="Pausa Automática"
|
||||
ACF_VIDEO_AUTOPAUSE_DESC="Establezca si el video se pausará automáticamente cuando salga de la ventana gráfica."
|
||||
ACF_VIDEO_CLOSED_CAPTIONS="Subtítulos"
|
||||
ACF_VIDEO_CLOSED_CAPTIONS_DESC="Habilite esta opción para que los subtítulos ocultos se muestren de forma predeterminada, incluso si el usuario los ha desactivado."
|
||||
ACF_VIDEO_COLOR="Color"
|
||||
ACF_VIDEO_COLOR_DESC="Establezca el color que se usará en la barra de progreso del video del reproductor para resaltar la cantidad de video que el espectador ya ha visto."
|
||||
ACF_VIDEO_COLOR_RED="Rojo"
|
||||
ACF_VIDEO_COLOR_WHITE="Blanco"
|
||||
ACF_VIDEO_CONTROLS="Controles"
|
||||
ACF_VIDEO_CONTROLS_DESC="Establezca si se muestran los controles del reproductor de video."
|
||||
ACF_VIDEO_DISABLE_KEYBOARD="Deshabilitar atajos de teclado"
|
||||
ACF_VIDEO_DISABLE_KEYBOARD_DESC="Habilite para hacer que el reproductor no responda a los controles del teclado."
|
||||
ACF_VIDEO_START="Tiempo de Inicio"
|
||||
ACF_VIDEO_START_DESC="Especifique el tiempo, medido en segundos desde el inicio del video, cuando el reproductor comenzará a reproducir el video."
|
||||
ACF_VIDEO_END="Tiempo Final"
|
||||
ACF_VIDEO_END_DESC="Especifique el tiempo, medido en segundos desde el inicio del video, cuando el reproductor dejará de reproducir el video."
|
||||
ACF_VIDEO_FULLSCREEN="Pantalla Completa"
|
||||
ACF_VIDEO_FULLSCREEN_DESC="Establezca si desea permitir que el video se reproduzca en modo de pantalla completa."
|
||||
ACF_VIDEO_LOOP="Bucle"
|
||||
ACF_VIDEO_LOOP_DESC="Establezca si el reproductor reproducirá repetidamente el vídeo."
|
||||
ACF_VIDEO_MODESTBRANDING="Logotipo"
|
||||
ACF_VIDEO_MODESTBRANDING_DESC="Habilite para evitar que el logotipo de YouTube se muestre en la barra de control. Tenga en cuenta que aún se mostrará una pequeña etiqueta de texto de YouTube en la esquina superior derecha de un video en pausa cuando el puntero del mouse del usuario se desplace sobre el reproductor."
|
||||
ACF_VIDEO_REL="Vídeos Relacionados"
|
||||
ACF_VIDEO_REL_DESC="Habilite para mostrar videos relacionados cuando finalice la reproducción del video inicial."
|
||||
ACF_VIDEO_PRIVACY_MODE="Modo de privacidad mejorada"
|
||||
ACF_VIDEO_PRIVACY_MODE_DESC="Cuando activa el modo de privacidad mejorada, YouTube no almacenará información sobre los visitantes en su sitio web a menos que reproduzcan el video."
|
||||
ACF_VIDEO_YOUTUBE="YouTube"
|
||||
ACF_VIDEO_DAILYMOTION="DailyMotion"
|
||||
ACF_VIDEO_VIMEO="Vimeo"
|
||||
ACF_VIDEO_FACEBOOK="Facebook"
|
||||
ACF_VIDEO_SELF_HOSTED_VIDEO="Vídeo Auto Hospedado"
|
||||
ACF_VIDEO_MUTE="Silencio "
|
||||
ACF_VIDEO_MUTE_DESC="Si silenciar el video o no"
|
||||
ACF_VIDEO_COVER_IMAGE_TYPE="Tipo de Imagen de Portada"
|
||||
ACF_VIDEO_COVER_IMAGE_TYPE_DESC="Seleccione el tipo de imagen de portada."
|
||||
ACF_VIDEO_COVER_IMAGE="Imagen de Portada"
|
||||
ACF_VIDEO_SELECT_COVER_IMAGE="Seleccione la Imagen de Portada"
|
||||
ACF_VIDEO_SELECT_COVER_IMAGE_DESC="Seleccione una imagen de portada personalizada."
|
||||
ACF_VIDEO_NO_COVER_IMAGE="Sín Imagen de Portada"
|
||||
ACF_VIDEO_AUTO_COVER="Automático (del proveedor de vídeo)"
|
||||
ACF_VIDEO_CUSTOM="Personalizar"
|
||||
ACF_VIDEO_TITLE="Mostrar Título"
|
||||
ACF_VIDEO_TITLE_DESC="Elija si desea mostrar el título del vídeo, solo si el propietario lo permite."
|
||||
ACF_VIDEO_BYLINE="Mostrar línea de autor"
|
||||
ACF_VIDEO_BYLINE_DESC="Elija mostrar la línea de autor del vídeo, solo si el propietario lo permite.<br><br>La línea de autor es todo lo que se muestra justo debajo del título. En la mayoría de ocasiones es el nombre de usuario del creador."
|
||||
ACF_VIDEO_PORTRAIT="Mostrar Retrato"
|
||||
ACF_VIDEO_PORTRAIT_DESC="Elija mostrar el retrato del creador, sólo si el propietario lo permite."
|
||||
ACF_VIDEO_VIMEO_COLOR="Color de IU"
|
||||
ACF_VIDEO_VIMEO_COLOR_DESC="Elija un color para la interfaz de usuario del video <br><br> Este color se usará para el título, la firma y los controles del reproductor."
|
||||
ACF_VIDEO_PIP="Imagen en imagen"
|
||||
ACF_VIDEO_PIP_DESC="Habilite para mostrar el botón de imagen en imagen en la barra de control."
|
||||
ACF_VIDEO_FACEBOOKVIDEO_INCLUDEPOST="Incluir Publicación"
|
||||
ACF_VIDEO_FACEBOOKVIDEO_INCLUDEPOST_DESC="Habilite para incluir el texto de la publicación de Facebook asociada con el video, si corresponde. Solo disponible para sitios de escritorio."
|
||||
ACF_VIDEO_FACEBOOKVIDEO_SHOWCAPTIONS="Mostrar Subtítulos"
|
||||
ACF_VIDEO_FACEBOOKVIDEO_SHOWCAPTIONS_DESC="Habilite para mostrar los subtítulos (si están disponibles) de forma predeterminada. Los subtítulos solo están disponibles en el escritorio."
|
||||
ACF_VIDEO_PREVIEW_VIDEO="Vista previa del vídeo"
|
||||
ACF_VIDEO_ENABLE_PREVIEWER="Habilitar Vista Previa"
|
||||
ACF_VIDEO_ENABLE_PREVIEWER_DESC="Establezca si desea habilitar la vista previa al terminar de escribir una URL al editar un elemento (artículo, contacto, usuario, etc.)."
|
||||
ACF_VIDEO_TYPE_A_PROVIDER_VIDEO_URL="Introduzca una URL de vídeo de %s ..."
|
||||
@ -0,0 +1,9 @@
|
||||
; @package Advanced Custom Fields
|
||||
; @version 2.8.8 Pro
|
||||
;
|
||||
; @author Tassos Marinos - http://www.tassos.gr/joomla-extensions
|
||||
; @copyright Copyright (c) 2019 Tassos Marinos. All rights reserved.
|
||||
; @license http://www.tassos.gr
|
||||
|
||||
ACF_VIDEO="Campos - ACF Vídeo"
|
||||
ACF_VIDEO_DESC="Ingrese un vídeo de YouTube, Vimeo, Dailymotion, Facebook o incluso vídeos auto hospedados."
|
||||
279
plugins/fields/acfvideo/params/acfvideo.xml
Normal file
279
plugins/fields/acfvideo/params/acfvideo.xml
Normal file
@ -0,0 +1,279 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<form>
|
||||
<fields name="fieldparams">
|
||||
<fieldset name="fieldparams">
|
||||
<field name="provider" type="NRImagesSelector"
|
||||
images='[
|
||||
{
|
||||
"key": "YouTube",
|
||||
"label": "YouTube",
|
||||
"url": "https://www.tassos.gr/images/apps/youtube.png"
|
||||
},
|
||||
{
|
||||
"key": "Vimeo",
|
||||
"label": "Vimeo",
|
||||
"url": "https://www.tassos.gr/images/apps/vimeo.png"
|
||||
},
|
||||
{
|
||||
"key": "FacebookVideo",
|
||||
"label": "Facebook Video",
|
||||
"url": "https://www.tassos.gr/images/apps/facebook.png"
|
||||
},
|
||||
{
|
||||
"key": "Dailymotion",
|
||||
"label": "Dailymotion",
|
||||
"url": "https://www.tassos.gr/images/apps/dailymotion.png"
|
||||
},
|
||||
{
|
||||
"key": "SelfHostedVideo",
|
||||
"label": "ACF_VIDEO_SELF_HOSTED_VIDEO",
|
||||
"url": "https://www.tassos.gr/images/icons/Video.svg"
|
||||
}
|
||||
]'
|
||||
columns="5"
|
||||
width="850px"
|
||||
image_width="90px"
|
||||
key_type="filename"
|
||||
label="ACF_VIDEO_PROVIDER"
|
||||
description="ACF_VIDEO_PROVIDER_DESC"
|
||||
default="YouTube"
|
||||
mode="links"
|
||||
/>
|
||||
<field name="width" type="NRResponsiveControl"
|
||||
class="is-one-line"
|
||||
label="ACF_VIDEO_WIDTH"
|
||||
description="ACF_VIDEO_WIDTH_DESC"
|
||||
default='{"desktop":{"value":"480","unit":"px"}}'
|
||||
subtype="TFUnitControl"
|
||||
subtype_hint="480"
|
||||
/>
|
||||
<field name="height" type="NRResponsiveControl"
|
||||
class="is-one-line"
|
||||
label="ACF_VIDEO_HEIGHT"
|
||||
description="ACF_VIDEO_HEIGHT_DESC"
|
||||
default='{"desktop":{"value":"270", "unit":"px"}}'
|
||||
subtype="TFUnitControl"
|
||||
subtype_hint="270"
|
||||
subtype_units="px,%,auto"
|
||||
showon="provider!:FacebookVideo"
|
||||
/>
|
||||
|
||||
<field name="autoplay" type="nrtoggle"
|
||||
label="ACF_VIDEO_AUTOPLAY"
|
||||
description="ACF_VIDEO_AUTOPLAY_DESC"
|
||||
showon="provider:YouTube,Vimeo,FacebookVideo"
|
||||
/>
|
||||
<field name="autopause" type="nrtoggle"
|
||||
label="ACF_VIDEO_AUTOPAUSE"
|
||||
description="ACF_VIDEO_AUTOPAUSE_DESC"
|
||||
showon="provider:YouTube,Vimeo,FacebookVideo,Dailymotion,SelfHostedVideo"
|
||||
/>
|
||||
<field name="fs" type="nrtoggle"
|
||||
label="ACF_VIDEO_FULLSCREEN"
|
||||
description="ACF_VIDEO_FULLSCREEN_DESC"
|
||||
checked="true"
|
||||
showon="provider:YouTube,FacebookVideo"
|
||||
/>
|
||||
<field name="controls" type="nrtoggle"
|
||||
label="ACF_VIDEO_CONTROLS"
|
||||
description="ACF_VIDEO_CONTROLS_DESC"
|
||||
checked="true"
|
||||
showon="provider:YouTube,Vimeo,Dailymotion"
|
||||
/>
|
||||
<field name="loop" type="nrtoggle"
|
||||
label="ACF_VIDEO_LOOP"
|
||||
description="ACF_VIDEO_LOOP_DESC"
|
||||
showon="provider!:Dailymotion,FacebookVideo,SelfHostedVideo"
|
||||
/>
|
||||
<field name="mute" type="nrtoggle"
|
||||
label="ACF_VIDEO_MUTE"
|
||||
description="ACF_VIDEO_MUTE_DESC"
|
||||
showon="provider!:FacebookVideo,SelfHostedVideo"
|
||||
/>
|
||||
<field name="disablekb" type="nrtoggle"
|
||||
label="ACF_VIDEO_DISABLE_KEYBOARD"
|
||||
description="ACF_VIDEO_DISABLE_KEYBOARD_DESC"
|
||||
showon="provider:YouTube,Vimeo"
|
||||
/>
|
||||
<field name="start" type="nrnumber"
|
||||
label="ACF_VIDEO_START"
|
||||
description="ACF_VIDEO_START_DESC"
|
||||
addon="seconds"
|
||||
hint="0"
|
||||
class="input-small"
|
||||
default="0"
|
||||
showon="provider:YouTube,Vimeo,Dailymotion"
|
||||
/>
|
||||
<field name="end" type="nrnumber"
|
||||
label="ACF_VIDEO_END"
|
||||
description="ACF_VIDEO_END_DESC"
|
||||
addon="seconds"
|
||||
hint="0"
|
||||
class="input-small"
|
||||
default="0"
|
||||
showon="provider:YouTube,Vimeo,Dailymotion"
|
||||
/>
|
||||
|
||||
<field name="selfhostedvideo_autoplay" type="nrtoggle"
|
||||
label="ACF_VIDEO_AUTOPLAY"
|
||||
description="ACF_VIDEO_AUTOPLAY_DESC"
|
||||
showon="provider:SelfHostedVideo"
|
||||
/>
|
||||
<field name="selfhostedvideo_controls" type="nrtoggle"
|
||||
label="ACF_VIDEO_CONTROLS"
|
||||
description="ACF_VIDEO_CONTROLS_DESC"
|
||||
checked="true"
|
||||
showon="provider:SelfHostedVideo"
|
||||
/>
|
||||
<field name="selfhostedvideo_loop" type="nrtoggle"
|
||||
label="ACF_VIDEO_LOOP"
|
||||
description="ACF_VIDEO_LOOP_DESC"
|
||||
showon="provider:SelfHostedVideo"
|
||||
/>
|
||||
<field name="selfhostedvideo_mute" type="nrtoggle"
|
||||
label="ACF_VIDEO_MUTE"
|
||||
description="ACF_VIDEO_MUTE_DESC"
|
||||
showon="provider:SelfHostedVideo"
|
||||
/>
|
||||
|
||||
|
||||
<!-- Providers Labels -->
|
||||
<field type="spacer" name="yt_label"
|
||||
label="ACF_VIDEO_YOUTUBE"
|
||||
class="acf"
|
||||
showon="provider:YouTube"
|
||||
/>
|
||||
<field type="spacer" name="vimeo_label"
|
||||
label="ACF_VIDEO_VIMEO"
|
||||
class="acf"
|
||||
showon="provider:Vimeo"
|
||||
/>
|
||||
<field type="spacer" name="fb_label"
|
||||
label="ACF_VIDEO_FACEBOOK"
|
||||
class="acf"
|
||||
showon="provider:FacebookVideo"
|
||||
/>
|
||||
<field type="spacer" name="selfhosted_label"
|
||||
label="ACF_VIDEO_SELF_HOSTED_VIDEO"
|
||||
class="acf"
|
||||
showon="provider:SelfHostedVideo"
|
||||
/>
|
||||
|
||||
<!-- YouTube Specific Params -->
|
||||
|
||||
<field name="cc_load_policy" type="nrtoggle"
|
||||
label="ACF_VIDEO_CLOSED_CAPTIONS"
|
||||
description="ACF_VIDEO_CLOSED_CAPTIONS_DESC"
|
||||
showon="provider:YouTube"
|
||||
/>
|
||||
<field name="modestbranding" type="nrtoggle"
|
||||
label="ACF_VIDEO_MODESTBRANDING"
|
||||
description="ACF_VIDEO_MODESTBRANDING_DESC"
|
||||
showon="provider:YouTube"
|
||||
/>
|
||||
<field name="rel" type="nrtoggle"
|
||||
label="ACF_VIDEO_REL"
|
||||
description="ACF_VIDEO_REL_DESC"
|
||||
checked="true"
|
||||
showon="provider:YouTube"
|
||||
/>
|
||||
<field name="youtube_color" type="list"
|
||||
label="ACF_VIDEO_COLOR"
|
||||
description="ACF_VIDEO_COLOR_DESC"
|
||||
showon="provider:YouTube"
|
||||
default="red">
|
||||
<option value="red">ACF_VIDEO_COLOR_RED</option>
|
||||
<option value="white">ACF_VIDEO_COLOR_WHITE</option>
|
||||
</field>
|
||||
|
||||
<field name="privacyMode" type="nrtoggle"
|
||||
label="ACF_VIDEO_PRIVACY_MODE"
|
||||
description="ACF_VIDEO_PRIVACY_MODE_DESC"
|
||||
showon="provider:YouTube,Vimeo"
|
||||
/>
|
||||
|
||||
<!-- Vimeo Specific Params -->
|
||||
|
||||
<field name="title" type="nrtoggle"
|
||||
label="ACF_VIDEO_TITLE"
|
||||
description="ACF_VIDEO_TITLE_DESC"
|
||||
checked="true"
|
||||
showon="provider:Vimeo"
|
||||
/>
|
||||
<field name="byline" type="nrtoggle"
|
||||
label="ACF_VIDEO_BYLINE"
|
||||
description="ACF_VIDEO_BYLINE_DESC"
|
||||
checked="true"
|
||||
showon="provider:Vimeo"
|
||||
/>
|
||||
<field name="portrait" type="nrtoggle"
|
||||
label="ACF_VIDEO_PORTRAIT"
|
||||
description="ACF_VIDEO_PORTRAIT_DESC"
|
||||
showon="provider:Vimeo"
|
||||
/>
|
||||
<field name="pip" type="nrtoggle"
|
||||
label="ACF_VIDEO_PIP"
|
||||
description="ACF_VIDEO_PIP_DESC"
|
||||
showon="provider:Vimeo"
|
||||
/>
|
||||
<field name="vimeo_color" type="color"
|
||||
label="ACF_VIDEO_VIMEO_COLOR"
|
||||
description="ACF_VIDEO_VIMEO_COLOR_DESC"
|
||||
default="#00adef"
|
||||
showon="provider:Vimeo"
|
||||
/>
|
||||
|
||||
|
||||
<!-- Facebook Specific Params -->
|
||||
|
||||
<field name="show_text" type="nrtoggle"
|
||||
label="ACF_VIDEO_FACEBOOKVIDEO_INCLUDEPOST"
|
||||
description="ACF_VIDEO_FACEBOOKVIDEO_INCLUDEPOST_DESC"
|
||||
showon="provider:FacebookVideo"
|
||||
/>
|
||||
<field name="show_captions" type="nrtoggle"
|
||||
label="ACF_VIDEO_FACEBOOKVIDEO_SHOWCAPTIONS"
|
||||
description="ACF_VIDEO_FACEBOOKVIDEO_SHOWCAPTIONS_DESC"
|
||||
showon="provider:FacebookVideo"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Self Hosted Video -->
|
||||
<field name="preload" type="list"
|
||||
label="ACF_PRELOAD"
|
||||
description="ACF_PRELOAD_DESC"
|
||||
default="auto"
|
||||
showon="provider:SelfHostedVideo">
|
||||
<option value="metadata">ACF_METADATA</option>
|
||||
<option value="auto">NR_AUTO</option>
|
||||
<option value="none">JNONE</option>
|
||||
</field>
|
||||
|
||||
<!-- Cover Image -->
|
||||
<field type="spacer" name="cover_image_label"
|
||||
label="ACF_VIDEO_COVER_IMAGE"
|
||||
showon="provider:YouTube,Vimeo,Dailymotion"
|
||||
class="acf"
|
||||
/>
|
||||
|
||||
<field name="coverImageType" type="list"
|
||||
label="ACF_VIDEO_COVER_IMAGE_TYPE"
|
||||
description="ACF_VIDEO_COVER_IMAGE_TYPE_DESC"
|
||||
showon="provider:YouTube,Vimeo,Dailymotion"
|
||||
default="none">
|
||||
<option value="none">ACF_VIDEO_NO_COVER_IMAGE</option>
|
||||
<option value="auto">ACF_VIDEO_AUTO_COVER</option>
|
||||
<option value="custom">ACF_VIDEO_CUSTOM</option>
|
||||
</field>
|
||||
<field name="coverImage" type="media"
|
||||
label="ACF_VIDEO_SELECT_COVER_IMAGE"
|
||||
description="ACF_VIDEO_SELECT_COVER_IMAGE_DESC"
|
||||
showon="provider:YouTube,Vimeo,Dailymotion[AND]coverImageType:custom"
|
||||
/>
|
||||
|
||||
|
||||
</fieldset>
|
||||
</fields>
|
||||
</form>
|
||||
691
plugins/fields/acfvideo/script.install.helper.php
Normal file
691
plugins/fields/acfvideo/script.install.helper.php
Normal file
@ -0,0 +1,691 @@
|
||||
<?php
|
||||
/**
|
||||
* Installer Script Helper
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2016 Tassos Marinos All Rights Reserved
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Installer\Installer;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\Filesystem\File;
|
||||
use Joomla\Filesystem\Folder;
|
||||
|
||||
class PlgFieldsAcfvideoInstallerScriptHelper
|
||||
{
|
||||
public $name = '';
|
||||
public $alias = '';
|
||||
public $extname = '';
|
||||
public $extension_type = '';
|
||||
public $plugin_folder = 'system';
|
||||
public $module_position = 'status';
|
||||
public $client_id = 1;
|
||||
public $install_type = 'install';
|
||||
public $show_message = true;
|
||||
public $autopublish = true;
|
||||
public $db = null;
|
||||
public $app = null;
|
||||
public $installedVersion;
|
||||
|
||||
public function __construct(&$params)
|
||||
{
|
||||
$this->extname = $this->extname ?: $this->alias;
|
||||
$this->db = Factory::getDbo();
|
||||
$this->app = Factory::getApplication();
|
||||
$this->installedVersion = $this->getVersion($this->getInstalledXMLFile());
|
||||
}
|
||||
|
||||
/**
|
||||
* Preflight event
|
||||
*
|
||||
* @param string
|
||||
* @param JAdapterInstance
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function preflight($route, $adapter)
|
||||
{
|
||||
if (!in_array($route, array('install', 'update')))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Factory::getLanguage()->load('plg_system_novaraininstaller', JPATH_PLUGINS . '/system/novaraininstaller');
|
||||
|
||||
if ($this->show_message && $this->isInstalled())
|
||||
{
|
||||
$this->install_type = 'update';
|
||||
}
|
||||
|
||||
if ($this->onBeforeInstall() === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Preflight event
|
||||
*
|
||||
* @param string
|
||||
* @param JAdapterInstance
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function postflight($route, $adapter)
|
||||
{
|
||||
Factory::getLanguage()->load($this->getPrefix() . '_' . $this->extname, $this->getMainFolder());
|
||||
|
||||
if (!in_array($route, array('install', 'update')))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ($this->onAfterInstall() === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($route == 'install' && $this->autopublish)
|
||||
{
|
||||
$this->publishExtension();
|
||||
}
|
||||
|
||||
if ($this->show_message)
|
||||
{
|
||||
$this->addInstalledMessage();
|
||||
}
|
||||
|
||||
Factory::getCache()->clean('com_plugins');
|
||||
Factory::getCache()->clean('_system');
|
||||
}
|
||||
|
||||
public function isInstalled()
|
||||
{
|
||||
if (!is_file($this->getInstalledXMLFile()))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$query = $this->db->getQuery(true)
|
||||
->select('extension_id')
|
||||
->from('#__extensions')
|
||||
->where($this->db->quoteName('type') . ' = ' . $this->db->quote($this->extension_type))
|
||||
->where($this->db->quoteName('element') . ' = ' . $this->db->quote($this->getElementName()));
|
||||
$this->db->setQuery($query, 0, 1);
|
||||
$result = $this->db->loadResult();
|
||||
|
||||
return empty($result) ? false : true;
|
||||
}
|
||||
|
||||
public function getMainFolder()
|
||||
{
|
||||
switch ($this->extension_type)
|
||||
{
|
||||
case 'plugin' :
|
||||
return JPATH_SITE . '/plugins/' . $this->plugin_folder . '/' . $this->extname;
|
||||
|
||||
case 'component' :
|
||||
return JPATH_ADMINISTRATOR . '/components/com_' . $this->extname;
|
||||
|
||||
case 'module' :
|
||||
return JPATH_ADMINISTRATOR . '/modules/mod_' . $this->extname;
|
||||
|
||||
case 'library' :
|
||||
return JPATH_SITE . '/libraries/' . $this->extname;
|
||||
}
|
||||
}
|
||||
|
||||
public function getInstalledXMLFile()
|
||||
{
|
||||
return $this->getXMLFile($this->getMainFolder());
|
||||
}
|
||||
|
||||
public function getCurrentXMLFile()
|
||||
{
|
||||
return $this->getXMLFile(__DIR__);
|
||||
}
|
||||
|
||||
public function getXMLFile($folder)
|
||||
{
|
||||
switch ($this->extension_type)
|
||||
{
|
||||
case 'module' :
|
||||
return $folder . '/mod_' . $this->extname . '.xml';
|
||||
default :
|
||||
return $folder . '/' . $this->extname . '.xml';
|
||||
}
|
||||
}
|
||||
|
||||
public function foldersExist($folders = array())
|
||||
{
|
||||
foreach ($folders as $folder)
|
||||
{
|
||||
if (is_dir($folder))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function publishExtension()
|
||||
{
|
||||
switch ($this->extension_type)
|
||||
{
|
||||
case 'plugin' :
|
||||
$this->publishPlugin();
|
||||
|
||||
case 'module' :
|
||||
$this->publishModule();
|
||||
}
|
||||
}
|
||||
|
||||
public function publishPlugin()
|
||||
{
|
||||
$query = $this->db->getQuery(true)
|
||||
->update('#__extensions')
|
||||
->set($this->db->quoteName('enabled') . ' = 1')
|
||||
->where($this->db->quoteName('type') . ' = ' . $this->db->quote('plugin'))
|
||||
->where($this->db->quoteName('element') . ' = ' . $this->db->quote($this->extname))
|
||||
->where($this->db->quoteName('folder') . ' = ' . $this->db->quote($this->plugin_folder));
|
||||
$this->db->setQuery($query);
|
||||
$this->db->execute();
|
||||
}
|
||||
|
||||
public function publishModule()
|
||||
{
|
||||
// Get module id
|
||||
$query = $this->db->getQuery(true)
|
||||
->select('id')
|
||||
->from('#__modules')
|
||||
->where($this->db->quoteName('module') . ' = ' . $this->db->quote('mod_' . $this->extname))
|
||||
->where($this->db->quoteName('client_id') . ' = ' . (int) $this->client_id);
|
||||
$this->db->setQuery($query, 0, 1);
|
||||
$id = $this->db->loadResult();
|
||||
|
||||
if (!$id)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// check if module is already in the modules_menu table (meaning is is already saved)
|
||||
$query->clear()
|
||||
->select('moduleid')
|
||||
->from('#__modules_menu')
|
||||
->where($this->db->quoteName('moduleid') . ' = ' . (int) $id);
|
||||
$this->db->setQuery($query, 0, 1);
|
||||
$exists = $this->db->loadResult();
|
||||
|
||||
if ($exists)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Get highest ordering number in position
|
||||
$query->clear()
|
||||
->select('ordering')
|
||||
->from('#__modules')
|
||||
->where($this->db->quoteName('position') . ' = ' . $this->db->quote($this->module_position))
|
||||
->where($this->db->quoteName('client_id') . ' = ' . (int) $this->client_id)
|
||||
->order('ordering DESC');
|
||||
$this->db->setQuery($query, 0, 1);
|
||||
$ordering = $this->db->loadResult();
|
||||
$ordering++;
|
||||
|
||||
// publish module and set ordering number
|
||||
$query->clear()
|
||||
->update('#__modules')
|
||||
->set($this->db->quoteName('published') . ' = 1')
|
||||
->set($this->db->quoteName('ordering') . ' = ' . (int) $ordering)
|
||||
->set($this->db->quoteName('position') . ' = ' . $this->db->quote($this->module_position))
|
||||
->where($this->db->quoteName('id') . ' = ' . (int) $id);
|
||||
$this->db->setQuery($query);
|
||||
$this->db->execute();
|
||||
|
||||
// add module to the modules_menu table
|
||||
$query->clear()
|
||||
->insert('#__modules_menu')
|
||||
->columns(array($this->db->quoteName('moduleid'), $this->db->quoteName('menuid')))
|
||||
->values((int) $id . ', 0');
|
||||
$this->db->setQuery($query);
|
||||
$this->db->execute();
|
||||
}
|
||||
|
||||
public function addInstalledMessage()
|
||||
{
|
||||
Factory::getApplication()->enqueueMessage(
|
||||
Text::sprintf(
|
||||
Text::_($this->install_type == 'update' ? 'NRI_THE_EXTENSION_HAS_BEEN_UPDATED_SUCCESSFULLY' : 'NRI_THE_EXTENSION_HAS_BEEN_INSTALLED_SUCCESSFULLY'),
|
||||
'<strong>' . Text::_($this->name) . '</strong>',
|
||||
'<strong>' . $this->getVersion() . '</strong>',
|
||||
$this->getFullType()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public function getPrefix()
|
||||
{
|
||||
switch ($this->extension_type)
|
||||
{
|
||||
case 'plugin';
|
||||
return Text::_('plg_' . strtolower($this->plugin_folder));
|
||||
|
||||
case 'component':
|
||||
return Text::_('com');
|
||||
|
||||
case 'module':
|
||||
return Text::_('mod');
|
||||
|
||||
case 'library':
|
||||
return Text::_('lib');
|
||||
|
||||
default:
|
||||
return $this->extension_type;
|
||||
}
|
||||
}
|
||||
|
||||
public function getElementName($type = null, $extname = null)
|
||||
{
|
||||
$type = is_null($type) ? $this->extension_type : $type;
|
||||
$extname = is_null($extname) ? $this->extname : $extname;
|
||||
|
||||
switch ($type)
|
||||
{
|
||||
case 'component' :
|
||||
return 'com_' . $extname;
|
||||
|
||||
case 'module' :
|
||||
return 'mod_' . $extname;
|
||||
|
||||
case 'plugin' :
|
||||
default:
|
||||
return $extname;
|
||||
}
|
||||
}
|
||||
|
||||
public function getFullType()
|
||||
{
|
||||
return Text::_('NRI_' . strtoupper($this->getPrefix()));
|
||||
}
|
||||
|
||||
public function isPro()
|
||||
{
|
||||
$versionFile = __DIR__ . "/version.php";
|
||||
|
||||
// If version file does not exist we assume a PRO version
|
||||
if (!is_file($versionFile))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Load version file
|
||||
require_once $versionFile;
|
||||
return (bool) $NR_PRO;
|
||||
}
|
||||
|
||||
public function getVersion($file = '')
|
||||
{
|
||||
$file = $file ?: $this->getCurrentXMLFile();
|
||||
|
||||
if (!is_file($file))
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
$xml = Installer::parseXMLInstallFile($file);
|
||||
|
||||
if (!$xml || !isset($xml['version']))
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
return $xml['version'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks wether the extension can be installed or not
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function canInstall()
|
||||
{
|
||||
// The extension is not installed yet. Accept Install.
|
||||
if (!$installed_version = $this->getVersion($this->getInstalledXMLFile()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Path to extension's version file
|
||||
$versionFile = $this->getMainFolder() . "/version.php";
|
||||
$NR_PRO = true;
|
||||
|
||||
// If version file does not exist we assume we have a PRO version installed
|
||||
if (file_exists($versionFile))
|
||||
{
|
||||
require_once($versionFile);
|
||||
}
|
||||
|
||||
// The free version is installed. Accept install.
|
||||
if (!(bool)$NR_PRO)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Current package is a PRO version. Accept install.
|
||||
if ($this->isPro())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// User is trying to update from PRO version to FREE. Do not accept install.
|
||||
Factory::getLanguage()->load($this->getPrefix() . '_' . $this->extname, __DIR__);
|
||||
|
||||
Factory::getApplication()->enqueueMessage(
|
||||
Text::_('NRI_ERROR_PRO_TO_FREE'), 'error'
|
||||
);
|
||||
|
||||
Factory::getApplication()->enqueueMessage(
|
||||
html_entity_decode(
|
||||
Text::sprintf(
|
||||
'NRI_ERROR_UNINSTALL_FIRST',
|
||||
'<a href="http://www.tassos.gr/joomla-extensions/' . $this->getUrlAlias() . '" target="_blank">',
|
||||
'</a>',
|
||||
Text::_($this->name)
|
||||
)
|
||||
), 'error'
|
||||
);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the URL alias of the extension.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function getUrlAlias()
|
||||
{
|
||||
$alias = $this->alias;
|
||||
|
||||
switch ($alias)
|
||||
{
|
||||
case 'smilepack':
|
||||
$alias = 'smile-pack';
|
||||
break;
|
||||
case 'convertforms':
|
||||
$alias = 'convert-forms';
|
||||
break;
|
||||
case 'rstbox':
|
||||
$alias = 'engagebox';
|
||||
break;
|
||||
case 'gsd':
|
||||
$alias = 'google-structured-data';
|
||||
break;
|
||||
}
|
||||
|
||||
// ACF
|
||||
if ($this->plugin_folder === 'fields' && ($alias === 'acf' || $this->startsWith($alias, 'acf')))
|
||||
{
|
||||
$alias = 'advanced-custom-fields';
|
||||
}
|
||||
|
||||
return $alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether string starts with substring.
|
||||
*
|
||||
* @param string $string
|
||||
* @param string $query
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function startsWith($string, $query)
|
||||
{
|
||||
return substr($string, 0, strlen($query)) === $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if current version is newer than the installed one
|
||||
* Used for Novarain Framework
|
||||
*
|
||||
* @return boolean [description]
|
||||
*/
|
||||
public function isNewer()
|
||||
{
|
||||
if (!$installed_version = $this->getVersion($this->getInstalledXMLFile()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
$package_version = $this->getVersion();
|
||||
|
||||
return version_compare($installed_version, $package_version, '<=');
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method triggered before installation
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function onBeforeInstall()
|
||||
{
|
||||
if (!$this->canInstall())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method triggered after installation
|
||||
*/
|
||||
public function onAfterInstall()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete files
|
||||
*
|
||||
* @param array $folders
|
||||
*/
|
||||
public function deleteFiles($files = array())
|
||||
{
|
||||
foreach ($files as $key => $file)
|
||||
{
|
||||
if (!is_file($file))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
File::delete($file);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes folders
|
||||
*
|
||||
* @param array $folders
|
||||
*/
|
||||
public function deleteFolders($folders = array())
|
||||
{
|
||||
foreach ($folders as $folder)
|
||||
{
|
||||
if (!is_dir($folder))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Folder::delete($folder);
|
||||
}
|
||||
}
|
||||
|
||||
public function dropIndex($table, $index)
|
||||
{
|
||||
$db = $this->db;
|
||||
|
||||
// Check if index exists first
|
||||
$query = 'SHOW INDEX FROM ' . $db->quoteName('#__' . $table) . ' WHERE KEY_NAME = ' . $db->quote($index);
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
|
||||
if (!$db->loadResult())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove index
|
||||
$query = 'ALTER TABLE ' . $db->quoteName('#__' . $table) . ' DROP INDEX ' . $db->quoteName($index);
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
}
|
||||
|
||||
public function dropUnwantedTables($tables) {
|
||||
|
||||
if (!$tables) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($tables as $table) {
|
||||
$query = "DROP TABLE IF EXISTS #__".$this->db->escape($table);
|
||||
$this->db->setQuery($query);
|
||||
$this->db->execute();
|
||||
}
|
||||
}
|
||||
|
||||
public function dropUnwantedColumns($table, $columns) {
|
||||
|
||||
if (!$columns || !$table) {
|
||||
return;
|
||||
}
|
||||
|
||||
$db = $this->db;
|
||||
|
||||
// Check if columns exists in database
|
||||
function qt($n) {
|
||||
return(Factory::getDBO()->quote($n));
|
||||
}
|
||||
|
||||
$query = 'SHOW COLUMNS FROM #__'.$table.' WHERE Field IN ('.implode(",", array_map("qt", $columns)).')';
|
||||
$db->setQuery($query);
|
||||
$rows = $db->loadColumn(0);
|
||||
|
||||
// Abort if we don't have any rows
|
||||
if (!$rows) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Let's remove the columns
|
||||
$q = "";
|
||||
foreach ($rows as $key => $column) {
|
||||
$comma = (($key+1) < count($rows)) ? "," : "";
|
||||
$q .= "drop ".$this->db->escape($column).$comma;
|
||||
}
|
||||
|
||||
$query = "alter table #__".$table." $q";
|
||||
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
}
|
||||
|
||||
public function fetch($table, $columns = "*", $where = null, $singlerow = false) {
|
||||
if (!$table) {
|
||||
return;
|
||||
}
|
||||
|
||||
$db = $this->db;
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
$query
|
||||
->select($columns)
|
||||
->from("#__$table");
|
||||
|
||||
if (isset($where)) {
|
||||
$query->where("$where");
|
||||
}
|
||||
|
||||
$db->setQuery($query);
|
||||
|
||||
return ($singlerow) ? $db->loadObject() : $db->loadObjectList();
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the Novarain Framework
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function loadFramework()
|
||||
{
|
||||
if (is_file(JPATH_PLUGINS . '/system/nrframework/autoload.php'))
|
||||
{
|
||||
include_once JPATH_PLUGINS . '/system/nrframework/autoload.php';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Re-orders plugin after passed array of plugins
|
||||
*
|
||||
* @param string $plugin Plugin element name
|
||||
* @param array $lowerPluginOrder Array of plugin element names
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function pluginOrderAfter($lowerPluginOrder)
|
||||
{
|
||||
|
||||
if (!is_array($lowerPluginOrder) || !count($lowerPluginOrder))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$db = $this->db;
|
||||
|
||||
// Get plugins max order
|
||||
$query = $db->getQuery(true);
|
||||
$query
|
||||
->select($db->quoteName('b.ordering'))
|
||||
->from($db->quoteName('#__extensions', 'b'))
|
||||
->where($db->quoteName('b.element') . ' IN ("'.implode("\",\"",$lowerPluginOrder).'")')
|
||||
->order('b.ordering desc');
|
||||
|
||||
$db->setQuery($query);
|
||||
$maxOrder = $db->loadResult();
|
||||
|
||||
if (is_null($maxOrder))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Get plugin details
|
||||
$query
|
||||
->clear()
|
||||
->select(array($db->quoteName('extension_id'), $db->quoteName('ordering')))
|
||||
->from($db->quoteName('#__extensions'))
|
||||
->where($db->quoteName('element') . ' = ' . $db->quote($this->alias));
|
||||
|
||||
$db->setQuery($query);
|
||||
$pluginInfo = $db->loadObject();
|
||||
|
||||
if (!isset($pluginInfo->ordering) || $pluginInfo->ordering > $maxOrder)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Update the new plugin order
|
||||
$object = new stdClass();
|
||||
$object->extension_id = $pluginInfo->extension_id;
|
||||
$object->ordering = ($maxOrder + 1);
|
||||
|
||||
try {
|
||||
$db->updateObject('#__extensions', $object, 'extension_id');
|
||||
} catch (Exception $e) {
|
||||
return $e->getMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
43
plugins/fields/acfvideo/script.install.php
Normal file
43
plugins/fields/acfvideo/script.install.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2019 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\Filesystem\File;
|
||||
|
||||
require_once __DIR__ . '/script.install.helper.php';
|
||||
|
||||
class PlgFieldsACFVideoInstallerScript extends PlgFieldsACFVideoInstallerScriptHelper
|
||||
{
|
||||
public $alias = 'acfvideo';
|
||||
public $extension_type = 'plugin';
|
||||
public $plugin_folder = 'fields';
|
||||
public $show_message = false;
|
||||
|
||||
/**
|
||||
* Helper method triggered before installation
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function onBeforeInstall()
|
||||
{
|
||||
// If version.php doesn't exist, copy it from the system plugin
|
||||
if ($this->isInstalled() && !file_exists($this->getMainFolder() . '/version.php'))
|
||||
{
|
||||
$systemVersionPath = JPATH_SITE . '/plugins/system/acf/version.php';
|
||||
|
||||
$result = File::copy($systemVersionPath, $this->getMainFolder() . '/version.php');
|
||||
}
|
||||
|
||||
return parent::onBeforeInstall();
|
||||
}
|
||||
}
|
||||
27
plugins/fields/acfvideo/tmpl/acfvideo.php
Normal file
27
plugins/fields/acfvideo/tmpl/acfvideo.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2021 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
if (!$provider = $fieldParams->get('provider', 'YouTube'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$file = __DIR__ . '/providers/' . strtolower($provider) . '.php';
|
||||
if(!file_exists($file))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Display selected widget
|
||||
require $file;
|
||||
41
plugins/fields/acfvideo/tmpl/providers/dailymotion.php
Normal file
41
plugins/fields/acfvideo/tmpl/providers/dailymotion.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2019 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
if (!$videoURL = $field->value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$payload = [
|
||||
'value' => $videoURL,
|
||||
'width' => $fieldParams->get('width', '480px'),
|
||||
'height' => $fieldParams->get('height', '270px'),
|
||||
|
||||
'mute' => $fieldParams->get('mute', '0') === '1',
|
||||
'loop' => $fieldParams->get('loop', '0') === '1',
|
||||
'autopause' => $fieldParams->get('autopause', '0') === '1',
|
||||
'start' => $fieldParams->get('start', ''),
|
||||
'end' => $fieldParams->get('end', ''),
|
||||
'coverImageType' => $fieldParams->get('coverImageType', false),
|
||||
'coverImage' => $fieldParams->get('coverImage', ''),
|
||||
|
||||
];
|
||||
|
||||
// Set custom layout
|
||||
if ($field->params->get('acf_layout_override'))
|
||||
{
|
||||
$payload['layout'] = $field->params->get('acf_layout_override');
|
||||
}
|
||||
|
||||
echo \NRFramework\Widgets\Helper::render('Dailymotion', $payload);
|
||||
39
plugins/fields/acfvideo/tmpl/providers/facebookvideo.php
Normal file
39
plugins/fields/acfvideo/tmpl/providers/facebookvideo.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2019 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
if (!$videoURL = $field->value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$payload = [
|
||||
'value' => $videoURL,
|
||||
'width' => $fieldParams->get('width', '480px'),
|
||||
'height' => null,
|
||||
|
||||
'fs' => $fieldParams->get('fs', '1') === '1',
|
||||
'autoplay' => $fieldParams->get('autoplay', '0') === '1',
|
||||
'autopause' => $fieldParams->get('autopause', '0') === '1',
|
||||
'show_text' => $fieldParams->get('show_text', '0') === '1',
|
||||
'show_captions' => $fieldParams->get('show_captions', '0') === '1',
|
||||
|
||||
];
|
||||
|
||||
// Set custom layout
|
||||
if ($field->params->get('acf_layout_override'))
|
||||
{
|
||||
$payload['layout'] = $field->params->get('acf_layout_override');
|
||||
}
|
||||
|
||||
echo \NRFramework\Widgets\Helper::render('FacebookVideo', $payload);
|
||||
0
plugins/fields/acfvideo/tmpl/providers/index.php
Normal file
0
plugins/fields/acfvideo/tmpl/providers/index.php
Normal file
40
plugins/fields/acfvideo/tmpl/providers/selfhostedvideo.php
Normal file
40
plugins/fields/acfvideo/tmpl/providers/selfhostedvideo.php
Normal file
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2019 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
if (!$videoURL = $field->value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$payload = [
|
||||
'value' => $videoURL,
|
||||
'width' => $fieldParams->get('width', '480px'),
|
||||
'height' => $fieldParams->get('height', '270px'),
|
||||
'preload' => $fieldParams->get('preload', 'auto'),
|
||||
|
||||
'autopause' => $fieldParams->get('autopause', '0') === '1',
|
||||
|
||||
'autoplay' => $fieldParams->get('selfhostedvideo_autoplay', '0') === '1',
|
||||
'controls' => $fieldParams->get('selfhostedvideo_controls', '0') === '1',
|
||||
'loop' => $fieldParams->get('selfhostedvideo_loop', '0') === '1',
|
||||
'mute' => $fieldParams->get('selfhostedvideo_mute', '0') === '1'
|
||||
];
|
||||
|
||||
// Set custom layout
|
||||
if ($field->params->get('acf_layout_override'))
|
||||
{
|
||||
$payload['layout'] = $field->params->get('acf_layout_override');
|
||||
}
|
||||
|
||||
echo \NRFramework\Widgets\Helper::render('SelfHostedVideo', $payload);
|
||||
51
plugins/fields/acfvideo/tmpl/providers/vimeo.php
Normal file
51
plugins/fields/acfvideo/tmpl/providers/vimeo.php
Normal file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2019 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
if (!$videoURL = $field->value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$payload = [
|
||||
'value' => $videoURL,
|
||||
'width' => $fieldParams->get('width', '480px'),
|
||||
'height' => $fieldParams->get('height', '270px'),
|
||||
'privacy' => $fieldParams->get('privacyMode', '0') === '1',
|
||||
|
||||
'controls' => $fieldParams->get('controls', '1') === '1',
|
||||
'loop' => $fieldParams->get('loop', '0') === '1',
|
||||
'mute' => $fieldParams->get('mute', '0') === '1',
|
||||
'autoplay' => $fieldParams->get('autoplay', '0') === '1',
|
||||
'autopause' => $fieldParams->get('autopause', '0') === '1',
|
||||
'title' => $fieldParams->get('title', '0') === '1',
|
||||
'byline' => $fieldParams->get('byline', '0') === '1',
|
||||
'portrait' => $fieldParams->get('portrait', '0') === '1',
|
||||
'pip' => $fieldParams->get('pip', '0') === '1',
|
||||
'speed' => $fieldParams->get('speed', '0') === '1',
|
||||
'color' => $fieldParams->get('vimeo_color'),
|
||||
'keyboard' => $fieldParams->get('disablekb', '0') === '0',
|
||||
'start' => $fieldParams->get('start', ''),
|
||||
'end' => $fieldParams->get('end', ''),
|
||||
'coverImageType' => $fieldParams->get('coverImageType', false),
|
||||
'coverImage' => $fieldParams->get('coverImage', ''),
|
||||
|
||||
];
|
||||
|
||||
// Set custom layout
|
||||
if ($field->params->get('acf_layout_override'))
|
||||
{
|
||||
$payload['layout'] = $field->params->get('acf_layout_override');
|
||||
}
|
||||
|
||||
echo \NRFramework\Widgets\Helper::render('Vimeo', $payload);
|
||||
50
plugins/fields/acfvideo/tmpl/providers/youtube.php
Normal file
50
plugins/fields/acfvideo/tmpl/providers/youtube.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2019 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
if (!$videoURL = $field->value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$payload = [
|
||||
'value' => $videoURL,
|
||||
'width' => $fieldParams->get('width', '480px'),
|
||||
'height' => $fieldParams->get('height', '270px'),
|
||||
'privacy' => $fieldParams->get('privacyMode', '0') === '1',
|
||||
|
||||
'autoplay' => $fieldParams->get('autoplay', '0') === '1',
|
||||
'autopause' => $fieldParams->get('autopause', '0') === '1',
|
||||
'fs' => $fieldParams->get('fs', '1') === '1',
|
||||
'controls' => $fieldParams->get('controls', '1') === '1',
|
||||
'loop' => $fieldParams->get('loop', '0') === '1',
|
||||
'mute' => $fieldParams->get('mute', '0') === '1',
|
||||
'cc_load_policy' => $fieldParams->get('cc_load_policy', '0') === '1',
|
||||
'disablekb' => $fieldParams->get('disablekb', '0') === '1',
|
||||
'start' => $fieldParams->get('start', ''),
|
||||
'end' => $fieldParams->get('end', ''),
|
||||
'modestbranding' => $fieldParams->get('modestbranding', '0') === '1',
|
||||
'rel' => $fieldParams->get('rel', '') === '1' ? '1' : '0',
|
||||
'color' => $fieldParams->get('youtube_color', 'red'),
|
||||
'coverImageType' => $fieldParams->get('coverImageType', false),
|
||||
'coverImage' => $fieldParams->get('coverImage', ''),
|
||||
|
||||
];
|
||||
|
||||
// Set custom layout
|
||||
if ($field->params->get('acf_layout_override'))
|
||||
{
|
||||
$payload['layout'] = $field->params->get('acf_layout_override');
|
||||
}
|
||||
|
||||
echo \NRFramework\Widgets\Helper::render('YouTube', $payload);
|
||||
14
plugins/fields/acfvideo/version.php
Normal file
14
plugins/fields/acfvideo/version.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2019 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted Access');
|
||||
$NR_PRO = "1";
|
||||
Reference in New Issue
Block a user