Ejemplo n.º 1
0
 public function getcontent()
 {
     $result = '';
     $types = tpolltypes::i();
     $html = tadminhtml::i();
     $lang = tlocal::admin('polls');
     $args = new targs();
     $type = isset($_GET['type']) ? $_GET['type'] : '';
     if (isset($types->items[$type])) {
         $args->type = $type;
         $tabs = new tuitabs();
         foreach ($types->items[$type] as $name => $value) {
             $args->{$name} = $value;
             $tabs->add($lang->{$name}, "[editor={$name}]");
         }
         $args->formtitle = $lang->edittype;
         $result .= $html->adminform($tabs->get(), $args);
     }
     $result .= $html->h4->alltypes;
     $result .= '<ul>';
     $adminurl = $html->getadminlink($this->url, 'type=');
     foreach ($types->items as $type => $item) {
         $result .= sprintf('<li><a href="%s%2$s" title="%2$s">%2$s</a></li>', $adminurl, $type);
     }
     $result .= '</ul>';
     return $result;
 }
/**
* Lite Publisher
* Copyright (C) 2010 - 2015 Vladimir Yushko http://litepublisher.ru/ http://litepublisher.com/
* Dual licensed under the MIT (mit.txt)
* and GPL (gpl.txt) licenses.
**/
function tlocalmergerInstall($self)
{
    $dir = litepublisher::$paths->data . 'languages';
    if (!is_dir($dir)) {
        @mkdir($dir, 0777);
    }
    @chmod($dir, 0777);
    $lang = litepublisher::$options->language;
    $self->lock();
    $self->add('default', "lib/languages/{$lang}/default.ini");
    $self->add('admin', "lib/languages/{$lang}/admin.ini");
    $self->add('mail', "lib/languages/{$lang}/mail.ini");
    if (litepublisher::$options->language != 'en') {
        $self->add('translit', "lib/languages/{$lang}/translit.ini");
    } else {
        $self->items['translit'] = array('files' => array(), 'texts' => array());
    }
    $self->add('install', "lib/languages/{$lang}/install.ini");
    $self->addhtml('lib/languages/adminhtml.ini');
    $self->addhtml('lib/languages/posteditor.ini');
    $self->unlock();
    //after install
    litepublisher::$options->timezone = tlocal::get('installation', 'timezone');
    date_default_timezone_set(tlocal::get('installation', 'timezone'));
    $html = tadminhtml::i();
    $html->loadinstall();
}
 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()
 {
     $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;
 }
Ejemplo n.º 5
0
 protected function create()
 {
     //parent::i();
     $this->html = tadminhtml::i();
     $this->html->section = 'widgets';
     $this->lang = tlocal::i('widgets');
 }
Ejemplo n.º 6
0
 public function gethtml()
 {
     $result = tadminhtml::i();
     $result->section = $this->section;
     $lang = tlocal::admin($this->section);
     return $result;
 }
Ejemplo n.º 7
0
 public static function getradio($idicon)
 {
     $items = self::getallicons();
     if (count($items) == 0) {
         return '';
     }
     $html = tadminhtml::i();
     $html->section = 'files';
     $args = targs::i();
     //add empty icon
     $args->id = 0;
     $args->checked = 0 == $idicon;
     $args->filename = '';
     $args->title = tlocal::i()->empty;
     $result = $html->radioicon($args);
     $files = tfiles::i();
     $url = litepublisher::$site->files . '/files/';
     foreach ($items as $id) {
         $item = $files->getitem($id);
         $args->add($item);
         $args->id = $id;
         $args->checked = $id == $idicon;
         $args->link = $url . $item['filename'];
         $result .= $html->radioicon($args);
     }
     return $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);
 }
