Zeile 35 | Zeile 35 |
---|
if($mybb->input['action'] == "xmlhttp_stylesheet" && $mybb->request_method == "post") { // Fetch the theme we want to edit this stylesheet in
|
if($mybb->input['action'] == "xmlhttp_stylesheet" && $mybb->request_method == "post") { // Fetch the theme we want to edit this stylesheet in
|
$query = $db->simple_select("themes", "*", "tid='".$mybb->get_input('tid', 1)."'");
| $query = $db->simple_select("themes", "*", "tid='".$mybb->get_input('tid', MyBB::INPUT_INT)."'");
|
$theme = $db->fetch_array($query);
if(!$theme['tid'] || $theme['tid'] == 1)
| $theme = $db->fetch_array($query);
if(!$theme['tid'] || $theme['tid'] == 1)
|
Zeile 155 | Zeile 155 |
---|
if($mybb->input['page']) {
|
if($mybb->input['page']) {
|
$url_page = "&page=".$mybb->get_input('page', 1);
| $url_page = "&page=".$mybb->get_input('page', MyBB::INPUT_INT);
|
} else {
| } else {
|
Zeile 379 | Zeile 379 |
---|
$options = array( 'no_stylesheets' => ($mybb->input['import_stylesheets'] ? 0 : 1), 'no_templates' => ($mybb->input['import_templates'] ? 0 : 1),
|
$options = array( 'no_stylesheets' => ($mybb->input['import_stylesheets'] ? 0 : 1), 'no_templates' => ($mybb->input['import_templates'] ? 0 : 1),
|
'version_compat' => (int)$mybb->input['version_compat'], 'parent' => $mybb->get_input('tid', 1),
| 'version_compat' => $mybb->get_input('version_compat', MyBB::INPUT_INT), 'parent' => $mybb->get_input('tid', MyBB::INPUT_INT),
|
'force_name_check' => true, ); $theme_id = import_theme_xml($contents, $options);
| 'force_name_check' => true, ); $theme_id = import_theme_xml($contents, $options);
|
Zeile 516 | Zeile 516 |
---|
if($mybb->input['action'] == "export") {
|
if($mybb->input['action'] == "export") {
|
$query = $db->simple_select("themes", "*", "tid='".$mybb->get_input('tid', 1)."'");
| $query = $db->simple_select("themes", "*", "tid='".$mybb->get_input('tid', MyBB::INPUT_INT)."'");
|
$theme = $db->fetch_array($query);
// Does the theme not exist?
| $theme = $db->fetch_array($query);
// Does the theme not exist?
|
Zeile 541 | Zeile 541 |
---|
if(is_array($value)) {
|
if(is_array($value)) {
|
$value = serialize($value);
| $value = my_serialize($value);
|
}
$value = str_replace(']]>', ']]]]><![CDATA[>', $value);
| }
$value = str_replace(']]>', ']]]]><![CDATA[>', $value);
|
Zeile 734 | Zeile 734 |
---|
if($mybb->input['action'] == "duplicate") {
|
if($mybb->input['action'] == "duplicate") {
|
$query = $db->simple_select("themes", "*", "tid='".$mybb->get_input('tid', 1)."'");
| $query = $db->simple_select("themes", "*", "tid='".$mybb->get_input('tid', MyBB::INPUT_INT)."'");
|
$theme = $db->fetch_array($query);
// Does the theme not exist?
| $theme = $db->fetch_array($query);
// Does the theme not exist?
|
Zeile 766 | Zeile 766 |
---|
if(!$errors) { $properties = my_unserialize($theme['properties']);
|
if(!$errors) { $properties = my_unserialize($theme['properties']);
|
$sid = $properties['sid'];
| $sid = $properties['templateset'];
|
$nprops = null; if($mybb->input['duplicate_templates']) {
| $nprops = null; if($mybb->input['duplicate_templates']) {
|
Zeile 948 | Zeile 948 |
---|
if($mybb->input['action'] == "delete") {
|
if($mybb->input['action'] == "delete") {
|
$query = $db->simple_select("themes", "*", "tid='".$mybb->get_input('tid', 1)."'");
| $query = $db->simple_select("themes", "*", "tid='".$mybb->get_input('tid', MyBB::INPUT_INT)."'");
|
$theme = $db->fetch_array($query);
// Does the theme not exist? or are we trying to delete the master?
| $theme = $db->fetch_array($query);
// Does the theme not exist? or are we trying to delete the master?
|
Zeile 1045 | Zeile 1045 |
---|
if($mybb->input['action'] == "edit") {
|
if($mybb->input['action'] == "edit") {
|
$query = $db->simple_select("themes", "*", "tid='".$mybb->get_input('tid', 1)."'");
| $query = $db->simple_select("themes", "*", "tid='".$mybb->get_input('tid', MyBB::INPUT_INT)."'");
|
$theme = $db->fetch_array($query);
// Does the theme not exist?
| $theme = $db->fetch_array($query);
// Does the theme not exist?
|
Zeile 1060 | Zeile 1060 |
---|
if($mybb->request_method == "post" && !$mybb->input['do']) { $properties = array(
|
if($mybb->request_method == "post" && !$mybb->input['do']) { $properties = array(
|
'templateset' => (int)$mybb->input['templateset'],
| 'templateset' => $mybb->get_input('templateset', MyBB::INPUT_INT),
|
'editortheme' => $mybb->input['editortheme'], 'imgdir' => $mybb->input['imgdir'], 'logo' => $mybb->input['logo'],
|
'editortheme' => $mybb->input['editortheme'], 'imgdir' => $mybb->input['imgdir'], 'logo' => $mybb->input['logo'],
|
'tablespace' => (int)$mybb->input['tablespace'], 'borderwidth' => (int)$mybb->input['borderwidth'],
| 'tablespace' => $mybb->get_input('tablespace', MyBB::INPUT_INT), 'borderwidth' => $mybb->get_input('borderwidth', MyBB::INPUT_INT),
|
'color' => $mybb->input['color'] );
| 'color' => $mybb->input['color'] );
|
Zeile 1118 | Zeile 1118 |
---|
$update_array = array( 'name' => $db->escape_string($mybb->input['name']),
|
$update_array = array( 'name' => $db->escape_string($mybb->input['name']),
|
'pid' => $mybb->get_input('pid', 1),
| 'pid' => $mybb->get_input('pid', MyBB::INPUT_INT),
|
'allowedgroups' => $allowedgroups,
|
'allowedgroups' => $allowedgroups,
|
'properties' => $db->escape_string(serialize($properties))
| 'properties' => $db->escape_string(my_serialize($properties))
|
);
// perform validation
| );
// perform validation
|
Zeile 1171 | Zeile 1171 |
---|
$plugins->run_hooks("admin_style_themes_edit_commit");
$db->update_query("themes", $update_array, "tid='{$theme['tid']}'");
|
$plugins->run_hooks("admin_style_themes_edit_commit");
$db->update_query("themes", $update_array, "tid='{$theme['tid']}'");
|
| update_theme_stylesheet_list($theme['tid']);
|
if($theme['def'] == 1) {
| if($theme['def'] == 1) {
|
Zeile 1273 | Zeile 1274 |
---|
$properties['disporder'] = $orders;
$update_array = array(
|
$properties['disporder'] = $orders;
$update_array = array(
|
"properties" => $db->escape_string(serialize($properties))
| "properties" => $db->escape_string(my_serialize($properties))
|
);
$db->update_query("themes", $update_array, "tid = '{$theme['tid']}'");
| );
$db->update_query("themes", $update_array, "tid = '{$theme['tid']}'");
|
Zeile 1504 | Zeile 1505 |
---|
}
$table->construct_cell("<strong><a href=\"index.php?module=style-themes&action=edit_stylesheet&file=".htmlspecialchars_uni($filename)."&tid={$theme['tid']}\">{$filename}</a></strong>{$inherited}<br />{$attached_to}");
|
}
$table->construct_cell("<strong><a href=\"index.php?module=style-themes&action=edit_stylesheet&file=".htmlspecialchars_uni($filename)."&tid={$theme['tid']}\">{$filename}</a></strong>{$inherited}<br />{$attached_to}");
|
$table->construct_cell($form->generate_numeric_field("disporder[{$theme_stylesheets[$filename]['sid']}]", $properties['disporder'][$filename], array('style' => 'width: 80%; text-align: center;')), array("class" => "align_center"));
| $table->construct_cell($form->generate_numeric_field("disporder[{$theme_stylesheets[$filename]['sid']}]", $properties['disporder'][$filename], array('style' => 'width: 80%; text-align: center;', 'min' => 0)), array("class" => "align_center"));
|
$table->construct_cell($popup->fetch(), array("class" => "align_center")); $table->construct_row(); }
| $table->construct_cell($popup->fetch(), array("class" => "align_center")); $table->construct_row(); }
|
Zeile 1566 | Zeile 1567 |
---|
$form_container->output_row($lang->img_directory, $lang->img_directory_desc, $form->generate_text_box('imgdir', $properties['imgdir'], array('id' => 'imgdir')), 'imgdir'); $form_container->output_row($lang->logo, $lang->logo_desc, $form->generate_text_box('logo', $properties['logo'], array('id' => 'boardlogo')), 'logo');
|
$form_container->output_row($lang->img_directory, $lang->img_directory_desc, $form->generate_text_box('imgdir', $properties['imgdir'], array('id' => 'imgdir')), 'imgdir'); $form_container->output_row($lang->logo, $lang->logo_desc, $form->generate_text_box('logo', $properties['logo'], array('id' => 'boardlogo')), 'logo');
|
$form_container->output_row($lang->table_spacing, $lang->table_spacing_desc, $form->generate_numeric_field('tablespace', $properties['tablespace'], array('id' => 'tablespace')), 'tablespace'); $form_container->output_row($lang->inner_border, $lang->inner_border_desc, $form->generate_numeric_field('borderwidth', $properties['borderwidth'], array('id' => 'borderwidth')), 'borderwidth');
| $form_container->output_row($lang->table_spacing, $lang->table_spacing_desc, $form->generate_numeric_field('tablespace', $properties['tablespace'], array('id' => 'tablespace', 'min' => 0)), 'tablespace'); $form_container->output_row($lang->inner_border, $lang->inner_border_desc, $form->generate_numeric_field('borderwidth', $properties['borderwidth'], array('id' => 'borderwidth', 'min' => 0)), 'borderwidth');
|
$form_container->end();
| $form_container->end();
|
Zeile 1612 | Zeile 1613 |
---|
if($mybb->input['action'] == "stylesheet_properties") { // Fetch the theme we want to edit this stylesheet in
|
if($mybb->input['action'] == "stylesheet_properties") { // Fetch the theme we want to edit this stylesheet in
|
$query = $db->simple_select("themes", "*", "tid='".$mybb->get_input('tid', 1)."'");
| $query = $db->simple_select("themes", "*", "tid='".$mybb->get_input('tid', MyBB::INPUT_INT)."'");
|
$theme = $db->fetch_array($query);
if(!$theme['tid'] || $theme['tid'] == 1)
| $theme = $db->fetch_array($query);
if(!$theme['tid'] || $theme['tid'] == 1)
|
Zeile 1986 | Zeile 1987 |
---|
if($mybb->input['action'] == "edit_stylesheet" && (!isset($mybb->input['mode']) || $mybb->input['mode'] == "simple")) { // Fetch the theme we want to edit this stylesheet in
|
if($mybb->input['action'] == "edit_stylesheet" && (!isset($mybb->input['mode']) || $mybb->input['mode'] == "simple")) { // Fetch the theme we want to edit this stylesheet in
|
$query = $db->simple_select("themes", "*", "tid='".$mybb->get_input('tid', 1)."'");
| $query = $db->simple_select("themes", "*", "tid='".$mybb->get_input('tid', MyBB::INPUT_INT)."'");
|
$theme = $db->fetch_array($query);
if(!$theme['tid'] || $theme['tid'] == 1)
| $theme = $db->fetch_array($query);
if(!$theme['tid'] || $theme['tid'] == 1)
|
Zeile 2231 | Zeile 2232 |
---|
$form->output_submit_wrapper($buttons);
|
$form->output_submit_wrapper($buttons);
|
echo '<script type="text/javascript" src="./jscripts/themes.js"></script>';
| echo '<script type="text/javascript" src="./jscripts/themes.js?ver=1804"></script>';
|
echo '<script type="text/javascript">
$(document).ready(function() { //<![CDATA[
|
echo '<script type="text/javascript">
$(document).ready(function() { //<![CDATA[
|
new ThemeSelector("./index.php?module=style-themes&action=xmlhttp_stylesheet", "./index.php?module=style-themes&action=edit_stylesheet", $("#selector"), $("#stylesheet"), "'.htmlspecialchars_uni($mybb->input['file']).'", $("#selector_form"), "'.$mybb->input['tid'].'");
| ThemeSelector.init("./index.php?module=style-themes&action=xmlhttp_stylesheet", "./index.php?module=style-themes&action=edit_stylesheet", $("#selector"), $("#stylesheet"), "'.htmlspecialchars_uni($mybb->input['file']).'", $("#selector_form"), "'.$mybb->input['tid'].'");
|
lang.saving = "'.$lang->saving.'"; }); //]]>
| lang.saving = "'.$lang->saving.'"; }); //]]>
|
Zeile 2250 | Zeile 2251 |
---|
if($mybb->input['action'] == "edit_stylesheet" && $mybb->input['mode'] == "advanced") { // Fetch the theme we want to edit this stylesheet in
|
if($mybb->input['action'] == "edit_stylesheet" && $mybb->input['mode'] == "advanced") { // Fetch the theme we want to edit this stylesheet in
|
$query = $db->simple_select("themes", "*", "tid='".$mybb->get_input('tid', 1)."'");
| $query = $db->simple_select("themes", "*", "tid='".$mybb->get_input('tid', MyBB::INPUT_INT)."'");
|
$theme = $db->fetch_array($query);
if(!$theme['tid'] || $theme['tid'] == 1)
| $theme = $db->fetch_array($query);
if(!$theme['tid'] || $theme['tid'] == 1)
|
Zeile 2331 | Zeile 2332 |
---|
{ $page->extra_header .= ' <link href="./jscripts/codemirror/lib/codemirror.css" rel="stylesheet">
|
{ $page->extra_header .= ' <link href="./jscripts/codemirror/lib/codemirror.css" rel="stylesheet">
|
<link href="./jscripts/codemirror/theme/mybb.css" rel="stylesheet">
| <link href="./jscripts/codemirror/theme/mybb.css?ver=1804" rel="stylesheet">
|
<link href="./jscripts/codemirror/addon/dialog/dialog-mybb.css" rel="stylesheet"> <script src="./jscripts/codemirror/lib/codemirror.js"></script> <script src="./jscripts/codemirror/mode/css/css.js"></script>
| <link href="./jscripts/codemirror/addon/dialog/dialog-mybb.css" rel="stylesheet"> <script src="./jscripts/codemirror/lib/codemirror.js"></script> <script src="./jscripts/codemirror/mode/css/css.js"></script>
|
Zeile 2391 | Zeile 2392 |
---|
$table = new Table; $table->construct_cell($form->generate_text_area('stylesheet', $stylesheet['stylesheet'], array('id' => 'stylesheet', 'style' => 'width: 99%;', 'class' => '', 'rows' => '30'))); $table->construct_row();
|
$table = new Table; $table->construct_cell($form->generate_text_area('stylesheet', $stylesheet['stylesheet'], array('id' => 'stylesheet', 'style' => 'width: 99%;', 'class' => '', 'rows' => '30'))); $table->construct_row();
|
$table->output("{$lang->full_stylesheet_for} ".htmlspecialchars_uni($stylesheet['name']));
| $table->output($lang->full_stylesheet_for.' '.htmlspecialchars_uni($stylesheet['name']), 1, 'tfixed');
|
$buttons[] = $form->generate_submit_button($lang->save_changes, array('id' => 'save', 'name' => 'save')); $buttons[] = $form->generate_submit_button($lang->save_changes_and_close, array('id' => 'save_close', 'name' => 'save_close'));
| $buttons[] = $form->generate_submit_button($lang->save_changes, array('id' => 'save', 'name' => 'save')); $buttons[] = $form->generate_submit_button($lang->save_changes_and_close, array('id' => 'save_close', 'name' => 'save_close'));
|
Zeile 2402 | Zeile 2403 |
---|
if($admin_options['codepress'] != 0) {
|
if($admin_options['codepress'] != 0) {
|
echo "<script type=\"text/javascript\"> var editor = CodeMirror.fromTextArea(document.getElementById(\"stylesheet\"), {
| echo '<script type="text/javascript"> var editor = CodeMirror.fromTextArea(document.getElementById("stylesheet"), {
|
lineNumbers: true,
|
lineNumbers: true,
|
tabMode: \"indent\", theme: \"mybb\", lineWrapping: true });</script>";
| lineWrapping: true, viewportMargin: Infinity, indentWithTabs: true, indentUnit: 4, mode: "text/css", theme: "mybb" });</script>';
|
}
$page->output_footer();
| }
$page->output_footer();
|
Zeile 2417 | Zeile 2421 |
---|
if($mybb->input['action'] == "delete_stylesheet") { // Fetch the theme we want to edit this stylesheet in
|
if($mybb->input['action'] == "delete_stylesheet") { // Fetch the theme we want to edit this stylesheet in
|
$query = $db->simple_select("themes", "*", "tid='".$mybb->get_input('tid', 1)."'");
| $query = $db->simple_select("themes", "*", "tid='".$mybb->get_input('tid', MyBB::INPUT_INT)."'");
|
$theme = $db->fetch_array($query);
if(!$theme['tid'] || $theme['tid'] == 1)
| $theme = $db->fetch_array($query);
if(!$theme['tid'] || $theme['tid'] == 1)
|
Zeile 2476 | Zeile 2480 |
---|
if($mybb->input['action'] == "add_stylesheet") { // Fetch the theme we want to edit this stylesheet in
|
if($mybb->input['action'] == "add_stylesheet") { // Fetch the theme we want to edit this stylesheet in
|
$query = $db->simple_select("themes", "*", "tid='".$mybb->get_input('tid', 1)."'");
| $query = $db->simple_select("themes", "*", "tid='".$mybb->get_input('tid', MyBB::INPUT_INT)."'");
|
$theme = $db->fetch_array($query);
if(!$theme['tid'] || $theme['tid'] == 1)
| $theme = $db->fetch_array($query);
if(!$theme['tid'] || $theme['tid'] == 1)
|
Zeile 2570 | Zeile 2574 |
---|
// Add Stylesheet $insert_array = array( 'name' => $db->escape_string($mybb->input['name']),
|
// Add Stylesheet $insert_array = array( 'name' => $db->escape_string($mybb->input['name']),
|
'tid' => $mybb->get_input('tid', 1),
| 'tid' => $mybb->get_input('tid', MyBB::INPUT_INT),
|
'attachedto' => implode('|', array_map(array($db, "escape_string"), $attached)), 'stylesheet' => $db->escape_string($stylesheet), 'cachefile' => $db->escape_string(str_replace('/', '', $mybb->input['name'])),
| 'attachedto' => implode('|', array_map(array($db, "escape_string"), $attached)), 'stylesheet' => $db->escape_string($stylesheet), 'cachefile' => $db->escape_string(str_replace('/', '', $mybb->input['name'])),
|
Zeile 2601 | Zeile 2605 |
---|
{ $page->extra_header .= ' <link href="./jscripts/codemirror/lib/codemirror.css" rel="stylesheet">
|
{ $page->extra_header .= ' <link href="./jscripts/codemirror/lib/codemirror.css" rel="stylesheet">
|
<link href="./jscripts/codemirror/theme/mybb.css" rel="stylesheet">
| <link href="./jscripts/codemirror/theme/mybb.css?ver=1804" rel="stylesheet">
|
<link href="./jscripts/codemirror/addon/dialog/dialog-mybb.css" rel="stylesheet"> <script src="./jscripts/codemirror/lib/codemirror.js"></script> <script src="./jscripts/codemirror/mode/css/css.js"></script>
| <link href="./jscripts/codemirror/addon/dialog/dialog-mybb.css" rel="stylesheet"> <script src="./jscripts/codemirror/lib/codemirror.js"></script> <script src="./jscripts/codemirror/mode/css/css.js"></script>
|
Zeile 2824 | Zeile 2828 |
---|
echo $form->generate_hidden_field("sid", $stylesheet['sid'])."<br />\n";
|
echo $form->generate_hidden_field("sid", $stylesheet['sid'])."<br />\n";
|
$form_container = new FormContainer("{$lang->add_stylesheet_to} ".htmlspecialchars_uni($theme['name']));
| $form_container = new FormContainer($lang->add_stylesheet_to.' '.htmlspecialchars_uni($theme['name']), 'tfixed');
|
$form_container->output_row($lang->file_name, $lang->file_name_desc, $form->generate_text_box('name', $mybb->input['name'], array('id' => 'name', 'style' => 'width: 200px;')), 'name');
$form_container->output_row($lang->attached_to, $lang->attached_to_desc, $actions);
| $form_container->output_row($lang->file_name, $lang->file_name_desc, $form->generate_text_box('name', $mybb->input['name'], array('id' => 'name', 'style' => 'width: 200px;')), 'name');
$form_container->output_row($lang->attached_to, $lang->attached_to_desc, $actions);
|
Zeile 2858 | Zeile 2862 |
---|
if($admin_options['codepress'] != 0) {
|
if($admin_options['codepress'] != 0) {
|
echo "<script type=\"text/javascript\"> var editor = CodeMirror.fromTextArea(document.getElementById(\"stylesheet\"), {
| echo '<script type="text/javascript"> var editor = CodeMirror.fromTextArea(document.getElementById("stylesheet"), {
|
lineNumbers: true,
|
lineNumbers: true,
|
tabMode: \"indent\", theme: \"mybb\", lineWrapping: true });</script>";
| lineWrapping: true, viewportMargin: Infinity, indentWithTabs: true, indentUnit: 4, mode: "text/css", theme: "mybb" });</script>';
|
}
|
}
|
echo '<script type="text/javascript" src="./jscripts/themes.js"></script>';
| echo '<script type="text/javascript" src="./jscripts/themes.js?ver=1804"></script>';
|
echo '<script type="text/javascript" src="./jscripts/theme_properties.js"></script>'; echo '<script type="text/javascript"> $(function() {
| echo '<script type="text/javascript" src="./jscripts/theme_properties.js"></script>'; echo '<script type="text/javascript"> $(function() {
|
Zeile 2891 | Zeile 2898 |
---|
admin_redirect("index.php?module=style-themes"); }
|
admin_redirect("index.php?module=style-themes"); }
|
$query = $db->simple_select("themes", "*", "tid='".$mybb->get_input('tid', 1)."'");
| $query = $db->simple_select("themes", "*", "tid='".$mybb->get_input('tid', MyBB::INPUT_INT)."'");
|
$theme = $db->fetch_array($query);
// Does the theme not exist?
| $theme = $db->fetch_array($query);
// Does the theme not exist?
|
Zeile 2906 | Zeile 2913 |
---|
$cache->update('default_theme', $theme);
$db->update_query("themes", array('def' => 0));
|
$cache->update('default_theme', $theme);
$db->update_query("themes", array('def' => 0));
|
$db->update_query("themes", array('def' => 1), "tid='".$mybb->get_input('tid', 1)."'");
| $db->update_query("themes", array('def' => 1), "tid='".$mybb->get_input('tid', MyBB::INPUT_INT)."'");
|
$plugins->run_hooks("admin_style_themes_set_default_commit");
| $plugins->run_hooks("admin_style_themes_set_default_commit");
|
Zeile 2919 | Zeile 2926 |
---|
if($mybb->input['action'] == "force") {
|
if($mybb->input['action'] == "force") {
|
$query = $db->simple_select("themes", "*", "tid='".$mybb->get_input('tid', 1)."'");
| $query = $db->simple_select("themes", "*", "tid='".$mybb->get_input('tid', MyBB::INPUT_INT)."'");
|
$theme = $db->fetch_array($query);
// Does the theme not exist?
| $theme = $db->fetch_array($query);
// Does the theme not exist?
|