public function getcont() { $this->cache = false; $view = tview::getview($this); $theme = $view->theme; if ($this->text != '') { return $theme->simple($this->text); } $lang = tlocal::i('default'); if ($this->basename == 'forbidden') { return $theme->simple(sprintf('<h1>%s</h1>', $lang->forbidden)); } else { return $theme->parse($theme->templates['content.notfound']); } }
public function getcontent() { $result = parent::getcontent(); $db = litepublisher::$db; $items = $db->res2items($db->query("select id, class from {$db->prefix}codedoc order by class")); if (count($items) == 0) { return $result; } tposts::i()->loaditems(array_keys($items)); $theme = tview::getview($this)->theme; $args = new targs(); $result .= '<ul class="doc_classes">'; $tml = '<li id="doc-class-$id"><a href="#">$class</a> $post.excerptcontent</li>'; foreach ($items as $id => $item) { $args->add($item); ttheme::$vars['post'] = tpost::i($id); $result .= $theme->parsearg($tml, $args); } $result .= '</ul>'; return $result; }
public function gettheme() { ttheme::$vars['post'] = $this; if (isset($this->_theme)) { return $this->_theme; } $this->_theme = isset(ttemplate::i()->view) ? ttemplate::i()->view->theme : tview::getview($this)->theme; return $this->_theme; }
public function gethead() { $result = $this->contents->getvalue($this->id, 'head'); $result .= tview::getview($this)->theme->templates['head.tags']; $list = $this->getidposts($this->id); $result .= $this->factory->posts->getanhead($list); return ttheme::i()->parse($result); }
public static function gettheme() { return tview::getview(self::i())->theme; }
public function getview() { return tview::getview($this); }
protected function get_view($context) { return $this->itemplate ? tview::getview($context) : tview::i(); }
public function getcont() { $theme = tview::getview($this)->theme; return $theme->simple($this->getval('filtered')); }
public function getcont() { $items = $this->getidposts(); if (count($items) == 0) { return ''; } $theme = tview::getview($this)->theme; $perpage = $this->lite ? 1000 : litepublisher::$options->perpage; $list = array_slice($items, (litepublisher::$urlmap->page - 1) * $perpage, $perpage); $result = $theme->getposts($list, $this->lite); $result .= $theme->getpages($this->items[$this->date]['url'], litepublisher::$urlmap->page, ceil(count($items) / $perpage)); return $result; }
public function getcont() { $item = $this->getitem($this->id); ttheme::$vars['author'] = $this; $theme = tview::getview($this)->theme; $result = $theme->parse($theme->templates['content.author']); $perpage = $this->lite ? 1000 : litepublisher::$options->perpage; $posts = litepublisher::$classes->posts; $from = (litepublisher::$urlmap->page - 1) * $perpage; $poststable = $posts->thistable; $count = $posts->db->getcount("{$poststable}.status = 'published' and {$poststable}.author = {$this->id}"); $items = $posts->select("{$poststable}.status = 'published' and {$poststable}.author = {$this->id}", "order by {$poststable}.posted desc limit {$from}, {$perpage}"); $result .= $theme->getposts($items, $this->lite); $result .= $theme->getpages($item['url'], litepublisher::$urlmap->page, ceil($count / $perpage)); return $result; }