mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
Filter plugins on the plugins menu
This commit is contained in:
parent
139e4bad1c
commit
79a3ef4c69
64 changed files with 817 additions and 393 deletions
|
@ -436,3 +436,21 @@ class Plugin extends ObjectYPT {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
class PluginTags {
|
||||
static $RECOMMENDED = array('success', 'Recommended', '<i class="fas fa-heart"></i>', 'RECOMMENDED');
|
||||
static $SECURITY = array('warning', 'Security', '<i class="fas fa-user-shield"></i>', 'SECURITY');
|
||||
static $LIVE = array('primary', 'Live', '<i class="fas fa-broadcast-tower"></i>', 'LIVE');
|
||||
static $MONETIZATION = array('primary', 'Monetization', '<i class="fas fa-dollar-sign"></i>', 'MONETIZATION');
|
||||
static $ADS = array('primary', 'ADS', '<i class="fas fa-camera-retro"></i>', 'ADS');
|
||||
static $STORAGE = array('primary', 'Storage', '<i class="fas fa-archive"></i>', 'STORAGE');
|
||||
static $GALLERY = array('primary', 'Gallery', '<i class="fas fa-images"></i>', 'GALLERY');
|
||||
static $NETFLIX = array('primary', 'Netflix', '<i class="fas fa-film"></i>', 'NETFLIX');
|
||||
static $LAYOUT = array('primary', 'Layout', '<i class="fas fa-sitemap"></i>', 'LAYOUT');
|
||||
static $LOGIN = array('primary', 'Login', '<i class="fas fa-lock"></i>', 'LOGIN');
|
||||
static $MOBILE = array('primary', 'Mobile', '<i class="fas fa-mobile-alt"></i>', 'MOBILE');
|
||||
static $PLAYER = array('primary', 'Player', '<i class="fas fa-play-circle"></i>', 'PLAYER');
|
||||
static $FREE = array('info', 'Free', '<i class="fas fa-check"></i>', 'FREE');
|
||||
static $PREMIUM = array('info', 'Premium', '<i class="fas fa-thumbs-up"></i>', 'PREMIUM');
|
||||
static $DEPRECATED = array('danger', 'Deprecated', '<i class="fas fa-times-circle"></i>', 'DEPRECATED');
|
||||
}
|
|
@ -5,6 +5,16 @@ require_once $global['systemRootPath'] . 'plugin/AD_Overlay/Objects/AD_Overlay_C
|
|||
|
||||
class AD_Overlay extends PluginAbstract {
|
||||
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$MONETIZATION,
|
||||
PluginTags::$ADS,
|
||||
PluginTags::$FREE,
|
||||
PluginTags::$PLAYER,
|
||||
);
|
||||
}
|
||||
|
||||
public function getDescription() {
|
||||
$txt = "Display simple overlays - similar to YouTube's \"Annotations\" feature in appearance - during video playback.";
|
||||
$help = "<br><small><a href='https://github.com/WWBN/AVideo/wiki/AD_Overlay-Plugin' target='__blank'><i class='fas fa-question-circle'></i> Help</a></small>";
|
||||
|
@ -41,7 +51,7 @@ class AD_Overlay extends PluginAbstract {
|
|||
</script>
|
||||
';
|
||||
$obj->adText = $o;
|
||||
|
||||
|
||||
$o = new stdClass();
|
||||
$o->type = "textarea";
|
||||
$o->value = '<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
||||
|
@ -82,10 +92,6 @@ class AD_Overlay extends PluginAbstract {
|
|||
return $obj;
|
||||
}
|
||||
|
||||
public function getTags() {
|
||||
return array('free');
|
||||
}
|
||||
|
||||
public function getHeadCode() {
|
||||
if (empty($_GET['videoName']) && empty($_GET['u']) && empty($_GET['link'])) {
|
||||
return false;
|
||||
|
@ -120,12 +126,12 @@ class AD_Overlay extends PluginAbstract {
|
|||
}
|
||||
$obj = $this->getDataObject();
|
||||
|
||||
if(isMobile()){
|
||||
if (isMobile()) {
|
||||
$adText = $obj->mobileAdText->value;
|
||||
}else{
|
||||
} else {
|
||||
$adText = $obj->adText->value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($obj->allowUserAds) {
|
||||
if (!empty($video['id'])) {
|
||||
|
@ -155,7 +161,7 @@ class AD_Overlay extends PluginAbstract {
|
|||
. '</div>';
|
||||
|
||||
$js .= '<script src="' . $global['webSiteRootURL'] . 'plugin/AD_Overlay/videojs-overlay/videojs-overlay.js" type="text/javascript"></script>';
|
||||
|
||||
|
||||
$onPlayerReady = "setTimeout(function(){
|
||||
\$('#cbb').click(function() {
|
||||
\$('.vjs-overlay').fadeOut();
|
||||
|
@ -178,8 +184,8 @@ class AD_Overlay extends PluginAbstract {
|
|||
align: '{$obj->align}'
|
||||
}]
|
||||
});";
|
||||
$js .= '<script>'.PlayerSkins::getStartPlayerJS($onPlayerReady).'</script>';
|
||||
|
||||
$js .= '<script>' . PlayerSkins::getStartPlayerJS($onPlayerReady) . '</script>';
|
||||
|
||||
return $js;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,6 +11,14 @@ require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
|||
require_once $global['systemRootPath'] . 'plugin/AD_Server/Objects/VastCampaigns.php';
|
||||
|
||||
class AD_Server extends PluginAbstract {
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$MONETIZATION,
|
||||
PluginTags::$ADS,
|
||||
PluginTags::$FREE,
|
||||
PluginTags::$PLAYER,
|
||||
);
|
||||
}
|
||||
|
||||
public function getDescription() {
|
||||
return "VAST Ad Server<br><small><a href='https://github.com/WWBN/AVideo/wiki/Ad-Server-Plugin' target='__blank'><i class='fas fa-question-circle'></i> Help</a></small>";
|
||||
|
|
|
@ -12,6 +12,15 @@ require_once $global['systemRootPath'] . 'plugin/User_Location/Objects/IP2Locati
|
|||
|
||||
class AD_Server_Location extends PluginAbstract {
|
||||
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$MONETIZATION,
|
||||
PluginTags::$ADS,
|
||||
PluginTags::$FREE
|
||||
);
|
||||
}
|
||||
|
||||
public function getDescription() {
|
||||
$desc = "Enable select location to display each ad<br>";
|
||||
|
||||
|
|
|
@ -3,7 +3,13 @@
|
|||
require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
||||
|
||||
class ADs extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$MONETIZATION,
|
||||
PluginTags::$ADS,
|
||||
PluginTags::$FREE
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
$txt = "Handle the ads system, like Adsense or similar";
|
||||
//$help = "<br><small><a href='https://github.com/WWBN/AVideo/wiki/AD_Overlay-Plugin' target='__blank'><i class='fas fa-question-circle'></i> Help</a></small>";
|
||||
|
@ -140,8 +146,4 @@ class ADs extends PluginAbstract {
|
|||
}
|
||||
return "<script> window.abkw = 'home-page'; </script>";
|
||||
}
|
||||
|
||||
public function getTags() {
|
||||
return array('free');
|
||||
}
|
||||
}
|
|
@ -5,6 +5,12 @@ require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
|||
|
||||
class API extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$FREE,
|
||||
PluginTags::$MOBILE
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
return "Handle APIs for third party Applications";
|
||||
}
|
||||
|
|
|
@ -240,28 +240,7 @@ class AVideoPlugin {
|
|||
return $str;
|
||||
}
|
||||
|
||||
private static function firstPage() {
|
||||
$name = "ThemeSwitcherMenu";
|
||||
if (Plugin::isEnabledByName($name)) {
|
||||
$p = static::loadPlugin($name);
|
||||
if (is_object($p)) {
|
||||
$page = $p->getPage();
|
||||
if (!empty($page)) {
|
||||
$p2 = static::loadPlugin($page);
|
||||
|
||||
return $p2->getFirstPage();
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function getFirstPage() {
|
||||
// if the menu set a different defaul page
|
||||
$fp = static::firstPage();
|
||||
if (!empty($fp)) {
|
||||
return $fp;
|
||||
}
|
||||
return static::getEnabledFirstPage();
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,13 @@ global $global;
|
|||
require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
||||
|
||||
class AdsForJesus extends PluginAbstract {
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$ADS,
|
||||
PluginTags::$FREE,
|
||||
PluginTags::$PLAYER,
|
||||
);
|
||||
}
|
||||
|
||||
public function getDescription() {
|
||||
$txt = " We will provide a simple VMAP Ad link for free, these ads will be placed in your videos.<br>"
|
||||
|
|
|
@ -3,6 +3,11 @@ global $global;
|
|||
require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
||||
|
||||
class Articles extends PluginAbstract {
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$FREE
|
||||
);
|
||||
}
|
||||
|
||||
public function getDescription() {
|
||||
global $global;
|
||||
|
|
|
@ -5,6 +5,13 @@ require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
|||
require_once $global['systemRootPath'] . 'plugin/Audit/Objects/AuditTable.php';
|
||||
|
||||
class Audit extends PluginAbstract {
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$RECOMMENDED,
|
||||
PluginTags::$FREE,
|
||||
PluginTags::$SECURITY
|
||||
);
|
||||
}
|
||||
|
||||
public function getDescription() {
|
||||
return "Save all insert, update and delete queries for audit";
|
||||
|
|
|
@ -3,6 +3,12 @@
|
|||
require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
||||
|
||||
class BulkEmbed extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$FREE,
|
||||
);
|
||||
}
|
||||
|
||||
public function getDescription() {
|
||||
global $global;
|
||||
|
@ -32,12 +38,7 @@ class BulkEmbed extends PluginAbstract {
|
|||
$obj->API_KEY = "AIzaSyCIqxE86BawU33Um2HEGtX4PcrUWeCh_6o";
|
||||
$obj->onlyAdminCanBulkEmbed = true;
|
||||
return $obj;
|
||||
}
|
||||
|
||||
public function getTags() {
|
||||
return array('free', 'google');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function getPluginMenu() {
|
||||
global $global;
|
||||
|
|
|
@ -3,6 +3,13 @@
|
|||
require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
||||
|
||||
class Cache extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$RECOMMENDED,
|
||||
PluginTags::$FREE
|
||||
);
|
||||
}
|
||||
|
||||
public function getDescription() {
|
||||
$txt = "AVideo application accelerator to cache pages.<br>Your website has 10,000 visitors who are online, and your dynamic page has to send 10,000 times the same queries to database on every page load. With this plugin, your page only sends 1 query to your DB, and uses the cache to serve the 9,999 other visitors.";
|
||||
|
@ -53,10 +60,6 @@ class Cache extends PluginAbstract {
|
|||
return $obj->cacheDir . $firstPage;
|
||||
}
|
||||
|
||||
public function getTags() {
|
||||
return array('free', 'cache', 'speed up');
|
||||
}
|
||||
|
||||
private function getFileName() {
|
||||
if (empty($_SERVER['REQUEST_URI'])) {
|
||||
$_SERVER['REQUEST_URI'] = "";
|
||||
|
|
|
@ -5,6 +5,11 @@ require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
|||
|
||||
class Chromecast extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$FREE
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
return "A plugin that adds a button to the control bar which will cast videos to a Chromecast.";
|
||||
}
|
||||
|
|
|
@ -5,6 +5,13 @@ require_once $global['systemRootPath'] . 'plugin/CloneSite/functions.php';
|
|||
|
||||
class CloneSite extends PluginAbstract {
|
||||
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$SECURITY,
|
||||
PluginTags::$FREE
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
global $global;
|
||||
$obj = $this->getDataObject();
|
||||
|
|
|
@ -6,6 +6,12 @@ require_once $global['systemRootPath'] . 'plugin/CombineSites/Objects/CombineSit
|
|||
|
||||
class CombineSites extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$RECOMMENDED,
|
||||
PluginTags::$FREE
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
$desc = "This plugin will share multiple streamers medias<br>";
|
||||
$desc .= $this->isReadyLabel(array('API'));
|
||||
|
|
|
@ -5,6 +5,13 @@ require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
|||
|
||||
class CustomizeAdvanced extends PluginAbstract {
|
||||
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$RECOMMENDED,
|
||||
PluginTags::$FREE
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
$txt = "Fine Tuning your AVideo";
|
||||
$help = "<br><small><a href='https://github.com/WWBN/AVideo/wiki/Advanced-Customization-Plugin' target='__blank'><i class='fas fa-question-circle'></i> Help</a></small>";
|
||||
|
@ -111,10 +118,10 @@ class CustomizeAdvanced extends PluginAbstract {
|
|||
$obj->autoHideNavbarInSeconds = 0;
|
||||
$obj->videosCDN = "";
|
||||
$obj->useFFMPEGToGenerateThumbs = false;
|
||||
$obj->thumbsWidthPortrait = 170;
|
||||
$obj->thumbsHeightPortrait = 250;
|
||||
$obj->thumbsWidthLandscape = 250;
|
||||
$obj->thumbsHeightLandscape = 140;
|
||||
$obj->thumbsWidthPortrait = 360;
|
||||
$obj->thumbsHeightPortrait = 640;
|
||||
$obj->thumbsWidthLandscape = 640;
|
||||
$obj->thumbsHeightLandscape = 360;
|
||||
$obj->showImageDownloadOption = false;
|
||||
$obj->doNotDisplayViews = false;
|
||||
$obj->doNotDisplayLikes = false;
|
||||
|
@ -181,11 +188,7 @@ class CustomizeAdvanced extends PluginAbstract {
|
|||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public function getTags() {
|
||||
return array('free', 'customization', 'buttons', 'resolutions');
|
||||
}
|
||||
|
||||
|
||||
public function getModeYouTube($videos_id) {
|
||||
global $global, $config;
|
||||
$obj = $this->getDataObject();
|
||||
|
|
|
@ -8,6 +8,13 @@ require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
|||
|
||||
class CustomizeUser extends PluginAbstract {
|
||||
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$RECOMMENDED,
|
||||
PluginTags::$FREE
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
$txt = "Fine Tuning User Profile";
|
||||
return $txt;
|
||||
|
@ -216,10 +223,6 @@ class CustomizeUser extends PluginAbstract {
|
|||
}
|
||||
}
|
||||
|
||||
public function getTags() {
|
||||
return array('free', 'customization', 'users');
|
||||
}
|
||||
|
||||
public function getChannelButton() {
|
||||
global $global, $isMyChannel;
|
||||
if (!$isMyChannel) {
|
||||
|
|
|
@ -8,6 +8,12 @@ require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
|||
|
||||
class DiscordNotify extends PluginAbstract {
|
||||
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$FREE
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
return "Send video upload notifications to discord webhook";
|
||||
}
|
||||
|
@ -20,14 +26,6 @@ class DiscordNotify extends PluginAbstract {
|
|||
return "cf145581-7d5e-4bb6-8c12-848a19j1564g";
|
||||
}
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
'free',
|
||||
'notifications',
|
||||
'webhook'
|
||||
);
|
||||
}
|
||||
|
||||
public function getPluginVersion() {
|
||||
return "1.0";
|
||||
}
|
||||
|
|
|
@ -4,6 +4,11 @@ require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
|||
|
||||
class FBTube extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$FREE
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
return "<b>(Deprecated, will be removed in next version)</b> Make the first page works as a facebook page";
|
||||
}
|
||||
|
@ -30,9 +35,4 @@ class FBTube extends PluginAbstract {
|
|||
global $global;
|
||||
return '<link href="'.$global['webSiteRootURL'].'plugin/FBTube/view/style.css" rel="stylesheet" type="text/css"/>';
|
||||
}
|
||||
|
||||
public function getTags() {
|
||||
return array('free', 'firstPage', 'facebook');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -5,6 +5,12 @@ require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
|||
|
||||
class FloatVideo extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$FREE,
|
||||
PluginTags::$PLAYER,
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
return "Enable Or disable Float Video";
|
||||
}
|
||||
|
@ -46,8 +52,4 @@ class FloatVideo extends PluginAbstract {
|
|||
}
|
||||
return $str;
|
||||
}
|
||||
|
||||
public function getTags() {
|
||||
return array('free');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,14 @@ require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
|||
require_once $global['systemRootPath'] . 'plugin/AVideoPlugin.php';
|
||||
class Gallery extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$RECOMMENDED,
|
||||
PluginTags::$FREE,
|
||||
PluginTags::$GALLERY,
|
||||
PluginTags::$LAYOUT,
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
return "Make the first page works as a gallery";
|
||||
}
|
||||
|
@ -99,10 +107,6 @@ class Gallery extends PluginAbstract {
|
|||
}
|
||||
}
|
||||
|
||||
public function getTags() {
|
||||
return array('free', 'firstPage', 'gallery');
|
||||
}
|
||||
|
||||
public function getFooterCode() {
|
||||
$obj = $this->getDataObject();
|
||||
global $global;
|
||||
|
|
|
@ -4,6 +4,12 @@ require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
|||
|
||||
class Hotkeys extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$FREE,
|
||||
PluginTags::$PLAYER,
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
global $global;
|
||||
return "Enable hotkeys for videos, like F for fullscreen, space for play/pause, etc..<br />Author: <a href='http://hersche.github.io' target='_blank' >Vinzenz Hersche</a>";
|
||||
|
@ -57,12 +63,7 @@ class Hotkeys extends PluginAbstract {
|
|||
$obj->PlayPauseKey = " ";
|
||||
$obj->AlwaysCaptureHotkeys = true;
|
||||
return $obj;
|
||||
}
|
||||
|
||||
public function getTags() {
|
||||
return array('free', 'videos', 'hotkeys');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function getFooterCode() {
|
||||
global $global;
|
||||
|
|
|
@ -6,6 +6,11 @@ require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
|||
|
||||
class IMDbScrape extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$DEPRECATED
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
return "Enables you to scrape data from IMDB.com<br>Your Video title must match with IMDb title<br><small><a href='https://github.com/WWBN/AVideo/wiki/IMDbScrape-Plugin' target='__blank'><i class='fas fa-question-circle'></i> Help</a></small>";
|
||||
}
|
||||
|
|
|
@ -13,6 +13,15 @@ $_getStats = array();
|
|||
|
||||
class Live extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$LIVE,
|
||||
PluginTags::$FREE,
|
||||
PluginTags::$RECOMMENDED,
|
||||
PluginTags::$PLAYER,
|
||||
);
|
||||
}
|
||||
|
||||
public function getDescription() {
|
||||
$desc = "Broadcast a RTMP video from your computer<br> and receive HLS streaming from servers";
|
||||
$lu = AVideoPlugin::loadPlugin("LiveUsers");
|
||||
|
@ -532,10 +541,6 @@ class Live extends PluginAbstract {
|
|||
return false;
|
||||
}
|
||||
|
||||
public function getTags() {
|
||||
return array('free', 'live', 'streaming', 'live stream');
|
||||
}
|
||||
|
||||
public function getChartTabs() {
|
||||
return '<li><a data-toggle="tab" id="liveVideos" href="#liveVideosMenu"><i class="fas fa-play-circle"></i> '.__('Live videos').'</a></li>';
|
||||
}
|
||||
|
|
|
@ -3,6 +3,14 @@
|
|||
require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
||||
class LiveChat extends PluginAbstract{
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$LIVE,
|
||||
PluginTags::$FREE,
|
||||
PluginTags::$DEPRECATED
|
||||
);
|
||||
}
|
||||
|
||||
public function getDescription() {
|
||||
global $global;
|
||||
$desc = "<b>(Deprecated, will be removed next version)</b> This plugin is Discontinued. you should move to Chat2 plugin.<br>A live chat for multiple propouses<br>Initiate it on terminal with the command <code>nohup php {$global['systemRootPath']}plugin/LiveChat/chat-server.php &</code>";
|
||||
|
@ -62,11 +70,6 @@ class LiveChat extends PluginAbstract{
|
|||
$o = $this->getDataObject();
|
||||
return $o->websocket;
|
||||
}
|
||||
|
||||
|
||||
public function getTags() {
|
||||
return array('free', 'live', 'streaming', 'live stream', 'chat');
|
||||
}
|
||||
|
||||
public function canSendMessage($isLogged=false){
|
||||
$obj = $this->getDataObject();
|
||||
|
|
|
@ -6,6 +6,14 @@ require_once $global['systemRootPath'] . 'plugin/LiveLinks/Objects/LiveLinksTabl
|
|||
|
||||
class LiveLinks extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$LIVE,
|
||||
PluginTags::$FREE,
|
||||
PluginTags::$PLAYER,
|
||||
);
|
||||
}
|
||||
|
||||
public function getDescription() {
|
||||
$desc = "Register Livestreams external Links from any HLS provider, Wowza and others";
|
||||
$desc .= $this->isReadyLabel(array('Live'));
|
||||
|
|
|
@ -4,6 +4,11 @@ require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
|||
|
||||
class LoginFacebook extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$FREE,
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
global $global;
|
||||
$obj = $this->getLogin();
|
||||
|
@ -34,11 +39,6 @@ class LoginFacebook extends PluginAbstract {
|
|||
$obj->key = "";
|
||||
return $obj;
|
||||
}
|
||||
|
||||
public function getTags() {
|
||||
return array('free', 'login', 'facebook');
|
||||
}
|
||||
|
||||
public function getLogin() {
|
||||
$obj = new stdClass();
|
||||
$obj->class = "btn btn-primary btn-block";
|
||||
|
|
|
@ -4,6 +4,12 @@ require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
|||
|
||||
class LoginGoogle extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$FREE,
|
||||
PluginTags::$LOGIN,
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
global $global;
|
||||
$obj = $this->getLogin();
|
||||
|
@ -36,10 +42,6 @@ class LoginGoogle extends PluginAbstract {
|
|||
return $obj;
|
||||
}
|
||||
|
||||
public function getTags() {
|
||||
return array('free', 'login', 'google');
|
||||
}
|
||||
|
||||
public function getLogin() {
|
||||
$obj = new stdClass();
|
||||
$obj->class = "btn btn-danger btn-block";
|
||||
|
|
|
@ -4,6 +4,12 @@ require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
|||
|
||||
class LoginLinkedin extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$FREE,
|
||||
PluginTags::$LOGIN,
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
global $global;
|
||||
$obj = $this->getLogin();
|
||||
|
@ -34,11 +40,6 @@ class LoginLinkedin extends PluginAbstract {
|
|||
$obj->key = "";
|
||||
return $obj;
|
||||
}
|
||||
|
||||
public function getTags() {
|
||||
return array('free', 'login', 'linkedin');
|
||||
}
|
||||
|
||||
public function getLogin() {
|
||||
$obj = new stdClass();
|
||||
$obj->class = "btn btn-primary btn-block";
|
||||
|
|
|
@ -4,6 +4,12 @@ require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
|||
|
||||
class LoginTwitter extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$FREE,
|
||||
PluginTags::$LOGIN,
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
global $global;
|
||||
$obj = $this->getLogin();
|
||||
|
@ -34,11 +40,6 @@ class LoginTwitter extends PluginAbstract {
|
|||
$obj->key = "";
|
||||
return $obj;
|
||||
}
|
||||
|
||||
public function getTags() {
|
||||
return array('free', 'login', 'twitter');
|
||||
}
|
||||
|
||||
public function getLogin() {
|
||||
$obj = new stdClass();
|
||||
$obj->class = "btn btn-info btn-block";
|
||||
|
|
|
@ -4,6 +4,12 @@ require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
|||
|
||||
class LoginYahoo extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$FREE,
|
||||
PluginTags::$LOGIN,
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
global $global;
|
||||
$obj = $this->getLogin();
|
||||
|
@ -35,10 +41,6 @@ class LoginYahoo extends PluginAbstract {
|
|||
return $obj;
|
||||
}
|
||||
|
||||
public function getTags() {
|
||||
return array('free', 'login', 'yahoo');
|
||||
}
|
||||
|
||||
public function getLogin() {
|
||||
$obj = new stdClass();
|
||||
$obj->class = "btn btn-primary btn-block";
|
||||
|
|
|
@ -4,6 +4,11 @@ require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
|||
|
||||
class MaintenanceMode extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$FREE,
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
global $global;
|
||||
$desc = "Put your site in Maintenance Mode";
|
||||
|
|
|
@ -14,6 +14,13 @@ User::loginFromRequest();
|
|||
//require_once $global['systemRootPath'] . 'objects/php-jwt/src/JWT.php';
|
||||
//use \Firebase\JWT\JWT;
|
||||
class Meet extends PluginAbstract {
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$RECOMMENDED,
|
||||
PluginTags::$FREE,
|
||||
PluginTags::$LIVE,
|
||||
);
|
||||
}
|
||||
|
||||
public function getDescription() {
|
||||
$txt = "AVideo Meet/Conference software";
|
||||
|
|
|
@ -17,12 +17,12 @@ if (empty($objM)) {
|
|||
$meet_schedule_id = intval($_GET['meet_schedule_id']);
|
||||
|
||||
if (empty($meet_schedule_id)) {
|
||||
die("meet schedule id cannot be empty");
|
||||
forbiddenPage("meet schedule id cannot be empty");
|
||||
}
|
||||
|
||||
$meet = new Meet_schedule($meet_schedule_id);
|
||||
if(empty($meet->getName())){
|
||||
die("meet not found");
|
||||
forbiddenPage("meet not found");
|
||||
}
|
||||
|
||||
$userCredentials = User::loginFromRequestToGet();
|
||||
|
|
|
@ -9,12 +9,11 @@ if (!isset($global['systemRootPath'])) {
|
|||
$obj = AVideoPlugin::getObjectDataIfEnabled("Meet");
|
||||
//_error_log(json_encode($_SERVER));
|
||||
if (empty($obj)) {
|
||||
die("Plugin disabled");
|
||||
forbiddenPage("Plugin disabled");
|
||||
}
|
||||
|
||||
if (!User::isLogged()) {
|
||||
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not do this"));
|
||||
exit;
|
||||
forbiddenPage("You can not do this");
|
||||
}
|
||||
$userCredentials = User::loginFromRequestToGet();
|
||||
if (User::isAdmin() && !empty($_GET['newServer'])) {
|
||||
|
|
|
@ -5,6 +5,12 @@ require_once $global['systemRootPath'] . 'objects/video.php';
|
|||
|
||||
class MobileManager extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$FREE,
|
||||
PluginTags::$MOBILE
|
||||
);
|
||||
}
|
||||
public static function getVersion(){
|
||||
return 2;
|
||||
}
|
||||
|
@ -27,10 +33,6 @@ class MobileManager extends PluginAbstract {
|
|||
return "1.0";
|
||||
}
|
||||
|
||||
public function getTags() {
|
||||
return array('free', 'mobile', 'android', 'ios');
|
||||
}
|
||||
|
||||
public function getEmptyDataObject() {
|
||||
global $global;
|
||||
$obj = new stdClass();
|
||||
|
|
|
@ -4,6 +4,12 @@ require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
|||
|
||||
class MonetizeUsers extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$MONETIZATION,
|
||||
PluginTags::$FREE,
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
$txt = "This plugin will reward your users based on their videos view, each view will affect the user's walled balance";
|
||||
|
||||
|
@ -31,10 +37,6 @@ class MonetizeUsers extends PluginAbstract {
|
|||
return $obj;
|
||||
}
|
||||
|
||||
public function getTags() {
|
||||
return array('free', 'monetize', 'wallet');
|
||||
}
|
||||
|
||||
public function addView($videos_id, $total) {
|
||||
global $global;
|
||||
$obj = $this->getDataObject();
|
||||
|
|
|
@ -5,6 +5,12 @@ require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
|||
|
||||
class NextButton extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$FREE,
|
||||
PluginTags::$PLAYER,
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
return "Add next button to the control bar";
|
||||
}
|
||||
|
@ -43,11 +49,6 @@ class NextButton extends PluginAbstract {
|
|||
return $js;
|
||||
}
|
||||
}
|
||||
|
||||
public function getTags() {
|
||||
return array('free', 'buttons', 'video player');
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -6,6 +6,11 @@ use Pecee\SimpleRouter\SimpleRouter; //required if we want to define routes on o
|
|||
|
||||
class OptionsTest extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$FREE,
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
global $global;
|
||||
return "Salmple object for new features <br />Author: <a href='https://github.com/Criptos' target='_blank' > Criptos</a>";
|
||||
|
@ -45,10 +50,6 @@ class OptionsTest extends PluginAbstract {
|
|||
|
||||
public function getHeadCode() {
|
||||
}
|
||||
|
||||
public function getTags() {
|
||||
return array('sample');
|
||||
}
|
||||
|
||||
public function addRoutes()
|
||||
{
|
||||
|
|
|
@ -25,6 +25,12 @@ use PayPal\Api\ShippingAddress;
|
|||
|
||||
class PayPalYPT extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$MONETIZATION,
|
||||
PluginTags::$FREE,
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
return "Paypal module for several purposes<br>
|
||||
Go to Paypal developer Site here https://developer.paypal.com/developer/applications (you must have Paypal account, of course)
|
||||
|
|
|
@ -6,6 +6,12 @@ require_once $global['systemRootPath'] . 'objects/playlist.php';
|
|||
|
||||
class PlayLists extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$RECOMMENDED,
|
||||
PluginTags::$FREE,
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
return "Playlists or Program Playlists are identified by default as programs of content on the AVideo Platform.<br>"
|
||||
. " You can use the Edit Parameters button to rename it to your choosing.<br> We recommend to keep the Program name "
|
||||
|
|
|
@ -5,6 +5,12 @@ require_once $global['systemRootPath'] . 'plugin/AVideoPlugin.php';
|
|||
|
||||
class PlayerSkins extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$FREE,
|
||||
PluginTags::$PLAYER,
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
global $global;
|
||||
$desc = "Customize your playes Skin<br>The Skis options are: ";
|
||||
|
@ -117,10 +123,6 @@ class PlayerSkins extends PluginAbstract {
|
|||
return $js;
|
||||
}
|
||||
|
||||
public function getTags() {
|
||||
return array('free');
|
||||
}
|
||||
|
||||
static function getDataSetup($str = "") {
|
||||
global $video, $disableYoutubeIntegration, $global;
|
||||
$obj = AVideoPlugin::getObjectData('PlayerSkins');
|
||||
|
|
|
@ -6,10 +6,16 @@ require_once $global['systemRootPath'] . 'objects/userGroups.php';
|
|||
|
||||
class PredefinedCategory extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$FREE
|
||||
);
|
||||
}
|
||||
|
||||
public function getDescription() {
|
||||
$txt = "Choose what category the video goes when upload, encode or embed";
|
||||
$help = "<br><small><a href='https://github.com/WWBN/AVideo/wiki/PredefinedCategory-Plugin' target='__blank'><i class='fas fa-question-circle'></i> Help</a></small>";
|
||||
return $txt.$help;
|
||||
return $txt . $help;
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
|
@ -24,13 +30,13 @@ class PredefinedCategory extends PluginAbstract {
|
|||
$obj = new stdClass();
|
||||
$obj->defaultCategory = 1;
|
||||
$obj->userCategory = new stdClass();
|
||||
|
||||
|
||||
$groups = UserGroups::getAllUsersGroups();
|
||||
//import external plugins configuration options
|
||||
foreach ($groups as $value) {
|
||||
$obj->{"AddVideoOnGroup_[{$value['id']}]_"}=false;
|
||||
$obj->{"AddVideoOnGroup_[{$value['id']}]_"} = false;
|
||||
}
|
||||
|
||||
|
||||
return $obj;
|
||||
}
|
||||
|
||||
|
@ -39,44 +45,38 @@ class PredefinedCategory extends PluginAbstract {
|
|||
$filename = $global['systemRootPath'] . 'plugin/PredefinedCategory/pluginMenu.html';
|
||||
return file_get_contents($filename);
|
||||
}
|
||||
|
||||
|
||||
public function getCategoryId() {
|
||||
global $global;
|
||||
global $global;
|
||||
require_once $global['systemRootPath'] . 'objects/user.php';
|
||||
$obj = AVideoPlugin::getObjectDataIfEnabled("PredefinedCategory");
|
||||
$id = $obj->defaultCategory;
|
||||
if(User::canUpload()){
|
||||
if (User::canUpload()) {
|
||||
$user_id = User::getId();
|
||||
if(!empty($obj->userCategory->$user_id)){
|
||||
if (!empty($obj->userCategory->$user_id)) {
|
||||
$id = $obj->userCategory->$user_id;
|
||||
}
|
||||
}
|
||||
return $id;
|
||||
}
|
||||
|
||||
public function getUserGroupsArray(){
|
||||
|
||||
public function getUserGroupsArray() {
|
||||
$obj = $this->getDataObject();
|
||||
|
||||
|
||||
$videoGroups = array();
|
||||
foreach ($obj as $key => $value) {
|
||||
if($value===true){
|
||||
if ($value === true) {
|
||||
preg_match("/^AddVideoOnGroup_\[([0-9]+)\]_/", $key, $match);
|
||||
if(!empty($match[1])){
|
||||
if (!empty($match[1])) {
|
||||
//check if group exists
|
||||
$group=new UserGroups($match[1]);
|
||||
if(!empty($group->getGroup_name())){
|
||||
$group = new UserGroups($match[1]);
|
||||
if (!empty($group->getGroup_name())) {
|
||||
$videoGroups[] = $match[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $videoGroups;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function getTags() {
|
||||
return array('free');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,6 +8,12 @@ require_once ($global['systemRootPath'] . 'plugin/RazorPayYPT/razorpay-php/Razor
|
|||
use Razorpay\Api\Api;
|
||||
class RazorPayYPT extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$MONETIZATION,
|
||||
PluginTags::$FREE,
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
global $global;
|
||||
$obj = $this->getDataObject();
|
||||
|
|
|
@ -6,6 +6,12 @@ require_once $global['systemRootPath'] . 'plugin/ReportVideo/Objects/videos_repo
|
|||
|
||||
class ReportVideo extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$RECOMMENDED,
|
||||
PluginTags::$FREE,
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
return "Create a button to report videos with inapropriate content";
|
||||
}
|
||||
|
@ -49,11 +55,6 @@ class ReportVideo extends PluginAbstract {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getTags() {
|
||||
return array('free', 'buttons', 'report');
|
||||
}
|
||||
|
||||
public function getWatchActionButton($videos_id) {
|
||||
global $global, $video;
|
||||
if (!isVideo()) {
|
||||
|
|
|
@ -5,6 +5,12 @@ require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
|||
|
||||
class SeekButton extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$FREE,
|
||||
PluginTags::$PLAYER,
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
return "Add seek buttons to the control bar";
|
||||
}
|
||||
|
@ -57,9 +63,4 @@ class SeekButton extends PluginAbstract {
|
|||
return $js;
|
||||
}
|
||||
}
|
||||
|
||||
public function getTags() {
|
||||
return array('free', 'buttons', 'video player');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -5,6 +5,12 @@ require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
|||
|
||||
class ShareSocialButtonsOnEmbed extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$FREE,
|
||||
);
|
||||
}
|
||||
|
||||
public function getDescription() {
|
||||
return "<b>(Deprecated, will be removed next version)</b> Enable Or disable Share Social Buttons on Embed videos";
|
||||
}
|
||||
|
@ -24,9 +30,4 @@ class ShareSocialButtonsOnEmbed extends PluginAbstract {
|
|||
}
|
||||
include 'script.php';
|
||||
}
|
||||
|
||||
|
||||
public function getTags() {
|
||||
return array('free');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,11 @@ require_once $global['systemRootPath'] . 'objects/subscribe.php';
|
|||
class SlackBot extends PluginAbstract
|
||||
{
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$FREE,
|
||||
);
|
||||
}
|
||||
public function getDescription()
|
||||
{
|
||||
return "Send video upload notifications to Users on Slack who have subscribed to the channel via a Slack Bot.
|
||||
|
@ -29,14 +34,7 @@ class SlackBot extends PluginAbstract
|
|||
{
|
||||
return "cf145581-7d5e-4bb6-8c13-848a19j1564a";
|
||||
}
|
||||
public function getTags()
|
||||
{
|
||||
return array(
|
||||
'free',
|
||||
'notifications',
|
||||
'bot'
|
||||
);
|
||||
}
|
||||
|
||||
public function getPluginVersion()
|
||||
{
|
||||
return "1.0";
|
||||
|
|
|
@ -9,6 +9,11 @@ require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
|||
class SlackNotify extends PluginAbstract
|
||||
{
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$FREE,
|
||||
);
|
||||
}
|
||||
public function getDescription()
|
||||
{
|
||||
return "Send video upload notifications to Slack webhook";
|
||||
|
@ -23,14 +28,6 @@ class SlackNotify extends PluginAbstract
|
|||
{
|
||||
return "cf145581-7d5e-4bb6-8c13-848a19j1564h";
|
||||
}
|
||||
public function getTags()
|
||||
{
|
||||
return array(
|
||||
'free',
|
||||
'notifications',
|
||||
'webhook'
|
||||
);
|
||||
}
|
||||
public function getPluginVersion()
|
||||
{
|
||||
return "1.0";
|
||||
|
|
|
@ -8,6 +8,12 @@ class StripeYPT extends PluginAbstract {
|
|||
|
||||
private $Publishablekey, $Restrictedkey, $SigningSecret;
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$MONETIZATION,
|
||||
PluginTags::$FREE,
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
$str = "Stripe module for several purposes<br>
|
||||
Go to Stripe dashboard Site <a href='https://dashboard.stripe.com/apikeys'>here</a> (you must have Stripe account, of course)<br>";
|
||||
|
|
|
@ -5,6 +5,12 @@ require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
|||
|
||||
class TheaterButton extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$FREE,
|
||||
PluginTags::$PLAYER,
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
return "Add next theater switch button to the control bar";
|
||||
}
|
||||
|
@ -81,11 +87,6 @@ class TheaterButton extends PluginAbstract {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getTags() {
|
||||
return array('free', 'buttons', 'video player');
|
||||
}
|
||||
|
||||
static function isCompressed(){
|
||||
if(empty($_COOKIE['compress'])){
|
||||
$obj = AVideoPlugin::getDataObject('TheaterButton');
|
||||
|
|
|
@ -8,6 +8,12 @@ use Pecee\SimpleRouter\SimpleRouter; //required if we want to define routes on o
|
|||
|
||||
class TopMenu extends PluginAbstract {
|
||||
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$FREE,
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
$txt = "Responsive Customized Top Menu";
|
||||
$help = "<br><small><a href='https://github.com/WWBN/AVideo/wiki/How-to-use-TopMenu-Plug-in' target='__blank'><i class='fas fa-question-circle'></i> Help</a></small>";
|
||||
|
@ -79,8 +85,4 @@ class TopMenu extends PluginAbstract {
|
|||
return false;
|
||||
return $menuId['id'];
|
||||
}
|
||||
|
||||
public function getTags() {
|
||||
return array('free');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,11 @@ require_once $global['systemRootPath'] . 'plugin/User_Location/Objects/IP2Locati
|
|||
|
||||
class User_Location extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$FREE,
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
global $global, $mysqlDatabase;
|
||||
$ret = "Detects user location for various purposes";
|
||||
|
|
|
@ -7,6 +7,11 @@ class VR360 extends PluginAbstract {
|
|||
|
||||
private $script = 'panorama';
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$FREE,
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
return "Panoramic 360 video player. Project video onto different shapes";
|
||||
}
|
||||
|
@ -91,9 +96,5 @@ class VR360 extends PluginAbstract {
|
|||
}(window, window.videojs));</script>';
|
||||
return $js;
|
||||
}
|
||||
|
||||
public function getTags() {
|
||||
return array('free');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,6 +4,11 @@ require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
|||
|
||||
class VideoLandscapeFullscreen extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$FREE,
|
||||
);
|
||||
}
|
||||
public function getPluginVersion(){
|
||||
return "1.0";
|
||||
}
|
||||
|
|
|
@ -5,6 +5,11 @@ require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
|||
|
||||
class VideoLogoOverlay extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$FREE,
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
return "Put an Logo overlay on video";
|
||||
}
|
||||
|
@ -74,10 +79,5 @@ class VideoLogoOverlay extends PluginAbstract {
|
|||
}
|
||||
return $url;
|
||||
}
|
||||
|
||||
|
||||
public function getTags() {
|
||||
return array('free');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,6 +8,11 @@ require_once $global['systemRootPath'] . 'plugin/VideoTags/Objects/TagsTypes.php
|
|||
|
||||
class VideoTags extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$FREE,
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
$txt = "User interface for managing tags";
|
||||
$help = "";
|
||||
|
|
|
@ -10,6 +10,10 @@ use Vimeo\Exceptions\VimeoUploadException;
|
|||
|
||||
class VimeoAPI extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
$txt = "Upload your videos to Vimeo using the Vimeo API.<br>";
|
||||
$txt .= "<a href='https://developer.vimeo.com/apps/'>Create an APP and get your credentials here</a><br>";
|
||||
|
|
|
@ -4,6 +4,12 @@ require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
|||
|
||||
class WWBN extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$RECOMMENDED,
|
||||
PluginTags::$FREE,
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
global $global;
|
||||
$desc = "WWBN Network Index (this plugin is under development)<br>";
|
||||
|
|
|
@ -11,6 +11,13 @@ class YPTWallet extends PluginAbstract {
|
|||
const MANUAL_WITHDRAW = "Manual Withdraw Funds";
|
||||
const MANUAL_ADD = "Manual Add Funds";
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$MONETIZATION,
|
||||
PluginTags::$NETFLIX,
|
||||
PluginTags::$FREE,
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
return "Wallet for AVideo";
|
||||
}
|
||||
|
@ -79,10 +86,6 @@ class YPTWallet extends PluginAbstract {
|
|||
return $obj;
|
||||
}
|
||||
|
||||
public function getTags() {
|
||||
return array('free', 'monetization');
|
||||
}
|
||||
|
||||
public function getBalance($users_id) {
|
||||
$wallet = self::getWallet($users_id);
|
||||
return $wallet->getBalance();
|
||||
|
|
|
@ -4,6 +4,12 @@ require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
|||
require_once $global['systemRootPath'] . 'plugin/AVideoPlugin.php';
|
||||
class YouPHPFlix2 extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$NETFLIX,
|
||||
PluginTags::$FREE,
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
$txt = "Make the first page looks like a Netflix site";
|
||||
$help = "<br><small><a href='https://github.com/WWBN/AVideo/wiki/Configure-a-Netflix-Clone-Page' target='__blank'><i class='fas fa-question-circle'></i> Help</a></small>";
|
||||
|
@ -119,9 +125,4 @@ class YouPHPFlix2 extends PluginAbstract {
|
|||
return $js;
|
||||
}
|
||||
|
||||
public function getTags() {
|
||||
return array('free', 'firstPage', 'netflix');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -4,6 +4,11 @@ require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
|||
require_once $global['systemRootPath'] . 'plugin/AVideoPlugin.php';
|
||||
class YouTube extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$DEPRECATED,
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
return "<b>(Deprecated, will be removed in next version)</b> Make the first page works as a YouTube";
|
||||
}
|
||||
|
@ -86,10 +91,6 @@ class YouTube extends PluginAbstract {
|
|||
return $global['systemRootPath'].'plugin/YouTube/view/modeYouTube.php';
|
||||
}
|
||||
|
||||
public function getTags() {
|
||||
return array('free', 'firstPage', 'YouTube');
|
||||
}
|
||||
|
||||
public function getFooterCode() {
|
||||
$obj = $this->getDataObject();
|
||||
global $global;
|
||||
|
|
|
@ -6,6 +6,11 @@ require_once $global['systemRootPath'] . 'plugin/YouTubeAPI/Objects/YouTubeUploa
|
|||
|
||||
class YouTubeAPI extends PluginAbstract {
|
||||
|
||||
public function getTags() {
|
||||
return array(
|
||||
PluginTags::$FREE,
|
||||
);
|
||||
}
|
||||
public function getDescription() {
|
||||
$txt = "Upload your videos to YouTube using the YouTube API.<br>";
|
||||
//$txt .= "You can acquire an OAuth 2.0 <b>client ID</b> and <b>client secret</b> from the <a href='https://cloud.google.com/console'>Google Cloud Console</a>";
|
||||
|
|
|
@ -8,145 +8,197 @@ $uuidJSCondition = implode(" && ", $rowId);
|
|||
?>
|
||||
<style>
|
||||
td.wrapText{white-space: normal;}
|
||||
.PluginActive, .PluginTags{
|
||||
margin: 2px;
|
||||
border: solid 2px;
|
||||
}
|
||||
.PluginActive.checked, .PluginTags.checked{
|
||||
}
|
||||
.PluginActive.unchecked, .PluginTags.unchecked{
|
||||
background-color: rgba(0,0,0,0.4);
|
||||
}
|
||||
.PluginActive:hover, .PluginTags:hover{
|
||||
border: solid 2px rgba(0,0,0,1);
|
||||
cursor: pointer;
|
||||
}
|
||||
.pluginDescription{
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
height: 1.75em;
|
||||
line-height: 1.75;
|
||||
}
|
||||
</style>
|
||||
<div class="container-fluid">
|
||||
<?php
|
||||
include $global['systemRootPath'] . 'view/include/updateCheck.php';
|
||||
?>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a data-toggle="tab" href="#menu0"><i class="fa fa-plug"></i> <?php echo __('Installed Plugins'); ?></a></li>
|
||||
<li><a data-toggle="tab" href="#menu1"><i class="fa fa-cart-plus"></i> <?php echo __('Plugins Store'); ?></a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div id="menu0" class="tab-pane fade in active">
|
||||
<div class="list-group-item">
|
||||
<div class="btn-group" >
|
||||
<button type="button" class="btn btn-default" id="upload">
|
||||
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> <?php echo __("Upload a Plugin"); ?>
|
||||
</button>
|
||||
</div>
|
||||
<table id="grid" class="table table-condensed table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-column-id="name" data-formatter="name" data-width="300px" ><?php echo __("Name"); ?></th>
|
||||
<th data-column-id="description" data-css-class="wrapText"><?php echo __("description"); ?></th>
|
||||
<th data-column-id="commands" data-formatter="commands" data-sortable="false" data-width="150px"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<div id="pluginsFormModal" class="modal fade" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo __("Plugin Form"); ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a data-toggle="tab" href="#visual">Visual</a></li>
|
||||
<li><a data-toggle="tab" href="#code">Code</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div id="visual" class="tab-pane fade in active">
|
||||
<div class="row" id="jsonElements" style="padding: 10px;">Some content.</div>
|
||||
</div>
|
||||
<div id="code" class="tab-pane fade">
|
||||
<form class="form-compact" id="updatePluginForm" onsubmit="">
|
||||
<input type="hidden" id="inputPluginId" >
|
||||
<label for="inputData" class="sr-only">Object Data</label>
|
||||
<textarea class="form-control" id="inputData" rows="5" placeholder="Object Data"></textarea>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __("Close"); ?></button>
|
||||
<button type="button" class="btn btn-primary" id="savePluginBtn"><?php echo __("Save changes"); ?></button>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div>
|
||||
<div id="pluginsImportFormModal" class="modal fade" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<?php
|
||||
$dir = "{$global['systemRootPath']}plugin";
|
||||
if (!isUnzip()) {
|
||||
?>
|
||||
<div class="alert alert-warning">
|
||||
<?php echo __("Make sure you have the unzip app on your server"); ?>
|
||||
<pre><code>sudo apt-get install unzip</code></pre>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
if (is_writable($dir)) {
|
||||
?>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo __("Upload a Plugin ZIP File"); ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<input id="input-b1" name="input-b1" type="file" class="">
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<div class="alert alert-danger">
|
||||
<?php echo __("You need to make the plugin dir writable before upload, run this command and refresh this page"); ?>
|
||||
<pre><code>chown www-data:www-data <?php echo $dir; ?> && chmod 755 <?php echo $dir; ?></code></pre>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel">
|
||||
<div class="panel-heading tabbable-line">
|
||||
<?php
|
||||
include $global['systemRootPath'] . 'view/include/updateCheck.php';
|
||||
?>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a data-toggle="tab" href="#menu0"><i class="fa fa-plug"></i> <?php echo __('Installed Plugins'); ?></a></li>
|
||||
<li><a data-toggle="tab" href="#menu1"><i class="fa fa-cart-plus"></i> <?php echo __('Plugins Store'); ?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="menu1" class="tab-pane fade">
|
||||
<div class="list-group-item">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><a href="https://plugins.avideo.com/" class="btn btn-default btn-xs"><i class="fa fa-plug"></i> Plugin Store </a></div>
|
||||
<div class="panel-body">
|
||||
<ul class="list-group" id="pluginStoreList">
|
||||
</ul>
|
||||
<div class="panel-body">
|
||||
|
||||
<div class="tab-content">
|
||||
<div id="menu0" class="tab-pane fade in active">
|
||||
<div class="list-group-item">
|
||||
<div class="btn-group" >
|
||||
<button type="button" class="btn btn-default" id="upload">
|
||||
<i class="fas fa-plus"></i> <?php echo __("Upload a Plugin"); ?>
|
||||
</button>
|
||||
</div>
|
||||
<div style="text-align: right; padding: 5px;">
|
||||
<span class="badge" id="PluginTagsTotal">...</span>
|
||||
<button class="label label-default checked PluginTags PluginActive" pluginTag="all" id="PluginTagsAll" onclick="resetShowActiveInactiveOnly();PluginTagsReset();" >
|
||||
<i class="fas fa-check-double"></i> <span class="hidden-md hidden-sm hidden-xs"><?php echo __("All"); ?></span>
|
||||
</button>
|
||||
<button class="label label-primary checked PluginActive" pluginTag="Installed" id="PluginTagsInstalled" onclick="showActivesOnly();" >
|
||||
<i class="fas fa-check"></i> <span class="hidden-md hidden-sm hidden-xs"><?php echo __("Installed"); ?></span>
|
||||
</button>
|
||||
<button class="label label-primary checked PluginActive" pluginTag="Uninstalled" id="PluginTagsUninstalled" onclick="showInactiveOnly();" >
|
||||
<i class="fas fa-times"></i> <span class="hidden-md hidden-sm hidden-xs"><?php echo __("Uninstalled"); ?></span>
|
||||
</button>
|
||||
<?php
|
||||
$class = new ReflectionClass('PluginTags');
|
||||
$staticProperties = $class->getStaticProperties();
|
||||
foreach ($staticProperties as $key => $value) {
|
||||
?>
|
||||
<button class="label label-<?php echo $value[0]; ?> unchecked PluginTags"
|
||||
id="PluginTags<?php echo $value[3]; ?>"
|
||||
pluginTag="<?php echo $value[3]; ?>"
|
||||
onclick="PluginTagsToggle('<?php echo $value[3]; ?>')"
|
||||
data-toggle="tooltip" title="<?php echo __($value[1]); ?>">
|
||||
<?php echo $value[2]; ?> <span class="hidden-md hidden-sm hidden-xs"><?php echo __($value[1]); ?></span>
|
||||
</button>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<table id="grid" class="table table-condensed table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-column-id="name" data-formatter="name" data-width="300px" ><?php echo __("Name"); ?></th>
|
||||
<th data-column-id="description" data-formatter="description" data-css-class="wrapText hidden-md hidden-sm hidden-xs" data-header-css-class="hidden-md hidden-sm hidden-xs"><?php echo __("description"); ?></th>
|
||||
<th data-column-id="commands" data-formatter="commands" data-sortable="false" data-width="150px"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<div id="pluginsFormModal" class="modal fade" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo __("Plugin Form"); ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a data-toggle="tab" href="#visual">Visual</a></li>
|
||||
<li><a data-toggle="tab" href="#code">Code</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div id="visual" class="tab-pane fade in active">
|
||||
<div class="row" id="jsonElements" style="padding: 10px;">Some content.</div>
|
||||
</div>
|
||||
<div id="code" class="tab-pane fade">
|
||||
<form class="form-compact" id="updatePluginForm" onsubmit="">
|
||||
<input type="hidden" id="inputPluginId" >
|
||||
<label for="inputData" class="sr-only">Object Data</label>
|
||||
<textarea class="form-control" id="inputData" rows="5" placeholder="Object Data"></textarea>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __("Close"); ?></button>
|
||||
<button type="button" class="btn btn-primary" id="savePluginBtn"><?php echo __("Save changes"); ?></button>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div>
|
||||
<div id="pluginsImportFormModal" class="modal fade" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<?php
|
||||
$dir = "{$global['systemRootPath']}plugin";
|
||||
if (!isUnzip()) {
|
||||
?>
|
||||
<div class="alert alert-warning">
|
||||
<?php echo __("Make sure you have the unzip app on your server"); ?>
|
||||
<pre><code>sudo apt-get install unzip</code></pre>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
if (is_writable($dir)) {
|
||||
?>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo __("Upload a Plugin ZIP File"); ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<input id="input-b1" name="input-b1" type="file" class="">
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<div class="alert alert-danger">
|
||||
<?php echo __("You need to make the plugin dir writable before upload, run this command and refresh this page"); ?>
|
||||
<pre><code>chown www-data:www-data <?php echo $dir; ?> && chmod 755 <?php echo $dir; ?></code></pre>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="menu1" class="tab-pane fade">
|
||||
<div class="list-group-item">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><a href="https://plugins.avideo.com/" class="btn btn-default btn-xs"><i class="fa fa-plug"></i> Plugin Store </a></div>
|
||||
<div class="panel-body">
|
||||
<ul class="list-group" id="pluginStoreList">
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<li class="list-group-item hidden col-md-3" id="pluginStoreListModel">
|
||||
|
||||
<div class="panel panel-warning panel-sm">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="the-price">
|
||||
<h1>
|
||||
USD $<span class="int">0</span>.<small class="cents">00</small>
|
||||
</h1>
|
||||
</div>
|
||||
<table class="table">
|
||||
<tr >
|
||||
<td>
|
||||
<img src="" class="img img-responsive img-rounded img-thumbnail zoom" style="height: 70px;">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="active">
|
||||
<td class="desc" style="height: 50px;"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<a href="https://youphp.tube/plugins/" class="btn btn-success btn-xs" role="button"><i class="fa fa-cart-plus"></i> <?php echo __("Buy This Plugin"); ?> </a>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<li class="list-group-item hidden col-md-3" id="pluginStoreListModel">
|
||||
|
||||
<div class="panel panel-warning panel-sm">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="the-price">
|
||||
<h1>
|
||||
USD $<span class="int">0</span>.<small class="cents">00</small>
|
||||
</h1>
|
||||
</div>
|
||||
<table class="table">
|
||||
<tr >
|
||||
<td>
|
||||
<img src="" class="img img-responsive img-rounded img-thumbnail zoom" style="height: 70px;">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="active">
|
||||
<td class="desc" style="height: 50px;"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<a href="https://youphp.tube/plugins/" class="btn btn-success btn-xs" role="button"><i class="fa fa-cart-plus"></i> <?php echo __("Buy This Plugin"); ?> </a>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</div><!--/.container-->
|
||||
|
||||
<script>
|
||||
|
@ -227,7 +279,7 @@ $uuidJSCondition = implode(" && ", $rowId);
|
|||
json [name] = $(this).val();
|
||||
}
|
||||
});
|
||||
console.log(json);
|
||||
//console.log(json);
|
||||
return json;
|
||||
}
|
||||
|
||||
|
@ -243,6 +295,175 @@ $uuidJSCondition = implode(" && ", $rowId);
|
|||
$li.find('.img').attr("src", src);
|
||||
$('#pluginStoreList').append($li);
|
||||
}
|
||||
|
||||
function showActivesOnly() {
|
||||
var id = "#PluginTagsUninstalled";
|
||||
$(id).removeClass('checked');
|
||||
$(id).addClass('unchecked');
|
||||
var id = "#PluginTagsInstalled";
|
||||
$(id).removeClass('unchecked');
|
||||
$(id).addClass('checked');
|
||||
processShow();
|
||||
}
|
||||
function showInactiveOnly() {
|
||||
var id = "#PluginTagsInstalled";
|
||||
$(id).removeClass('checked');
|
||||
$(id).addClass('unchecked');
|
||||
var id = "#PluginTagsUninstalled";
|
||||
$(id).removeClass('unchecked');
|
||||
$(id).addClass('checked');
|
||||
processShow();
|
||||
}
|
||||
|
||||
function resetShowActiveInactiveOnly() {
|
||||
var id = "#PluginTagsInstalled";
|
||||
$(id).removeClass('unchecked');
|
||||
$(id).addClass('checked');
|
||||
var id = "#PluginTagsUninstalled";
|
||||
$(id).removeClass('unchecked');
|
||||
$(id).addClass('checked');
|
||||
}
|
||||
|
||||
function showAllOnProcess() {
|
||||
if (isFilterInstalledUninstalledDisabled() || $("#PluginTagsAll").hasClass('checked')) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function isFilterInstalledUninstalledDisabled() {
|
||||
var id1 = "#PluginTagsInstalled";
|
||||
var id2 = "#PluginTagsUninstalled";
|
||||
if ($(id1).hasClass('checked') && $(id2).hasClass('checked')) {
|
||||
return false;
|
||||
}
|
||||
if ($(id1).hasClass('unchecked') && $(id2).hasClass('unchecked')) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function processShowHideIfActive(tr){
|
||||
if ($(tr).find(".pluginSwitch").is(":checked")) {
|
||||
if ($("#PluginTagsInstalled").hasClass('checked')) {
|
||||
$(tr).show();
|
||||
} else {
|
||||
$(tr).hide();
|
||||
}
|
||||
} else {
|
||||
if ($("#PluginTagsInstalled").hasClass('checked')) {
|
||||
$(tr).hide();
|
||||
} else {
|
||||
$(tr).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function processShow() {
|
||||
if (!isFilterInstalledUninstalledDisabled()) {
|
||||
PluginTagsProcess();
|
||||
} else {
|
||||
var allItemsSeletors = getAllItemsSelector();
|
||||
console.log(allItemsSeletors);
|
||||
$("#grid tr").each(function (i, tr) {
|
||||
|
||||
if (allItemsSeletors) {
|
||||
if ($(tr).find(allItemsSeletors).length !== 0) {
|
||||
processShowHideIfActive(tr);
|
||||
} else {
|
||||
$(tr).hide();
|
||||
}
|
||||
} else {
|
||||
processShowHideIfActive(tr);
|
||||
}
|
||||
|
||||
|
||||
console.log($(tr).find(allItemsSeletors).length);
|
||||
if (!allItemsSeletors || $(tr).find(allItemsSeletors).length !== 0) {
|
||||
if ($(tr).find(".pluginSwitch").is(":checked")) {
|
||||
if ($("#PluginTagsInstalled").hasClass('checked')) {
|
||||
$(tr).show();
|
||||
} else {
|
||||
$(tr).hide();
|
||||
}
|
||||
} else {
|
||||
if ($("#PluginTagsInstalled").hasClass('checked')) {
|
||||
$(tr).hide();
|
||||
} else {
|
||||
$(tr).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
totalVisible();
|
||||
}
|
||||
function PluginTagsReset() {
|
||||
$('.PluginTags').not('#PluginTagsAll').removeClass('checked');
|
||||
$('.PluginTags').not('#PluginTagsAll').addClass('unchecked');
|
||||
$("#PluginTagsAll").removeClass('unchecked');
|
||||
$("#PluginTagsAll").addClass('checked');
|
||||
$("#grid tr").show();
|
||||
totalVisible();
|
||||
}
|
||||
|
||||
function totalVisible() {
|
||||
$('#PluginTagsTotal').text($("#grid tr:visible").length + ' / ' + $("#grid tr").length);
|
||||
}
|
||||
|
||||
function PluginTagsToggle(type) {
|
||||
var id = '#PluginTags' + type;
|
||||
if ($(id).hasClass('checked')) {
|
||||
$(id).removeClass('checked');
|
||||
$(id).addClass('unchecked');
|
||||
} else {
|
||||
$(id).removeClass('unchecked');
|
||||
$(id).addClass('checked');
|
||||
}
|
||||
$('#PluginTagsAll').removeClass('checked');
|
||||
$('#PluginTagsAll').addClass('unchecked');
|
||||
processShow();
|
||||
}
|
||||
|
||||
function getAllItemsSelector() {
|
||||
var selectors = [];
|
||||
$('.PluginTags').each(function (i, obj) {
|
||||
if ($(obj).hasClass('checked')) {
|
||||
selectors.push('.plugin' + $(obj).attr('pluginTag'));
|
||||
}
|
||||
});
|
||||
if ($("#PluginTagsAll").hasClass('checked') || selectors.length === 0) {
|
||||
PluginTagsReset();
|
||||
return false;
|
||||
}
|
||||
return selectors.join(", ");
|
||||
}
|
||||
|
||||
function PluginTagsProcess() {
|
||||
var allItemsSeletors = getAllItemsSelector();
|
||||
$("#grid tr").each(function (i, tr) {
|
||||
if (!allItemsSeletors || $(tr).find(allItemsSeletors).length !== 0) {
|
||||
$(tr).show();
|
||||
} else {
|
||||
$(tr).hide();
|
||||
}
|
||||
});
|
||||
totalVisible();
|
||||
}
|
||||
|
||||
function tooglePluginDescription(t) {
|
||||
if ($(t).parent().hasClass('pluginDescription')) {
|
||||
$(t).parent().removeClass('pluginDescription');
|
||||
$(t).find('i').removeClass('fa-plus');
|
||||
$(t).find('i').addClass('fa-minus');
|
||||
} else {
|
||||
$(t).parent().addClass('pluginDescription');
|
||||
$(t).find('i').addClass('fa-plus');
|
||||
$(t).find('i').removeClass('fa-minus');
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
var myTextarea = document.getElementById("inputData");
|
||||
var grid = $("#grid").bootgrid({
|
||||
|
@ -257,6 +478,13 @@ $uuidJSCondition = implode(" && ", $rowId);
|
|||
navigation: 0,
|
||||
ajax: true,
|
||||
url: "<?php echo $global['webSiteRootURL'] . "objects/pluginsAvailable.json.php"; ?>",
|
||||
responseHandler: function (data) {
|
||||
setTimeout(function () {
|
||||
totalVisible();
|
||||
}, 1000);
|
||||
return data;
|
||||
|
||||
},
|
||||
formatters: {
|
||||
"commands": function (column, row) {
|
||||
var editBtn = '';
|
||||
|
@ -277,7 +505,7 @@ $uuidJSCondition = implode(" && ", $rowId);
|
|||
updateBtn = '<button type="button" class="btn btn-xs btn-warning command-update btn-block" data-row-id="' + row.id + '" data-toggle="tooltip" data-placement="left" title="<?php echo __('Run Update Script'); ?>"><span class="fa fa-wrench" aria-hidden="true"></span> <?php echo __('Update'); ?> @' + row.pluginversion + '</button>';
|
||||
}
|
||||
|
||||
return editBtn + sqlBtn + updateBtn + "<br>" + menu;
|
||||
return editBtn + sqlBtn + updateBtn + menu;
|
||||
},
|
||||
"name": function (column, row) {
|
||||
var checked = "";
|
||||
|
@ -286,7 +514,7 @@ $uuidJSCondition = implode(" && ", $rowId);
|
|||
if (row.enabled) {
|
||||
checked = " checked='checked' ";
|
||||
}
|
||||
var switchBtn = '<div class="material-switch"><input name="enable' + row.uuid + '" id="enable' + row.uuid + '" type="checkbox" value="0" class="pluginSwitch" ' + checked + ' /><label for="enable' + row.uuid + '" class="label-success"></label></div>';
|
||||
var switchBtn = '<div class="material-small material-switch pull-left"><input name="enable' + row.uuid + '" id="enable' + row.uuid + '" type="checkbox" value="0" class="pluginSwitch" ' + checked + ' /><label for="enable' + row.uuid + '" class="label-success"></label></div>';
|
||||
} else {
|
||||
if (!row.enabled) {
|
||||
$.ajax({
|
||||
|
@ -298,42 +526,50 @@ $uuidJSCondition = implode(" && ", $rowId);
|
|||
}
|
||||
var switchBtn = '';
|
||||
}
|
||||
//var txt = '<span id="plugin' + row.uuid + '" style="margin-top: -60px; position: absolute;"></span><a href="#plugin' + row.uuid + '">' + row.name + "</a> (" + row.dir + ")<br><small class='text-muted'>UUID: " + row.uuid + "</small>";
|
||||
var txt = '<span id="plugin' + row.uuid + '" style="margin-top: -60px; position: absolute;"></span><a href="#plugin' + row.uuid + '">' + row.name + "</a> <small class='text-muted'>(" + row.dir + ")</small>";
|
||||
|
||||
|
||||
txt += "<br> " + switchBtn + ' ';
|
||||
if (row.hasOwnProperty("installedPlugin") && row.installedPlugin.hasOwnProperty("pluginversion")) {
|
||||
//console.log("Objecto: " + row.name);
|
||||
//console.log("Installed: " + row.installedPlugin.pluginversion);
|
||||
//console.log("Object: " + row.pluginversion);
|
||||
//console.log(row.installedPlugin.pluginversion != row.pluginversion);
|
||||
if (row.installedPlugin.pluginversion != row.pluginversion) {
|
||||
txt += "<small class='text-danger'>Installed (@" + row.installedPlugin.pluginversion + ")<br>Current Version (@" + row.pluginversion + "), please update</small>";
|
||||
} else {
|
||||
txt += "<small class='text-success'>Version: @" + row.pluginversion + "</small>";
|
||||
}
|
||||
}
|
||||
|
||||
return txt;
|
||||
},
|
||||
"description": function (column, row) {
|
||||
var txt = '<div class="pluginDescription"><button class="btn btn-xs btn-default" onclick="tooglePluginDescription(this);"><i class="fas fa-plus"></i></button> ' + row.description + '</div>';
|
||||
var tags = '';
|
||||
if (row.tags) {
|
||||
for (i = 0; i < row.tags.length; i++) {
|
||||
if (row.tags[i] === 'update') {
|
||||
tags += '<a class="label label-warning" href="https://youphp.tube/marketplace/" target="_blank">Update Available: v' + row.pluginversionMarketPlace + '</a> ';
|
||||
}else{
|
||||
var cl = "primary";
|
||||
if (row.tags[i] === 'free') {
|
||||
cl = 'success';
|
||||
} else if (row.tags[i] === 'firstPage') {
|
||||
cl = 'danger';
|
||||
} else if (row.tags[i] === 'login') {
|
||||
cl = 'info';
|
||||
}
|
||||
if (typeof row.tags[i] == 'object') {
|
||||
tags += '<span class="label label-' + row.tags[i][0] + ' plugin' + row.tags[i][3] + '">' + row.tags[i][2] + ' ' + row.tags[i][1] + '</span> ';
|
||||
} else {
|
||||
if (row.tags[i] === 'update') {
|
||||
tags += '<a class="label label-warning" href="https://youphp.tube/marketplace/" target="_blank">Update Available: v' + row.pluginversionMarketPlace + '</a> ';
|
||||
} else {
|
||||
var cl = "primary";
|
||||
if (row.tags[i] === 'free') {
|
||||
cl = 'success';
|
||||
} else if (row.tags[i] === 'firstPage') {
|
||||
cl = 'danger';
|
||||
} else if (row.tags[i] === 'login') {
|
||||
cl = 'info';
|
||||
}
|
||||
|
||||
tags += '<span class="label label-' + cl + '">' + row.tags[i] + '</span> ';
|
||||
tags += '<span class="label label-' + cl + '">' + row.tags[i] + '</span> ';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
var txt = '<span id="plugin' + row.uuid + '" style="margin-top: -60px; position: absolute;"></span><a href="#plugin' + row.uuid + '">' + row.name + "</a> (" + row.dir + ")<br><small class='text-muted'>UUID: " + row.uuid + "</small>";
|
||||
if (row.hasOwnProperty("installedPlugin") && row.installedPlugin.hasOwnProperty("pluginversion")) {
|
||||
console.log("Objecto: " + row.name);
|
||||
console.log("Installed: " + row.installedPlugin.pluginversion);
|
||||
console.log("Object: " + row.pluginversion);
|
||||
console.log(row.installedPlugin.pluginversion != row.pluginversion);
|
||||
if (row.installedPlugin.pluginversion != row.pluginversion) {
|
||||
txt += "<br><small class='text-danger'>Installed (@" + row.installedPlugin.pluginversion + ")<br>Current Version (@" + row.pluginversion + "), please update</small><br>";
|
||||
} else {
|
||||
txt += "<br><small class='text-success'>Version: @" + row.pluginversion + "</small><br>";
|
||||
}
|
||||
}
|
||||
console.log(txt);
|
||||
txt += "<br>" + switchBtn;
|
||||
txt += "<br>" + tags;
|
||||
return txt;
|
||||
}
|
||||
|
@ -359,8 +595,8 @@ $uuidJSCondition = implode(" && ", $rowId);
|
|||
var row = $("#grid").bootgrid("getCurrentRows")[row_index];
|
||||
$('#inputPluginId').val(row.id);
|
||||
var json = JSON.stringify(row.data_object);
|
||||
console.log(json);
|
||||
console.log(row.data_object);
|
||||
//console.log(json);
|
||||
//console.log(row.data_object);
|
||||
jsonToForm(row.data_object);
|
||||
$('#inputData').val(json);
|
||||
$('#pluginsFormModal').modal();
|
||||
|
@ -429,6 +665,7 @@ $uuidJSCondition = implode(" && ", $rowId);
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue