public function getcontent()
 {
     $widget = tpostcatwidget::i();
     $about = tplugins::getabout(tplugins::getname(__FILE__));
     $args = targs::i();
     $id = (int) tadminhtml::getparam('idwidget', 0);
     if (isset($widget->items[$id])) {
         $item = $widget->items[$id];
         $args->mode = 'edit';
         $args->idwidget = $id;
     } else {
         $item = array('title' => '', 'content' => '', 'template' => 'widget', 'cats' => array());
         $args->mode = 'add';
         $args->idwidget = 0;
     }
     $cats = tposteditor::getcategories($item['cats']);
     $html = $this->html;
     $html->section = 'widgets';
     $args->add($item);
     $args->widgettitle = $item['title'];
     $args->template = tadminhtml::array2combo(self::gettemplates(), $item['template']);
     $args->formtitle = $item['title'] == '' ? $this->lang->widget : $item['title'];
     $result = $html->adminform('
 [text=widgettitle]
 [editor=content]
 [combo=template]
 [hidden=idwidget]
 [hidden=mode]' . sprintf('<h4>%s</h4>', $about['cats']) . $cats, $args);
     $result .= $this->getlist($widget);
     return $result;
 }
Exemplo n.º 2
0
 public function getcontent()
 {
     $widget = tsubcatwidget::i();
     $about = tplugins::getabout(tplugins::getname(__FILE__));
     $html = $this->html;
     $args = targs::i();
     $id = (int) tadminhtml::getparam('idwidget', 0);
     if (isset($widget->items[$id])) {
         $args->add($widget->items[$id]);
         $args->sort = tadminhtml::array2combo(tlocal::admin()->ini['sortnametags'], $widget->items[$id]['sortname']);
         $args->idwidget = $id;
         $args->data['$lang.invertorder'] = $about['invertorder'];
         $args->formtitle = $widget->gettitle($id);
         return $html->adminform('
   [combo=sort]
   [checkbox=showsubitems]
   [checkbox=showcount]
   [text=maxcount]
   [hidden=idwidget]', $args);
     }
     $tags = array();
     foreach ($widget->items as $id => $item) {
         $tags[] = $item['idtag'];
     }
     $args->formtitle = $about['formtitle'];
     return $html->adminform(tposteditor::getcategories($tags), $args);
 }
 public function getcontent()
 {
     $lang = tlocal::admin('tickets');
     $args = new targs();
     $args->formtitle = $lang->admincats;
     $tickets = ttickets::i();
     return $this->html->adminform(tposteditor::getcategories($tickets->cats), $args);
 }
 public function getcontent()
 {
     $plugin = tcategoriesmenu::i();
     $about = tplugins::getabout(tplugins::getname(__FILE__));
     $args = targs::i();
     $args->cats = tposteditor::getcategories($plugin->exitems);
     $args->formtitle = $about['formtitle'];
     //    $args->data['$lang.before'] = $about['before'];
     $html = tadminhtml::i();
     return $html->adminform('$cats', $args);
 }
 public function getcontent()
 {
     $widget = texcerptslide::i();
     $about = tplugins::getabout(tplugins::getname(__FILE__));
     $html = $this->html;
     $args = targs::i();
     $id = (int) tadminhtml::getparam('idwidget', 0);
     if (isset($widget->items[$id])) {
         $args->add($widget->items[$id]);
         $args->idwidget = $id;
         $args->data['$lang.invertorder'] = $about['invertorder'];
         $args->formtitle = $widget->gettitle($id);
         return $html->adminform('[text=maxcount]
   [checkbox=invertorder]
   [hidden=idwidget]', $args);
     }
     $tags = array();
     foreach ($widget->items as $id => $item) {
         $tags[] = $item['idtag'];
     }
     $args->formtitle = $about['formtitle'];
     return $html->adminform(tposteditor::getcategories($tags), $args);
 }
Exemplo n.º 6
0
 public function getcontent()
 {
     if ($form = $this->getautoform($this->name)) {
         return $form->getform();
     }
     $options = litepublisher::$options;
     $template = ttemplate::i();
     ttheme::$vars['template'] = $template;
     $result = '';
     $args = new targs();
     $lang = tlocal::admin('options');
     $html = $this->html;
     switch ($this->name) {
         case 'options':
             $site = litepublisher::$site;
             $args->fixedurl = $site->fixedurl;
             $args->redirdom = litepublisher::$urlmap->redirdom;
             $args->url = $site->url;
             $args->name = $site->name;
             $args->description = $site->description;
             $args->keywords = $site->keywords;
             $args->author = $site->author;
             $args->footer = $template->footer;
             $args->formtitle = $lang->options;
             return $html->adminform('
   [checkbox=fixedurl]
   [checkbox=redirdom]
   [text=url]
   [text=name]
   [text=description]
   [text=keywords]
   [text=author]
   [editor=footer]
   ', $args);
         case 'home':
             $home = thomepage::i();
             $tabs = new tuitabs();
             $args->image = $home->image;
             $args->parsetags = $home->parsetags;
             $args->showmidle = $home->showmidle;
             $args->midlecat = tposteditor::getcombocategories(array(), $home->midlecat);
             $args->showposts = $home->showposts;
             $args->invertorder = $home->invertorder;
             $args->showpagenator = $home->showpagenator;
             $args->idhome = $home->id;
             $menus = tmenus::i();
             $args->homemenu = $menus->home;
             $tabs->add($lang->options, '
   [checkbox=homemenu]
   [text=image]
   [checkbox=parsetags]
   [checkbox=showmidle]
   [combo=midlecat]
   [checkbox=showposts]
   [checkbox=invertorder]
   [checkbox=showpagenator]
   ');
             $tabs->add($lang->includecats, $html->h4->includehome . tposteditor::getcategories($home->includecats));
             $tabs->add($lang->excludecats, $html->h4->excludehome . str_replace('category-', 'exclude_category-', tposteditor::getcategories($home->excludecats)));
             $args->formtitle = $lang->homeform;
             return tuitabs::gethead() . $html->adminform('<h4><a href="$site.url/admin/menu/edit/{$site.q}id=$idhome">$lang.hometext</a></h4>' . $tabs->get(), $args);
         case 'mail':
             $args->adminemail = $options->email;
             $args->fromemail = $options->fromemail;
             $args->mailer = $options->mailer == 'smtp';
             $subscribers = tsubscribers::i();
             $args->subscribeemail = $subscribers->fromemail;
             $mailer = TSMTPMailer::i();
             $args->host = $mailer->host;
             $args->smtplogin = $mailer->login;
             $args->password = $mailer->password;
             $args->port = $mailer->port;
             $args->formtitle = $lang->mailoptions;
             return $html->adminform('
   [text=adminemail]
   [text=fromemail]
   [text=subscribeemail]
   [checkbox=mailer]
   [text=host]
   [text=smtplogin]
   [password=password]
   [text=port]
   ', $args);
         case 'view':
             $args->perpage = $options->perpage;
             $filter = tcontentfilter::i();
             $args->usefilter = $filter->usefilter;
             $args->automore = $filter->automore;
             $args->automorelength = $filter->automorelength;
             $args->autolinks = $filter->autolinks;
             $args->commentautolinks = $filter->commentautolinks;
             $args->icondisabled = $options->icondisabled;
             $args->hidefilesonpage = $options->hidefilesonpage;
             $themeparser = tthemeparser::i();
             $args->replacelang = $themeparser->replacelang;
             $args->stylebefore = $themeparser->stylebefore;
             $args->formtitle = $lang->viewoptions;
             return $html->adminform('
   [text=perpage]
   [checkbox=usefilter]
   [checkbox=automore]
   [text=automorelength]
   [checkbox=autolinks]
   [checkbox=commentautolinks]
   [checkbox=hidefilesonpage]
   [checkbox=icondisabled]
   [checkbox=replacelang]
   [checkbox=stylebefore]
   ', $args);
             break;
         case 'files':
             $parser = tmediaparser::i();
             $args->enablepreview = $parser->enablepreview;
             $args->ratio = $parser->ratio;
             $args->clipbounds = $parser->clipbounds;
             $args->previewwidth = $parser->previewwidth;
             $args->previewheight = $parser->previewheight;
             $args->maxwidth = $parser->maxwidth;
             $args->maxheight = $parser->maxheight;
             $args->alwaysresize = $parser->alwaysresize;
             $args->quality_original = $parser->quality_original;
             $args->quality_snapshot = $parser->quality_snapshot;
             $args->audioext = $parser->audioext;
             $args->videoext = $parser->videoext;
             $args->video_width = litepublisher::$site->video_width;
             $args->video_height = litepublisher::$site->video_height;
             $args->formtitle = $lang->files;
             return $html->adminform('
   <h4>$lang.imagesize</h4>
   [checkbox=alwaysresize]
   [text=maxwidth]
   [text=maxheight]
   [text=quality_original]
   
   <h4>$lang.previewsize</h4>
   [checkbox=enablepreview]
   [checkbox=ratio]
   [checkbox=clipbounds]
   [text=previewwidth]
   [text=previewheight]
   [text=quality_snapshot]
   
   <h4>$lang.extfile</h4>
   [text=audioext]
   [text=videoext]
   
   [text=video_width]
   [text=video_height]
   ', $args);
             break;
         case 'links':
             $linkgen = tlinkgenerator::i();
             $args->urlencode = $linkgen->urlencode;
             $args->post = $linkgen->post;
             $args->menu = $linkgen->menu;
             $args->category = $linkgen->category;
             $args->tag = $linkgen->tag;
             $args->archive = $linkgen->archive;
             $args->formtitle = $lang->schemalinks;
             return $html->adminform('
   <p>$lang.taglinks</p>
   [checkbox=urlencode]
   [text=post]
   [text=menu]
   [text=category]
   [text=tag]
   [text=archive]
   ', $args);
         case 'cache':
             $args->enabledcache = $options->cache;
             $args->expiredcache = $options->expiredcache;
             $args->admincache = $options->admincache;
             $args->ob_cache = $options->ob_cache;
             $args->compress = $options->compress;
             $args->commentspull = $options->commentspull;
             $args->memcache_classes = litepublisher::$classes->memcache;
             $args->formtitle = $lang->optionscache;
             $result = $html->adminform('
   [checkbox=enabledcache]
   [text=expiredcache]
   [checkbox=ob_cache]
   [checkbox=admincache]
   [checkbox=commentspull]
   [checkbox=memcache_classes]
   ', $args);
             $form = new adminform($args);
             $form->submit = 'clearcache';
             $result .= $form->get();
             return $result;
         case 'catstags':
         case 'lite':
             //old version suports
             $args->litearch = litepublisher::$classes->archives->lite;
             $cats = litepublisher::$classes->categories;
             $args->litecats = $cats->lite;
             $args->parentcats = $cats->includeparents;
             $args->childcats = $cats->includechilds;
             $tags = litepublisher::$classes->tags;
             $args->litetags = $tags->lite;
             $args->parenttags = $tags->includeparents;
             $args->childtags = $tags->includechilds;
             $lang = tlocal::admin('options');
             $args->formtitle = $lang->catstags;
             $html = $this->html;
             return $html->adminform('[checkbox=litearch]
   [checkbox=litecats] [checkbox=parentcats] [checkbox=childcats]
   [checkbox=litetags] [checkbox=parenttags] [checkbox=childtags]', $args) . $html->p->notecatstags;
         case 'robots':
             $html = $this->html;
             $args->formtitle = 'robots.txt';
             $args->robots = trobotstxt::i()->text;
             $args->appcache = appcache_manifest::i()->text;
             $tabs = new tuitabs();
             $tabs->add('robots.txt', '[editor=robots]');
             $tabs->add('manifest.appcache', '[editor=appcache]');
             return tuitabs::gethead() . $html->adminform($tabs->get(), $args);
             break;
         case 'secure':
             $args->echoexception = $options->echoexception;
             $args->usersenabled = $options->usersenabled;
             $args->reguser = $options->reguser;
             $args->parsepost = $options->parsepost;
             $args->show_draft_post = $options->show_draft_post;
             $args->xxxcheck = $options->xxxcheck;
             $filter = tcontentfilter::i();
             $args->phpcode = $filter->phpcode;
             $args->removephp = tthemeparser::i()->removephp;
             $args->useshell = tupdater::i()->useshell;
             $backuper = tbackuper::i();
             $args->filertype = tadminhtml::array2combo(array('auto' => 'auto', 'file' => 'file', 'ftp' => 'ftp', 'ftpsocket' => 'ftpsocket'), $backuper->filertype);
             $args->formtitle = $lang->securehead;
             $result = $html->adminform('
   [checkbox=echoexception]
   [checkbox=xxxcheck]
   [checkbox=usersenabled]
   [checkbox=reguser]
   [checkbox=removephp]
   [checkbox=phpcode]
   [checkbox=parsepost]
   [checkbox=show_draft_post]
   [combo=filertype]
   [checkbox=useshell]
   ', $args);
             $form = new adminform($args);
             $form->title = $lang->changepassword;
             $args->oldpassword = '';
             $args->newpassword = '';
             $args->repassword = '';
             $form->items = '[password=oldpassword]
   [password=newpassword]
   [password=repassword]';
             $form->submit = 'changepassword';
             $result .= $form->get();
             return $result;
     }
     $result = $this->html->{$this->name}($args);
     return $this->html->fixquote($result);
 }