BxBasePageHome.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
  4. * CC-BY License - http://creativecommons.org/licenses/by/3.0/
  5. *
  6. * @defgroup TridentCore Trident Core
  7. * @{
  8. */
  9. /**
  10. * Homepage.
  11. */
  12. class BxBasePageHome extends BxTemplPage
  13. {
  14. protected $_sTourTheme = 'default';
  15. public function __construct($aObject, $oTemplate)
  16. {
  17. parent::__construct($aObject, $oTemplate);
  18. $this->addMarkers(array('site_title' => getParam('site_title')));
  19. $oCover = BxDolCover::getInstance();
  20. $oCover->set(array(
  21. 'class' => 'bx-cover-homepage',
  22. 'title' => _t('_sys_txt_homepage_cover'),
  23. 'actions' => '',
  24. 'bx_if:image' => array (
  25. 'condition' => false,
  26. 'content' => array(),
  27. ),
  28. 'bx_if:icon' => array (
  29. 'condition' => false,
  30. 'content' => array(),
  31. ),
  32. 'bx_if:bg' => array (
  33. 'condition' => false,
  34. 'content' => array(),
  35. ),
  36. ));
  37. }
  38. public function getCode ()
  39. {
  40. $s = parent::getCode ();
  41. if (isAdmin())
  42. $s .= $this->_oTemplate->parseHtmlByName('homepage_tour.html', array('tour_theme' => $this->_sTourTheme));
  43. return $s;
  44. }
  45. protected function _addJsCss()
  46. {
  47. parent::_addJsCss();
  48. if (isAdmin()) {
  49. $this->_oTemplate->addJs(array(
  50. 'shepherd/js/tether.min.js',
  51. 'shepherd/js/shepherd.min.js',
  52. ));
  53. $this->_oTemplate->addCss(array(
  54. 'homepage.css',
  55. BX_DIRECTORY_PATH_PLUGINS_PUBLIC . 'shepherd/css/|shepherd-theme-' . $this->_sTourTheme . '.css'
  56. ));
  57. }
  58. }
  59. }
  60. /** @} */