XOOPS  2.6.0
search_blocks.php
Go to the documentation of this file.
1 <?php
2 /*
3  You may not change or alter any portion of this comment or credits
4  of supporting developers from this source code or any supporting source code
5  which is considered copyrighted (c) material of the original comment or credit authors.
6 
7  This program is distributed in the hope that it will be useful,
8  but WITHOUT ANY WARRANTY; without even the implied warranty of
9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 */
11 
22 function b_search_show()
23 {
25  $search->loadLanguage('main', 'search');
26 
27  $form = new Xoops\Form\SimpleForm('', 'search', $search->url('index.php'), 'get', false, 'inline');
28 
29  // create form elements
30  $form->addElement(new Xoops\Form\Text('', 'query', 2, 100, '', _MD_SEARCH_KEYWORDS), true);
31  $form->addElement(new Xoops\Form\Hidden('action', 'results'));
32  $form->addElement(new Xoops\Form\Token('id'));
33 
34  $button = new Xoops\Form\Button('', 'submit', _MD_SEARCH, 'submit');
35  $button->setClass('btn btn-primary');
36  $form->addElement($button);
37 
38  $block['form'] = $form->render();
39  return $block;
40 }
$form
Definition: xoops_code.php:21
$search
Definition: index.php:28
$button
Definition: xoops_code.php:29
const _MD_SEARCH_KEYWORDS
Definition: main.php:31
const _MD_SEARCH
Definition: main.php:19
b_search_show()