Vergleich admin/modules/config/settings.php - 1.4.0 - 1.4.6

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * $Id: settings.php 4031 2008-07-20 20:56:39Z Tikitiki $

 * $Id: settings.php 4311 2009-01-22 04:55:38Z Tikitiki $

 */

// Disallow direct access to this file for security reasons

 */

// Disallow direct access to this file for security reasons

Zeile 19Zeile 19

$plugins->run_hooks("admin_config_settings_begin");



$plugins->run_hooks("admin_config_settings_begin");


 
/*

// Delete all duplicate settings and setting groups
if($mybb->input['action'] == "delete_duplicates")
{
$query = $db->query("
DELETE s1
FROM ".TABLE_PREFIX."settings s1

// Delete all duplicate settings and setting groups
if($mybb->input['action'] == "delete_duplicates")
{
$query = $db->query("
DELETE s1
FROM ".TABLE_PREFIX."settings s1

		INNER JOIN ".TABLE_PREFIX."settings s2 ON (s2.name=s1.name AND s2.sid!=s1.sid)

		INNER JOIN ".TABLE_PREFIX."settings s2 ON (s2.name=s1.name AND s2.sid!=s1.sid AND s2.sid < s1.sid)

	");
$query = $db->query("
DELETE g1
FROM ".TABLE_PREFIX."settinggroups g1

	");
$query = $db->query("
DELETE g1
FROM ".TABLE_PREFIX."settinggroups g1

		INNER JOIN ".TABLE_PREFIX."settinggroups g2 ON (g2.title=g1.title AND g2.gid!=g1.gid)

		INNER JOIN ".TABLE_PREFIX."settinggroups g2 ON (g2.title=g1.title AND g2.gid!=g1.gid AND g2.gid < g1.gid)

	");
rebuild_settings();


	");
rebuild_settings();


Zeile 41Zeile 42

flash_message($lang->success_duplicate_settings_deleted, 'success');
admin_redirect("index.php?module=config/settings&action=manage");


flash_message($lang->success_duplicate_settings_deleted, 'success');
admin_redirect("index.php?module=config/settings&action=manage");

}


}*/
// ^^ Code, Please go away. Forever.


// Creating a new setting group
if($mybb->input['action'] == "addgroup")


// Creating a new setting group
if($mybb->input['action'] == "addgroup")

Zeile 54Zeile 56
		if(!trim($mybb->input['title']))
{
$errors[] = $lang->error_missing_group_title;

		if(!trim($mybb->input['title']))
{
$errors[] = $lang->error_missing_group_title;

		}

		}

		
// Validate identifier
if(!trim($mybb->input['name']))

		
// Validate identifier
if(!trim($mybb->input['name']))

Zeile 62Zeile 64
			$errors[] = $lang->error_missing_group_name;
}
$query = $db->simple_select("settinggroups", "title", "name='".$db->escape_string($mybb->input['name'])."'");

			$errors[] = $lang->error_missing_group_name;
}
$query = $db->simple_select("settinggroups", "title", "name='".$db->escape_string($mybb->input['name'])."'");

		if($db->num_rows($query) > 0)

		if($db->num_rows($query) > 0)

		{
$dup_group_title = $db->fetch_field($query, 'title');
$errors[] = $lang->sprintf($lang->error_duplicate_group_name, $dup_group_title);

		{
$dup_group_title = $db->fetch_field($query, 'title');
$errors[] = $lang->sprintf($lang->error_duplicate_group_name, $dup_group_title);

Zeile 164Zeile 166
		if(!trim($mybb->input['title']))
{
$errors[] = $lang->error_missing_group_title;

		if(!trim($mybb->input['title']))
{
$errors[] = $lang->error_missing_group_title;

		}

		}

		
// Validate identifier
if(!trim($mybb->input['name']))

		
// Validate identifier
if(!trim($mybb->input['name']))

Zeile 206Zeile 208
		'title' => $lang->edit_setting_group,
'link' => "index.php?module=config/settings&amp;action=editgroup&amp;gid={$group['gid']}",
'description' => $lang->edit_setting_group_desc

		'title' => $lang->edit_setting_group,
'link' => "index.php?module=config/settings&amp;action=editgroup&amp;gid={$group['gid']}",
'description' => $lang->edit_setting_group_desc

	);

$page->output_nav_tabs($sub_tabs, 'edit_setting_group');


	);

$page->output_nav_tabs($sub_tabs, 'edit_setting_group');


	$form = new Form("index.php?module=config/settings&amp;action=editgroup", "post", "editgroup");

echo $form->generate_hidden_field("gid", $group['gid']);

	$form = new Form("index.php?module=config/settings&amp;action=editgroup", "post", "editgroup");

echo $form->generate_hidden_field("gid", $group['gid']);

Zeile 422Zeile 424
		"select" => $lang->select,
"radio" => $lang->radio,
"checkbox" => $lang->checkbox,

		"select" => $lang->select,
"radio" => $lang->radio,
"checkbox" => $lang->checkbox,

		"language" => $lang->language,

		"language" => $lang->language_selection_box,

		"adminlanguage" => $lang->adminlanguage,
"cpstyle" => $lang->cpstyle,
//"php" => $lang->php // Internal Use Only

		"adminlanguage" => $lang->adminlanguage,
"cpstyle" => $lang->cpstyle,
//"php" => $lang->php // Internal Use Only

Zeile 543Zeile 545

$page->add_breadcrumb_item($lang->edit_setting);
$page->output_header($lang->board_settings." - ".$lang->edit_setting);


$page->add_breadcrumb_item($lang->edit_setting);
$page->output_header($lang->board_settings." - ".$lang->edit_setting);

	
$sub_tabs['change_settings'] = array(
'title' => $lang->change_settings,
'link' => "index.php?module=config/settings",

	
$sub_tabs['change_settings'] = array(
'title' => $lang->change_settings,
'link' => "index.php?module=config/settings",

	);

$sub_tabs['add_setting'] = array(

	);

$sub_tabs['add_setting'] = array(

Zeile 608Zeile 610
		"select" => $lang->select,
"radio" => $lang->radio,
"checkbox" => $lang->checkbox,

		"select" => $lang->select,
"radio" => $lang->radio,
"checkbox" => $lang->checkbox,

		"language" => $lang->language,

		"language" => $lang->language_selection_box,

		"adminlanguage" => $lang->adminlanguage,
"cpstyle" => $lang->cpstyle,
//"php" => $lang->php // Internal Use Only

		"adminlanguage" => $lang->adminlanguage,
"cpstyle" => $lang->cpstyle,
//"php" => $lang->php // Internal Use Only

Zeile 831Zeile 833
	$form->output_submit_wrapper($buttons);
$form->end();


	$form->output_submit_wrapper($buttons);
$form->end();


	echo '<script type="text/javascript" src="./jscripts/config_settings.js"></script><script type="text/javascript">Event.observe(window, "load", ManageSettings.init);</script>';

	/*echo '<script type="text/javascript" src="./jscripts/config_settings.js"></script><script type="text/javascript">Event.observe(window, "load", ManageSettings.init);</script>';*/

	
$page->output_footer();
}

	
$page->output_footer();
}

Zeile 1094Zeile 1096
			{
$languages = $lang->get_languages(1);
$setting_code = $form->generate_select_box($element_name, $languages, $setting['value'], array('id' => $element_id));

			{
$languages = $lang->get_languages(1);
$setting_code = $form->generate_select_box($element_name, $languages, $setting['value'], array('id' => $element_id));

 
			}
else if($type[0] == "passwordbox")
{
$setting_code = $form->generate_password_box($element_name, $setting['value'], array('id' => $element_id));

			}
else if($type[0] == "php")
{

			}
else if($type[0] == "php")
{

Zeile 1124Zeile 1130
						if($setting['value'] == $optionsexp[0])
{
$option_list[$i] = $form->generate_radio_button($element_name, $optionsexp[0], htmlspecialchars_uni($optionsexp[1]), array('id' => $element_id.'_'.$i, "checked" => 1, 'class' => $element_id));

						if($setting['value'] == $optionsexp[0])
{
$option_list[$i] = $form->generate_radio_button($element_name, $optionsexp[0], htmlspecialchars_uni($optionsexp[1]), array('id' => $element_id.'_'.$i, "checked" => 1, 'class' => $element_id));

						}
else
{

						}
else
{

							$option_list[$i] = $form->generate_radio_button($element_name, $optionsexp[0], htmlspecialchars_uni($optionsexp[1]), array('id' => $element_id.'_'.$i, 'class' => $element_id));
}
}

							$option_list[$i] = $form->generate_radio_button($element_name, $optionsexp[0], htmlspecialchars_uni($optionsexp[1]), array('id' => $element_id.'_'.$i, 'class' => $element_id));
}
}

