1
0

oembed.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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_embedly');
  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. .embedly-card{
  33. width:600px;
  34. }
  35. .bx-base-attach-link-form-field .embera-embed-responsive {
  36. padding-bottom: 0;
  37. }
  38. .bx-base-attach-link-form-field .embera-embed-responsive-item {
  39. position: relative;
  40. width: auto;
  41. height: auto;
  42. }</style><script language="javascript" src="'.BX_DOL_URL_ROOT.'/plugins_public/jquery/jquery.min.js"></script>' . $oEmbed->addJsCss() . '<div style="max-width:900; margin:0px auto; justify-content: center; display:flex">' . $oEmbed->getLinkHTML($aLinks, '', '', bx_get('theme')) .'</div></body>';
  43. exit();
  44. }
  45. //data-card-theme
  46. echoJson($oEmbed->parseLinks($aLinks));