$jumpbits[] = construct_forumjump_css_row(construct_phrase($vbphrase['depth_x_items'], $depth), ".fjdpth{$depth}"); } $i = 0; while ($i < sizeof($jumpbits)) { print_label_row($jumpbits[$i++], $jumpbits[$i++], 'alt2'); } print_table_break(' '); // additional css print_table_header($vbphrase['additional_css']); print_textarea_row($vbphrase['additional_css_description'], 'css[EXTRA][all]', $css['EXTRA']['all'], 10, 80, true, false, 'ltr', fetch_inherited_color($css_info['EXTRA'], $vbulletin->GPC['dostyleid']) . '" style="font:9pt \'courier new\', monospace'); $revertcode = construct_revert_code($css_info['EXTRA'], 'css', 'EXTRA'); if ($revertcode['info']) { print_description_row("<span style=\"float:{$stylevar['right']}\">{$revertcode['revertcode']}</span>{$revertcode['info']}", 0, 2, 'tfoot" align="center'); } print_textarea_row('', 'css[EXTRA2][all]', $css['EXTRA2']['all'], 10, 80, true, false, 'ltr', fetch_inherited_color($css_info['EXTRA2'], $vbulletin->GPC['dostyleid']) . '" style="font:9pt \'courier new\', monospace'); $revertcode = construct_revert_code($css_info['EXTRA2'], 'css', 'EXTRA2'); if ($revertcode['info']) { print_description_row("<span style=\"float:{$stylevar['right']}\">{$revertcode['revertcode']}</span>{$revertcode['info']}", 0, 2, 'tfoot" align="center'); } print_table_break(' '); } // ############################################################################# // POST EDITOR if ($vbulletin->GPC['dowhat'] == 'posteditor' or $vbulletin->GPC['dowhat'] == 'all') { construct_hidden_code('dowhat[posteditor]', 1); print_table_header($vbphrase['text_editor_control_styles']); print_description_row($vbphrase['text_editor_control_desc']); $out = array(); foreach ($_query_special_templates as $varname) { if (substr($varname, 0, 13) == 'editor_styles') { //$out[] = construct_posteditor_style_code(ucwords(str_replace('_', ' ', substr($varname, 13))), $varname);
/** * Returns a <fieldset> for editing post editor styles * * @param string Item title * @param string Item varname * * @return string */ function construct_posteditor_style_code($title, $varname) { global $template_cache, $vbphrase, $stylevar, $vbulletin; $template = $template_cache['template']["{$varname}"]; $color = fetch_inherited_color($template['styleid'], $vbulletin->GPC['dostyleid']); $revertcode = construct_revert_code($template['styleid'], 'template', $varname); $item = fetch_posteditor_styles($template['template_un']); $out = "\n\t<fieldset title=\"{$title}\">\n\t\t<legend>{$title}</legend>\n\t\t<div class=\"smallfont\" style=\"padding: 2px\">\n\t\t<table cellpadding=\"0\" cellspacing=\"2\" border=\"0\" width=\"100%\">\n\t\t<col width=\"50\"></col>\n\t\t<col></col>\n\t\t<col align=\"{$stylevar['right']}\"></col>\n\t\t<tr>\n\t\t\t<td rowspan=\"5\"><img src=\"control_examples/" . substr($varname, 14) . ".gif\" alt=\"\" title=\"{$title}\" /></td>\n\t\t\t" . construct_color_row($vbphrase['background'], "commontemplate[{$varname}][background]", htmlspecialchars_uni($item['background']), $color, 12, false) . "\n\t\t</tr>\n\t\t<tr>\n\t\t\t" . construct_color_row($vbphrase['font_color'], "commontemplate[{$varname}][color]", htmlspecialchars_uni($item['color']), $color, 12, false) . "\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>{$vbphrase['padding']}</td>\n\t\t\t<td><input type=\"text\" class=\"{$color}\" name=\"commontemplate[{$varname}][padding]\" size=\"20\" value=\"" . htmlspecialchars_uni($item['padding']) . "\" tabindex=\"1\" dir=\"ltr\" /></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>{$vbphrase['border']}</td>\n\t\t\t<td><input type=\"text\" class=\"{$color}\" name=\"commontemplate[{$varname}][border]\" size=\"20\" value=\"" . htmlspecialchars_uni($item['border']) . "\" tabindex=\"1\" dir=\"ltr\" /></td>\n\t\t</tr>"; if ($revertcode['info']) { $out .= "\n\t\t<tr>\n\t\t\t<td>{$revertcode['info']}</td>\n\t\t\t<td>{$revertcode['revertcode']}</td>\n\t\t</tr>"; } else { $out .= "\n\t\t<tr>\n\t\t\t<td colspan=\"2\"> </td>\n\t\t</tr>"; } $out .= "\n\t\t</table>\n\t\t</div>\n\t</fieldset>"; return $out; }
/** * Prints a row containing an input for editing a stylevar * * @param string Stylevar title * @param string Stylevar varname * @param integer Size of text box */ function print_stylevar_row($title, $varname, $size = 30, $validation_regex = '', $failsafe_value = '') { global $stylevars, $stylevar_info, $vbulletin; $color = fetch_inherited_color($stylevar_info["{$varname}"], $vbulletin->GPC['dostyleid']); $revertcode = construct_revert_code($stylevar_info["{$varname}"], 'stylevar', $varname); if ($help = construct_table_help_button("stylevar[{$varname}]")) { $helplink = " {$help}"; } if ($validation_regex != '') { construct_hidden_code("stylevar[_validation][{$varname}]", htmlspecialchars_uni($validation_regex)); construct_hidden_code("stylevar[_failsafe][{$varname}]", htmlspecialchars_uni($failsafe_value)); } print_cells_row(array("<span title=\"\$stylevar[{$varname}]\">{$title}</span>", "<span class=\"smallfont\"><input type=\"text\" class=\"{$color}\" title=\"\$stylevar[{$varname}]\" name=\"stylevar[{$varname}]\" tabindex=\"1\" value=\"" . htmlspecialchars_uni($stylevars["{$varname}"]) . "\" size=\"{$size}\" dir=\"ltr\" /><br />{$revertcode['info']}</span>", "<span class=\"smallfont\">{$revertcode['revertcode']}</span>{$helplink}")); }