$prefix_selected = array('any' => (in_array('', $vbulletin->GPC['prefixchoice']) or empty($vbulletin->GPC['prefixchoice'])) ? ' selected="selected"' : '', 'none' => in_array('-1', $vbulletin->GPC['prefixchoice']) ? ' selected="selected"' : ''); $show['tag_option'] = $vbulletin->options['threadtagging']; // image verification if (!$vbulletin->userinfo['userid'] and $vbulletin->options['hvcheck_search']) { require_once DIR . '/includes/class_humanverify.php'; $verification =& vB_HumanVerify::fetch_library($vbulletin); $human_verify = $verification->output_token(); } else { $human_verify = ''; } if ($vbulletin->debug) { $show['nocache'] = true; } // tag cloud display if ($vbulletin->options['threadtagging'] == 1 and $vbulletin->options['tagcloud_searchcloud'] == 1) { $tag_cloud = fetch_tagcloud('search'); if ($tag_cloud) { eval('$tag_cloud_headinclude .= "' . fetch_template('tag_cloud_headinclude') . '";'); } } else { $tag_cloud = ''; $tag_cloud_headinclude = ''; } // select the correct part of the forum jump menu $frmjmpsel['search'] = 'class="fjsel" selected="selected"'; construct_forum_jump(); // unlink the 'search' part of the navbits array_pop($navbits); $navbits[''] = $vbphrase['search_forums']; ($hook = vBulletinHook::fetch_hook('search_intro')) ? eval($hook) : false; $templatename = 'search_forums';
/** * Handle registration of the search cloud * * @param vB_Template The main search display template */ function search_intro_register_tagcloud($template) { global $vbulletin; $template->register('tag_cloud', ''); $template->register('tag_cloud_headinclude', ''); // tag cloud display if ($vbulletin->options['threadtagging'] == 1 AND $vbulletin->options['tagcloud_searchcloud'] == 1) { $tag_cloud = fetch_tagcloud('search'); if ($tag_cloud) { $template->register('tag_cloud', $tag_cloud); $tag_cloud_header = vB_Template::create('tag_cloud_headinclude'); $template->register('tag_cloud_headinclude', $tag_cloud_header->render()); } } }
} else { $_REQUEST['do'] = 'tag'; } } // ######################### REQUIRE BACK-END ############################ require_once './global.php'; require_once DIR . '/includes/functions_bigthree.php'; require_once DIR . '/includes/functions_forumdisplay.php'; if (!$vbulletin->options['threadtagging']) { print_no_permission(); } ($hook = vBulletinHook::fetch_hook('tags_start')) ? eval($hook) : false; // ####################################################################### if ($_REQUEST['do'] == 'cloud') { require_once DIR . '/includes/functions_search.php'; $tag_cloud = fetch_tagcloud('usage'); if ($tag_cloud) { eval('$tag_cloud_headinclude .= "' . fetch_template('tag_cloud_headinclude') . '";'); } else { $tag_cloud_headinclude = ''; } $navbits = construct_navbits(array('' => $vbphrase['tags'])); eval('$navbar = "' . fetch_template('navbar') . '";'); ($hook = vBulletinHook::fetch_hook('tags_cloud_complete')) ? eval($hook) : false; eval('print_output("' . fetch_template('tag_cloud_page') . '");'); } // ####################################################################### if ($_REQUEST['do'] == 'tag') { $vbulletin->input->clean_array_gpc('r', array('tag' => TYPE_NOHTML, 'pagenumber' => TYPE_UINT, 'perpage' => TYPE_UINT)); if (!$vbulletin->GPC['tag']) { standard_error(fetch_error('invalidid', $vbphrase['tag'], $vbulletin->options['contactuslink']));
<?php // tag cloud display $tag_links = fetch_tagcloud('usage'); $tag_cloud = ' <!-- tag cloud --> <div id="tag_cloud_r"> <div class="top"> </div> <div class="box"> <div class="title"> <h2>Popular Tags</h2> </div> <div class="links">' . $tag_links . '<div class="clearboth"> </div> </div> </div> <div class="bottom"> </div> </div> <!-- / tag cloud --> ';
/** * Handle registration of the search cloud * * @param vB_Template The main search display template */ function search_intro_register_tagcloud($template) { global $vbulletin; $template->register('tag_cloud', ''); // tag cloud display if ($vbulletin->options['threadtagging'] == 1 and $vbulletin->options['tagcloud_searchcloud'] == 1) { $tag_cloud = fetch_tagcloud('search'); if ($tag_cloud) { $template->register('tag_cloud', $tag_cloud); } } }
/** * vBForum_Search_Type_Post::listUi() *This function generates the search elements for the user to search for posts * @param mixed $prefs : the array of user preferences / propogated form values. * @param mixed $contenttypeid : the content type for which we are going to * search * @param array registers : any additional elements to be registered. These are * just passed to the template * @param string $template_name : name of the template to use for display. We have * a default template. * @return $html: complete html for the search elements */ public function listUi($prefs = null, $contenttypeid = null, $registers = null, $template_name = null) { global $vbulletin, $vbphrase; if (!isset($template_name)) { $template_name = 'search_input_post'; } if (!isset($contenttypeid)) { $contenttypeid = $this->get_contenttypeid(); } $template = vB_Template::create($template_name); if ($prefs['searchthreadid']) { if ($thread = vB_Legacy_Thread::create_from_id($prefs['searchthreadid'])) { $template->register('thread_title', $thread->get_field('title')); } } $template->register('securitytoken', $vbulletin->userinfo['securitytoken']); $template->register('contenttypeid', $contenttypeid); $template->register('search_forum_options', $this->showForumOptions($prefs['forumchoice'])); $template->register('tag_cloud', fetch_tagcloud('selectlist', $prefs['tags'])); $prefix_selected = array ( 'anythread' => (empty($prefs['prefixchoice']) OR in_array('', $prefs['prefixchoice']) ) ? 'selected="selected"' : '', 'anyprefix' => ($prefs['prefixchoice'] AND in_array('-2', $prefs['prefixchoice'])) ? 'selected="selected"' : '', 'none' => ($prefs['prefixchoice'] AND in_array('-1', $prefs['prefixchoice'])) ? 'selected="selected"' : '' ); $template->register('prefix_selected', $prefix_selected); $template->register('search_prefix_options', vB_Search_Searchtools::getPrefixOptions($prefs['prefixchoice'], false)); $this->setPrefs($template, $prefs, array( 'select'=> array('sortby', 'order', 'forumchoice', 'prefixchoice', 'titleonly', 'starteronly', 'searchdate', 'beforeafter'), 'cb' => array('childforums', 'exactname', 'nocache'), 'value' => array('query', 'searchuser', 'tag', 'searchthreadid'), 'rb' => array('showposts') ) ); vB_Search_Searchtools::searchIntroRegisterHumanVerify($template); if (isset($registers) and is_array($registers) ) { foreach($registers as $key => $value) { $template->register($key, htmlspecialchars_uni($value)); } } return $template->render(); }