require_once(PATH_tslib.'class.tslib_pibase.php'); class user_teaser extends tslib_pibase { var $prefixId = 'pageteaser'; var $conf; var $id; var $GPvars; var $local_cObj; var $out = ''; var $totalTemplate; var $counter = 0; var $pages = 0; var $start = 0; /** * Configuration, setup vars * * @return void */ function config() { // Create conf, classes $this->conf['limit'] = intval( $this->conf['limit'] ); $this->conf['orderby'] = $this->conf['orderby'] ? $this->conf['orderby'] : 'pages.sorting, tt_content.sorting'; $this->id = intval( $GLOBALS['TSFE']->id ); $this->GPvars = t3lib_div::GPvar( $this->prefixId ); $this->local_cObj = t3lib_div::makeInstance( 'tslib_cObj' ); $this->totalTemplate = $this->cObj->fileResource( $this->conf['template'] ); $this->conf['pid'] = intval($this->conf['pid']); if( $this->conf['pid'] > 0) $this->pids = $this->conf['pid']; else $this->pids = $this->id; } /** * Pages teaser * * @param string $content: * @param array $conf: TS configuration * @return string return: HTML output */ function teaser( $content, $conf ) { // Conf base $template = ''; $this->conf = &$conf; $this->config(); // SQL typo3 conditions $this->where = $this->local_cObj->enableFields( 'pages' ); if ($this->conf['level'] == 100) $this->where .= " AND pages.abstract <> '' "; $this->whereContent = $this->local_cObj->enableFields( 'tt_content' ); //co chceme? if ($this->conf['level'] == 0) { $this->where2 = ' AND (children > 0) '; } else if ($this->conf['level'] == 47) { $this->where2 = ' '; } else { $this->where2 = ' AND (children = 0 OR children IS NULL) '; } $wrapArr = array( 'disabledLinkWrap' => '
|
|
|