comments.php 992 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * Copyright (c) UNA, Inc - https://una.io
  4. * MIT License - https://opensource.org/licenses/MIT
  5. *
  6. * @defgroup UnaCoreSamples Samples
  7. * @{
  8. */
  9. /**
  10. * @page samples
  11. * @section comments Comments
  12. */
  13. /**
  14. * Please refer to the following file for custom class and SQL dump data for this example:
  15. * @see BxCmtsMy.php
  16. */
  17. $aPathInfo = pathinfo(__FILE__);
  18. require_once ($aPathInfo['dirname'] . '/../inc/header.inc.php');
  19. require_once(BX_DIRECTORY_PATH_INC . "design.inc.php");
  20. $oTemplate = BxDolTemplate::getInstance();
  21. $oTemplate->setPageNameIndex (BX_PAGE_DEFAULT);
  22. $oTemplate->setPageHeader ('Comments');
  23. $oTemplate->setPageContent ('page_main_code', PageCompMainCode());
  24. $oTemplate->getPageCode();
  25. /**
  26. * page code function
  27. */
  28. function PageCompMainCode()
  29. {
  30. $iObjectId = 1;
  31. bx_import('BxDolCmts');
  32. $oCmts = BxDolCmts::getObjectInstance('sample', $iObjectId);
  33. if(!$oCmts->isEnabled())
  34. return '';
  35. return $oCmts->getCommentsBlock();
  36. }
  37. /** @} */