protected function doprocessform(twidget $widget) { extract($_POST, EXTR_SKIP); if (isset($addwidget)) { $widget->add(); } elseif (isset($sapeoptions)) { $widget->user = $user; $widget->force = isset($force); } else { $widget->counts[$widget->id] = (int) $maxcount; } }
protected function create() { parent::create(); $this->adminclass = 'tadminexcerptslide'; $this->addmap('items', array()); $this->tags = tcategories::i(); }
protected function create() { parent::create(); $this->basename = 'widgets.custom'; $this->adminclass = 'tadmincustomwidget'; $this->addmap('items', array()); $this->addevents('added', 'deleted'); }
protected function create() { parent::create(); $this->adminclass = 'tadminsingletagwidget'; $this->basename = 'widget.singletag'; $this->addmap('items', array()); $this->tags = tcategories::i(); }
protected function create() { parent::create(); $this->basename = 'widget.meta'; $this->template = 'meta'; $this->adminclass = 'tadminmetawidget'; $this->addmap('items', array()); }
protected function create() { parent::create(); $this->basename = 'widget.comments'; $this->cache = 'include'; $this->template = 'comments'; $this->adminclass = 'tadminmaxcount'; $this->data['maxcount'] = 7; }
public function getwidget($id, $sidebar) { if ($this->user == '') { return ''; } if (litepublisher::$urlmap->is404 || litepublisher::$urlmap->adminpanel) { return ''; } return parent::getwidget($id, $sidebar); }
protected function create() { parent::create(); $this->basename = 'widget.friends'; $this->template = 'friends'; $this->adminclass = 'tadminfriendswidget'; $this->data['maxcount'] = 0; $this->data['redir'] = true; $this->data['redirlink'] = '/foaflink.htm'; }
public function create() { parent::create(); $this->basename = 'keywords' . DIRECTORY_SEPARATOR . 'index'; $this->cache = 'nocache'; $this->adminclass = 'tadminkeywords'; $this->data['count'] = 6; $this->data['notify'] = true; $this->data['trace'] = true; $this->addmap('links', array()); }
protected function create() { parent::create(); $this->addevents('added', 'deleted'); $this->basename = 'widgets.links'; $this->template = 'links'; $this->adminclass = 'tadminlinkswidget'; $this->addmap('items', array()); $this->addmap('autoid', 0); $this->redirlink = '/linkswidget/'; $this->data['redir'] = false; }
public function getwidgetcontent($id, $sidebar) { if (!isset($this->items[$id])) { return false; } switch ($this->items[$id]['cache']) { case 'cache': $cache = twidgetscache::i(); $result = $cache->getcontent($id, $sidebar); break; case 'include': $filename = twidget::getcachefilename($id, $sidebar); $result = litepublisher::$urlmap->cache->get($filename); if (!$result) { $widget = $this->getwidget($id); $result = $widget->getcontent($id, $sidebar); litepublisher::$urlmap->cache->set($filename, $result); } break; case 'nocache': case 'code': case false: $widget = $this->getwidget($id); $result = $widget->getcontent($id, $sidebar); break; } return $result; }
protected function create() { parent::create(); $this->adminclass = 'tadmintagswidget'; $this->data['sortname'] = 'count'; $this->data['showcount'] = true; $this->data['showsubitems'] = true; $this->data['maxcount'] = 0; }
protected function doprocessform(twidget $widget) { $widget->maxcount = (int) $_POST['maxcount']; $widget->postschanged(); return parent::doprocessform($widget); }
public function deletewidgets(twidget $widget) { $widgets = twidgets::i(); $widgets->lock(); $widget->lock(); foreach ($_POST as $key => $value) { if (strbegin($key, 'widgetcheck-')) { $widget->delete((int) $value); } } $widget->unlock(); $widgets->unlock(); }
protected function create() { parent::create(); $this->basename = 'widget.archives'; $this->template = 'archives'; $this->adminclass = 'tadminshowcount'; $this->data['showcount'] = false; }