function tagmerge() { global $vbulletin, $vbphrase, $db; tagcp_init_tag_action(); $taglist = tagcp_fetch_tag_list(); if (!sizeof($taglist)) { print_stop_message('no_tags_selected'); } $tags = $db->query_read(" SELECT tagid, tagtext FROM " . TABLE_PREFIX . "tag WHERE tagid IN (" . implode(',', $taglist) . ") ORDER BY tagtext ASC "); if (!($tag_count = $db->num_rows($tags))) { print_stop_message('no_tags_selected'); } print_form_header(); print_table_header($vbphrase['merge_tags'], 3); $columns = array('','',''); $counter = 0; while ($tag = $db->fetch_array($tags)) { $column = floor($counter++ / ceil($tag_count / 3)); $columns[$column] .= '<strong>' . $tag['tagtext'] . "</strong><br />\n"; } print_description_row($vbphrase['tag_merge_description'], false, 3, '', vB_Template_Runtime::fetchStyleVar('left')); print_cells_row($columns, false, false, -3); print_table_footer(); construct_hidden_code('page', $vbulletin->GPC['pagenumber']); construct_hidden_code('sort', $vbulletin->GPC['sort']); print_form_header('tag', 'tagdomerge'); print_input_row($vbphrase['new_tag'], 'tagtext'); print_submit_row($vbphrase['merge_tags'], false, 3, $vbphrase['go_back']); }
function tagmerge() { global $vbulletin, $vbphrase, $stop_file, $stop_args; tagcp_init_tag_action(); $taglist = tagcp_fetch_tag_list(); if (!sizeof($taglist)) { print_stop_message2('no_tags_selected', $stop_file, $stop_args); } $tags = vB::getDbAssertor()->getRows('vBForum:tag', array(vB_dB_Query::TYPE_KEY => vB_dB_Query::QUERY_SELECT, 'tagid' => $taglist), array('field' => 'tagtext', 'direction' => vB_dB_Query::SORT_ASC)); if (!$tags) { print_stop_message2('no_tags_selected', $stop_file, $stop_args); } print_form_header('tag', 'tagdomerge'); $columns = array('', '', ''); $counter = 0; foreach ($tags as $tag) { $id = $tag['tagid']; $text = $tag['tagtext']; $column = floor($counter++ / ceil(count($tags) / 3)); $columns[$column] .= '<label for="taglist_' . $id . '"><input type="checkbox" name="tag[' . $id . ']" id="taglist_' . $id . '" value="' . $id . '" tabindex="' . $column . '" checked="checked" /> ' . $text . '</label><br/>'; } print_description_row($vbphrase['tag_merge_description'], false, 3, '', vB_Template_Runtime::fetchStyleVar('left')); print_cells_row($columns, false, false, -3); construct_hidden_code('page', $vbulletin->GPC['pagenumber']); construct_hidden_code('sort', $vbulletin->GPC['sort']); print_input_row($vbphrase['new_tag'], 'tagtext', '', true, 35, 0, '', false, false, array(1, 2)); print_submit_row($vbphrase['merge_tags'], false, 3, $vbphrase['go_back']); }