public function getcontent() { if (!($id = $this->getidfile())) { return $this->notfound; } $result = ''; $files = tfiles::i(); $html = $this->html; $lang = tlocal::admin(); $args = new targs(); $item = $files->getitem($id); $idpreview = $item['preview']; if ($idpreview > 0) { $args->add($files->getitem($idpreview)); $form = new adminform($args); $form->action = "{$this->adminurl}={$id}"; $form->inline = true; $form->items = $html->p('<img src="$site.files/files/$filename" alt="thumbnail" />' . $lang->wantdelete); $form->submit = 'delete'; $result .= $form->get(); } $form = new adminform($args); $form->upload = true; $form->action = "{$this->adminurl}={$id}"; $form->title = $lang->changethumb; $form->items = '[upload=filename] [checkbox=noresize]'; $result .= $form->get(); return $result; }
public function getsortedcontent(array $tml, $parent, $sortname, $count, $showcount) { $sorted = $this->getsorted($parent, $sortname, $count); if (count($sorted) == 0) { return ''; } $result = ''; $iconenabled = !litepublisher::$options->icondisabled; $theme = ttheme::i(); $args = new targs(); $args->rel = $this->PermalinkIndex; $args->parent = $parent; foreach ($sorted as $id) { $item = $this->getitem($id); $args->add($item); $args->icon = $iconenabled ? $this->geticonlink($id) : ''; $args->subcount = $showcount ? $theme->parsearg($tml['subcount'], $args) : ''; $args->subitems = $tml['subitems'] ? $this->getsortedcontent($tml, $id, $sortname, $count, $showcount) : ''; $result .= $theme->parsearg($tml['item'], $args); } if ($parent == 0) { return $result; } $args->parent = $parent; $args->item = $result; return $theme->parsearg($tml['subitems'], $args); }
protected static function getsubcategories($parent, array $postitems, $exclude = false) { $result = ''; $categories = tcategories::i(); $html = tadminhtml::getinstance('editor'); $tml = str_replace('$checkbox', $html->getinput('checkbox', 'category-$id', 'value="$id" $checked', '$title'), $html->category); $args = new targs(); foreach ($categories->items as $id => $item) { if ($parent != $item['parent']) { continue; } if ($exclude && in_array($id, $exclude)) { continue; } $args->add($item); $args->checked = in_array($item['id'], $postitems); $args->subcount = ''; $args->subitems = self::getsubcategories($id, $postitems); $result .= $html->parsearg($tml, $args); } if ($result == '') { return ''; } return sprintf($html->categories(), $result); }
public function getcontent() { $plugin = tlivejournalposter::i(); $dir = dirname(__FILE__) . DIRECTORY_SEPARATOR; if ($plugin->template == '') { $plugin->template = file_get_contents($dir . 'livejournalposter.tml'); } $about = tplugins::getabout(tplugins::getname(__FILE__)); $lang = tplugins::getlangabout(__FILE__); $html = tadminhtml::i(); $html->section = $lang->section; $args = targs::i(); $args->add($about); $args->add($plugin->data); $args->public = 'public' == $plugin->privacy; $args->private = 'private' == $plugin->privacy; $args->friends = 'friends' == $plugin->privacy; return $html->adminform('[text=host] [text=login] [password=password] [text=community] <p><strong>$lang.privacy</strong> <label><input name="privacy" type="radio" value="public" $public/>$lang.public</label> <label><input name="privacy" type="radio" value="private" $private />$lang.private</label> <label><input name="privacy" type="radio" value="frinds" $friends/>$lang.friends</label> </p> [editor=template]', $args); }
public function getcontent($id, $sidebar) { if (litepublisher::$urlmap->is404) { return ''; } $result = ''; $a = array('$url' => urlencode(litepublisher::$site->url . litepublisher::$urlmap->url), '$title' => urlencode(ttemplate::i()->title)); $redirlink = litepublisher::$site->url . $this->redirlink . litepublisher::$site->q . strtr('url=$url&title=$title&id=', $a); $iconurl = litepublisher::$site->files . '/plugins/bookmarks/icons/'; $theme = ttheme::i(); $tml = $theme->getwidgetitem('links', $sidebar); $args = targs::i(); $args->subcount = ''; $args->subitems = ''; $args->rel = 'link bookmark'; foreach ($this->items as $id => $item) { $args->id = $id; $args->title = $item['title']; $args->text = $item['title']; if ($this->redir) { $args->link = $redirlink . $id; } else { $args->link = strtr($item['url'], $a); } $args->icon = $item['text'] == '' ? '' : sprintf('<img src="%s%s" alt="%s" />', $iconurl, $item['text'], $item['title']); $result .= $theme->parsearg($tml, $args); } return $theme->getwidgetcontent($result, 'links', $sidebar); }
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($id, $sidebar) { if (count($this->items) == 0) { return ''; } $result = ''; $theme = ttheme::i(); $tml = $theme->getwidgetitem('links', $sidebar); $redirlink = litepublisher::$site->url . $this->redirlink . litepublisher::$site->q . 'id='; $url = litepublisher::$site->url; $args = targs::i(); $args->subcount = ''; $args->subitems = ''; $args->icon = ''; $args->rel = 'link'; foreach ($this->items as $id => $item) { $args->add($item); $args->id = $id; if ($this->redir && !strbegin($item['url'], $url)) { $args->link = $redirlink . $id; } else { $args->link = $item['url']; } $result .= $theme->parsearg($tml, $args); } return $theme->getwidgetcontent($result, 'links', $sidebar); }
public function getcontent() { $redir = tredirector::i(); $html = $this->html; $lang = $this->lang; $args = targs::i(); $from = tadminhtml::getparam('from', ''); if (isset($redir->items[$from])) { $args->from = $from; $args->to = $redir->items[$from]; } else { $args->from = ''; $args->to = ''; } $args->action = 'edit'; $args->formtitle = $lang->edit; $result = $html->adminform('[text=from] [text=to] [hidden=action]', $args); $id = 1; $items = array(); foreach ($redir->items as $from => $to) { $items[] = array('id' => $id++, 'from' => $from, 'to' => $to); } $adminurl = tadminhtml::getadminlink($this->url, 'from'); $args->table = $html->buildtable($items, array(array('center', '+', '<input type="checkbox" name="checkbox_$id" id="checkbox_$id" value="$from" />'), array('left', $lang->from, '<a href="$site.url$from" title="$from">$from</a>'), array('left', $lang->to, '<a href="$site.url$to" title="$to">$to</a>'), array('center', $lang->edit, "<a href=\"{$adminurl}=\$from\">{$lang->edit}</a>"))); $args->action = 'delete'; $result .= $html->parsearg('<form name="deleteform" action="" method="post"> [hidden=action] $table <p><input type="submit" name="delete" value="$lang.delete" /></p> </form>', $args); $result = $html->fixquote($result); return $result; }
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; }
public function getcontent() { $id = tadminhtml::idparam(); $menus = tmenus::i(); if ($id != 0 && !$menus->itemexists($id)) { return self::error403(); } $menu = tmenu::i($id); if (litepublisher::$options->group == 'author' && litepublisher::$options->user != $menu->author) { return self::error403(); } if ($id > 0 && !$menus->itemexists($id)) { return self::error403(); } $views = tviews::i(); $theme = tview::i($views->defaults['admin'])->theme; $html = tadminhtml::i(); $html->section = 'menu'; switch ($_GET['get']) { case 'view': $result = tadminviews::getcomboview($id == 0 ? $views->defaults['menu'] : $menu->idview); break; case 'seo': $args = targs::i(); $args->url = $menu->url; $args->keywords = $menu->keywords; $args->description = $menu->description; $args->head = $menu->data['head']; $result = $html->parsearg('[text=url] [text=description] [text=keywords] [editor=head]', $args); break; default: $result = var_export($_GET, true); } return turlmap::htmlheader(false) . $result; }
public function getcontent($id, $sidebar) { $foaf = tfoaf::i(); $items = $foaf->getapproved($this->maxcount); if (count($items) == 0) { return ''; } $result = ''; $url = litepublisher::$site->url; $redirlink = litepublisher::$site->url . $this->redirlink . litepublisher::$site->q . 'id='; $theme = ttheme::i(); $tml = $theme->getwidgetitem('friends', $sidebar); $args = targs::i(); $args->subcount = ''; $args->subitems = ''; $args->{$icon} = ''; $args->rel = 'friend'; foreach ($items as $id) { $item = $foaf->getitem($id); $args->add($item); $args->anchor = $item['title']; if ($this->redir && !strbegin($item['url'], $url)) { $args->url = $redirlink . $id; } $result .= $theme->parsearg($tml, $args); } return $theme->getwidgetcontent($result, 'friends', $sidebar); }
public function getcontent() { $result = ''; $files = tfiles::i(); $icons = ticons::i(); $html = $this->html; $lang = tlocal::admin('files'); $args = targs::i(); $a = array(); //добавить 0 для отсутствия иконки $a[0] = $lang->noicon; $allicons = self::getallicons(); foreach ($allicons as $id) { $args->id = $id; $item = $files->getitem($id); $args->add($item); $a[$id] = $html->comboitem($args); } $list = ''; foreach ($icons->items as $name => $id) { $args->name = $name; $title = $lang->{$name}; if ($title == '') { $title = tlocal::usefile('install')->{$name}; } $args->title = $title; $args->combo = $html->array2combo($a, $id); $list .= $html->iconitem($args); } $args->formtitle = $lang->iconheader; $result .= $html->adminform($list, $args); return $html->fixquote($result); }
public function getcontent() { $merger = tlocalmerger::i(); $tabs = new tuitabs(); $html = $this->html; $lang = tlocal::i('options'); $args = targs::i(); foreach ($merger->items as $section => $items) { $tab = new tuitabs(); $tab->add($lang->files, $html->getinput('editor', $section . '_files', tadminhtml::specchars(implode("\n", $items['files'])), $lang->files)); $tabtext = new tuitabs(); foreach ($items['texts'] as $key => $text) { $tabtext->add($key, $html->getinput('editor', $section . '_text_' . $key, tadminhtml::specchars($text), $key)); } $tab->add($lang->text, $tabtext->get()); $tabs->add($section, $tab->get()); } $tabs->add('HTML', $html->getinput('editor', 'adminhtml_files', tadminhtml::specchars(implode("\n", $merger->html)), $lang->files)); $args->formtitle = $lang->optionslocal; $args->dateformat = litepublisher::$options->dateformat; $dirs = tfiler::getdir(litepublisher::$paths->languages); $args->language = tadminhtml::array2combo(array_combine($dirs, $dirs), litepublisher::$options->language); $zones = timezone_identifiers_list(); $args->timezone = tadminhtml::array2combo(array_combine($zones, $zones), litepublisher::$options->timezone); return $html->adminform('[text=dateformat] [combo=language] [combo=timezone]' . $tabs->get(), $args); }
public function getcontent() { $result = ''; $plugin = titemsreplacer::i(); $views = tviews::i(); $html = tadminhtml::i(); $args = targs::i(); $lang = tplugins::getlangabout(__FILE__); $adminurl = tadminhtml::getadminlink('/admin/plugins/', 'plugin=' . basename(dirname(__FILE__))); if (!empty($_GET['id'])) { $id = (int) $_GET['id']; if (isset($plugin->items[$id])) { $args->formtitle = sprintf($lang->formtitle, $views->items[$id]['name']); $tabs = new tuitabs(); $tabs->add($lang->add, $html->getinput('text', 'addtag', '', $lang->addtag) . $html->getinput('editor', 'addreplace', '', $lang->replace)); $i = 0; foreach ($plugin->items[$id] as $tag => $replace) { $tabs->add($tag, $html->getinput('editor', "replace-{$i}", tadminhtml::specchars($replace), $lang->replace)); $i++; } $result .= $html->adminform($tabs->get(), $args); } } $result .= "<h4>{$lang->viewlist}</h4><ul>"; foreach (array_keys($plugin->items) as $id) { $name = $views->items[$id]['name']; $result .= "<li><a href='{$adminurl}&id={$id}'>{$name}</a></li>"; } $result .= '</ul>'; $form = "<h3>{$lang->addview}</h3>\n <form name='form' action='{$adminurl}&action=add' method='post' >\n " . $html->getinput('text', 'viewname', '', $lang->viewname) . "\n <p><input type='submit' name='submitbutton' id='idsubmitbutton' value='{$lang->add}' /></p>\n </form>"; $result .= $form; return $result; }
private function getsubscribed($authorid) { $db = litepublisher::$db; $authorid = (int) $authorid; $users = tusers::i(); if (!$users->itemexists($authorid)) { return ''; } $html = $this->gethtml('moderator'); $result = ''; $res = $db->query("select {$db->posts}.id as id, {$db->posts}.title as title, {$db->urlmap}.url as url\n from {$db->posts}, {$db->urlmap}\n where {$db->posts}.id in (select DISTINCT {$db->comments}.post from {$db->comments} where author = {$authorid})\n and {$db->urlmap}.id = {$db->posts}.idurl\n order by {$db->posts}.posted desc"); $items = $db->res2assoc($res); $subscribers = tsubscribers::i(); $subscribed = $subscribers->getposts($authorid); $args = targs::i(); foreach ($items as $item) { $args->add($item); $args->subscribed = in_array($item['id'], $subscribed); $result .= $html->subscribeitem($args); } return $html->fixquote($result); /* subscribeitem = "<tr> <td align ='center'><input type='checkbox' name='$id' id='$id' $subscribed /></td> <td align='left'><a href='$site.url$url'>$title</a></td> </tr>" */ }
public function getcontent($id, $sidebar) { $result = ''; $theme = ttheme::i(); $tml = $theme->getwidgetitem('meta', $sidebar); $metaclasses = $theme->getwidgettml($sidebar, 'meta', 'classes'); $args = targs::i(); foreach ($this->items as $name => $item) { if (!$item['enabled']) { continue; } $args->add($item); $args->icon = ''; $args->subcount = ''; $args->subitems = ''; $args->rel = $name; if ($name == 'profile') { $args->rel = 'author profile'; } $args->class = isset($metaclasses[$name]) ? $metaclasses[$name] : ''; $result .= $theme->parsearg($tml, $args); } if ($result == '') { return ''; } return $theme->getwidgetcontent($result, 'meta', $sidebar); }
public function getcontent() { $type = tadminhtml::getparam('type', 'tags') == 'tags' ? 'tags' : 'categories'; $tags = $type == 'tags' ? ttags::i() : tcategories::i(); if ($err = self::auth()) { return $err; } $id = tadminhtml::idparam(); if ($id > 0 && !$tags->itemexists($id)) { return self::error403(); } $theme = tview::i(tviews::i()->defaults['admin'])->theme; $html = tadminhtml::i(); $html->section = 'tags'; $lang = tlocal::i('tags'); if ($id == 0) { $views = tviews::i(); $name = $type == 'tags' ? 'tag' : 'category'; $item = array('title' => '', 'idview' => isset($views->defaults[$name]) ? $views->defaults[$name] : 1, 'idperm' => 0, 'icon' => 0, 'includechilds' => $tags->includechilds, 'includeparents' => $tags->includeparents, 'invertorder' => false, 'lite' => $tags->lite, 'liteperpage' => 1000, 'url' => '', 'keywords' => '', 'description' => '', 'head' => ''); } else { $item = $tags->getitem($id); } switch ($_GET['get']) { case 'view': if ($id > 0) { foreach (array('includechilds', 'includeparents', 'invertorder', 'lite') as $prop) { $item[$prop] = (int) $item[$prop] > 0; } } $args = new targs(); $args->add($item); $result = $html->parsearg('[checkbox=includechilds] [checkbox=includeparents] [checkbox=invertorder] [checkbox=lite] [text=liteperpage]', $args); $result .= $this->getviewicon($item['idview'], $item['icon']); $result .= tadminperms::getcombo($item['idperm']); break; case 'seo': $args = targs::i(); if ($id == 0) { $args->url = ''; $args->keywords = ''; $args->description = ''; $args->head = ''; } else { $args->add($tags->contents->getitem($id)); $args->url = $tags->items[$id]['url']; } $result = $html->parsearg('[text=url] [text=description] [text=keywords] [editor=head]', $args); break; case 'text': $result = $this->geteditor('raw', $id == 0 ? '' : $tags->contents->getcontent($id), true); $result .= $this->gethead(); break; default: $result = var_export($_GET, true); } return turlmap::htmlheader(false) . $result; }
public static function getcontent($holder, $menu) { $result = ''; $html = $menu->html; $lang = tlocal::admin(); $id = (int) tadminhtml::getparam('id', 0); $args = new targs(); $args->id = $id; $args->adminurl = $menu->adminurl; if (isset($_GET['action']) && $_GET['action'] == 'delete' && $tags->itemexists($id)) { if (isset($_REQUEST['confirm']) && $_REQUEST['confirm'] == 1) { $holder->delete($id); $result .= $html->h4->deleted; } else { return $html->confirmdelete($id, $menu->adminurl, $lang->confirmdelete); } } if ($id == 0) { $item = $menu->defaultitem; } elseif ($holder->itemexists($id)) { $item = $holder->getitem($id); } else { $item = false; } if ($item) { $args->add($item); $menu->editargs($item, $args); $result .= $html->adminform($menu->editform, $args); } //table $perpage = 20; $count = $holder->count; $from = $menu->getfrom($perpage, $count); $items = $holder->select($menu->where, " order by id desc limit {$from}, {$perpage}"); if (!$items) { $items = array(); } $result .= $html->buildtable($items, $menu->table); $result = $html->fixquote($result); $theme = ttheme::i(); $result .= $theme->getpages($menu->url, litepublisher::$urlmap->page, ceil($count / $perpage)); return $result; }
public function getcontent() { $plugin = tmarkdownplugin::i(); $about = tplugins::getabout(tplugins::getname(__FILE__)); $args = targs::i(); $html = tadminhtml::i(); $args->formtitle = $about['name']; $args->data['$lang.deletep'] = $about['deletep']; $args->deletep = $plugin->deletep; return $html->adminform('[checkbox=deletep]', $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() { $plugin = tyoutubeplayer::i(); $about = tplugins::getabout(tplugins::getname(__FILE__)); $args = targs::i(); $args->formtitle = $about['formtitle']; $args->data['$lang.template'] = $about['template']; $args->template = $plugin->template; $html = tadminhtml::i(); return $html->adminform('[editor:template]', $args); }
private function editpingback($id) { $pingbacks = tpingbacks::i(); $args = targs::i(); $args->add($pingbacks->getitem($id)); $args->formtitle = tlocal::i()->edit; return $this->html->adminform(' [text=title] [text=url] ', $args); }
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 getcontent() { $plugin = tpostcontentplugin::i(); $html = tadminhtml::i(); $args = targs::i(); $about = tplugins::getabout(tplugins::getname(__FILE__)); $args->formtitle = $about['formtitle']; $args->data['$lang.before'] = $about['before']; $args->data['$lang.after'] = $about['after']; $args->before = $plugin->before; $args->after = $plugin->after; return $html->adminform('[editor=before] [editor=after]', $args); }
public function getcontent() { $result = $this->getpluginsmenu(); $html = $this->html; $plugins = tplugins::i(); if (empty($_GET['plugin'])) { $result .= $html->formhead(); $args = new targs(); $lang = $this->lang; list($head, $tml) = $html->tablestruct(array(array('center', ' ', '<input type="checkbox" name="$name" id="$name" $checked />'), array('left', $lang->name, '$short'), array('right', $lang->version, '$version'), array('left', $lang->author, '<a target="_blank" href="$url">$author</a>'), array('left', $lang->description, '$description'))); $body = ''; foreach ($this->names as $name) { if (in_array($name, $plugins->deprecated)) { continue; } $about = tplugins::getabout($name); $args->add($about); $args->name = $name; $args->checked = isset($plugins->items[$name]); $args->short = $about['name']; $body .= $html->parsearg($tml, $args); } $args->tablehead = $head; $args->tablebody = $body; //$table = $html->parsearg($html->ini['common']['table'], $args); $args->formtitle = $lang->formhead; $result .= $html->adminform($html->ini['common']['table'], $args); $result = $html->fixquote($result); } else { $name = $_GET['plugin']; if (!in_array($name, $this->names)) { return $this->notfound; } if ($admin = $this->getadminplugin($name)) { $result .= $admin->getcontent(); } } return $result; }
public function getcontent() { $plugin = catbread::i(); $lang = tplugins::getnamelang('catbread'); $html = tadminhtml::i(); $args = new targs(); $args->add($plugin->tml); $args->showhome = $plugin->showhome; $args->showchilds = $plugin->showchilds; $args->showsimilar = $plugin->showsimilar; $lang->addsearch('sortnametags'); $sort = array('title' => $lang->title, 'itemscount' => $lang->count, 'customorder' => $lang->customorder); $args->sort = tadminhtml::array2combo($sort, $plugin->childsortname); $pos = array('top' => $lang->top, 'before' => $lang->before, 'after' => $lang->after); $args->breadpos = tadminhtml::array2combo($pos, $plugin->breadpos); $args->similarpos = tadminhtml::array2combo($pos, $plugin->similarpos); $args->formtitle = $lang->formtitle; return $html->adminform(' [checkbox=showhome] [combo=breadpos] [text=item] [text=active] [text=child] [editor=items] [editor=container] [checkbox=showchilds] [combo=sort] [text=childitem] [text=childsubitems] [editor=childitems] [checkbox=showsimilar] [combo=similarpos] [text=similaritem] [text=similaritems] ', $args); }
public function getcontent() { $result = tadminviews::getviewform('/admin/views/themes/'); $idview = tadminhtml::getparam('idview', 1); $view = tview::i($idview); $html = $this->gethtml('themes'); $args = targs::i(); $args->idview = $idview; $theme = $view->theme; $result .= $html->formheader($args); $result .= self::getlist($html->radioitem, $theme->name); $result .= $html->formfooter(); return $html->fixquote($result); }
public function getcontent() { $tml = '[text:user] [editor:se]'; $html = tadminhtml::i(); $args = targs::i(); $about = tplugins::getabout(tplugins::getname(__FILE__)); $args->formtitle = $about['formtitle']; $args->data['$lang.user'] = $about['user']; $args->data['$lang.se'] = $about['se']; $args->user = $this->user; $args->se = $this->se; return $html->adminform($tml, $args); }
public function getcontent() { $plugin = ttagreplacer::i(); $html = tadminhtml::i(); $tabs = new tuitabs(); $args = targs::i(); $about = tplugins::getabout('tagreplacer'); $args->formtitle = $about['name']; $tabs->add($about['new'], $html->getinput('text', 'where-add', '', $about['where']) . $html->getinput('text', 'search-add', '', $about['search']) . $html->getinput('editor', 'replace-add', '', $about['replace'])); foreach ($plugin->items as $i => $item) { $tabs->add($item['where'], $html->getinput('text', "where-{$i}", tadminhtml::specchars($item['where']), $about['where']) . $html->getinput('text', "search-{$i}", tadminhtml::specchars($item['search']), $about['search']) . $html->getinput('editor', "replace-{$i}", tadminhtml::specchars($item['replace']), $about['replace'])); } return $html->adminform($tabs->get(), $args); }
public function getcontent() { $result = parent::getcontent(); $args = targs::i(); $args->script = $this->script; $args->ignorelink = $this->ignorelink; $about = tplugins::getabout(tplugins::getname(__FILE__)); $args->scriptlabel = $about['scriptlabel']; $args->ignorelinklabel = $about['ignorelink']; $tml = file_get_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'form.tml'); $html = tadminhtml::i(); $result .= $html->parsearg($tml, $args); return $result; }