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

Improve get social

This commit is contained in:
DanieL 2022-04-05 14:00:18 -03:00
parent f4f71be24a
commit 9cf51342a1
2 changed files with 39 additions and 34 deletions

View file

@ -0,0 +1,29 @@
<div id="SharingModal<?php echo $sharingUid ?>" class="modal fade" role="dialog" style="top: 60px;">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-body">
<center>
<?php include $global['systemRootPath'] . 'view/include/social.php'; ?>
</center>
</div>
</div>
</div>
</div>
<script>
function showSharing<?php echo $sharingUid ?>() {
if ($('#mainVideo').length) {
$('#SharingModal<?php echo $sharingUid ?>').appendTo("#mainVideo");
} else {
$('#SharingModal<?php echo $sharingUid ?>').appendTo("body");
}
$('#SharingModal<?php echo $sharingUid ?>').modal("show");
$('.modal-backdrop').hide();
return false;
}
$(document).ready(function () {
$('#SharingModal<?php echo $sharingUid ?>').modal({show: false});
});
</script>

View file

@ -6397,40 +6397,16 @@ function getSocialModal($videos_id, $url = "", $title = "") {
global $global;
$video['id'] = $videos_id;
$sharingUid = uniqid();
_ob_start();
?>
<div id="SharingModal<?php echo $sharingUid ?>" class="modal fade" role="dialog" style="top: 60px;">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-body">
<center>
<?php include $global['systemRootPath'] . 'view/include/social.php'; ?>
</center>
</div>
</div>
</div>
</div>
<script>
function showSharing<?php echo $sharingUid ?>() {
if ($('#mainVideo').length) {
$('#SharingModal<?php echo $sharingUid ?>').appendTo("#mainVideo");
} else {
$('#SharingModal<?php echo $sharingUid ?>').appendTo("body");
}
$('#SharingModal<?php echo $sharingUid ?>').modal("show");
$('.modal-backdrop').hide();
return false;
}
$(document).ready(function () {
$('#SharingModal<?php echo $sharingUid ?>').modal({show: false});
});
</script>
<?php
$contents = ob_get_contents();
ob_end_clean();
$filePath = $global['systemRootPath'].'objects/functionGetSocialModal.php';
$contents = getIncludeFileContent($filePath,
array(
'videos_id'=>$videos_id,
'url'=>$url,
'title'=>$title,
'video'=>$video,
'sharingUid'=>$sharingUid
)
);
return ['html' => $contents, 'id' => $sharingUid];
}