File manager - Edit - /home/jardides/www/Jardi-design/j37/administrator/components/com_pagebuilderck/views/options/tmpl/edit_video.php
Back
<?php /** * @name Page Builder CK * @package com_pagebuilderck * @copyright Copyright (C) 2015. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * @author Cedric Keiflin - http://www.template-creator.com - http://www.joomlack.fr */ defined('_JEXEC') or die; $input = new JInput(); $id = $input->get('ckid', '', 'string'); ?> <div id="elementscontainer"> <div class="menulink current" tab="tab_video"><?php echo JText::_('CK_VIDEO_EDITION'); ?></div> <div class="menulink" tab="tab_blocstyles"><?php echo JText::_('CK_STYLES'); ?></div> <div class="clr"></div> <div id="elementscontent"> <div class="tab menustyles current ckproperty" id="tab_video"> <table> <tr> <td style="vertical-align:top;"> <div class="layoutinfos"> <div class="layoutinfostitle"><?php echo JText::_('CK_VIDEO_INFOS'); ?></div> <div class="layoutinfosdesc"><?php echo JText::_('CK_VIDEO_INFOS_DESC'); ?></div> </div> </td> <td style="vertical-align:top;width:800px;"> <div class="menustylesblock" style="width:850px;"> <div class="menustylesblocktitle"><?php echo JText::_('CK_VIDEO') ?></div> <div class="menustylesblockaccordion"> <div class="menupanetitle"><?php echo JText::_('CK_VIDEO'); ?></div> <div style="text-align:left;"> <input class="inputbox" type="text" value="" name="videourl" id="videourl" size="7" style="width:90%; min-width: 200px; clear:both;" onchange="ckUpdateVideoPreview()" /> <a class="ckbuttonstyle" href="javascript:void(0)" onclick="CKBox.open({handler: 'iframe', url: 'index.php?option=com_pagebuilderck&view=browse&type=video&func=selectvideofile&tmpl=component'})"><?php echo JText::_('CK_SELECT') ?></a> </div> <div class="menupanetitle"><?php echo JText::_('CK_DIMENSIONS'); ?></div> <div style="text-align:left;clear:both;"> <div style="float:left;text-align:right;margin:5px 5px 0 0;line-height: 15px;;"><?php echo JText::_('CK_WIDTH'); ?></div><div style="float:left;text-align:right;margin:5px 5px 0 0;"><img src="<?php echo $this->imagespath; ?>width.png" width="15" height="15" align="top" /></div><div style="float:left;"><input class="inputbox" type="text" name="videowidth" id="videowidth" size="2" value="" style="" onchange="ckUpdateVideoPreview()" /></div><div style="float:left;text-align:left;margin-left:3px;width:50px;"></div> <div style="float:left;text-align:right;margin:5px 5px 0 10px;line-height: 15px;;"><?php echo JText::_('CK_HEIGHT'); ?></div><div style="float:left;text-align:right;margin:5px 5px 0 0;"><img src="<?php echo $this->imagespath; ?>height.png" width="15" height="15" align="top" /></div><div style="float:left;"><input class="inputbox" type="text" name="videoheight" id="videoheight" size="2" value="" style="" onchange="ckUpdateVideoPreview()" /></div><div style="float:left;text-align:left;margin-left:3px;width:50px;"></div> <div style="text-align:left;"> <div style="margin:0px;" class="btn-group"> <div style="float:left;margin:0px 0px 0 2px;"><input type="radio" class="inputbox" name="blocratio" id="blocratio169" onclick="ckSetActiveButton('blocratio');ckSetVideoRatio(this);" value="169" style="width:16px;border:none;margin:0 2px;display:none;" /><label for="blocratio169" class="btn">16:9</label></div> <div style="float:left;margin:0px 5px 0 2px;"></div> <div style="float:left;margin:0px 0px 0 2px;"><input type="radio" class="inputbox" name="blocratio" id="blocratio43" onclick="ckSetActiveButton('blocratio');ckSetVideoRatio(this);" value="43" style="width:16px;border:none;margin:0 2px;display:none;" /><label for="blocratio43" class="btn">4:3</label></div> <div style="float:left;margin:0px 5px 0 2px;"></div> </div> </div> <div class="clr"></div> </div> <div class="menupanetitle"><?php echo JText::_('CK_ALIGN'); ?></div> <div style="text-align:left;"> <div style="margin:5px 0 0 0px;" class="btn-group"> <div style="float:left;margin:0px 0px 0 2px;"><input type="radio" class="inputbox" name="blocalignement" id="blocalignementleft" onclick="ckSetActiveButton('blocalignement')" value="left" style="width:16px;border:none;margin:0 2px;display:none;" /><label for="blocalignementleft" class="btn"><img src="<?php echo $this->imagespath; ?>text_align_left.png" width="16" height="16" /></label></div> <div style="float:left;margin:0px 5px 0 2px;"></div> <div style="float:left;margin:0px 0px 0 2px;"><input type="radio" class="inputbox" name="blocalignement" id="blocalignementcenter" onclick="ckSetActiveButton('blocalignement')" value="center" style="width:16px;border:none;margin:0 2px;display:none;" /><label for="blocalignementcenter" class="btn"><img src="<?php echo $this->imagespath; ?>text_align_center.png" width="16" height="16" /></label></div> <div style="float:left;margin:0px 5px 0 2px;"></div> <div style="float:left;margin:0px 0px 0 2px;"><input type="radio" class="inputbox" name="blocalignement" id="blocalignementright" onclick="ckSetActiveButton('blocalignement')" value="right" style="width:16px;border:none;margin:0 2px;display:none;" /><label for="blocalignementright" class="btn"><img src="<?php echo $this->imagespath; ?>text_align_right.png" width="16" height="16" /></label></div> <div style="float:left;margin:0px 5px 0 2px;"></div> </div> </div> <div class="menupanetitle"><?php echo JText::_('CK_OPTIONS'); ?></div> <div style="text-align:left;clear:both;"> <div style="display:inline-block;margin:0px 0px 0 2px;vertical-align: middle;min-width: 150px;"><?php echo JText::_('CK_AUTOPLAY'); ?></div> <div style="margin:5px 0 0 0px;" class="btn-group"> <div style="float:left;margin:0px 0px 0 2px;"><input type="radio" class="inputbox" name="autoplay" id="autoplayyes" onclick="ckUpdateVideoPreview()" value="1" style="width:16px;border:none;margin:0 2px;display:none;" /><label for="autoplayyes" class="btn"><?php echo JText::_('JYES') ?></label></div> <div style="float:left;margin:0px 5px 0 2px;"></div> <div style="float:left;margin:0px 0px 0 2px;"><input type="radio" class="inputbox" name="autoplay" id="autoplayno" onclick="ckUpdateVideoPreview()" value="0" style="width:16px;border:none;margin:0 2px;display:none;" /><label for="autoplayno" class="btn"><?php echo JText::_('JNO') ?></label></div> <div style="float:left;margin:0px 5px 0 2px;"></div> </div> </div> <br /> <div style="text-align:left;clear:both;"> <div style="width:150px;float:left;text-align:left;margin:5px 5px 0 0;line-height: 15px;"><?php echo JText::_('CK_CSS_CLASS'); ?></div><div style="float:left;text-align:right;margin:5px 5px 0 0;"><img src="<?php echo $this->imagespath; ?>text_signature.png" width="15" height="15" align="top" /></div><div style="float:left;"><input class="inputbox" type="text" name="videocssclass" id="videocssclass" size="10" value="" style="width:300px;" onchange="ckUpdateVideoAttribute('class', this.value)" /></div><div style="float:left;text-align:left;margin-left:3px;"></div> </div> <div class="clr"></div> </div> </div> </td> </tr> </table> <div class="clr"></div> </div> <div class="tab menustyles ckproperty" id="tab_blocstyles"> <table> <tr> <td style="vertical-align:top;"> <div class="layoutinfos"> <div class="layoutinfostitle"><?php echo JText::_('CK_VIDEO_INFOS'); ?></div> <div class="layoutinfosdesc"><?php echo JText::_('CK_VIDEO_INFOS_DESC'); ?></div> </div> </td> <td style="vertical-align:top;"> <?php echo $this->menustyles->createBlocStyles('bloc', 'video', '') ?> </td> </tr> </table> <div class="clr"></div> </div> </div> </div> <div id="previewarea" class="clearfix"> <div class="previewareatitle"><?php echo JText::_('CK_PREVIEWAREA_TITLE'); ?></div> <div id="previewareabloc"> <div class="ckstyle"></div> <div class="inner"> <div class="videock"> </div> </div> </div> </div> <div class="clr"></div> <script language="javascript" type="text/javascript"> function ckLoadEditionPopup() { var focus = $ck('.editfocus'); // var focus_video = $ck('.editfocus iframe'); $ck('#previewareabloc > .inner').html(focus.find('> .inner').html()); $ck('#previewareabloc .ckstyle').html(focus.find('.ckstyle').html()); ckFillEditionPopup(focus.attr('id')); } function ckBeforeSaveEditionPopup() { var focus = $ck('.editfocus'); ckUpdateVideoPreview(); focus.find('> .inner').html($ck('#previewareabloc > .inner').html()); focus.find('.ckstyle').html($ck('#previewareabloc .ckstyle').html()); ckSaveEditionPopup(focus.attr('id')); ckCloseEditionPopup(); } function ckUpdateVideoPreview() { ckAutoDetectVideoEmbedurl(); var videoSrc = $ck('#videourl').val(); if (videoSrc.substr(0,1) == '/') { videoSrc = videoSrc.slice(1,videoSrc.length); } var isLocal = !(/^(f|ht)tps?:\/\//i.test(videoSrc)); videoSrc = isLocal ? URIROOT + '/' + videoSrc : videoSrc; var videoiframe = isLocal ? $ck('#previewareabloc .videock video') : $ck('#previewareabloc .videock iframe'); var videow = $ck('#videowidth').val() ? $ck('#videowidth').val() : ''; var videoh = $ck('#videoheight').val() ? $ck('#videoheight').val() : ''; var autoplay = $ck('#elementscontainer [name="autoplay"]:checked').val() == '1' ? 'autoplay' : ''; if (videoSrc) { var appendChar = videoSrc.indexOf('?') != '-1' ? '&' : '?'; $ck('#previewareabloc .videock').empty(); if (isLocal) { $ck('#previewareabloc .videock').append( '<video src="'+videoSrc+'" '+autoplay+' controls >' + '</video>'); } else { $ck('#previewareabloc .videock').append( '<iframe src="'+videoSrc+(autoplay ? appendChar + 'autoplay=1' : '')+'" frameborder="0" allowfullscreen>' + '</iframe>'); } $ck('#previewareabloc .videock').css('width', videow).css('padding-bottom', videoh); } else { $ck('#previewareabloc .videock').css('width', videow).css('padding-bottom', videoh); } } function ckAutoDetectVideoEmbedurl() { var url = $ck('#videourl').val(); // for youtube // https://www.youtube.com/watch?v=ffWUwNJRrQI url = url.replace('youtu.be', 'www.youtube.com/embed'); url = url.replace('youtube.com/watch?v=', 'youtube.com/embed/'); $ck('#videourl').val(url); } // set active class for radio buttons function ckSetActiveButton(type) { $ck('#elementscontainer .inputbox[name="'+type+'"]').each(function() { if ($ck(this).attr('checked')) { $ck(this).next('label').addClass('active'); } else { $ck(this).next('label').removeClass('active'); } }); } function ckUpdateVideoAttribute(attribute, value) { var videopreview = $ck('#previewareabloc iframe'); if (value) { videopreview.attr(attribute, value); } else { videopreview.removeAttr(attribute); } } function ckSetVideoRatio(button) { if (button.value == '169') { $ck('#videoheight').val('56.25%'); $ck('#videowidth').val('100%'); } else if (button.value == '43') { $ck('#videoheight').val('75%'); $ck('#videowidth').val('100%'); } ckUpdateVideoPreview(); } function selectvideofile(file) { $ck('#videourl').val(file); CKBox.close(); ckUpdateVideoPreview(); } /**------- Needed for tabs ----------**/ $ck('#elementscontent div.tab:not(.current)').hide(); $ck('.menulink', $ck('#elementscontainer')).each(function(i, tab) { $ck(tab).click(function() { $ck('#elementscontent div.tab').hide(); $ck('.menulink', $ck('#elementscontainer')).removeClass('current'); if ($ck('#' + $ck(tab).attr('tab')).length) $ck('#' + $ck(tab).attr('tab')).show(); $ck(this).addClass('current'); }); }); ckSetActiveButton('blocalignement'); ckInitColorPickers(); // initModalPopup(); ckInitAccordions(); </script> <style type="text/css"> #video_preview { padding: 5px; background: #f5f5f5; border: 1px solid #ddd; margin: 10px 10px 10px 0; max-width: 600px; /*height: 200px;*/ overlow: hidden; } #video_preview > iframe { max-width: 100%; } </style>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings