Zeile 168 | Zeile 168 |
---|
// Convert to mods site version codes $search_version = ($major_version_code/100).'x';
|
// Convert to mods site version codes $search_version = ($major_version_code/100).'x';
|
$contents = fetch_remote_file("http://community.mybb.com/xmlbrowse.php?type=themes&version={$search_version}{$keywords}{$url_page}", $post_data);
| $contents = fetch_remote_file("https://community.mybb.com/xmlbrowse.php?api=2&type=themes&version={$search_version}{$keywords}{$url_page}", $post_data);
|
if(!$contents) {
| if(!$contents) {
|
Zeile 208 | Zeile 208 |
---|
$result['thumbnail']['value'] = htmlspecialchars_uni($result['thumbnail']['value']); $result['name']['value'] = htmlspecialchars_uni($result['name']['value']); $result['description']['value'] = htmlspecialchars_uni($result['description']['value']);
|
$result['thumbnail']['value'] = htmlspecialchars_uni($result['thumbnail']['value']); $result['name']['value'] = htmlspecialchars_uni($result['name']['value']); $result['description']['value'] = htmlspecialchars_uni($result['description']['value']);
|
$result['author']['value'] = $post_parser->parse_message($result['author']['value'], array( 'allow_html' => true ) );
| $result['author']['url']['value'] = htmlspecialchars_uni($result['author']['url']['value']); $result['author']['name']['value'] = htmlspecialchars_uni($result['author']['name']['value']);
|
$result['download_url']['value'] = htmlspecialchars_uni(html_entity_decode($result['download_url']['value']));
|
$result['download_url']['value'] = htmlspecialchars_uni(html_entity_decode($result['download_url']['value']));
|
$table->construct_cell("<img src=\"http://community.mybb.com/{$result['thumbnail']['value']}\" alt=\"{$lang->theme_thumbnail}\" title=\"{$lang->theme_thumbnail}\"/>", array("class" => "align_center", "width" => 100)); $table->construct_cell("<strong>{$result['name']['value']}</strong><br /><small>{$result['description']['value']}</small><br /><i><small>{$lang->created_by} {$result['author']['value']}</small></i>"); $table->construct_cell("<strong><a href=\"http://community.mybb.com/{$result['download_url']['value']}\" target=\"_blank\">{$lang->download}</a></strong>", array("class" => "align_center"));
| $table->construct_cell("<img src=\"https://community.mybb.com/{$result['thumbnail']['value']}\" alt=\"{$lang->theme_thumbnail}\" title=\"{$lang->theme_thumbnail}\"/>", array("class" => "align_center", "width" => 100)); $table->construct_cell("<strong>{$result['name']['value']}</strong><br /><small>{$result['description']['value']}</small><br /><i><small>{$lang->created_by} <a href=\"{$result['author']['url']['value']}\" target=\"_blank\" rel=\"noopener\">{$result['author']['name']['value']}</a></small></i>"); $table->construct_cell("<strong><a href=\"https://community.mybb.com/{$result['download_url']['value']}\" target=\"_blank\" rel=\"noopener\">{$lang->download}</a></strong>", array("class" => "align_center"));
|
$table->construct_row(); }
|
$table->construct_row(); }
|
}
| }
|
if($table->num_rows() == 0) { $table->construct_cell($lang->error_no_results_found, array("colspan" => 3)); $table->construct_row();
|
if($table->num_rows() == 0) { $table->construct_cell($lang->error_no_results_found, array("colspan" => 3)); $table->construct_row();
|
}
| }
|
$search = new Form("index.php?module=style-themes&action=browse", 'post', 'search_form'); echo "<div style=\"padding-bottom: 3px; margin-top: -9px; text-align: right;\">";
| $search = new Form("index.php?module=style-themes&action=browse", 'post', 'search_form'); echo "<div style=\"padding-bottom: 3px; margin-top: -9px; text-align: right;\">";
|
Zeile 243 | Zeile 241 |
---|
echo "<input type=\"submit\" class=\"search_button\" value=\"{$lang->search}\" />\n"; echo "<script type=\"text/javascript\"> var form = $(\"#search_form\");
|
echo "<input type=\"submit\" class=\"search_button\" value=\"{$lang->search}\" />\n"; echo "<script type=\"text/javascript\"> var form = $(\"#search_form\");
|
form.submit(function()
| form.on('submit', function()
|
{ var search = $('#search_keywords'); if(search.val() == '' || search.val() == '{$lang->search_for_themes}') {
|
{ var search = $('#search_keywords'); if(search.val() == '' || search.val() == '{$lang->search_for_themes}') {
|
search.focus();
| search.trigger('focus');
|
return false; } });
var search = $('#search_keywords');
|
return false; } });
var search = $('#search_keywords');
|
search.focus(function()
| search.on('focus', function()
|
{ var search_focus = $(this); if(search_focus.val() == '{$lang->search_for_themes}')
| { var search_focus = $(this); if(search_focus.val() == '{$lang->search_for_themes}')
|
Zeile 262 | Zeile 260 |
---|
search_focus.removeClass('search_default'); search_focus.val(''); }
|
search_focus.removeClass('search_default'); search_focus.val(''); }
|
});
search.blur(function()
| }).on('blur', function()
|
{ var search_blur = $(this); if(search_blur.val() == '')
| { var search_blur = $(this); if(search_blur.val() == '')
|
Zeile 286 | Zeile 282 |
---|
// Recommended themes = Default; Otherwise search results & pagination if($mybb->request_method == "post") {
|
// Recommended themes = Default; Otherwise search results & pagination if($mybb->request_method == "post") {
|
$table->output("<span style=\"float: right;\"><small><a href=\"http://community.mybb.com/mods.php?action=browse&category=themes\" target=\"_blank\">{$lang->browse_all_themes}</a></small></span>".$lang->sprintf($lang->browse_results_for_mybb, $mybb->version));
| $table->output("<span style=\"float: right;\"><small><a href=\"https://community.mybb.com/mods.php?action=browse&category=themes\" target=\"_blank\" rel=\"noopener\">{$lang->browse_all_themes}</a></small></span>".$lang->sprintf($lang->browse_results_for_mybb, $mybb->version));
|
} else {
|
} else {
|
$table->output("<span style=\"float: right;\"><small><a href=\"http://community.mybb.com/mods.php?action=browse&category=themes\" target=\"_blank\">{$lang->browse_all_themes}</a></small></span>".$lang->sprintf($lang->recommended_themes_for_mybb, $mybb->version));
| $table->output("<span style=\"float: right;\"><small><a href=\"https://community.mybb.com/mods.php?action=browse&category=themes\" target=\"_blank\" rel=\"noopener\">{$lang->browse_all_themes}</a></small></span>".$lang->sprintf($lang->recommended_themes_for_mybb, $mybb->version));
|
}
echo "<br />".draw_admin_pagination($mybb->input['page'], 15, $tree['results']['attributes']['total'], "index.php?module=style-themes&action=browse{$keywords}&page={page}");
| }
echo "<br />".draw_admin_pagination($mybb->input['page'], 15, $tree['results']['attributes']['total'], "index.php?module=style-themes&action=browse{$keywords}&page={page}");
|
Zeile 584 | Zeile 580 |
---|
$inherited_load[] = $mybb->input['tid']; $inherited_load = array_unique($inherited_load);
|
$inherited_load[] = $mybb->input['tid']; $inherited_load = array_unique($inherited_load);
|
$inherited_themes = array();
| $inherited_themes = $theme_stylesheets = array();
|
if(count($inherited_load) > 0) { $query = $db->simple_select("themes", "tid, name", "tid IN (".implode(",", $inherited_load).")");
| if(count($inherited_load) > 0) { $query = $db->simple_select("themes", "tid, name", "tid IN (".implode(",", $inherited_load).")");
|
Zeile 592 | Zeile 588 |
---|
{ $inherited_themes[$inherited_theme['tid']] = $inherited_theme['name']; }
|
{ $inherited_themes[$inherited_theme['tid']] = $inherited_theme['name']; }
|
}
$theme_stylesheets = array();
| |
|
|
if(count($inherited_load) > 0) {
| |
$query = $db->simple_select("themestylesheets", "*", "tid IN (".implode(",", $inherited_load).")", array('order_by' => 'tid', 'order_dir' => 'desc')); while($theme_stylesheet = $db->fetch_array($query)) {
| $query = $db->simple_select("themestylesheets", "*", "tid IN (".implode(",", $inherited_load).")", array('order_by' => 'tid', 'order_dir' => 'desc')); while($theme_stylesheet = $db->fetch_array($query)) {
|
Zeile 654 | Zeile 645 |
---|
if($mybb->input['include_templates'] != 0) { $xml .= "\t<templates>\r\n";
|
if($mybb->input['include_templates'] != 0) { $xml .= "\t<templates>\r\n";
|
$query = $db->simple_select("templates", "*", "sid='".$properties['templateset']."'");
| $query = $db->simple_select("templates", "*", "sid='".(int)$properties['templateset']."'");
|
while($template = $db->fetch_array($query)) { $template['template'] = str_replace(']]>', ']]]]><![CDATA[>', $template['template']);
| while($template = $db->fetch_array($query)) { $template['template'] = str_replace(']]>', ']]]]><![CDATA[>', $template['template']);
|
Zeile 667 | Zeile 658 |
---|
$plugins->run_hooks("admin_style_themes_export_commit");
// Log admin action
|
$plugins->run_hooks("admin_style_themes_export_commit");
// Log admin action
|
log_admin_action($theme['tid'], htmlspecialchars_uni($theme['name']));
| log_admin_action($theme['tid'], $theme['name']);
|
$theme['name'] = rawurlencode($theme['name']); header("Content-disposition: attachment; filename=".$theme['name']."-theme.xml");
| $theme['name'] = rawurlencode($theme['name']); header("Content-disposition: attachment; filename=".$theme['name']."-theme.xml");
|
Zeile 684 | Zeile 675 |
---|
$page->add_breadcrumb_item($lang->export_theme, "index.php?module=style-themes&action=export");
$page->output_header("{$lang->themes} - {$lang->export_theme}");
|
$page->add_breadcrumb_item($lang->export_theme, "index.php?module=style-themes&action=export");
$page->output_header("{$lang->themes} - {$lang->export_theme}");
|
$sub_tabs['edit_stylesheets'] = array( 'title' => $lang->edit_stylesheets, 'link' => "index.php?module=style-themes&action=edit&tid={$mybb->input['tid']}", );
$sub_tabs['add_stylesheet'] = array( 'title' => $lang->add_stylesheet, 'link' => "index.php?module=style-themes&action=add_stylesheet&tid={$mybb->input['tid']}", );
$sub_tabs['export_theme'] = array( 'title' => $lang->export_theme, 'link' => "index.php?module=style-themes&action=export&tid={$mybb->input['tid']}", 'description' => $lang->export_theme_desc );
$sub_tabs['duplicate_theme'] = array( 'title' => $lang->duplicate_theme, 'link' => "index.php?module=style-themes&action=duplicate&tid={$mybb->input['tid']}", 'description' => $lang->duplicate_theme_desc );
$page->output_nav_tabs($sub_tabs, 'export_theme');
if($errors)
| $sub_tabs['edit_stylesheets'] = array( 'title' => $lang->edit_stylesheets, 'link' => "index.php?module=style-themes&action=edit&tid={$mybb->input['tid']}", );
$sub_tabs['add_stylesheet'] = array( 'title' => $lang->add_stylesheet, 'link' => "index.php?module=style-themes&action=add_stylesheet&tid={$mybb->input['tid']}", );
$sub_tabs['export_theme'] = array( 'title' => $lang->export_theme, 'link' => "index.php?module=style-themes&action=export&tid={$mybb->input['tid']}", 'description' => $lang->export_theme_desc );
$sub_tabs['duplicate_theme'] = array( 'title' => $lang->duplicate_theme, 'link' => "index.php?module=style-themes&action=duplicate&tid={$mybb->input['tid']}", 'description' => $lang->duplicate_theme_desc );
$page->output_nav_tabs($sub_tabs, 'export_theme');
if($errors)
|
{ $page->output_inline_error($errors); }
| { $page->output_inline_error($errors); }
|
Zeile 728 | Zeile 719 |
---|
$form->output_submit_wrapper($buttons);
$form->end();
|
$form->output_submit_wrapper($buttons);
$form->end();
|
|
|
$page->output_footer(); }
| $page->output_footer(); }
|
Zeile 742 | Zeile 733 |
---|
{ flash_message($lang->error_invalid_theme, 'error'); admin_redirect("index.php?module=style-themes");
|
{ flash_message($lang->error_invalid_theme, 'error'); admin_redirect("index.php?module=style-themes");
|
}
$plugins->run_hooks("admin_style_themes_duplicate");
if($mybb->request_method == "post")
| }
$plugins->run_hooks("admin_style_themes_duplicate");
if($mybb->request_method == "post")
|
{ if($mybb->input['name'] == "") {
| { if($mybb->input['name'] == "") {
|
Zeile 766 | Zeile 757 |
---|
if(!$errors) { $properties = my_unserialize($theme['properties']);
|
if(!$errors) { $properties = my_unserialize($theme['properties']);
|
$sid = $properties['templateset'];
| $sid = (int)$properties['templateset'];
|
$nprops = null; if($mybb->input['duplicate_templates']) {
| $nprops = null; if($mybb->input['duplicate_templates']) {
|
Zeile 821 | Zeile 812 |
---|
// Log admin action log_admin_action($tid, $theme['tid']);
|
// Log admin action log_admin_action($tid, $theme['tid']);
|
|
|
flash_message($lang->success_duplicated_theme, 'success'); admin_redirect("index.php?module=style-themes&action=edit&tid=".$tid); }
| flash_message($lang->success_duplicated_theme, 'success'); admin_redirect("index.php?module=style-themes&action=edit&tid=".$tid); }
|
Zeile 830 | Zeile 821 |
---|
$page->add_breadcrumb_item(htmlspecialchars_uni($theme['name']), "index.php?module=style-themes&action=edit&tid={$mybb->input['tid']}");
$page->add_breadcrumb_item($lang->duplicate_theme, "index.php?module=style-themes&action=duplicate&tid={$theme['tid']}");
|
$page->add_breadcrumb_item(htmlspecialchars_uni($theme['name']), "index.php?module=style-themes&action=edit&tid={$mybb->input['tid']}");
$page->add_breadcrumb_item($lang->duplicate_theme, "index.php?module=style-themes&action=duplicate&tid={$theme['tid']}");
|
|
|
$page->output_header("{$lang->themes} - {$lang->duplicate_theme}");
$sub_tabs['edit_stylesheets'] = array(
| $page->output_header("{$lang->themes} - {$lang->duplicate_theme}");
$sub_tabs['edit_stylesheets'] = array(
|
Zeile 847 | Zeile 838 |
---|
'title' => $lang->export_theme, 'link' => "index.php?module=style-themes&action=export&tid={$mybb->input['tid']}", 'description' => $lang->export_theme_desc
|
'title' => $lang->export_theme, 'link' => "index.php?module=style-themes&action=export&tid={$mybb->input['tid']}", 'description' => $lang->export_theme_desc
|
);
| );
|
$sub_tabs['duplicate_theme'] = array( 'title' => $lang->duplicate_theme, 'link' => "index.php?module=style-themes&action=duplicate&tid={$mybb->input['tid']}",
| $sub_tabs['duplicate_theme'] = array( 'title' => $lang->duplicate_theme, 'link' => "index.php?module=style-themes&action=duplicate&tid={$mybb->input['tid']}",
|
Zeile 858 | Zeile 849 |
---|
$page->output_nav_tabs($sub_tabs, 'duplicate_theme');
if($errors)
|
$page->output_nav_tabs($sub_tabs, 'duplicate_theme');
if($errors)
|
{
| {
|
$page->output_inline_error($errors); } else
| $page->output_inline_error($errors); } else
|
Zeile 877 | Zeile 868 |
---|
$buttons[] = $form->generate_submit_button($lang->duplicate_theme);
$form->output_submit_wrapper($buttons);
|
$buttons[] = $form->generate_submit_button($lang->duplicate_theme);
$form->output_submit_wrapper($buttons);
|
|
|
$form->end();
|
$form->end();
|
|
|
$page->output_footer(); }
|
$page->output_footer(); }
|
|
|
if($mybb->input['action'] == "add") { $plugins->run_hooks("admin_style_themes_add");
|
if($mybb->input['action'] == "add") { $plugins->run_hooks("admin_style_themes_add");
|
|
|
$query = $db->simple_select("themes", "tid, name"); while($theme = $db->fetch_array($query)) {
| $query = $db->simple_select("themes", "tid, name"); while($theme = $db->fetch_array($query)) {
|
Zeile 897 | Zeile 888 |
---|
{ if(!$mybb->input['name']) {
|
{ if(!$mybb->input['name']) {
|
$errors[] = $lang->error_missing_name; } else if(in_array($mybb->input['name'], $themes)) {
| $errors[] = $lang->error_missing_name; } else if(in_array($mybb->input['name'], $themes)) {
|
$errors[] = $lang->error_theme_already_exists; }
| $errors[] = $lang->error_theme_already_exists; }
|
Zeile 911 | Zeile 902 |
---|
$plugins->run_hooks("admin_style_themes_add_commit");
// Log admin action
|
$plugins->run_hooks("admin_style_themes_add_commit");
// Log admin action
|
log_admin_action(htmlspecialchars_uni($mybb->input['name']), $tid);
| log_admin_action($mybb->input['name'], $tid);
|
flash_message($lang->success_theme_created, 'success'); admin_redirect("index.php?module=style-themes&action=edit&tid=".$tid); }
|
flash_message($lang->success_theme_created, 'success'); admin_redirect("index.php?module=style-themes&action=edit&tid=".$tid); }
|
}
| }
|
$page->add_breadcrumb_item($lang->create_new_theme, "index.php?module=style-themes&action=add");
$page->output_header("{$lang->themes} - {$lang->create_new_theme}");
| $page->add_breadcrumb_item($lang->create_new_theme, "index.php?module=style-themes&action=add");
$page->output_header("{$lang->themes} - {$lang->create_new_theme}");
|
Zeile 942 | Zeile 933 |
---|
$form->output_submit_wrapper($buttons);
$form->end();
|
$form->output_submit_wrapper($buttons);
$form->end();
|
|
|
$page->output_footer(); }
| $page->output_footer(); }
|
Zeile 955 | Zeile 946 |
---|
if(!$theme['tid'] || $theme['tid'] == 1) { flash_message($lang->error_invalid_theme, 'error');
|
if(!$theme['tid'] || $theme['tid'] == 1) { flash_message($lang->error_invalid_theme, 'error');
|
admin_redirect("index.php?module=style-themes"); }
| admin_redirect("index.php?module=style-themes"); }
|
// User clicked no if($mybb->input['no'])
| // User clicked no if($mybb->input['no'])
|
Zeile 981 | Zeile 972 |
---|
}
$inherited_theme_cache[$theme2['tid']] = $theme2['stylesheets']['inherited'];
|
}
$inherited_theme_cache[$theme2['tid']] = $theme2['stylesheets']['inherited'];
|
}
$inherited_stylesheets = false;
| }
$inherited_stylesheets = false;
|
// Are any other themes relying on stylesheets from this theme? Get a list and show an error foreach($inherited_theme_cache as $tid => $inherited)
| // Are any other themes relying on stylesheets from this theme? Get a list and show an error foreach($inherited_theme_cache as $tid => $inherited)
|
Zeile 998 | Zeile 989 |
---|
} } }
|
} } }
|
}
| }
|
if($inherited_stylesheets == true) { flash_message($lang->error_inheriting_stylesheets, 'error'); admin_redirect("index.php?module=style-themes");
|
if($inherited_stylesheets == true) { flash_message($lang->error_inheriting_stylesheets, 'error'); admin_redirect("index.php?module=style-themes");
|
}
| }
|
$query = $db->simple_select("themestylesheets", "cachefile", "tid='{$theme['tid']}'"); while($cachefile = $db->fetch_array($query))
| $query = $db->simple_select("themestylesheets", "cachefile", "tid='{$theme['tid']}'"); while($cachefile = $db->fetch_array($query))
|
Zeile 1025 | Zeile 1016 |
---|
@rmdir(MYBB_ROOT."cache/themes/theme{$theme['tid']}/");
|
@rmdir(MYBB_ROOT."cache/themes/theme{$theme['tid']}/");
|
$children = make_child_theme_list($theme['tid']); $child_tid = $children[0];
$db->update_query("themes", array('pid' => $theme['pid']), "tid='{$child_tid}'");
| $children = (array)make_child_theme_list($theme['tid']); $child_tids = array();
foreach($children as $child_tid) { if($child_tid != 0) { $child_tids[] = $child_tid; } }
if(!empty($child_tids)) { $db->update_query("themes", array('pid' => $theme['pid']), "tid IN (".implode(',', $child_tids).")"); }
|
$db->delete_query("themes", "tid='{$theme['tid']}'", 1);
$plugins->run_hooks("admin_style_themes_delete_commit");
// Log admin action
|
$db->delete_query("themes", "tid='{$theme['tid']}'", 1);
$plugins->run_hooks("admin_style_themes_delete_commit");
// Log admin action
|
log_admin_action($theme['tid'], htmlspecialchars_uni($theme['name']));
| log_admin_action($theme['tid'], $theme['name']);
|
flash_message($lang->success_theme_deleted, 'success'); admin_redirect("index.php?module=style-themes");
| flash_message($lang->success_theme_deleted, 'success'); admin_redirect("index.php?module=style-themes");
|
Zeile 1083 | Zeile 1085 |
---|
foreach($colors as $color) {
|
foreach($colors as $color) {
|
$color = explode("=", $color);
$properties['colors'][$color[0]] = $color[1];
| $color = trim($color); if(preg_match('/^[a-z0-9]+={1}[a-z0-9]+$/i', $color)) { $color = explode("=", $color); $properties['colors'][$color[0]] = $color[1]; } else { $errors[] = $lang->sprintf($lang->error_invalid_color, $color); }
|
} }
| } }
|
Zeile 1153 | Zeile 1162 |
---|
if(!$parent_check) { $errors[] = $lang->error_invalid_parent_theme;
|
if(!$parent_check) { $errors[] = $lang->error_invalid_parent_theme;
|
}
| }
|
} if($properties['templateset']) {
|
} if($properties['templateset']) {
|
$query = $db->simple_select("templatesets", "sid", "sid='".$properties['templateset']."'");
| $query = $db->simple_select("templatesets", "sid", "sid='".(int)$properties['templateset']."'");
|
$ts_check = $db->fetch_field($query, "sid"); if(!$ts_check) {
| $ts_check = $db->fetch_field($query, "sid"); if(!$ts_check) {
|
Zeile 1168 | Zeile 1177 |
---|
{ $errors[] = $lang->error_invalid_templateset; }
|
{ $errors[] = $lang->error_invalid_templateset; }
|
if(!$properties['editortheme'] || !file_exists(MYBB_ROOT."jscripts/sceditor/editor_themes/".$properties['editortheme']) || is_dir(MYBB_ROOT."jscripts/sceditor/editor_themes/".$properties['editortheme']))
| if(!$properties['editortheme'] || !file_exists(MYBB_ROOT."jscripts/sceditor/themes/".$properties['editortheme']) || is_dir(MYBB_ROOT."jscripts/sceditor/themes/".$properties['editortheme']))
|
{ $errors[] = $lang->error_invalid_editortheme; }
| { $errors[] = $lang->error_invalid_editortheme; }
|
Zeile 1186 | Zeile 1195 |
---|
}
// Log admin action
|
}
// Log admin action
|
log_admin_action($theme['tid'], htmlspecialchars_uni($theme['name']));
| log_admin_action($theme['tid'], $theme['name']);
|
flash_message($lang->success_theme_properties_updated, 'success'); admin_redirect("index.php?module=style-themes&action=edit&tid={$theme['tid']}");
| flash_message($lang->success_theme_properties_updated, 'success'); admin_redirect("index.php?module=style-themes&action=edit&tid={$theme['tid']}");
|
Zeile 1227 | Zeile 1236 |
---|
$inherited_load[] = $mybb->input['tid']; $inherited_load = array_unique($inherited_load);
|
$inherited_load[] = $mybb->input['tid']; $inherited_load = array_unique($inherited_load);
|
$inherited_themes = array();
| $inherited_themes = $theme_stylesheets = array();
|
if(count($inherited_load) > 0) { $query = $db->simple_select("themes", "tid, name", "tid IN (".implode(",", $inherited_load).")");
| if(count($inherited_load) > 0) { $query = $db->simple_select("themes", "tid, name", "tid IN (".implode(",", $inherited_load).")");
|
Zeile 1235 | Zeile 1244 |
---|
{ $inherited_themes[$inherited_theme['tid']] = $inherited_theme['name']; }
|
{ $inherited_themes[$inherited_theme['tid']] = $inherited_theme['name']; }
|
}
$theme_stylesheets = array();
| |
|
|
if(count($inherited_load) > 0) {
| |
$query = $db->simple_select("themestylesheets", "*", "", array('order_by' => 'sid DESC, tid', 'order_dir' => 'desc')); while($theme_stylesheet = $db->fetch_array($query)) {
| $query = $db->simple_select("themestylesheets", "*", "", array('order_by' => 'sid DESC, tid', 'order_dir' => 'desc')); while($theme_stylesheet = $db->fetch_array($query)) {
|
Zeile 1448 | Zeile 1452 |
---|
// It's a file: ++$count;
|
// It's a file: ++$count;
|
| $name = htmlspecialchars_uni($name);
|
if($actions[0] != "global") {
|
if($actions[0] != "global") {
|
| $actions = array_map('htmlspecialchars_uni', $actions);
|
$name = "{$name} ({$lang->actions}: ".implode(',', $actions).")"; }
| $name = "{$name} ({$lang->actions}: ".implode(',', $actions).")"; }
|
Zeile 1557 | Zeile 1565 |
---|
$form_container->output_row($lang->template_set." <em>*</em>", $lang->template_set_desc, $form->generate_select_box('templateset', $options, $properties['templateset'], array('id' => 'templateset')), 'templateset');
$options = array();
|
$form_container->output_row($lang->template_set." <em>*</em>", $lang->template_set_desc, $form->generate_select_box('templateset', $options, $properties['templateset'], array('id' => 'templateset')), 'templateset');
$options = array();
|
$editor_theme_root = MYBB_ROOT."jscripts/sceditor/editor_themes/";
| $editor_theme_root = MYBB_ROOT."jscripts/sceditor/themes/";
|
if($dh = @opendir($editor_theme_root)) { while($dir = readdir($dh))
| if($dh = @opendir($editor_theme_root)) { while($dir = readdir($dh))
|
Zeile 1672 | Zeile 1680 |
---|
if(get_extension($mybb->input['name']) != "css") { // Does not end with '.css'
|
if(get_extension($mybb->input['name']) != "css") { // Does not end with '.css'
|
$errors[] = $lang->sprintf($lang->error_missing_stylesheet_extension, $mybb->input['name']);
| $errors[] = $lang->sprintf( $lang->error_missing_stylesheet_extension, htmlspecialchars_uni($mybb->input['name']) );
|
}
if(!$errors) { // Theme & stylesheet theme ID do not match, editing inherited - we copy to local theme if($theme['tid'] != $stylesheet['tid'])
|
}
if(!$errors) { // Theme & stylesheet theme ID do not match, editing inherited - we copy to local theme if($theme['tid'] != $stylesheet['tid'])
|
{
| {
|
$stylesheet['sid'] = copy_stylesheet_to_theme($stylesheet, $theme['tid']); }
|
$stylesheet['sid'] = copy_stylesheet_to_theme($stylesheet, $theme['tid']); }
|
|
|
$attached = array(); if($mybb->input['attach'] == 1) {
| $attached = array(); if($mybb->input['attach'] == 1) {
|
Zeile 1701 | Zeile 1712 |
---|
{ // We have custom actions for attached files $actions_list = $mybb->input['action_list_'.$attached_id];
|
{ // We have custom actions for attached files $actions_list = $mybb->input['action_list_'.$attached_id];
|
}
| }
|
if($actions_list) { $attached_to .= "?".$actions_list;
| if($actions_list) { $attached_to .= "?".$actions_list;
|
Zeile 1710 | Zeile 1721 |
---|
$attached[] = $attached_to; }
|
$attached[] = $attached_to; }
|
}
| }
|
} else if($mybb->input['attach'] == 2) {
| } else if($mybb->input['attach'] == 2) {
|
Zeile 1733 | Zeile 1744 |
---|
if($stylesheet['name'] != $mybb->input['name']) { $update_array['cachefile'] = $db->escape_string(str_replace('/', '', $mybb->input['name']));
|
if($stylesheet['name'] != $mybb->input['name']) { $update_array['cachefile'] = $db->escape_string(str_replace('/', '', $mybb->input['name']));
|
}
| }
|
$db->update_query("themestylesheets", $update_array, "sid='{$stylesheet['sid']}'", 1);
| $db->update_query("themestylesheets", $update_array, "sid='{$stylesheet['sid']}'", 1);
|
Zeile 1746 | Zeile 1757 |
---|
$update_d = true;
$db->update_query("themestylesheets", array('lastmodified' => TIME_NOW), "sid='{$stylesheet['sid']}'", 1);
|
$update_d = true;
$db->update_query("themestylesheets", array('lastmodified' => TIME_NOW), "sid='{$stylesheet['sid']}'", 1);
|
if(!cache_stylesheet($theme['tid'], str_replace('/', '', $mybb->input['name']), $theme['stylesheet']))
| if(!cache_stylesheet($theme['tid'], str_replace('/', '', $mybb->input['name']), $stylesheet['stylesheet']))
|
{ $db->update_query("themestylesheets", array('cachefile' => "css.php?stylesheet={$stylesheet['sid']}"), "sid='{$stylesheet['sid']}'", 1); }
| { $db->update_query("themestylesheets", array('cachefile' => "css.php?stylesheet={$stylesheet['sid']}"), "sid='{$stylesheet['sid']}'", 1); }
|
Zeile 1762 | Zeile 1773 |
---|
$plugins->run_hooks("admin_style_themes_stylesheet_properties_commit");
// Log admin action
|
$plugins->run_hooks("admin_style_themes_stylesheet_properties_commit");
// Log admin action
|
log_admin_action($stylesheet['sid'], $mybb->input['name'], $theme['tid'], htmlspecialchars_uni($theme['name']));
| log_admin_action($stylesheet['sid'], $mybb->input['name'], $theme['tid'], $theme['name']);
|
flash_message($lang->success_stylesheet_properties_updated, 'success'); admin_redirect("index.php?module=style-themes&action=edit&tid={$theme['tid']}");
| flash_message($lang->success_stylesheet_properties_updated, 'success'); admin_redirect("index.php?module=style-themes&action=edit&tid={$theme['tid']}");
|
Zeile 1796 | Zeile 1807 |
---|
unset($this_stylesheet);
if($errors)
|
unset($this_stylesheet);
if($errors)
|
{
| {
|
$page->output_inline_error($errors);
foreach($mybb->input as $name => $value)
| $page->output_inline_error($errors);
foreach($mybb->input as $name => $value)
|
Zeile 1857 | Zeile 1868 |
---|
if($actions[0] != "global") { $action_list = implode(',', $actions);
|
if($actions[0] != "global") { $action_list = implode(',', $actions);
|
}
| }
|
if($actions[0] == "global") {
| if($actions[0] == "global") {
|
Zeile 1919 | Zeile 1930 |
---|
{ $specific_colors = "<div id=\"attach_2\" class=\"attachs\">"; $specific_colors_option = '<dt><label style="display: block;"><input type="radio" name="attach" value="2" '.$global_checked[3].' class="attachs_check" onclick="checkAction(\'attach\');" style="vertical-align: middle;" /> '.$lang->colors_specific_color.'</label></dt><br />';
|
{ $specific_colors = "<div id=\"attach_2\" class=\"attachs\">"; $specific_colors_option = '<dt><label style="display: block;"><input type="radio" name="attach" value="2" '.$global_checked[3].' class="attachs_check" onclick="checkAction(\'attach\');" style="vertical-align: middle;" /> '.$lang->colors_specific_color.'</label></dt><br />';
|
$specific_color = " <small>{$lang->colors_add_edit_desc}</small> <br /><br /> ".$form->generate_select_box('color[]', $properties['colors'], $stylesheet['colors'], array('multiple' => true, 'size' => "5\" style=\"width: 200px;"))." ";
$form_container = new FormContainer(); $form_container->output_row("", "", $specific_color);
| $specific_color = " <small>{$lang->colors_add_edit_desc}</small> <br /><br /> ".$form->generate_select_box('color[]', $properties['colors'], $stylesheet['colors'], array('multiple' => true, 'size' => "5\" style=\"width: 200px;"))." ";
$form_container = new FormContainer(); $form_container->output_row("", "", $specific_color);
|
$specific_colors .= $form_container->end(true)."</div>"; }
| $specific_colors .= $form_container->end(true)."</div>"; }
|
Zeile 1980 | Zeile 1991 |
---|
echo <<<EOF
|
echo <<<EOF
|
<script type="text/javascript" src="./jscripts/theme_properties.js"></script>
| <script type="text/javascript" src="./jscripts/theme_properties.js?ver=1821"></script>
|
<script type="text/javascript"> <!--- themeProperties.setup('{$count}');
| <script type="text/javascript"> <!--- themeProperties.setup('{$count}');
|
Zeile 2013 | Zeile 2024 |
---|
if(!$parent_list) { $parent_list = 1;
|
if(!$parent_list) { $parent_list = 1;
|
}
| }
|
$query = $db->simple_select("themestylesheets", "*", "name='".$db->escape_string($mybb->input['file'])."' AND tid IN ({$parent_list})", array('order_by' => 'tid', 'order_dir' => 'desc', 'limit' => 1)); $stylesheet = $db->fetch_array($query);
| $query = $db->simple_select("themestylesheets", "*", "name='".$db->escape_string($mybb->input['file'])."' AND tid IN ({$parent_list})", array('order_by' => 'tid', 'order_dir' => 'desc', 'limit' => 1)); $stylesheet = $db->fetch_array($query);
|
Zeile 2028 | Zeile 2039 |
---|
if($mybb->request_method == "post") { $sid = $stylesheet['sid'];
|
if($mybb->request_method == "post") { $sid = $stylesheet['sid'];
|
|
|
// Theme & stylesheet theme ID do not match, editing inherited - we copy to local theme if($theme['tid'] != $stylesheet['tid']) { $sid = copy_stylesheet_to_theme($stylesheet, $theme['tid']);
|
// Theme & stylesheet theme ID do not match, editing inherited - we copy to local theme if($theme['tid'] != $stylesheet['tid']) { $sid = copy_stylesheet_to_theme($stylesheet, $theme['tid']);
|
}
| }
|
// Insert the modified CSS $new_stylesheet = $stylesheet['stylesheet'];
| // Insert the modified CSS $new_stylesheet = $stylesheet['stylesheet'];
|
Zeile 2054 | Zeile 2065 |
---|
if($field == "extra") { $css_to_insert .= $value."\n";
|
if($field == "extra") { $css_to_insert .= $value."\n";
|
} else
| } else
|
{ $field = str_replace("_", "-", $field); $css_to_insert .= "{$field}: {$value};\n";
|
{ $field = str_replace("_", "-", $field); $css_to_insert .= "{$field}: {$value};\n";
|
} }
| } }
|
$new_stylesheet = insert_into_css($css_to_insert, $mybb->input['selector'], $new_stylesheet);
// Now we have the new stylesheet, save it $updated_stylesheet = array( "cachefile" => $db->escape_string($stylesheet['name']),
|
$new_stylesheet = insert_into_css($css_to_insert, $mybb->input['selector'], $new_stylesheet);
// Now we have the new stylesheet, save it $updated_stylesheet = array( "cachefile" => $db->escape_string($stylesheet['name']),
|
"stylesheet" => $db->escape_string(unfix_css_urls($new_stylesheet)),
| "stylesheet" => $db->escape_string($new_stylesheet),
|
"lastmodified" => TIME_NOW ); $db->update_query("themestylesheets", $updated_stylesheet, "sid='{$sid}'");
| "lastmodified" => TIME_NOW ); $db->update_query("themestylesheets", $updated_stylesheet, "sid='{$sid}'");
|
Zeile 2077 | Zeile 2088 |
---|
{ $db->update_query("themestylesheets", array('cachefile' => "css.php?stylesheet={$sid}"), "sid='{$sid}'", 1); }
|
{ $db->update_query("themestylesheets", array('cachefile' => "css.php?stylesheet={$sid}"), "sid='{$sid}'", 1); }
|
|
|
// Update the CSS file list for this theme update_theme_stylesheet_list($theme['tid']);
| // Update the CSS file list for this theme update_theme_stylesheet_list($theme['tid']);
|
Zeile 2093 | Zeile 2104 |
---|
if($mybb->input['save_close']) { admin_redirect("index.php?module=style-themes&action=edit&tid={$theme['tid']}");
|
if($mybb->input['save_close']) { admin_redirect("index.php?module=style-themes&action=edit&tid={$theme['tid']}");
|
}
| }
|
else { admin_redirect("index.php?module=style-themes&action=edit_stylesheet&tid={$theme['tid']}&file={$stylesheet['name']}"); }
|
else { admin_redirect("index.php?module=style-themes&action=edit_stylesheet&tid={$theme['tid']}&file={$stylesheet['name']}"); }
|
}
| }
|
else { echo "1";
| else { echo "1";
|
Zeile 2224 | Zeile 2235 |
---|
$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[font_family]', $properties['font-family'], array('id' => 'css_bits[font_family]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->font_family}</strong></div>", array('style' => 'width: 40%;')); $table->construct_row(); $table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[font_size]', $properties['font-size'], array('id' => 'css_bits[font_size]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->font_size}</strong></div>", array('style' => 'width: 40%;'));
|
$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[font_family]', $properties['font-family'], array('id' => 'css_bits[font_family]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->font_family}</strong></div>", array('style' => 'width: 40%;')); $table->construct_row(); $table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[font_size]', $properties['font-size'], array('id' => 'css_bits[font_size]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->font_size}</strong></div>", array('style' => 'width: 40%;'));
|
$table->construct_row();
| $table->construct_row();
|
$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[font_style]', $properties['font-style'], array('id' => 'css_bits[font_style]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->font_style}</strong></div>", array('style' => 'width: 40%;'));
|
$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[font_style]', $properties['font-style'], array('id' => 'css_bits[font_style]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->font_style}</strong></div>", array('style' => 'width: 40%;'));
|
$table->construct_row();
| $table->construct_row();
|
$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[font_weight]', $properties['font-weight'], array('id' => 'css_bits[font_weight]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->font_weight}</strong></div>", array('style' => 'width: 40%;'));
|
$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[font_weight]', $properties['font-weight'], array('id' => 'css_bits[font_weight]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->font_weight}</strong></div>", array('style' => 'width: 40%;'));
|
$table->construct_row();
| $table->construct_row();
|
$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[text_decoration]', $properties['text-decoration'], array('id' => 'css_bits[text_decoration]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->text_decoration}</strong></div>", array('style' => 'width: 40%;')); $table->construct_row();
| $table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[text_decoration]', $properties['text-decoration'], array('id' => 'css_bits[text_decoration]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->text_decoration}</strong></div>", array('style' => 'width: 40%;')); $table->construct_row();
|
Zeile 2242 | Zeile 2253 |
---|
$form->output_submit_wrapper($buttons);
|
$form->output_submit_wrapper($buttons);
|
echo '<script type="text/javascript" src="./jscripts/themes.js?ver=1804"></script>';
| echo '<script type="text/javascript" src="./jscripts/themes.js?ver=1808"></script>';
|
echo '<script type="text/javascript">
|
echo '<script type="text/javascript">
|
$(document).ready(function() {
| $(function() {
|
//<![CDATA[ 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.'";
| //<![CDATA[ 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.'";
|
Zeile 2254 | Zeile 2265 |
---|
</script>';
$form->end();
|
</script>';
$form->end();
|
|
|
$page->output_footer(); }
|
$page->output_footer(); }
|
|
|
if($mybb->input['action'] == "edit_stylesheet" && $mybb->input['mode'] == "advanced")
|
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', MyBB::INPUT_INT)."'"); $theme = $db->fetch_array($query);
if(!$theme['tid'] || $theme['tid'] == 1) { flash_message($lang->error_invalid_theme, 'error'); admin_redirect("index.php?module=style-themes"); }
| { // Fetch the theme we want to edit this stylesheet in $query = $db->simple_select("themes", "*", "tid='".$mybb->get_input('tid', MyBB::INPUT_INT)."'"); $theme = $db->fetch_array($query);
if(!$theme['tid'] || $theme['tid'] == 1) { flash_message($lang->error_invalid_theme, 'error'); admin_redirect("index.php?module=style-themes"); }
|
$plugins->run_hooks("admin_style_themes_edit_stylesheet_advanced");
| $plugins->run_hooks("admin_style_themes_edit_stylesheet_advanced");
|
Zeile 2302 | Zeile 2313 |
---|
// Now we have the new stylesheet, save it $updated_stylesheet = array( "cachefile" => $db->escape_string($stylesheet['name']),
|
// Now we have the new stylesheet, save it $updated_stylesheet = array( "cachefile" => $db->escape_string($stylesheet['name']),
|
"stylesheet" => $db->escape_string(unfix_css_urls($mybb->input['stylesheet'])),
| "stylesheet" => $db->escape_string($mybb->input['stylesheet']),
|
"lastmodified" => TIME_NOW ); $db->update_query("themestylesheets", $updated_stylesheet, "sid='{$sid}'");
| "lastmodified" => TIME_NOW ); $db->update_query("themestylesheets", $updated_stylesheet, "sid='{$sid}'");
|
Zeile 2341 | Zeile 2352 |
---|
if($admin_options['codepress'] != 0) { $page->extra_header .= '
|
if($admin_options['codepress'] != 0) { $page->extra_header .= '
|
<link href="./jscripts/codemirror/lib/codemirror.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> <script src="./jscripts/codemirror/addon/dialog/dialog.js"></script> <script src="./jscripts/codemirror/addon/search/searchcursor.js"></script> <script src="./jscripts/codemirror/addon/search/search.js"></script>
| <link href="./jscripts/codemirror/lib/codemirror.css?ver=1813" rel="stylesheet"> <link href="./jscripts/codemirror/theme/mybb.css?ver=1813" rel="stylesheet"> <link href="./jscripts/codemirror/addon/dialog/dialog-mybb.css?ver=1813" rel="stylesheet"> <script src="./jscripts/codemirror/lib/codemirror.js?ver=1813"></script> <script src="./jscripts/codemirror/mode/css/css.js?ver=1813"></script> <script src="./jscripts/codemirror/addon/dialog/dialog.js?ver=1813"></script> <script src="./jscripts/codemirror/addon/search/searchcursor.js?ver=1813"></script> <script src="./jscripts/codemirror/addon/search/search.js?ver=1821"></script>
|
'; }
| '; }
|
Zeile 2479 | Zeile 2490 |
---|
$plugins->run_hooks("admin_style_themes_delete_stylesheet_commit");
// Log admin action
|
$plugins->run_hooks("admin_style_themes_delete_stylesheet_commit");
// Log admin action
|
log_admin_action($stylesheet['sid'], $stylesheet['name'], $theme['tid'], htmlspecialchars_uni($theme['name']));
| log_admin_action($stylesheet['sid'], $stylesheet['name'], $theme['tid'], $theme['name']);
|
flash_message($lang->success_stylesheet_deleted, 'success'); admin_redirect("index.php?module=style-themes&action=edit&tid={$theme['tid']}");
| flash_message($lang->success_stylesheet_deleted, 'success'); admin_redirect("index.php?module=style-themes&action=edit&tid={$theme['tid']}");
|
Zeile 2607 | Zeile 2618 |
---|
$plugins->run_hooks("admin_style_themes_add_stylesheet_commit");
// Log admin action
|
$plugins->run_hooks("admin_style_themes_add_stylesheet_commit");
// Log admin action
|
log_admin_action($sid, $mybb->input['name'], $theme['tid'], htmlspecialchars_uni($theme['name']));
| log_admin_action($sid, $mybb->input['name'], $theme['tid'], $theme['name']);
|
flash_message($lang->success_stylesheet_added, 'success'); admin_redirect("index.php?module=style-themes&action=edit_stylesheet&tid={$mybb->input['tid']}&sid={$sid}&file=".urlencode($mybb->input['name']));
| flash_message($lang->success_stylesheet_added, 'success'); admin_redirect("index.php?module=style-themes&action=edit_stylesheet&tid={$mybb->input['tid']}&sid={$sid}&file=".urlencode($mybb->input['name']));
|
Zeile 2617 | Zeile 2628 |
---|
if($admin_options['codepress'] != 0) { $page->extra_header .= '
|
if($admin_options['codepress'] != 0) { $page->extra_header .= '
|
<link href="./jscripts/codemirror/lib/codemirror.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> <script src="./jscripts/codemirror/addon/dialog/dialog.js"></script> <script src="./jscripts/codemirror/addon/search/searchcursor.js"></script> <script src="./jscripts/codemirror/addon/search/search.js"></script>
| <link href="./jscripts/codemirror/lib/codemirror.css?ver=1813" rel="stylesheet"> <link href="./jscripts/codemirror/theme/mybb.css?ver=1813" rel="stylesheet"> <link href="./jscripts/codemirror/addon/dialog/dialog-mybb.css?ver=1813" rel="stylesheet"> <script src="./jscripts/codemirror/lib/codemirror.js?ver=1813"></script> <script src="./jscripts/codemirror/mode/css/css.js?ver=1813"></script> <script src="./jscripts/codemirror/addon/dialog/dialog.js?ver=1813"></script> <script src="./jscripts/codemirror/addon/search/searchcursor.js?ver=1813"></script> <script src="./jscripts/codemirror/addon/search/search.js?ver=1821"></script>
|
'; }
| '; }
|
Zeile 2887 | Zeile 2898 |
---|
});</script>'; }
|
});</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" src="./jscripts/themes.js?ver=1808"></script>'; echo '<script type="text/javascript" src="./jscripts/theme_properties.js?ver=1821"></script>';
|
echo '<script type="text/javascript"> $(function() { //<![CDATA[
| echo '<script type="text/javascript"> $(function() { //<![CDATA[
|
Zeile 2931 | Zeile 2942 |
---|
$plugins->run_hooks("admin_style_themes_set_default_commit");
// Log admin action
|
$plugins->run_hooks("admin_style_themes_set_default_commit");
// Log admin action
|
log_admin_action($theme['tid'], htmlspecialchars_uni($theme['name']));
| log_admin_action($theme['tid'], $theme['name']);
|
flash_message($lang->success_theme_set_default, 'success'); admin_redirect("index.php?module=style-themes");
| flash_message($lang->success_theme_set_default, 'success'); admin_redirect("index.php?module=style-themes");
|
Zeile 2966 | Zeile 2977 |
---|
$plugins->run_hooks("admin_style_themes_force_commit");
$db->update_query("users", $updated_users);
|
$plugins->run_hooks("admin_style_themes_force_commit");
$db->update_query("users", $updated_users);
|
| // The theme has to be accessible to all usergroups in order to force on all users if($theme['allowedgroups'] !== "all") { $db->update_query("themes", array("allowedgroups" => "all"), "tid='{$theme['tid']}'"); }
|
// Log admin action
|
// Log admin action
|
log_admin_action($theme['tid'], htmlspecialchars_uni($theme['name']));
| log_admin_action($theme['tid'], $theme['name']);
|
flash_message($lang->success_theme_forced, 'success'); admin_redirect("index.php?module=style-themes");
| flash_message($lang->success_theme_forced, 'success'); admin_redirect("index.php?module=style-themes");
|