oembed.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. /**
  3. * Copyright (c) UNA, Inc - https://una.io
  4. * MIT License - https://opensource.org/licenses/MIT
  5. *
  6. * @defgroup UnaCore UNA Core
  7. * @{
  8. */
  9. require_once('./inc/header.inc.php');
  10. require_once(BX_DIRECTORY_PATH_INC . "design.inc.php");
  11. $aLinks = bx_get('l');
  12. bx_import('BxDolEmbed');
  13. $oEmbed = BxDolEmbed::getObjectInstance('sys_oembed');
  14. if (bx_get('html')){
  15. echo '<body style="margin:0"><style>iframe{width:100%} .embera-embed-responsive {
  16. position: relative;
  17. display: block;
  18. width: 100%;
  19. padding: 0;
  20. overflow: hidden;
  21. padding-bottom: 50%;
  22. }
  23. .embera-embed-responsive-item {
  24. position: absolute;
  25. top: 0;
  26. bottom: 0;
  27. left: 0;
  28. width: 100%;
  29. height: 100%;
  30. border: 0;
  31. }
  32. .bx-base-attach-link-form-field .embera-embed-responsive {
  33. padding-bottom: 0;
  34. }
  35. .bx-base-attach-link-form-field .embera-embed-responsive-item {
  36. position: relative;
  37. width: auto;
  38. height: auto;
  39. }</style><div style="max-width:900; margin:0px auto">' . $oEmbed->parseLinkHtml($aLinks) .'</div></body>';
  40. exit();
  41. }
  42. echoJson($oEmbed->parseLinks($aLinks));