Cheetah
ChSitesPageMain.php
Go to the documentation of this file.
1 <?php
2 
8 ch_import('ChWsbTwigPageMain');
9 
11 {
12  var $_oSites;
14  var $_oConfig;
15  var $_oDb;
16 
17  function __construct(&$oSites)
18  {
19  parent::__construct('ch_sites_main', $oSites);
20 
21  $this->_oSites = &$oSites;
22  $this->_oTemplate = $oSites->_oTemplate;
23  $this->_oConfig = $oSites->_oConfig;
24  $this->_oDb = $oSites->_oDb;
25  }
26 
28  {
29  ch_sites_import('SearchResult');
30  $oSearchResult = new ChSitesSearchResult('featuredshort');
31 
32  if ($s = $oSearchResult->displayResultBlock(true, true))
33  return $s;
34  else
35  return '';
36  }
37 
39  {
40  ch_sites_import('SearchResult');
41  $oSearchResult = new ChSitesSearchResult('featuredlast');
42 
43  if ($s = $oSearchResult->displayResultBlock())
44  return $s;
45  else
46  return '';
47  }
48 
50  {
51  ch_sites_import('SearchResult');
52  $oSearchResult = new ChSitesSearchResult('home');
53 
54  if ($s = $oSearchResult->displayResultBlock(true, true)) {
55  return array(
56  $s,
57  array(
58  _t('RSS') => array(
59  'href' => $this->_oConfig->getBaseUri() . 'browse/all?rss=1',
60  'target' => '_blank',
61  'icon' => 'rss',
62  )
63  ),
64  array(),
65  true
66  );
67  } else
68  return MsgBox(_t('_Empty'));
69  }
70 
71 }
ChSitesPageMain\getBlockCode_ViewAll
getBlockCode_ViewAll()
Definition: ChSitesPageMain.php:49
ChSitesPageMain
Definition: ChSitesPageMain.php:11
MsgBox
MsgBox($sText, $iTimer=0)
Definition: design.inc.php:175
ch_import
ch_import($sClassName, $aModule=array())
Definition: utils.inc.php:1218
php
ChWsbTwigPageMain
Definition: ChWsbTwigPageMain.php:14
ChSitesPageMain\$_oDb
$_oDb
Definition: ChSitesPageMain.php:15
ChSitesSearchResult
Definition: ChSitesSearchResult.php:11
ChSitesPageMain\$_oConfig
$_oConfig
Definition: ChSitesPageMain.php:14
ChSitesPageMain\$_oTemplate
$_oTemplate
Definition: ChSitesPageMain.php:13
ChSitesPageMain\getBlockCode_ViewRecent
getBlockCode_ViewRecent()
Definition: ChSitesPageMain.php:38
ChSitesPageMain\getBlockCode_ViewFeature
getBlockCode_ViewFeature()
Definition: ChSitesPageMain.php:27
_t
_t($key, $arg0="", $arg1="", $arg2="")
Definition: languages.inc.php:509
ch_sites_import
ch_sites_import($sClassPostfix, $aModuleOverwright=array())
Definition: ChSitesModule.php:8
$s
$s
Definition: embed.php:13
ChSitesPageMain\$_oSites
$_oSites
Definition: ChSitesPageMain.php:12
ChSitesPageMain\__construct
__construct(&$oSites)
Definition: ChSitesPageMain.php:17