PATH:
home
/
letacommog
/
letaweb
/
admin
/
modules
/
embed
<?php Yii::import('application.classes.socialEmbed.MediaEmbed.MediaEmbed'); $has_error = false; $MediaEmbed = new MediaEmbed(); $MediaObject = $MediaEmbed->parseUrl($this->url); if ($MediaObject) { $code = $MediaObject->getEmbedCode(); } if (!isset($code)) { try { Yii::import('application.classes.socialEmbed.Embera.Autoload', true); //require_once DOC_ROOT . '/../socialEmbed/Embera/Autoload.php'; $embera = new \Embera\Embera(); $code = $embera->autoEmbed($this->url); $has_error = count($embera->getErrors()); } catch (Exception $e) { unset($code); $has_error = 1; } } ?> <?php if (isset($code) && (!$has_error)) { ?> <div class="embed"> <?php echo $code; ?> </div> <?php } else { ?> <div class="alert"> <?php echo term('RESOLVE_URL_ERROR') ?> </div> <?php } ?> <script type="text/javascript"> $(document).ready(function() { var width = $("#<?php echo $this->page_id; ?>").width(); var height = width * 9 /16; $("#<?php echo $this->page_id; ?> iframe").height(height); }); $(window).resize(function() { var width = $("#<?php echo $this->page_id; ?>").width(); var height = width * 9 /16; $("#<?php echo $this->page_id; ?> iframe").height(height); }); </script>
[+]
..
[-] frontend_class.php
[edit]
[-] frontend_view.php
[edit]
[-] backend.php
[edit]
[-] backend.js
[edit]
[-] frontend_script.php
[edit]