mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
Improve get social
This commit is contained in:
parent
f4f71be24a
commit
9cf51342a1
2 changed files with 39 additions and 34 deletions
29
objects/functionGetSocialModal.php
Normal file
29
objects/functionGetSocialModal.php
Normal 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>
|
|
@ -6397,40 +6397,16 @@ function getSocialModal($videos_id, $url = "", $title = "") {
|
||||||
global $global;
|
global $global;
|
||||||
$video['id'] = $videos_id;
|
$video['id'] = $videos_id;
|
||||||
$sharingUid = uniqid();
|
$sharingUid = uniqid();
|
||||||
_ob_start();
|
$filePath = $global['systemRootPath'].'objects/functionGetSocialModal.php';
|
||||||
?>
|
$contents = getIncludeFileContent($filePath,
|
||||||
<div id="SharingModal<?php echo $sharingUid ?>" class="modal fade" role="dialog" style="top: 60px;">
|
array(
|
||||||
<div class="modal-dialog">
|
'videos_id'=>$videos_id,
|
||||||
<!-- Modal content-->
|
'url'=>$url,
|
||||||
<div class="modal-content">
|
'title'=>$title,
|
||||||
<div class="modal-body">
|
'video'=>$video,
|
||||||
<center>
|
'sharingUid'=>$sharingUid
|
||||||
<?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();
|
|
||||||
return ['html' => $contents, 'id' => $sharingUid];
|
return ['html' => $contents, 'id' => $sharingUid];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue