1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-04 10:19:24 +02:00

Add option to swap video content.

Basically it changes the filename of 2 videos.
This commit is contained in:
daniel 2020-03-27 12:35:21 -03:00
parent 08b49d1601
commit 3693b8ecaa
18 changed files with 423 additions and 80 deletions

View file

@ -73,7 +73,7 @@ abstract class ObjectYPT implements ObjectInterface {
//current=1&rowCount=10&sort[sender]=asc&searchPhrase= //current=1&rowCount=10&sort[sender]=asc&searchPhrase=
global $global; global $global;
if (!static::isTableInstalled()) { if (!static::isTableInstalled()) {
return false; return 0;
} }
$sql = "SELECT id FROM " . static::getTableName() . " WHERE 1=1 "; $sql = "SELECT id FROM " . static::getTableName() . " WHERE 1=1 ";
$sql .= self::getSqlSearchFromPost(); $sql .= self::getSqlSearchFromPost();

View file

@ -2497,7 +2497,7 @@ function get_browser_name($user_agent = "") {
strpos($t, 'bot') || strpos($t, 'archive') || strpos($t, 'bot') || strpos($t, 'archive') ||
strpos($t, 'info') || strpos($t, 'data')) strpos($t, 'info') || strpos($t, 'data'))
return '[Bot] Other'; return '[Bot] Other';
_error_log($t); _error_log("Unknow user agent ($t)");
return 'Other (Unknown)'; return 'Other (Unknown)';
} }

View file

