1
0

BxPostsTemplate.php 971 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) UNA, Inc - https://una.io
  4. * MIT License - https://opensource.org/licenses/MIT
  5. *
  6. * @defgroup Posts Posts
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. /*
  12. * Module representation.
  13. */
  14. class BxPostsTemplate extends BxBaseModTextTemplate
  15. {
  16. /**
  17. * Constructor
  18. */
  19. function __construct(&$oConfig, &$oDb)
  20. {
  21. $this->MODULE = 'bx_posts';
  22. parent::__construct($oConfig, $oDb);
  23. $this->addCss(array(BX_DIRECTORY_PATH_PLUGINS_PUBLIC . 'flickity/|flickity.css'));
  24. $this->addJs(array('flickity/flickity.pkgd.min.js', 'main.js'));
  25. }
  26. /**
  27. * Use Gallery image for both because currently there is no Unit types with small thumbnails.
  28. */
  29. protected function getUnitThumbAndGallery ($aData)
  30. {
  31. list($sPhotoThumb, $sPhotoGallery) = parent::getUnitThumbAndGallery($aData);
  32. return array($sPhotoGallery, $sPhotoGallery);
  33. }
  34. }
  35. /** @} */