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?type=themes&version={$search_version}{$keywords}{$url_page}", $post_data);
|
if(!$contents) {
| if(!$contents) {
|
Zeile 214 | Zeile 214 |
---|
); $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("<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} {$result['author']['value']}</small></i>");
|
$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("<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(); } }
|
Zeile 243 | Zeile 243 |
---|
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 262 |
---|
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 284 | Zeile 282 |
---|
echo $search->end();
// Recommended themes = Default; Otherwise search results & pagination
|
echo $search->end();
// 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)); }
| if($mybb->request_method == "post") { $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}");
|
|
|
$page->output_footer(); }
|
$page->output_footer(); }
|
|
|
if($mybb->input['action'] == "import") { $plugins->run_hooks("admin_style_themes_import");
| if($mybb->input['action'] == "import") { $plugins->run_hooks("admin_style_themes_import");
|
Zeile 307 | Zeile 305 |
---|
if(!$_FILES['local_file'] && !$mybb->input['url']) { $errors[] = $lang->error_missing_url;
|
if(!$_FILES['local_file'] && !$mybb->input['url']) { $errors[] = $lang->error_missing_url;
|
}
| }
|
if(!$errors) {
| if(!$errors) {
|
Zeile 388 | Zeile 386 |
---|
if($theme_id > -1) { $plugins->run_hooks("admin_style_themes_import_commit");
|
if($theme_id > -1) { $plugins->run_hooks("admin_style_themes_import_commit");
|
|
|
// Log admin action log_admin_action($theme_id);
| // Log admin action log_admin_action($theme_id);
|
Zeile 418 | Zeile 416 |
---|
$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))
|
{
| {
|
$themes[$theme['tid']] = $theme['name']; }
$page->add_breadcrumb_item($lang->import_a_theme, "index.php?module=style-themes&action=import");
|
$themes[$theme['tid']] = $theme['name']; }
$page->add_breadcrumb_item($lang->import_a_theme, "index.php?module=style-themes&action=import");
|
|
|
$page->output_header("{$lang->themes} - {$lang->import_a_theme}");
|
$page->output_header("{$lang->themes} - {$lang->import_a_theme}");
|
|
|
$page->output_nav_tabs($sub_tabs, 'import_theme');
if($errors)
|
$page->output_nav_tabs($sub_tabs, 'import_theme');
if($errors)
|
{
| {
|
$page->output_inline_error($errors);
if($mybb->input['import'] == 1)
| $page->output_inline_error($errors);
if($mybb->input['import'] == 1)
|
Zeile 510 | Zeile 508 |
---|
$form->output_submit_wrapper($buttons);
$form->end();
|
$form->output_submit_wrapper($buttons);
$form->end();
|
|
|
$page->output_footer(); }
| $page->output_footer(); }
|
Zeile 584 | Zeile 582 |
---|
$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 590 |
---|
{ $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 667 | Zeile 660 |
---|
$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 911 | Zeile 904 |
---|
$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);
|
Zeile 1025 | Zeile 1018 |
---|
@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];
| $children = (array)make_child_theme_list($theme['tid']); $child_tids = array();
|
|
|
$db->update_query("themes", array('pid' => $theme['pid']), "tid='{$child_tid}'");
| 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"); } else
|
flash_message($lang->success_theme_deleted, 'success'); admin_redirect("index.php?module=style-themes"); } else
|
{
| {
|
$page->output_confirm_action("index.php?module=style-themes&action=delete&tid={$theme['tid']}", $lang->confirm_theme_deletion); } }
| $page->output_confirm_action("index.php?module=style-themes&action=delete&tid={$theme['tid']}", $lang->confirm_theme_deletion); } }
|
Zeile 1056 | Zeile 1060 |
---|
{ 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_edit");
| }
$plugins->run_hooks("admin_style_themes_edit");
|
if($mybb->request_method == "post" && !$mybb->input['do']) { $properties = array(
| if($mybb->request_method == "post" && !$mybb->input['do']) { $properties = array(
|
Zeile 1071 | Zeile 1075 |
---|
'borderwidth' => $mybb->get_input('borderwidth', MyBB::INPUT_INT), 'color' => $mybb->input['color'] );
|
'borderwidth' => $mybb->get_input('borderwidth', MyBB::INPUT_INT), 'color' => $mybb->input['color'] );
|
|
|
if($properties['color'] == 'none') { unset($properties['color']);
| if($properties['color'] == 'none') { unset($properties['color']);
|
Zeile 1083 | Zeile 1087 |
---|
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); }
|
} }
if($properties['templateset'] <= 0)
|
} }
if($properties['templateset'] <= 0)
|
{ $errors[] = $lang->error_invalid_templateset;
| { $errors[] = $lang->error_invalid_templateset;
|
}
$theme_properties = my_unserialize($theme['properties']);
| }
$theme_properties = my_unserialize($theme['properties']);
|
Zeile 1106 | Zeile 1117 |
---|
$allowedgroups = array(); if(is_array($mybb->input['allowedgroups']))
|
$allowedgroups = array(); if(is_array($mybb->input['allowedgroups']))
|
{
| {
|
foreach($mybb->input['allowedgroups'] as $gid) { if($gid == "all")
| foreach($mybb->input['allowedgroups'] as $gid) { if($gid == "all")
|
Zeile 1121 | Zeile 1132 |
---|
if(is_array($allowedgroups)) { $allowedgroups = implode(",", $allowedgroups);
|
if(is_array($allowedgroups)) { $allowedgroups = implode(",", $allowedgroups);
|
}
| }
|
$update_array = array( 'name' => $db->escape_string($mybb->input['name']),
| $update_array = array( 'name' => $db->escape_string($mybb->input['name']),
|
Zeile 1129 | Zeile 1140 |
---|
'allowedgroups' => $allowedgroups, 'properties' => $db->escape_string(my_serialize($properties)) );
|
'allowedgroups' => $allowedgroups, 'properties' => $db->escape_string(my_serialize($properties)) );
|
|
|
// perform validation if(!$update_array['name']) { $errors[] = $lang->error_missing_name; } else
|
// perform validation if(!$update_array['name']) { $errors[] = $lang->error_missing_name; } else
|
{
| {
|
$query = $db->simple_select("themes", "COUNT(tid) as numthemes", "name = '".$db->escape_string($update_array['name'])."' AND tid != '{$theme['tid']}'"); $numthemes = $db->fetch_field($query, 'numthemes');
| $query = $db->simple_select("themes", "COUNT(tid) as numthemes", "name = '".$db->escape_string($update_array['name'])."' AND tid != '{$theme['tid']}'"); $numthemes = $db->fetch_field($query, 'numthemes');
|
Zeile 1151 | Zeile 1162 |
---|
$query = $db->simple_select("themes", "tid", "tid='".$update_array['pid']."'"); $parent_check = $db->fetch_field($query, "tid"); if(!$parent_check)
|
$query = $db->simple_select("themes", "tid", "tid='".$update_array['pid']."'"); $parent_check = $db->fetch_field($query, "tid"); if(!$parent_check)
|
{
| {
|
$errors[] = $lang->error_invalid_parent_theme; } }
| $errors[] = $lang->error_invalid_parent_theme; } }
|
Zeile 1168 | Zeile 1179 |
---|
{ $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 1197 |
---|
}
// 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 1238 |
---|
$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 1246 |
---|
{ $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)) { if(!isset($theme_stylesheets[$theme_stylesheet['name']]) && in_array($theme_stylesheet['tid'], $inherited_load))
|
$query = $db->simple_select("themestylesheets", "*", "", array('order_by' => 'sid DESC, tid', 'order_dir' => 'desc')); while($theme_stylesheet = $db->fetch_array($query)) { if(!isset($theme_stylesheets[$theme_stylesheet['name']]) && in_array($theme_stylesheet['tid'], $inherited_load))
|
{
| {
|
$theme_stylesheets[$theme_stylesheet['name']] = $theme_stylesheet;
|
$theme_stylesheets[$theme_stylesheet['name']] = $theme_stylesheet;
|
}
| }
|
$theme_stylesheets[$theme_stylesheet['sid']] = $theme_stylesheet['name']; } }
| $theme_stylesheets[$theme_stylesheet['sid']] = $theme_stylesheet['name']; } }
|
Zeile 1257 | Zeile 1263 |
---|
if($mybb->request_method == "post" && $mybb->input['do'] == "save_orders") { if(!is_array($mybb->input['disporder']))
|
if($mybb->request_method == "post" && $mybb->input['do'] == "save_orders") { if(!is_array($mybb->input['disporder']))
|
{
| {
|
// Error out flash_message($lang->error_no_display_order, 'error'); admin_redirect("index.php?module=style-themes&action=edit&tid={$theme['tid']}");
|
// Error out flash_message($lang->error_no_display_order, 'error'); admin_redirect("index.php?module=style-themes&action=edit&tid={$theme['tid']}");
|
}
| }
|
$orders = array(); foreach($theme_stylesheets as $stylesheet => $properties)
| $orders = array(); foreach($theme_stylesheets as $stylesheet => $properties)
|
Zeile 1271 | Zeile 1277 |
---|
$order = (int)$mybb->input['disporder'][$properties['sid']];
$orders[$properties['name']] = $order;
|
$order = (int)$mybb->input['disporder'][$properties['sid']];
$orders[$properties['name']] = $order;
|
} }
asort($orders, SORT_NUMERIC);
| } }
asort($orders, SORT_NUMERIC);
|
// Save the orders in the theme properties $properties = my_unserialize($theme['properties']); $properties['disporder'] = $orders;
| // Save the orders in the theme properties $properties = my_unserialize($theme['properties']); $properties['disporder'] = $orders;
|
Zeile 1306 | Zeile 1312 |
---|
'title' => $lang->edit_stylesheets, 'link' => "index.php?module=style-themes&action=edit&tid={$mybb->input['tid']}", 'description' => $lang->edit_stylesheets_desc
|
'title' => $lang->edit_stylesheets, 'link' => "index.php?module=style-themes&action=edit&tid={$mybb->input['tid']}", 'description' => $lang->edit_stylesheets_desc
|
);
| );
|
$sub_tabs['add_stylesheet'] = array( 'title' => $lang->add_stylesheet, 'link' => "index.php?module=style-themes&action=add_stylesheet&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']}",
|
Zeile 1316 | Zeile 1322 |
---|
$sub_tabs['export_theme'] = array( 'title' => $lang->export_theme, 'link' => "index.php?module=style-themes&action=export&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']}"
|
);
| );
|
$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 1345 | Zeile 1351 |
---|
foreach($stylesheets as $filename => $style) { if(strpos($filename, 'css.php?stylesheet=') !== false)
|
foreach($stylesheets as $filename => $style) { if(strpos($filename, 'css.php?stylesheet=') !== false)
|
{
| {
|
$style['sid'] = (int)str_replace('css.php?stylesheet=', '', $filename); $filename = $theme_stylesheets[$style['sid']]; }
| $style['sid'] = (int)str_replace('css.php?stylesheet=', '', $filename); $filename = $theme_stylesheets[$style['sid']]; }
|
Zeile 1356 | Zeile 1362 |
---|
}
$ordered_stylesheets[$filename] = $style;
|
}
$ordered_stylesheets[$filename] = $style;
|
} }
| } }
|
foreach($ordered_stylesheets as $filename => $style) { if(strpos($filename, 'css.php?stylesheet=') !== false)
| foreach($ordered_stylesheets as $filename => $style) { if(strpos($filename, 'css.php?stylesheet=') !== false)
|
Zeile 1374 | Zeile 1380 |
---|
// Has the file on the file system been modified? resync_stylesheet($theme_stylesheets[$filename]);
|
// Has the file on the file system been modified? resync_stylesheet($theme_stylesheets[$filename]);
|
|
|
$filename = $theme_stylesheets[$filename]['name'];
$inherited = "";
| $filename = $theme_stylesheets[$filename]['name'];
$inherited = "";
|
Zeile 1400 | Zeile 1406 |
---|
foreach($inherited_ary as $tid => $file) { if(isset($applied_to_count) && $count == $applied_to_count && $count != 0)
|
foreach($inherited_ary as $tid => $file) { if(isset($applied_to_count) && $count == $applied_to_count && $count != 0)
|
{
| {
|
$sep = " {$lang->and} "; }
$inherited .= $sep.$file; $sep = $lang->comma;
|
$sep = " {$lang->and} "; }
$inherited .= $sep.$file; $sep = $lang->comma;
|
|
|
++$count; } $inherited .= ")</small>"; }
|
++$count; } $inherited .= ")</small>"; }
|
|
|
if(is_array($style['applied_to']) && (!isset($style['applied_to']['global']) || $style['applied_to']['global'][0] != "global")) { $attached_to = '';
| if(is_array($style['applied_to']) && (!isset($style['applied_to']['global']) || $style['applied_to']['global'][0] != "global")) { $attached_to = '';
|
Zeile 1431 | Zeile 1437 |
---|
foreach($style['applied_to'] as $name => $actions) { if(!$name)
|
foreach($style['applied_to'] as $name => $actions) { if(!$name)
|
{
| {
|
continue; }
| continue; }
|
Zeile 1441 | Zeile 1447 |
---|
}
if(count($colors))
|
}
if(count($colors))
|
{
| {
|
// Colors override files and are handled below. continue; }
// It's a file: ++$count;
|
// Colors override files and are handled below. continue; }
// 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).")";
|
}
| }
|
if($count == $applied_to_count && $count > 1) {
| if($count == $applied_to_count && $count > 1) {
|
Zeile 1461 | Zeile 1471 |
---|
$attached_to .= $sep.$name;
$sep = $lang->comma;
|
$attached_to .= $sep.$name;
$sep = $lang->comma;
|
}
| }
|
if($attached_to) { $attached_to = "<small>{$lang->attached_to} {$attached_to}</small>";
| if($attached_to) { $attached_to = "<small>{$lang->attached_to} {$attached_to}</small>";
|
Zeile 1473 | Zeile 1483 |
---|
// Attached to color instead of files. $count = 1; $color_list = $sep = '';
|
// Attached to color instead of files. $count = 1; $color_list = $sep = '';
|
|
|
foreach($colors as $color) { if($count == count($colors) && $count > 1)
| foreach($colors as $color) { if($count == count($colors) && $count > 1)
|
Zeile 1483 | Zeile 1493 |
---|
$color_list .= $sep.trim($color); ++$count;
|
$color_list .= $sep.trim($color); ++$count;
|
|
|
$sep = ', '; }
|
$sep = ', '; }
|
|
|
$attached_to = "<small>{$lang->attached_to} ".$lang->sprintf($lang->colors_attached_to)." {$color_list}</small>";
|
$attached_to = "<small>{$lang->attached_to} ".$lang->sprintf($lang->colors_attached_to)." {$color_list}</small>";
|
}
| }
|
if($attached_to == '') { // Orphaned! :(
| if($attached_to == '') { // Orphaned! :(
|
Zeile 1499 | Zeile 1509 |
---|
else { $attached_to = "<small>{$lang->attached_to_all_pages}</small>";
|
else { $attached_to = "<small>{$lang->attached_to_all_pages}</small>";
|
}
| }
|
$popup = new PopupMenu("style_{$style['sid']}", $lang->options);
| $popup = new PopupMenu("style_{$style['sid']}", $lang->options);
|
Zeile 1524 | Zeile 1534 |
---|
$form->end();
echo '<br />';
|
$form->end();
echo '<br />';
|
|
|
// Theme Properties table if($errors) { $page->output_inline_error($errors);
|
// Theme Properties table if($errors) { $page->output_inline_error($errors);
|
}
| }
|
$form = new Form("index.php?module=style-themes&action=edit", "post", "edit"); echo $form->generate_hidden_field("tid", $theme['tid']); $form_container = new FormContainer($lang->edit_theme_properties); $form_container->output_row($lang->name." <em>*</em>", $lang->name_desc_edit, $form->generate_text_box('name', $theme['name'], array('id' => 'name')), 'name');
|
$form = new Form("index.php?module=style-themes&action=edit", "post", "edit"); echo $form->generate_hidden_field("tid", $theme['tid']); $form_container = new FormContainer($lang->edit_theme_properties); $form_container->output_row($lang->name." <em>*</em>", $lang->name_desc_edit, $form->generate_text_box('name', $theme['name'], array('id' => 'name')), 'name');
|
|
|
$options = build_theme_array($theme['tid']); $form_container->output_row($lang->parent_theme." <em>*</em>", $lang->parent_theme_desc, $form->generate_select_box('pid', $options, $theme['pid'], array('id' => 'pid')), 'pid');
| $options = build_theme_array($theme['tid']); $form_container->output_row($lang->parent_theme." <em>*</em>", $lang->parent_theme_desc, $form->generate_select_box('pid', $options, $theme['pid'], array('id' => 'pid')), 'pid');
|
Zeile 1545 | Zeile 1555 |
---|
while($usergroup = $db->fetch_array($query)) { $options[(int)$usergroup['gid']] = $usergroup['title'];
|
while($usergroup = $db->fetch_array($query)) { $options[(int)$usergroup['gid']] = $usergroup['title'];
|
}
| }
|
$form_container->output_row($lang->allowed_user_groups, $lang->allowed_user_groups_desc, $form->generate_select_box('allowedgroups[]', $options, explode(",", $theme['allowedgroups']), array('id' => 'allowedgroups', 'multiple' => true, 'size' => 5)), 'allowedgroups');
$options = array(); $query = $db->simple_select("templatesets", "*", "", array('order_by' => 'title')); while($templateset = $db->fetch_array($query))
|
$form_container->output_row($lang->allowed_user_groups, $lang->allowed_user_groups_desc, $form->generate_select_box('allowedgroups[]', $options, explode(",", $theme['allowedgroups']), array('id' => 'allowedgroups', 'multiple' => true, 'size' => 5)), 'allowedgroups');
$options = array(); $query = $db->simple_select("templatesets", "*", "", array('order_by' => 'title')); while($templateset = $db->fetch_array($query))
|
{
| {
|
$options[(int)$templateset['sid']] = $templateset['title']; } $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();
|
$options[(int)$templateset['sid']] = $templateset['title']; } $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 1567 | Zeile 1577 |
---|
continue; } $options[$dir] = ucfirst(str_replace(array('_', '.css'), array(' ', ''), $dir));
|
continue; } $options[$dir] = ucfirst(str_replace(array('_', '.css'), array(' ', ''), $dir));
|
} }
$form_container->output_row($lang->editor_theme." <em>*</em>", $lang->editor_theme_desc, $form->generate_select_box('editortheme', $options, $properties['editortheme'], array('id' => 'editortheme')), 'editortheme');
| } }
$form_container->output_row($lang->editor_theme." <em>*</em>", $lang->editor_theme_desc, $form->generate_select_box('editortheme', $options, $properties['editortheme'], array('id' => 'editortheme')), 'editortheme');
|
$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', '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->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', '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 = new FormContainer($lang->colors_manage);
| $form_container->end();
$form_container = new FormContainer($lang->colors_manage);
|
Zeile 1591 | Zeile 1601 |
---|
$colors = array_merge($colors, $properties['colors']);
$color_setting = $form->generate_select_box('color', $colors, $properties['color'], array('class' => "select\" style=\"width: 200px;"));
|
$colors = array_merge($colors, $properties['colors']);
$color_setting = $form->generate_select_box('color', $colors, $properties['color'], array('class' => "select\" style=\"width: 200px;"));
|
|
|
$mybb->input['colors'] = ''; foreach($properties['colors'] as $key => $color) {
| $mybb->input['colors'] = ''; foreach($properties['colors'] as $key => $color) {
|
Zeile 1606 | Zeile 1616 |
---|
$form_container->output_row($lang->colors_setting, $lang->colors_setting_desc, $color_setting, 'color'); $form_container->output_row($lang->colors_add, $lang->colors_add_desc, $form->generate_text_area('colors', $mybb->input['colors'], array('style' => 'width: 200px;', 'rows' => '5')));
|
$form_container->output_row($lang->colors_setting, $lang->colors_setting_desc, $color_setting, 'color'); $form_container->output_row($lang->colors_add, $lang->colors_add_desc, $form->generate_text_area('colors', $mybb->input['colors'], array('style' => 'width: 200px;', 'rows' => '5')));
|
$form_container->end();
| $form_container->end();
|
$buttons = array(); $buttons[] = $form->generate_submit_button($lang->save_theme_properties); $form->output_submit_wrapper($buttons);
| $buttons = array(); $buttons[] = $form->generate_submit_button($lang->save_theme_properties); $form->output_submit_wrapper($buttons);
|
Zeile 1672 | Zeile 1682 |
---|
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)
| }
if(!$errors)
|
Zeile 1721 | Zeile 1734 |
---|
else { $attached = $mybb->input['color'];
|
else { $attached = $mybb->input['color'];
|
} }
| } }
|
// Update Stylesheet $update_array = array(
| // Update Stylesheet $update_array = array(
|
Zeile 1746 | Zeile 1759 |
---|
$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 1758 | Zeile 1771 |
---|
// Update the CSS file list for this theme update_theme_stylesheet_list($theme['tid'], $theme_c, $update_d);
|
// Update the CSS file list for this theme update_theme_stylesheet_list($theme['tid'], $theme_c, $update_d);
|
|
|
$plugins->run_hooks("admin_style_themes_stylesheet_properties_commit");
|
$plugins->run_hooks("admin_style_themes_stylesheet_properties_commit");
|
|
|
// Log admin action
|
// 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']}");
|
} }
| } }
|
$properties = my_unserialize($theme['properties']); $page->add_breadcrumb_item(htmlspecialchars_uni($theme['name']), "index.php?module=style-themes&action=edit&tid={$mybb->input['tid']}"); $page->add_breadcrumb_item(htmlspecialchars_uni($stylesheet['name'])." {$lang->properties}", "index.php?module=style-themes&action=edit_properties&tid={$mybb->input['tid']}");
|
$properties = my_unserialize($theme['properties']); $page->add_breadcrumb_item(htmlspecialchars_uni($theme['name']), "index.php?module=style-themes&action=edit&tid={$mybb->input['tid']}"); $page->add_breadcrumb_item(htmlspecialchars_uni($stylesheet['name'])." {$lang->properties}", "index.php?module=style-themes&action=edit_properties&tid={$mybb->input['tid']}");
|
|
|
$page->output_header("{$lang->themes} - {$lang->stylesheet_properties}");
// If the stylesheet and theme do not match, we must be editing something that is inherited if($this_stylesheet['inherited'][$stylesheet['name']])
|
$page->output_header("{$lang->themes} - {$lang->stylesheet_properties}");
// If the stylesheet and theme do not match, we must be editing something that is inherited if($this_stylesheet['inherited'][$stylesheet['name']])
|
{
| {
|
$query = $db->simple_select("themes", "name", "tid='{$stylesheet['tid']}'"); $stylesheet_parent = htmlspecialchars_uni($db->fetch_field($query, 'name'));
| $query = $db->simple_select("themes", "name", "tid='{$stylesheet['tid']}'"); $stylesheet_parent = htmlspecialchars_uni($db->fetch_field($query, 'name'));
|
Zeile 1787 | Zeile 1800 |
---|
$page->output_alert($lang->sprintf($lang->stylesheet_inherited_default, $stylesheet_parent)); } else
|
$page->output_alert($lang->sprintf($lang->stylesheet_inherited_default, $stylesheet_parent)); } else
|
{
| {
|
$page->output_alert($lang->sprintf($lang->stylesheet_inherited, $stylesheet_parent)); } }
| $page->output_alert($lang->sprintf($lang->stylesheet_inherited, $stylesheet_parent)); } }
|
Zeile 1802 | Zeile 1815 |
---|
foreach($mybb->input as $name => $value) { if(strpos($name, "attached") !== false)
|
foreach($mybb->input as $name => $value) { if(strpos($name, "attached") !== false)
|
{
| {
|
list(, $id) = explode('_', $name); $id = (int)$id;
| list(, $id) = explode('_', $name); $id = (int)$id;
|
Zeile 1919 | Zeile 1932 |
---|
{ $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_colors .= $form_container->end(true)."</div>"; }
$actions = '<script type="text/javascript"> function checkAction(id) { var checked = \'\';
$(\'.\'+id+\'s_check\').each(function(e, val) { if($(this).prop(\'checked\') == true) { checked = $(this).val(); } }); $(\'.\'+id+\'s\').each(function(e)
| $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>"; }
$actions = '<script type="text/javascript"> function checkAction(id) { var checked = \'\';
$(\'.\'+id+\'s_check\').each(function(e, val) { if($(this).prop(\'checked\') == true) { checked = $(this).val(); } }); $(\'.\'+id+\'s\').each(function(e)
|
{ $(this).hide(); });
| { $(this).hide(); });
|
Zeile 1980 | Zeile 1993 |
---|
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 2067 | Zeile 2080 |
---|
// 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($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 2194 | Zeile 2207 |
---|
{ $editable_selector = $css_array[$mybb->input['selector']]; $selector = $mybb->input['selector'];
|
{ $editable_selector = $css_array[$mybb->input['selector']]; $selector = $mybb->input['selector'];
|
}
| }
|
// Get the properties from this item $properties = parse_css_properties($editable_selector['values']);
| // Get the properties from this item $properties = parse_css_properties($editable_selector['values']);
|
Zeile 2242 | Zeile 2255 |
---|
$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 2257 | Zeile 2270 |
---|
$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"); }
$plugins->run_hooks("admin_style_themes_edit_stylesheet_advanced");
$parent_list = make_parent_theme_list($theme['tid']); $parent_list = implode(',', $parent_list); 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));
| { // 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");
$parent_list = make_parent_theme_list($theme['tid']); $parent_list = implode(',', $parent_list); 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);
// Does the theme not exist?
| $stylesheet = $db->fetch_array($query);
// Does the theme not exist?
|
Zeile 2302 | Zeile 2315 |
---|
// 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 2354 |
---|
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 2492 |
---|
$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 2620 |
---|
$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 2630 |
---|
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 2900 |
---|
});</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 2944 |
---|
$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 2979 |
---|
$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");
|