@ -1301,11 +1301,19 @@ if (typeof gtag !== \"function\") {
return $this->recoverPass; return $this->recoverPass;
} }
static function canUpload() { static function canUpload($doNotCheckPlugins=false) {
global $global, $config; global $global, $config, $advancedCustomUser;
if (User::isAdmin()) { if (User::isAdmin()) {
return true; return true;
} }
if(empty($doNotCheckPlugins) && !AVideoPlugin::userCanUpload(User::getId())){
return false;
}
if(isset($advancedCustomUser->onlyVerifiedEmailCanUpload) && $advancedCustomUser->onlyVerifiedEmailCanUpload && !User::isVerified()){
return false;
}
if ($config->getAuthCanUploadVideos()) { if ($config->getAuthCanUploadVideos()) {
return self::isLogged(); return self::isLogged();
} }

View file

@ -2303,8 +2303,8 @@ if (!class_exists('Video')) {
$this->title = substr($this->title, 0, 187) . '...'; $this->title = substr($this->title, 0, 187) . '...';
} }
function setFilename($filename) { function setFilename($filename, $force=false) {
if (empty($this->filename)) { if ($force || empty($this->filename)) {
$this->filename = $filename; $this->filename = $filename;
} }
return $this->filename; return $this->filename;

View file

@ -0,0 +1,52 @@
<?php
header('Content-Type: application/json');
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../videos/configuration.php';
}
$obj = new stdClass();
$obj->msg = "";
$obj->error = true;
if (!User::canUpload()) {
$obj->msg = __("Permission denied");
die(json_encode($obj));
}
if (empty($_POST['videos_id_1']) || empty($_POST['videos_id_2'])) {
$obj->msg = __("Mou MUST select 2 videos to swap");
die(json_encode($obj));
}
$video1 = new Video("", "", $_POST['videos_id_1']);
if (!$video1->userCanManageVideo()) {
$obj->msg = __("You can not Manage This Video 1");
die(json_encode($obj));
}
$video2 = new Video("", "", $_POST['videos_id_2']);
if (!$video2->userCanManageVideo()) {
$obj->msg = __("You can not Manage This Video 2");
die(json_encode($obj));
}
$video1Filename = $video1->getFilename();
$video2Filename = $video2->getFilename();
$video1->setFilename($video2Filename, true);
$video2->setFilename($video1Filename, true);
$global['mysqli']->autocommit(false);
if(!$video1->save()){
$obj->msg = __("Error on save video 1");
die(json_encode($obj));
}
if(!$video2->save()){
$obj->msg = __("Error on save video 2");
die(json_encode($obj));
}
$global['mysqli']->commit();
$obj->error = false;
die(json_encode($obj));

View file

@ -858,6 +858,34 @@ class AVideoPlugin {
return $array; return $array;
} }
public static function userCanUpload($users_id){
if(empty($users_id)){
return false;
}
$resp = true;
$plugins = Plugin::getAllEnabled();
foreach ($plugins as $value) {
self::YPTstart();
$p = static::loadPlugin($value['dirName']);
if (is_object($p)) {
$can = $p->userCanUpload($users_id);
if(!empty($can)){
if($can < 0){
_error_log("userCanUpload: DENIED The plugin {$value['dirName']} said the user ({$users_id}) can NOT upload a video ");
$resp = false;
}
if($can>0){
_error_log("userCanUpload: SUCCESS The plugin {$value['dirName']} said the user ({$users_id}) can upload a video ");
return true;
}
}
}
self::YPTend("{$value['dirName']}::".__FUNCTION__);
}
return $resp;
}
public static function userCanWatchVideo($users_id, $videos_id){ public static function userCanWatchVideo($users_id, $videos_id){
$plugins = Plugin::getAllEnabled(); $plugins = Plugin::getAllEnabled();
$resp = Video::userGroupAndVideoGroupMatch($users_id, $videos_id);; $resp = Video::userGroupAndVideoGroupMatch($users_id, $videos_id);;

View file

@ -37,6 +37,7 @@ class CustomizeAdvanced extends PluginAbstract {
$obj->encoderNetworkLabel = ""; $obj->encoderNetworkLabel = "";
$obj->doNotShowUploadMP4Button = true; $obj->doNotShowUploadMP4Button = true;
$obj->disablePDFUpload = false; $obj->disablePDFUpload = false;
$obj->disableMP4Upload = false;
$obj->uploadMP4ButtonLabel = ""; $obj->uploadMP4ButtonLabel = "";
$obj->doNotShowImportMP4Button = true; $obj->doNotShowImportMP4Button = true;
$obj->importMP4ButtonLabel = ""; $obj->importMP4ButtonLabel = "";
@ -110,6 +111,7 @@ class CustomizeAdvanced extends PluginAbstract {
$obj->doNotDisplayGroupsTags = false; $obj->doNotDisplayGroupsTags = false;
$obj->doNotDisplayPluginsTags = false; $obj->doNotDisplayPluginsTags = false;
$obj->showNotRatedLabel = false; $obj->showNotRatedLabel = false;
$obj->showShareMenuOpenByDefault = false;
$obj->askRRatingConfirmationBeforePlay_G = false; $obj->askRRatingConfirmationBeforePlay_G = false;
$obj->askRRatingConfirmationBeforePlay_PG = false; $obj->askRRatingConfirmationBeforePlay_PG = false;
$obj->askRRatingConfirmationBeforePlay_PG13 = false; $obj->askRRatingConfirmationBeforePlay_PG13 = false;
@ -144,6 +146,7 @@ class CustomizeAdvanced extends PluginAbstract {
$obj->enableOldPassHashCheck = true; $obj->enableOldPassHashCheck = true;
$obj->disableHTMLDescription = false; $obj->disableHTMLDescription = false;
$obj->disableTopMenusInsideIframe = true; $obj->disableTopMenusInsideIframe = true;
$obj->disableVideoSwap = false;
return $obj; return $obj;
} }

View file

@ -342,6 +342,15 @@ abstract class PluginAbstract {
return array(); return array();
} }
/**
*
* @param type $users_id
* @return 0 = I dont know, -1 = can not upload, 1 = can upload
*/
public function userCanUpload($users_id) {
return 0;
}
/** /**
* *
* @param type $users_id * @param type $users_id

View file

@ -0,0 +1,22 @@
# How to become a contributor and submit your own code
## Contributor License Agreements
We'd love to accept your code patches! However, before we can take them, we have to jump a couple of legal hurdles.
Please fill out either the individual or corporate Contributor License Agreement (CLA).
* If you are an individual writing original source code and you're sure you own the intellectual property, then you'll need to sign an [individual CLA](http://code.google.com/legal/individual-cla-v1.0.html).
* If you work for a company that wants to allow you to contribute your work to this client library, then you'll need to sign a[corporate CLA](http://code.google.com/legal/corporate-cla-v1.0.html).
Follow either of the two links above to access the appropriate CLA and instructions for how to sign and return it. Once we receive it, we'll add you to the official list of contributors and be able to accept your patches.
## Submitting Patches
1. Fork the PHP client library on GitHub
1. Decide which code you want to submit. A submission should be a set of changes that addresses one issue in the issue tracker. Please file one change per issue, and address one issue per change. If you want to make a change that doesn't have a corresponding issue in the issue tracker, please file a new ticket!
1. Ensure that your code adheres to standard PHP conventions, as used in the rest of the library.
1. Ensure that there are unit tests for your code.
1. Sign a Contributor License Agreement (see above).
1. Submit a pull request with your patch on Github.

View file

@ -0,0 +1,41 @@
<?php
/*
* Copyright 2016 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
class Google_Service_AndroidPublisher_InappproductsBatchResponse extends Google_Collection
{
protected $collection_key = 'entrys';
protected $entrysType = 'Google_Service_AndroidPublisher_InappproductsBatchResponseEntry';
protected $entrysDataType = 'array';
public $kind;
public function setEntrys($entrys)
{
$this->entrys = $entrys;
}
public function getEntrys()
{
return $this->entrys;
}
public function setKind($kind)
{
$this->kind = $kind;
}
public function getKind()
{
return $this->kind;
}
}

View file

@ -0,0 +1,39 @@
<?php
/*
* Copyright 2016 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
class Google_Service_ServiceManagement_MediaUpload extends Google_Model
{
public $enabled;
public $uploadService;
public function setEnabled($enabled)
{
$this->enabled = $enabled;
}
public function getEnabled()
{
return $this->enabled;
}
public function setUploadService($uploadService)
{
$this->uploadService = $uploadService;
}
public function getUploadService()
{
return $this->uploadService;
}
}

View file

@ -0,0 +1,87 @@
<?php
/*
* Copyright 2016 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
class Google_Service_ServiceManagement_Rule extends Google_Collection
{
protected $collection_key = 'permissions';
public $action;
protected $conditionsType = 'Google_Service_ServiceManagement_Condition';
protected $conditionsDataType = 'array';
public $description;
public $in;
protected $logConfigType = 'Google_Service_ServiceManagement_LogConfig';
protected $logConfigDataType = 'array';
public $notIn;
public $permissions;
public function setAction($action)
{
$this->action = $action;
}
public function getAction()
{
return $this->action;
}
public function setConditions($conditions)
{
$this->conditions = $conditions;
}
public function getConditions()
{
return $this->conditions;
}
public function setDescription($description)
{
$this->description = $description;
}
public function getDescription()
{
return $this->description;
}
public function setIn($in)
{
$this->in = $in;
}
public function getIn()
{
return $this->in;
}
public function setLogConfig($logConfig)
{
$this->logConfig = $logConfig;
}
public function getLogConfig()
{
return $this->logConfig;
}
public function setNotIn($notIn)
{
$this->notIn = $notIn;
}
public function getNotIn()
{
return $this->notIn;
}
public function setPermissions($permissions)
{
$this->permissions = $permissions;
}
public function getPermissions()
{
return $this->permissions;
}
}

View file

@ -6,9 +6,15 @@ $extraPluginFile = $global['systemRootPath'] . 'plugin/Customize/Objects/ExtraCo
$custom = ""; $custom = "";
if (file_exists($extraPluginFile) && AVideoPlugin::isEnabled("c4fe1b83-8f5a-4d1b-b912-172c608bf9e3")) {
require_once $extraPluginFile;
$ec = new ExtraConfig();
$custom = $ec->getDescription();
}
if (!empty($poster)) { if (!empty($poster)) {
$subTitle = str_replace(array('"', "\n", "\r"), array("", "", ""), strip_tags($video['description'])); $subTitle = str_replace(array('"', "\n", "\r"), array("", "", ""), strip_tags($video['description']));
$custom .= " {$subTitle}"; $custom = "{$subTitle} - {$video["category"]}";
} }
if (!empty($_GET['catName'])) { if (!empty($_GET['catName'])) {
@ -17,11 +23,6 @@ if (!empty($_GET['catName'])) {
$custom = " {$description} - {$custom}"; $custom = " {$description} - {$custom}";
} }
if (file_exists($extraPluginFile) && AVideoPlugin::isEnabled("c4fe1b83-8f5a-4d1b-b912-172c608bf9e3")) {
require_once $extraPluginFile;
$ec = new ExtraConfig();
$custom .= $ec->getDescription();
}
$theme = $config->getTheme(); $theme = $config->getTheme();
?> ?>

View file

@ -520,7 +520,7 @@ if (((empty($advancedCustomUser->userMustBeLoggedIn) && empty($advancedCustom->d
</li> </li>
<?php <?php
if (User::canUpload()) { if (User::canUpload(true)) {
?> ?>
<li> <li>
<a href="<?php echo $global['webSiteRootURL']; ?>mvideos"> <a href="<?php echo $global['webSiteRootURL']; ?>mvideos">

View file

@ -551,3 +551,12 @@ function playerPlay(currentTime) {
console.log("playerPlay: Player is Undefined"); console.log("playerPlay: Player is Undefined");
} }
} }
function formatBytes(bytes,decimals) {
if(bytes == 0) return '0 Bytes';
var k = 1024,
dm = decimals <= 0 ? 0 : decimals || 2,
sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],
i = Math.floor(Math.log(bytes) / Math.log(k));
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
}

View file

@ -11,7 +11,7 @@ if(!User::isLogged()) {
exit; exit;
} }
if (!User::canUpload()) { if (!User::canUpload(true)) {
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not manage videos")); header("Location: {$global['webSiteRootURL']}?error=" . __("You can not manage videos"));
exit; exit;
} }

View file

@ -67,18 +67,19 @@
array_multisort(array_column($categories, 'hierarchyAndName'), SORT_ASC, $categories); array_multisort(array_column($categories, 'hierarchyAndName'), SORT_ASC, $categories);
if (User::canUpload()) { if (User::canUpload()) {
if (empty($advancedCustom->doNotShowEncoderButton)) { if (empty($advancedCustom->doNotShowEncoderButton)) {
if (!empty($config->getEncoderURL())) {} if (!empty($config->getEncoderURL())) {
?>
<form id="formEncoder" method="post" action="<?php echo $config->getEncoderURL(); ?>" target="encoder">
<input type="hidden" name="webSiteRootURL" value="<?php echo $global['webSiteRootURL']; ?>" />
<input type="hidden" name="user" value="<?php echo User::getUserName(); ?>" />
<input type="hidden" name="pass" value="<?php echo User::getUserPass(); ?>" />
</form>
<a href="#" onclick="$('#formEncoder').submit();return false;" class="btn btn-sm btn-xs btn-default">
<span class="fa fa-cog"></span> <?php echo __("Encode video and audio"); ?>
</a>
<?php
}
?>
<form id="formEncoder" method="post" action="<?php echo $config->getEncoderURL(); ?>" target="encoder">
<input type="hidden" name="webSiteRootURL" value="<?php echo $global['webSiteRootURL']; ?>" />
<input type="hidden" name="user" value="<?php echo User::getUserName(); ?>" />
<input type="hidden" name="pass" value="<?php echo User::getUserPass(); ?>" />
</form>
<a href="#" onclick="$('#formEncoder').submit();return false;" class="btn btn-sm btn-xs btn-default">
<span class="fa fa-cog"></span> <?php echo __("Encode video and audio"); ?>
</a>
<?php
} }
if (empty($advancedCustom->doNotShowUploadMP4Button)) { if (empty($advancedCustom->doNotShowUploadMP4Button)) {
?> ?>
@ -223,6 +224,13 @@
</div> </div>
<?php <?php
} }
if (empty($advancedCustom->disableVideoSwap)) {
?>
<button class="btn btn-primary" id="swapBtn">
<i class="fas fa-random"></i> <?php echo __('Swap Video File'); ?>
</button>
<?php
}
?> ?>
<button class="btn btn-danger" id="deleteBtn"> <button class="btn btn-danger" id="deleteBtn">
<i class="fa fa-trash" aria-hidden="true"></i> <?php echo __('Delete'); ?> <i class="fa fa-trash" aria-hidden="true"></i> <?php echo __('Delete'); ?>
@ -718,14 +726,19 @@ if (empty($advancedCustom->disableHTMLDescription)) {
}); });
} }
function changeStatus(status) { function getSelectedVideos() {
modal.showPleaseWait();
var vals = []; var vals = [];
$(".checkboxVideo").each(function (index) { $(".checkboxVideo").each(function (index) {
if ($(this).is(":checked")) { if ($(this).is(":checked")) {
vals.push($(this).val()); vals.push($(this).val());
} }
}); });
return vals;
}
function changeStatus(status) {
modal.showPleaseWait();
var vals = getSelectedVideos();
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/videoStatus.json.php', url: '<?php echo $global['webSiteRootURL']; ?>objects/videoStatus.json.php',
data: {"id": vals, "status": status}, data: {"id": vals, "status": status},
@ -748,12 +761,7 @@ if (empty($advancedCustom->disableHTMLDescription)) {
} }
function changeCategory(category_id) { function changeCategory(category_id) {
modal.showPleaseWait(); modal.showPleaseWait();
var vals = []; var vals = getSelectedVideos();
$(".checkboxVideo").each(function (index) {
if ($(this).is(":checked")) {
vals.push($(this).val());
}
});
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/videoCategory.json.php', url: '<?php echo $global['webSiteRootURL']; ?>objects/videoCategory.json.php',
data: {"id": vals, "category_id": category_id}, data: {"id": vals, "category_id": category_id},
@ -780,12 +788,7 @@ if (empty($advancedCustomUser->userCanNotChangeUserGroup) || User::isAdmin()) {
?> ?>
function userGroupSave(users_groups_id, add) { function userGroupSave(users_groups_id, add) {
modal.showPleaseWait(); modal.showPleaseWait();
var vals = []; var vals = getSelectedVideos();
$(".checkboxVideo").each(function (index) {
if ($(this).is(":checked")) {
vals.push($(this).val());
}
});
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/userGroupSave.json.php', url: '<?php echo $global['webSiteRootURL']; ?>objects/userGroupSave.json.php',
data: {"id": vals, "users_groups_id": users_groups_id, "add": add}, data: {"id": vals, "users_groups_id": users_groups_id, "add": add},
@ -1182,39 +1185,39 @@ if (empty($advancedCustom->disableHTMLDescription)) {
}, },
type: 'post', type: 'post',
success: function (response) { success: function (response) {
if (response.status === "1" || response.status === true) { if (response.status === "1" || response.status === true) {
if (response.video.id) { if (response.video.id) {
videos_id = response.video.id; videos_id = response.video.id;
} }
if (response.video.type === 'embed' || response.video.type === 'linkVideo' || response.video.type === 'article') { if (response.video.type === 'embed' || response.video.type === 'linkVideo' || response.video.type === 'article') {
videoUploaded = true; videoUploaded = true;
} }
if (closeModal && videoUploaded) { if (closeModal && videoUploaded) {
$('#videoFormModal').modal('hide'); $('#videoFormModal').modal('hide');
} }
$("#grid").bootgrid("reload"); $("#grid").bootgrid("reload");
$('#fileUploadVideos_id').val(response.videos_id); $('#fileUploadVideos_id').val(response.videos_id);
$('#inputVideoId').val(response.videos_id); $('#inputVideoId').val(response.videos_id);
videos_id = response.videos_id; videos_id = response.videos_id;
} else { } else {
if (response.error) { if (response.error) {
swal({ swal({
title: "<?php echo __("Sorry!"); ?>", title: "<?php echo __("Sorry!"); ?>",
text: response.error, text: response.error,
type: "error", type: "error",
html: true html: true
}); });
} else { } else {
swal("<?php echo __("Sorry!"); ?>", "<?php echo __("Your video has NOT been saved!"); ?>", "error"); swal("<?php echo __("Sorry!"); ?>", "<?php echo __("Your video has NOT been saved!"); ?>", "error");
} }
} }
modal.hidePleaseWait(); modal.hidePleaseWait();
setTimeout(function () { setTimeout(function () {
waitToSubmit = false; waitToSubmit = false;
}, 3000); }, 3000);
} }
}); });
return false; return false;
} }
function resetVideoForm() { function resetVideoForm() {
@ -1614,12 +1617,7 @@ echo AVideoPlugin::getManagerVideosReset();
<?php if (!$config->getDisable_youtubeupload()) { ?> <?php if (!$config->getDisable_youtubeupload()) { ?>
$("#uploadYouTubeBtn").click(function () { $("#uploadYouTubeBtn").click(function () {
modal.showPleaseWait(); modal.showPleaseWait();
var vals = []; var vals = getSelectedVideos();
$(".checkboxVideo").each(function (index) {
if ($(this).is(":checked")) {
vals.push($(this).val());
}
});
$.ajax({ $.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/youtubeUpload.json.php', url: '<?php echo $global['webSiteRootURL']; ?>objects/youtubeUpload.json.php',
data: {"id": vals}, data: {"id": vals},
@ -1659,15 +1657,55 @@ echo AVideoPlugin::getManagerVideosReset();
function () { function () {
swal.close(); swal.close();
modal.showPleaseWait(); modal.showPleaseWait();
var vals = []; var vals = getSelectedVideos();
$(".checkboxVideo").each(function (index) {
if ($(this).is(":checked")) {
vals.push($(this).val());
}
});
deleteVideo(vals); deleteVideo(vals);
}); });
}); });
<?php
if (empty($advancedCustom->disableVideoSwap)) {
?>
$("#swapBtn").click(function () {
var vals = getSelectedVideos();
if (vals.length !== 2) {
swal({
title: "<?php echo __("Sorry!"); ?>",
text: "<?php echo __("Mou MUST select 2 videos to swap"); ?>",
type: "error",
html: true
});
return false;
}
modal.showPleaseWait();
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/videoSwap.json.php',
data: {"users_id": <?php echo User::getId(); ?>, "videos_id_1": vals[0], "videos_id_2": vals[1]},
type: 'post',
success: function (response) {
modal.hidePleaseWait();
if (response.error) {
swal({
title: "<?php echo __("Sorry!"); ?>",
text: response.error,
type: "error",
html: true
});
} else {
swal({
title: "<?php echo __("Success!"); ?>",
text: "<?php echo __("Video Swaped!"); ?>",
type: "success",
html: true
});
$("#grid").bootgrid("reload");
}
}
});
});
<?php
}
?>
$('.datepicker').datetimepicker({ $('.datepicker').datetimepicker({
format: 'yyyy-mm-dd hh:ii', format: 'yyyy-mm-dd hh:ii',
autoclose: true autoclose: true

View file

@ -408,7 +408,13 @@ if (empty($video) && !empty($_GET['videos_id'])) {
</div> </div>
<script> <script>
$(document).ready(function () { $(document).ready(function () {
<?php
if(empty($advancedCustom->showShareMenuOpenByDefault)){
?>
$("#shareDiv").slideUp(); $("#shareDiv").slideUp();
<?php
}
?>
$("#shareBtn").click(function () { $("#shareBtn").click(function () {
$(".menusDiv").not("#shareDiv").slideUp(); $(".menusDiv").not("#shareDiv").slideUp();
$("#shareDiv").slideToggle(); $("#shareDiv").slideToggle();