Zeile 1134Zeile 1140
					{
if($setting['value'] == $optionsexp[0])
{

					{
if($setting['value'] == $optionsexp[0])
{

							$option_list[$i] = $form->generate_checkbox_input($element_name, $optionsexp[0], htmlspecialchars_uni($optionsexp[1]), array('id' => $element_id.'_'.$i, "checked" => 1, 'class' => $element_id));

							$option_list[$i] = $form->generate_check_box($element_name, $optionsexp[0], htmlspecialchars_uni($optionsexp[1]), array('id' => $element_id.'_'.$i, "checked" => 1, 'class' => $element_id));

						}
else
{

						}
else
{

							$option_list[$i] = $form->generate_checkbox_input($element_name, $optionsexp[0], htmlspecialchars_uni($optionsexp[1]), array('id' => $element_id.'_'.$i, 'class' => $element_id));

							$option_list[$i] = $form->generate_check_box($element_name, $optionsexp[0], htmlspecialchars_uni($optionsexp[1]), array('id' => $element_id.'_'.$i, 'class' => $element_id));

						}
}
}

						}
}
}

Zeile 1175Zeile 1181
	print_setting_peekers();

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

	print_setting_peekers();

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

	{

	{

		$page->output_footer();
}
}

		$page->output_footer();
}
}

Zeile 1222Zeile 1228
	echo "<input type=\"submit\" class=\"search_button\" value=\"{$lang->search}\" />";
$search->end();
echo "</div>\n";

	echo "<input type=\"submit\" class=\"search_button\" value=\"{$lang->search}\" />";
$search->end();
echo "</div>\n";





	echo '<div id="search_results">&nbsp;</div><div id="group_list">';
$table = new Table;
$table->construct_header($lang->setting_groups);

	echo '<div id="search_results">&nbsp;</div><div id="group_list">';
$table = new Table;
$table->construct_header($lang->setting_groups);

Zeile 1391Zeile 1397
			new Peeker($$(".setting_enablewarningsystem"), $("row_setting_canviewownwarning"), /1/, true);
new Peeker($$(".setting_enablewarningsystem"), $("row_setting_maxwarningpoints"), /1/, true);
new Peeker($$(".setting_enablepms"), $("row_setting_pmsallowhtml"), /1/, true);

			new Peeker($$(".setting_enablewarningsystem"), $("row_setting_canviewownwarning"), /1/, true);
new Peeker($$(".setting_enablewarningsystem"), $("row_setting_maxwarningpoints"), /1/, true);
new Peeker($$(".setting_enablepms"), $("row_setting_pmsallowhtml"), /1/, true);

 


			new Peeker($$(".setting_enablepms"), $("row_setting_pmsallowmycode"), /1/, true);
new Peeker($$(".setting_enablepms"), $("row_setting_pmsallowsmilies"), /1/, true);
new Peeker($$(".setting_enablepms"), $("row_setting_pmsallowimgcode"), /1/, true);

			new Peeker($$(".setting_enablepms"), $("row_setting_pmsallowmycode"), /1/, true);
new Peeker($$(".setting_enablepms"), $("row_setting_pmsallowsmilies"), /1/, true);
new Peeker($$(".setting_enablepms"), $("row_setting_pmsallowimgcode"), /1/, true);

			new Peeker($$(".setting_enablecalendar"), $("row_setting_publiceventcolor"), /1/, true);
new Peeker($$(".setting_enablecalendar"), $("row_setting_privateeventcolor"), /1/, true);

 
			new Peeker($$(".setting_smilieinserter"), $("row_setting_smilieinsertertot"), /1/, true);
new Peeker($$(".setting_smilieinserter"), $("row_setting_smilieinsertercols"), /1/, true);
new Peeker($("setting_mail_handler"), $("row_setting_smtp_host"), /smtp/, false);

			new Peeker($$(".setting_smilieinserter"), $("row_setting_smilieinsertertot"), /1/, true);
new Peeker($$(".setting_smilieinserter"), $("row_setting_smilieinsertercols"), /1/, true);
new Peeker($("setting_mail_handler"), $("row_setting_smtp_host"), /smtp/, false);