BxBasePageHome.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. }
  20. public function getCode ()
  21. {
  22. $s = parent::getCode ();
  23. if (isAdmin())
  24. $s .= $this->_oTemplate->parseHtmlByName('homepage_tour.html', array('tour_theme' => $this->_sTourTheme));
  25. return $s;
  26. }
  27. protected function _addJsCss()
  28. {
  29. parent::_addJsCss();
  30. if (isAdmin()) {
  31. $this->_oTemplate->addJs(array(
  32. 'shepherd/js/tether.min.js',
  33. 'shepherd/js/shepherd.min.js',
  34. ));
  35. $this->_oTemplate->addCss(array(
  36. 'homepage.css',
  37. BX_DIRECTORY_PATH_PLUGINS_PUBLIC . 'shepherd/css/|shepherd-theme-' . $this->_sTourTheme . '.css'
  38. ));
  39. }
  40. }
  41. }
  42. /** @} */