Vergleich admin/modules/style/themes.php - 1.8.8 - 1.8.21

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 216Zeile 216

$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("<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><a href=\"https://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 243Zeile 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 262Zeile 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 284Zeile 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=\"https://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=\"https://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&amp;action=browse{$keywords}&amp;page={page}");

	echo "<br />".draw_admin_pagination($mybb->input['page'], 15, $tree['results']['attributes']['total'], "index.php?module=style-themes&amp;action=browse{$keywords}&amp;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 307Zeile 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 388Zeile 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 418Zeile 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&amp;action=import");

		$themes[$theme['tid']] = $theme['name'];
}

$page->add_breadcrumb_item($lang->import_a_theme, "index.php?module=style-themes&amp;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 510Zeile 508
	$form->output_submit_wrapper($buttons);

$form->end();

	$form->output_submit_wrapper($buttons);

$form->end();





	$page->output_footer();
}


	$page->output_footer();
}


Zeile 584Zeile 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 592Zeile 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 667Zeile 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 911Zeile 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 1025Zeile 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");


flash_message($lang->success_theme_deleted, 'success');
admin_redirect("index.php?module=style-themes");

Zeile 1083Zeile 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']);
if(is_array($theme_properties['disporder']))

		$theme_properties = my_unserialize($theme['properties']);
if(is_array($theme_properties['disporder']))

		{

		{

			$properties['disporder'] = $theme_properties['disporder'];
}
else

			$properties['disporder'] = $theme_properties['disporder'];
}
else

Zeile 1108Zeile 1119
		if(is_array($mybb->input['allowedgroups']))
{
foreach($mybb->input['allowedgroups'] as $gid)

		if(is_array($mybb->input['allowedgroups']))
{
foreach($mybb->input['allowedgroups'] as $gid)

			{

			{

				if($gid == "all")
{
$allowedgroups = "all";

				if($gid == "all")
{
$allowedgroups = "all";

Zeile 1134Zeile 1145
		if(!$update_array['name'])
{
$errors[] = $lang->error_missing_name;

		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');

if($numthemes)

		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');

if($numthemes)

			{

			{

				$errors[] = $lang->error_theme_already_exists;

				$errors[] = $lang->error_theme_already_exists;

			}
}

			}
}


if($update_array['pid'])


if($update_array['pid'])

		{

		{

			$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)

Zeile 1160Zeile 1171
			$query = $db->simple_select("templatesets", "sid", "sid='".$properties['templateset']."'");
$ts_check = $db->fetch_field($query, "sid");
if(!$ts_check)

			$query = $db->simple_select("templatesets", "sid", "sid='".$properties['templateset']."'");
$ts_check = $db->fetch_field($query, "sid");
if(!$ts_check)

			{

			{

				unset($properties['templateset']);

				unset($properties['templateset']);

			}

			}

		}
if(!$properties['templateset'])

		}
if(!$properties['templateset'])

		{

		{

			$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 1183Zeile 1194
			if($theme['def'] == 1)
{
$cache->update_default_theme();

			if($theme['def'] == 1)
{
$cache->update_default_theme();

			}

// Log admin action
log_admin_action($theme['tid'], htmlspecialchars_uni($theme['name']));


			}

// Log admin action
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 1227Zeile 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 1235Zeile 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))
{

		$query = $db->simple_select("themestylesheets", "*", "", array('order_by' => 'sid DESC, tid', 'order_dir' => 'desc'));
while($theme_stylesheet = $db->fetch_array($query))
{

Zeile 1448Zeile 1454

// 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 1557Zeile 1567
	$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 1672Zeile 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)
{
// 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 1701Zeile 1714
						{
// 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 1710Zeile 1723

$attached[] = $attached_to;
}


$attached[] = $attached_to;
}

				}

				}

			}
else if($mybb->input['attach'] == 2)
{

			}
else if($mybb->input['attach'] == 2)
{

Zeile 1733Zeile 1746
			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 1746Zeile 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 1762Zeile 1775
			$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 1796Zeile 1809
	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 1857Zeile 1870
			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 1919Zeile 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();
});
if($(\'#\'+id+\'_\'+checked))

			$(this).hide();
});
if($(\'#\'+id+\'_\'+checked))

Zeile 1960Zeile 1973
		'.$specific_colors_option.'
'.$specific_colors.'
</dl>

		'.$specific_colors_option.'
'.$specific_colors.'
</dl>

	<script type="text/javascript">

	<script type="text/javascript">

	checkAction(\'attach\');'.$check_actions.'
</script>';


	checkAction(\'attach\');'.$check_actions.'
</script>';


Zeile 1971Zeile 1984
	$form_container->output_row($lang->file_name, $lang->file_name_desc, $form->generate_text_box('name', $mybb->input['name'], array('id' => 'name', 'style' => 'width: 200px;')), 'name');

$form_container->output_row($lang->attached_to, $lang->attached_to_desc, $actions);

	$form_container->output_row($lang->file_name, $lang->file_name_desc, $form->generate_text_box('name', $mybb->input['name'], array('id' => 'name', 'style' => 'width: 200px;')), 'name');

$form_container->output_row($lang->attached_to, $lang->attached_to_desc, $actions);





	$form_container->end();

$buttons[] = $form->generate_submit_button($lang->save_stylesheet_properties);

	$form_container->end();

$buttons[] = $form->generate_submit_button($lang->save_stylesheet_properties);

Zeile 1980Zeile 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>
EOF;

	<script type="text/javascript">
<!---
themeProperties.setup('{$count}');
// -->
</script>
EOF;





	$form->end();

$page->output_footer();

	$form->end();

$page->output_footer();

Zeile 2003Zeile 2016
	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");

	}

$plugins->run_hooks("admin_style_themes_edit_stylesheet_simple");

	}

$plugins->run_hooks("admin_style_themes_edit_stylesheet_simple");

Zeile 2013Zeile 2026
	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 2028Zeile 2041
	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'];

if($mybb->input['serialized'] == 1)

		// Insert the modified CSS
$new_stylesheet = $stylesheet['stylesheet'];

if($mybb->input['serialized'] == 1)

		{

		{

			$mybb->input['css_bits'] = my_unserialize($mybb->input['css_bits']);
}


			$mybb->input['css_bits'] = my_unserialize($mybb->input['css_bits']);
}


Zeile 2049Zeile 2062
			if(!trim($value) || !trim($field))
{
continue;

			if(!trim($value) || !trim($field))
{
continue;

			}

			}


if($field == "extra")
{


if($field == "extra")
{

Zeile 2067Zeile 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}'");





		// Cache the stylesheet to the file
if(!cache_stylesheet($theme['tid'], $stylesheet['name'], $new_stylesheet))
{
$db->update_query("themestylesheets", array('cachefile' => "css.php?stylesheet={$sid}"), "sid='{$sid}'", 1);

		// Cache the stylesheet to the file
if(!cache_stylesheet($theme['tid'], $stylesheet['name'], $new_stylesheet))
{
$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']);

$plugins->run_hooks("admin_style_themes_edit_stylesheet_simple_commit");

		// Update the CSS file list for this theme
update_theme_stylesheet_list($theme['tid']);

$plugins->run_hooks("admin_style_themes_edit_stylesheet_simple_commit");





		// Log admin action
log_admin_action(htmlspecialchars_uni($theme['name']), $stylesheet['name']);

if(!$mybb->input['ajax'])

		// Log admin action
log_admin_action(htmlspecialchars_uni($theme['name']), $stylesheet['name']);

if(!$mybb->input['ajax'])

		{

		{

			flash_message($lang->success_stylesheet_updated, 'success');

if($mybb->input['save_close'])

			flash_message($lang->success_stylesheet_updated, 'success');

if($mybb->input['save_close'])

Zeile 2112Zeile 2125
		// Need to refetch new stylesheet as it was modified
$query = $db->simple_select("themestylesheets", "stylesheet", "sid='{$stylesheet['sid']}'");
$stylesheet['stylesheet'] = $db->fetch_field($query, 'stylesheet');

		// Need to refetch new stylesheet as it was modified
$query = $db->simple_select("themestylesheets", "stylesheet", "sid='{$stylesheet['sid']}'");
$stylesheet['stylesheet'] = $db->fetch_field($query, 'stylesheet');

	}

	}


$css_array = css_to_array($stylesheet['stylesheet']);
$selector_list = get_selectors_as_options($css_array, $mybb->input['selector']);


$css_array = css_to_array($stylesheet['stylesheet']);
$selector_list = get_selectors_as_options($css_array, $mybb->input['selector']);

Zeile 2139Zeile 2152
	$page->add_breadcrumb_item("{$lang->editing} ".htmlspecialchars_uni($stylesheet['name']), "index.php?module=style-themes&amp;action=edit_stylesheet&amp;tid={$mybb->input['tid']}&amp;file=".htmlspecialchars_uni($mybb->input['file'])."&amp;mode=simple");

$page->output_header("{$lang->themes} - {$lang->edit_stylesheets}");

	$page->add_breadcrumb_item("{$lang->editing} ".htmlspecialchars_uni($stylesheet['name']), "index.php?module=style-themes&amp;action=edit_stylesheet&amp;tid={$mybb->input['tid']}&amp;file=".htmlspecialchars_uni($mybb->input['file'])."&amp;mode=simple");

$page->output_header("{$lang->themes} - {$lang->edit_stylesheets}");





	// If the stylesheet and theme do not match, we must be editing something that is inherited
if($this_stylesheet['inherited'][$stylesheet['name']])
{

	// If the stylesheet and theme do not match, we must be editing something that is inherited
if($this_stylesheet['inherited'][$stylesheet['name']])
{

Zeile 2154Zeile 2167
		else
{
$page->output_alert($lang->sprintf($lang->stylesheet_inherited, $stylesheet_parent), "ajax_alert");

		else
{
$page->output_alert($lang->sprintf($lang->stylesheet_inherited, $stylesheet_parent), "ajax_alert");

		}

		}

	}

$sub_tabs['edit_stylesheet'] = array(

	}

$sub_tabs['edit_stylesheet'] = array(

Zeile 2178Zeile 2191
	echo $form->generate_hidden_field("file", htmlspecialchars_uni($mybb->input['file']))."\n";

echo "{$lang->selector}: <select id=\"selector\" name=\"selector\">\n{$selector_list}</select> <span id=\"mini_spinner\">".$form->generate_submit_button($lang->go)."</span><br /><br />\n";

	echo $form->generate_hidden_field("file", htmlspecialchars_uni($mybb->input['file']))."\n";

echo "{$lang->selector}: <select id=\"selector\" name=\"selector\">\n{$selector_list}</select> <span id=\"mini_spinner\">".$form->generate_submit_button($lang->go)."</span><br /><br />\n";





	$form->end();

// Haven't chosen a selector to edit, show the first one from the stylesheet
if(!$mybb->input['selector'])

	$form->end();

// Haven't chosen a selector to edit, show the first one from the stylesheet
if(!$mybb->input['selector'])

	{

	{

		reset($css_array);
uasort($css_array, "css_selectors_sort_cmp");
$selector = key($css_array);
$editable_selector = $css_array[$selector];

		reset($css_array);
uasort($css_array, "css_selectors_sort_cmp");
$selector = key($css_array);
$editable_selector = $css_array[$selector];

	}

	}

	// Show a specific selector
else
{
$editable_selector = $css_array[$mybb->input['selector']];
$selector = $mybb->input['selector'];

	// Show a specific selector
else
{
$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 2245Zeile 2258
	echo '<script type="text/javascript" src="./jscripts/themes.js?ver=1808"></script>';
echo '<script type="text/javascript">


	echo '<script type="text/javascript" src="./jscripts/themes.js?ver=1808"></script>';
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 2257Zeile 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 2295Zeile 2308

// Theme & stylesheet theme ID do not match, editing inherited - we copy to local theme
if($theme['tid'] != $stylesheet['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']);
}

// Now we have the new stylesheet, save it
$updated_stylesheet = array(
"cachefile" => $db->escape_string($stylesheet['name']),

			$sid = copy_stylesheet_to_theme($stylesheet, $theme['tid']);
}

// 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 2312Zeile 2325
		{
$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']);

$plugins->run_hooks("admin_style_themes_edit_stylesheet_advanced_commit");

		// Update the CSS file list for this theme
update_theme_stylesheet_list($theme['tid']);

$plugins->run_hooks("admin_style_themes_edit_stylesheet_advanced_commit");





		// Log admin action
log_admin_action(htmlspecialchars_uni($theme['name']), $stylesheet['name']);

flash_message($lang->success_stylesheet_updated, 'success');

		// Log admin action
log_admin_action(htmlspecialchars_uni($theme['name']), $stylesheet['name']);

flash_message($lang->success_stylesheet_updated, 'success');





		if(!$mybb->input['save_close'])
{
admin_redirect("index.php?module=style-themes&action=edit_stylesheet&file=".htmlspecialchars_uni($stylesheet['name'])."&tid={$theme['tid']}&mode=advanced");

		if(!$mybb->input['save_close'])
{
admin_redirect("index.php?module=style-themes&action=edit_stylesheet&file=".htmlspecialchars_uni($stylesheet['name'])."&tid={$theme['tid']}&mode=advanced");

		}
else

		}
else

		{
admin_redirect("index.php?module=style-themes&action=edit&tid={$theme['tid']}");

		{
admin_redirect("index.php?module=style-themes&action=edit&tid={$theme['tid']}");

		}
}


		}
}


	// Fetch list of all of the stylesheets for this theme
$stylesheets = fetch_theme_stylesheets($theme);
$this_stylesheet = $stylesheets[$stylesheet['name']];
unset($stylesheets);

	// Fetch list of all of the stylesheets for this theme
$stylesheets = fetch_theme_stylesheets($theme);
$this_stylesheet = $stylesheets[$stylesheet['name']];
unset($stylesheets);





	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?ver=1808"></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>

';

';

	}

	}


$page->add_breadcrumb_item(htmlspecialchars_uni($theme['name']), "index.php?module=style-themes&amp;action=edit&amp;tid={$mybb->input['tid']}");
$page->add_breadcrumb_item("{$lang->editing} ".htmlspecialchars_uni($stylesheet['name']), "index.php?module=style-themes&amp;action=edit_stylesheet&amp;tid={$mybb->input['tid']}&amp;file=".htmlspecialchars_uni($mybb->input['file'])."&amp;mode=advanced");


$page->add_breadcrumb_item(htmlspecialchars_uni($theme['name']), "index.php?module=style-themes&amp;action=edit&amp;tid={$mybb->input['tid']}");
$page->add_breadcrumb_item("{$lang->editing} ".htmlspecialchars_uni($stylesheet['name']), "index.php?module=style-themes&amp;action=edit_stylesheet&amp;tid={$mybb->input['tid']}&amp;file=".htmlspecialchars_uni($mybb->input['file'])."&amp;mode=advanced");

Zeile 2365Zeile 2378

// Show inherited warning
if($stylesheet['tid'] == 1)


// Show inherited warning
if($stylesheet['tid'] == 1)

		{

		{

			$page->output_alert($lang->sprintf($lang->stylesheet_inherited_default, $stylesheet_parent));

			$page->output_alert($lang->sprintf($lang->stylesheet_inherited_default, $stylesheet_parent));

		}

		}

		else
{
$page->output_alert($lang->sprintf($lang->stylesheet_inherited, $stylesheet_parent));

		else
{
$page->output_alert($lang->sprintf($lang->stylesheet_inherited, $stylesheet_parent));

		}
}

		}
}


$sub_tabs['edit_stylesheet'] = array(
'title' => $lang->edit_stylesheet_simple_mode,


$sub_tabs['edit_stylesheet'] = array(
'title' => $lang->edit_stylesheet_simple_mode,

Zeile 2479Zeile 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 2539Zeile 2552
			{
// Custom stylesheet
$stylesheet = $mybb->input['stylesheet'];

			{
// Custom stylesheet
$stylesheet = $mybb->input['stylesheet'];

			}

			}


$attached = array();



$attached = array();


Zeile 2607Zeile 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 2617Zeile 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?ver=1808"></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>

';
}

$page->add_breadcrumb_item(htmlspecialchars_uni($theme['name']), "index.php?module=style-themes&amp;action=edit&amp;tid={$mybb->input['tid']}");
$page->add_breadcrumb_item($lang->add_stylesheet);
$properties = my_unserialize($theme['properties']);

';
}

$page->add_breadcrumb_item(htmlspecialchars_uni($theme['name']), "index.php?module=style-themes&amp;action=edit&amp;tid={$mybb->input['tid']}");
$page->add_breadcrumb_item($lang->add_stylesheet);
$properties = my_unserialize($theme['properties']);





	$page->output_header("{$lang->themes} - {$lang->add_stylesheet}");

$sub_tabs['edit_stylesheets'] = array(

	$page->output_header("{$lang->themes} - {$lang->add_stylesheet}");

$sub_tabs['edit_stylesheets'] = array(

Zeile 2888Zeile 2901
	}

echo '<script type="text/javascript" src="./jscripts/themes.js?ver=1808"></script>';

	}

echo '<script type="text/javascript" src="./jscripts/themes.js?ver=1808"></script>';

	echo '<script type="text/javascript" src="./jscripts/theme_properties.js"></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 2931Zeile 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 2966Zeile 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");