Ejemplo n.º 9
0
 public static function getlist($tml, $selected)
 {
     $result = '';
     if (!is_array($selected)) {
         $selected = array((string) $selected);
     }
     $html = tadminhtml::i();
     $html->section = 'themes';
     $args = targs::i();
     $list = tfiler::getdir(litepublisher::$paths->themes);
     sort($list);
     $args->filesurl = tadminhtml::getadminlink('/admin/views/themefiles/', 'theme');
     $parser = tthemeparser::i();
     foreach ($list as $name) {
         if ($about = $parser->getabout($name)) {
             $about['name'] = $name;
             if (!isset($about['screenshot'])) {
                 $about['screenshot'] = 'screenshot.png';
             }
             $args->add($about);
             $args->checked = in_array($name, $selected);
             $result .= $html->parsearg($tml, $args);
         }
     }
     return $result;
 }
 public function getcontent()
 {
     $html = tadminhtml::i();
     $lang = tlocal::admin('polls');
     $args = new targs();
     //note to open admin menus
     $result = $html->h3->noteoptions;
     $polls = tpolls::i();
     $man = tpollsman::i();
     $args->addtopost = $man->addtopost;
     $items = array();
     $polls->loadall_tml();
     foreach ($polls->tml_items as $id => $tml) {
         $items[$id] = $tml['name'];
     }
     $args->pollpost = tadminhtml::array2combo($items, $man->pollpost);
     $args->lifetime = $man->lifetime;
     $args->formtitle = $lang->Options;
     $result .= $html->adminform('
 [checkbox=addtopost]
 [combo=pollpost]
 [text=lifetime]
 ', $args);
     return $result;
 }
Ejemplo n.º 11
0
 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;
 }
/**
* Lite Publisher
* Copyright (C) 2010 - 2015 Vladimir Yushko http://litepublisher.ru/ http://litepublisher.com/
* Dual licensed under the MIT (mit.txt)
* and GPL (gpl.txt) licenses.
**/
function trssholdcommentsInstall($self)
{
    $self->idurl = litepublisher::$urlmap->add($self->url, get_class($self), null, 'usernormal');
    $html = tadminhtml::i();
    $html->section = 'installation';
    $self->template = $html->rsstemplate;
    $self->save();
    tcomments::i()->changed = $self->commentschanged;
}
Ejemplo n.º 13
0
 public function gethtml($name = '')
 {
     $result = tadminhtml::i();
     if ($name == '') {
         $name = 'login';
     }
     $result->section = $name;
     $lang = tlocal::admin($name);
     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);
 }
Ejemplo n.º 17
0
 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()
 {
     $plugin = textrasidebars::i();
     $html = tadminhtml::i();
     $themes = tadminthemes::getlist('<li><input name="theme-$name" id="checkbox-theme-$name" type="checkbox" value="$name" $checked />
 <label for="checkbox-theme-$name"><img src="$site.files/themes/$name/$screenshot" alt="$name" /></label>
 $lang.version:$version $lang.author: <a href="$url">$author</a> $lang.description:  $description</li>', $plugin->themes);
     $args = targs::i();
     $lang = tplugins::getlangabout(__FILE__);
     $args->formtitle = $lang->name;
     $args->beforepost = $plugin->beforepost;
     $args->afterpost = $plugin->afterpost;
     return $html->adminform('[checkbox=beforepost] [checkbox=afterpost]' . "<h4>{$lang->themes}</h4><ul>{$themes}</ul>", $args);
 }
Ejemplo n.º 19
0
 public static function getviewform($url)
 {
     $html = tadminhtml::i();
     $lang = tlocal::admin();
     $args = new targs();
     $args->idview = self::getcombo(tadminhtml::getparam('idview', 1));
     $form = new adminform($args);
     $form->action = litepublisher::$site->url . $url;
     $form->inline = true;
     $form->method = 'get';
     $form->items = '[combo=idview]';
     $form->submit = 'select';
     return $form->get();
 }
 public function getcontent()
 {
     $plugin = tregservices::i();
     $html = tadminhtml::i();
     $tabs = new tuitabs();
     $args = targs::i();
     $lang = tplugins::getnamelang($plugin->dirname);
     $args->formtitle = $lang->options;
     foreach ($plugin->items as $id => $classname) {
         $service = getinstance($classname);
         $tabs->add($service->title, $service->gettab($html, $args, $lang));
     }
     return $html->adminform($tabs->get(), $args);
 }
Ejemplo n.º 21
0
 public function getcontent()
 {
     $ulogin = ulogin::i();
     $html = tadminhtml::i();
     $args = new targs();
     $lang = tplugins::getnamelang('ulogin');
     $args->formtitle = $lang->options;
     $args->panel = $ulogin->panel;
     $args->button = $ulogin->button;
     return $html->adminform('
 [editor=panel]
 [editor=button]
 ', $args);
 }
Ejemplo n.º 22
0
 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;
 }
Ejemplo n.º 23
0
 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()
 {
     $plugin = tsourcefiles::i();
     $html = tadminhtml::i();
     $args = targs::i();
     $args->root = $plugin->root;
     $args->formtitle = 'Source files option';
     $args->data['$lang.root'] = 'Path to source files';
     $result = $html->adminform('[text=root]', $args);
     $result .= '<form name="rereadform" action="" method="post" >
 <p><input type="submit" name="reread" value="Reread"/></p>
 <p><input type="submit" name="download" value="Download and refresh"/></p>
 </form>';
     return $result;
 }
/**
* Lite Publisher
* Copyright (C) 2010 - 2015 Vladimir Yushko http://litepublisher.ru/ http://litepublisher.com/
* Dual licensed under the MIT (mit.txt)
* and GPL (gpl.txt) licenses.
**/
function tcontactformInstall($self)
{
    $html = tadminhtml::i();
    $html->section = 'contactform';
    tlocal::usefile('install');
    $lang = tlocal::i('contactform');
    $self->title = $lang->title;
    $self->subject = $lang->subject;
    $self->success = $html->success();
    $self->errmesg = $html->errmesg();
    $self->content = $html->form();
    $self->order = 10;
    $menus = tmenus::i();
    $menus->add($self);
}
Ejemplo n.º 27
0
 public function getcontent()
 {
     $contact = tcontactform::singleinstance('tcontactform');
     $about = tplugins::getabout(tplugins::getname(__FILE__));
     $args = targs::i();
     $items = '';
     foreach ($contact->data['extra'] as $name => $title) {
         $items .= "{$name} ={$title}\n";
     }
     $args->items = $items;
     $args->formtitle = $about['formtitle'];
     $args->data['$lang.items'] = $about['items'];
     $html = tadminhtml::i();
     return $html->adminform('[editor=items]', $args);
 }
 public function getcontent()
 {
     $plugin = tshortcode::i();
     $about = tplugins::getabout(tplugins::getname(__FILE__));
     $args = targs::i();
     $s = '';
     foreach ($plugin->items as $name => $value) {
         $s .= "{$name} = {$value}\n";
     }
     $args->codes = $s;
     $args->formtitle = $about['formtitle'];
     $args->data['$lang.codes'] = $about['codes'];
     $html = tadminhtml::i();
     return $html->adminform('[editor=codes]', $args);
 }
 public function getcontent()
 {
     $plugin = tsinglecat::i();
     $html = tadminhtml::i();
     $lang = tplugins::getlangabout(__FILE__);
     $args = targs::i();
     $args->maxcount = $plugin->maxcount;
     $args->invertorder = $plugin->invertorder;
     $args->tml = $plugin->tml;
     $args->tmlitems = $plugin->tmlitems;
     $args->formtitle = $lang->formtitle;
     return $html->adminform(' [checkbox=invertorder]
 [text=maxcount]
 [editor=tml]
 [editor=tmlitems]', $args);
 }
Ejemplo n.º 30
0
 public function getcontent()
 {
     $plugin = tblackip::i();
     $lang = tplugins::getlangabout('black-ip');
     $args = new targs();
     $args->ip = implode("\n", $plugin->ip);
     $args->words = implode("\n", $plugin->words);
     $args->ipstatus = tadminhtml::array2combo(tlocal::i()->ini['commentstatus'], $plugin->ipstatus);
     $args->wordstatus = tadminhtml::array2combo(tlocal::i()->ini['commentstatus'], $plugin->wordstatus);
     $tabs = new tuitabs();
     $tabs->add($lang->wordtitle, '[combo=wordstatus] [editor=words]');
     $tabs->add('IP', '[combo=ipstatus] [editor=ip]');
     $args->formtitle = $lang->formtitle;
     $html = tadminhtml::i();
     return tuitabs::gethead() . $html->adminform($tabs->get(), $args);
 }