Vergleich admin/modules/config/smilies.php - 1.8.0 - 1.8.2

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

$sid = $db->insert_query("smilies", $new_smilie);



$sid = $db->insert_query("smilies", $new_smilie);


			$cache->update_smilies();

$plugins->run_hooks("admin_config_smilies_add_commit");

			$plugins->run_hooks("admin_config_smilies_add_commit");

$cache->update_smilies();


// Log admin action
log_admin_action($sid, $mybb->input['name']);


// Log admin action
log_admin_action($sid, $mybb->input['name']);





			flash_message($lang->success_smilie_added, 'success');
admin_redirect("index.php?module=config-smilies");
}

			flash_message($lang->success_smilie_added, 'success');
admin_redirect("index.php?module=config-smilies");
}

Zeile 115Zeile 115
	if($errors)
{
$page->output_inline_error($errors);

	if($errors)
{
$page->output_inline_error($errors);

	}

	}

	else
{
$mybb->input['image'] = 'images/smilies/';

	else
{
$mybb->input['image'] = 'images/smilies/';

Zeile 129Zeile 129
	}

$form_container = new FormContainer($lang->add_smilie);

	}

$form_container = new FormContainer($lang->add_smilie);

	$form_container->output_row($lang->name." <em>*</em>", "", $form->generate_text_box('name', $mybb->input['name'], array('id' => 'name')), 'name');
$form_container->output_row($lang->text_replace." <em>*</em>", $lang->text_replace_desc, $form->generate_text_area('find', $mybb->input['find'], array('id' => 'find')), 'find');
$form_container->output_row($lang->image_path." <em>*</em>", $lang->image_path_desc, $form->generate_text_box('image', $mybb->input['image'], array('id' => 'image')), 'image');
$form_container->output_row($lang->display_order." <em>*</em>", $lang->display_order_desc, $form->generate_text_box('disporder', $mybb->input['disporder'], array('id' => 'disporder')), 'disporder');
$form_container->output_row($lang->show_clickable." <em>*</em>", $lang->show_clickable_desc, $form->generate_yes_no_radio('showclickable', $mybb->input['showclickable']));
$form_container->end();

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

$form->output_submit_wrapper($buttons);

	$form_container->output_row($lang->name." <em>*</em>", "", $form->generate_text_box('name', $mybb->input['name'], array('id' => 'name')), 'name');
$form_container->output_row($lang->text_replace." <em>*</em>", $lang->text_replace_desc, $form->generate_text_area('find', $mybb->input['find'], array('id' => 'find')), 'find');
$form_container->output_row($lang->image_path." <em>*</em>", $lang->image_path_desc, $form->generate_text_box('image', $mybb->input['image'], array('id' => 'image')), 'image');
$form_container->output_row($lang->display_order." <em>*</em>", $lang->display_order_desc, $form->generate_numeric_field('disporder', $mybb->input['disporder'], array('id' => 'disporder')), 'disporder');
$form_container->output_row($lang->show_clickable." <em>*</em>", $lang->show_clickable_desc, $form->generate_yes_no_radio('showclickable', $mybb->input['showclickable']));
$form_container->end();

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

$form->output_submit_wrapper($buttons);

	$form->end();

$page->output_footer();

	$form->end();

$page->output_footer();

Zeile 168Zeile 168
		if(!trim($mybb->input['find']))
{
$errors[] = $lang->error_missing_text_replacement;

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

		}


		}


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

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

Zeile 196Zeile 196
			$mybb->input['find'] = str_replace("\r\n", "\n", $mybb->input['find']);
$mybb->input['find'] = str_replace("\r", "\n", $mybb->input['find']);
$mybb->input['find'] = explode("\n", $mybb->input['find']);

			$mybb->input['find'] = str_replace("\r\n", "\n", $mybb->input['find']);
$mybb->input['find'] = str_replace("\r", "\n", $mybb->input['find']);
$mybb->input['find'] = explode("\n", $mybb->input['find']);

			foreach(array_merge(array_keys($mybb->input['find'], ""), array_keys($mybb->input['find'], " ")) as $key)
{
unset($mybb->input['find'][$key]);
}
$mybb->input['find'] = implode("\n", $mybb->input['find']);

			foreach(array_merge(array_keys($mybb->input['find'], ""), array_keys($mybb->input['find'], " ")) as $key)
{
unset($mybb->input['find'][$key]);
}
$mybb->input['find'] = implode("\n", $mybb->input['find']);


$updated_smilie = array(
"name" => $db->escape_string($mybb->input['name']),


$updated_smilie = array(
"name" => $db->escape_string($mybb->input['name']),

Zeile 209Zeile 209
				"disporder" => (int)$mybb->input['disporder'],
"showclickable" => $db->escape_string($mybb->input['showclickable'])
);

				"disporder" => (int)$mybb->input['disporder'],
"showclickable" => $db->escape_string($mybb->input['showclickable'])
);


$db->update_query("smilies", $updated_smilie, "sid = '".$mybb->get_input('sid', 1)."'");

$cache->update_smilies();

 

$plugins->run_hooks("admin_config_smilies_edit_commit");



$plugins->run_hooks("admin_config_smilies_edit_commit");


			// Log admin action





			$db->update_query("smilies", $updated_smilie, "sid = '".$mybb->get_input('sid', 1)."'");

$cache->update_smilies();

// Log admin action

			log_admin_action($smilie['sid'], $mybb->input['name']);

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

			log_admin_action($smilie['sid'], $mybb->input['name']);

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

Zeile 231Zeile 231
		'title' => $lang->edit_smilie,
'link' => "index.php?module=config-smilies&amp;action=edit",
'description' => $lang->edit_smilie_desc

		'title' => $lang->edit_smilie,
'link' => "index.php?module=config-smilies&amp;action=edit",
'description' => $lang->edit_smilie_desc

	);

	);

	$sub_tabs['mass_edit'] = array(
'title' => $lang->mass_edit,
'link' => "index.php?module=config-smilies&amp;action=mass_edit",

	$sub_tabs['mass_edit'] = array(
'title' => $lang->mass_edit,
'link' => "index.php?module=config-smilies&amp;action=mass_edit",

Zeile 239Zeile 239

$page->output_nav_tabs($sub_tabs, 'edit_smilie');
$form = new Form("index.php?module=config-smilies&amp;action=edit", "post", "edit");


$page->output_nav_tabs($sub_tabs, 'edit_smilie');
$form = new Form("index.php?module=config-smilies&amp;action=edit", "post", "edit");





	echo $form->generate_hidden_field("sid", $smilie['sid']);

if($errors)

	echo $form->generate_hidden_field("sid", $smilie['sid']);

if($errors)

Zeile 255Zeile 255
	$form_container->output_row($lang->name." <em>*</em>", "", $form->generate_text_box('name', $mybb->input['name'], array('id' => 'name')), 'name');
$form_container->output_row($lang->text_replace." <em>*</em>", $lang->text_replace_desc, $form->generate_text_area('find', $mybb->input['find'], array('id' => 'find')), 'find');
$form_container->output_row($lang->image_path." <em>*</em>", $lang->image_path_desc, $form->generate_text_box('image', $mybb->input['image'], array('id' => 'image')), 'image');

	$form_container->output_row($lang->name." <em>*</em>", "", $form->generate_text_box('name', $mybb->input['name'], array('id' => 'name')), 'name');
$form_container->output_row($lang->text_replace." <em>*</em>", $lang->text_replace_desc, $form->generate_text_area('find', $mybb->input['find'], array('id' => 'find')), 'find');
$form_container->output_row($lang->image_path." <em>*</em>", $lang->image_path_desc, $form->generate_text_box('image', $mybb->input['image'], array('id' => 'image')), 'image');

	$form_container->output_row($lang->display_order." <em>*</em>", $lang->display_order_desc, $form->generate_text_box('disporder', $mybb->input['disporder'], array('id' => 'disporder')), 'disporder');

	$form_container->output_row($lang->display_order." <em>*</em>", $lang->display_order_desc, $form->generate_numeric_field('disporder', $mybb->input['disporder'], array('id' => 'disporder')), 'disporder');

	$form_container->output_row($lang->show_clickable." <em>*</em>", $lang->show_clickable_desc, $form->generate_yes_no_radio('showclickable', $mybb->input['showclickable']));
$form_container->end();

$buttons[] = $form->generate_submit_button($lang->save_smilie);
$buttons[] = $form->generate_reset_button($lang->reset);


	$form_container->output_row($lang->show_clickable." <em>*</em>", $lang->show_clickable_desc, $form->generate_yes_no_radio('showclickable', $mybb->input['showclickable']));
$form_container->end();

$buttons[] = $form->generate_submit_button($lang->save_smilie);
$buttons[] = $form->generate_reset_button($lang->reset);


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


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


	$page->output_footer();
}

if($mybb->input['action'] == "delete")

	$page->output_footer();
}

if($mybb->input['action'] == "delete")

{

{

	$query = $db->simple_select("smilies", "*", "sid='".$mybb->get_input('sid', 1)."'");
$smilie = $db->fetch_array($query);


	$query = $db->simple_select("smilies", "*", "sid='".$mybb->get_input('sid', 1)."'");
$smilie = $db->fetch_array($query);


Zeile 282Zeile 282

// User clicked no
if($mybb->input['no'])


// User clicked no
if($mybb->input['no'])

	{
admin_redirect("index.php?module=config-smilies");
}

	{
admin_redirect("index.php?module=config-smilies");
}


$plugins->run_hooks("admin_config_smilies_delete");



$plugins->run_hooks("admin_config_smilies_delete");


Zeile 292Zeile 292
	{
// Delete the smilie
$db->delete_query("smilies", "sid='{$smilie['sid']}'");

	{
// Delete the smilie
$db->delete_query("smilies", "sid='{$smilie['sid']}'");

 

$plugins->run_hooks("admin_config_smilies_delete_commit");


$cache->update_smilies();


$cache->update_smilies();


$plugins->run_hooks("admin_config_smilies_delete_commit");

 

// Log admin action


// Log admin action

		log_admin_action($smilie['sid'], $smilie['name']);

		log_admin_action($smilie['sid'], $smilie['name']);


flash_message($lang->success_smilie_updated, 'success');
admin_redirect("index.php?module=config-smilies");


flash_message($lang->success_smilie_updated, 'success');
admin_redirect("index.php?module=config-smilies");

Zeile 321Zeile 321
			if(!trim($mybb->input['pathfolder']))
{
$errors[] = $lang->error_missing_path_multiple;

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

			}

$path = $mybb->input['pathfolder'];
$dir = @opendir(MYBB_ROOT.$path);


			}

$path = $mybb->input['pathfolder'];
$dir = @opendir(MYBB_ROOT.$path);


			if(!$dir)
{
$errors[] = $lang->error_invalid_path;

			if(!$dir)
{
$errors[] = $lang->error_invalid_path;

Zeile 475Zeile 475
					$db->insert_query("smilies", $new_smilie);
}
}

					$db->insert_query("smilies", $new_smilie);
}
}


$cache->update_smilies();

 

$plugins->run_hooks("admin_config_smilies_add_multiple_commit");


$plugins->run_hooks("admin_config_smilies_add_multiple_commit");

 

$cache->update_smilies();


// Log admin action
log_admin_action();


// Log admin action
log_admin_action();

Zeile 569Zeile 569

$disporder_list[$disporder] = $disporder;
}


$disporder_list[$disporder] = $disporder;
}


$cache->update_smilies();

 

$plugins->run_hooks("admin_config_smilies_mass_edit_commit");


$plugins->run_hooks("admin_config_smilies_mass_edit_commit");

 

$cache->update_smilies();


// Log admin action
log_admin_action();


// Log admin action
log_admin_action();

Zeile 648Zeile 648
		$form_container->output_cell("<img src=\"{$image}\" alt=\"\" />", array("class" => "align_center", "width" => 1));
$form_container->output_cell($form->generate_text_box("name[{$smilie['sid']}]", $smilie['name'], array('id' => 'name', 'style' => 'width: 98%')));
$form_container->output_cell($form->generate_text_area("find[{$smilie['sid']}]", $smilie['find'], array('id' => 'find', 'style' => 'width: 95%')));

		$form_container->output_cell("<img src=\"{$image}\" alt=\"\" />", array("class" => "align_center", "width" => 1));
$form_container->output_cell($form->generate_text_box("name[{$smilie['sid']}]", $smilie['name'], array('id' => 'name', 'style' => 'width: 98%')));
$form_container->output_cell($form->generate_text_area("find[{$smilie['sid']}]", $smilie['find'], array('id' => 'find', 'style' => 'width: 95%')));

		$form_container->output_cell($form->generate_text_box("disporder[{$smilie['sid']}]", $smilie['disporder'], array('id' => 'disporder', 'style' => 'width: 80%')));

		$form_container->output_cell($form->generate_numeric_field("disporder[{$smilie['sid']}]", $smilie['disporder'], array('id' => 'disporder', 'style' => 'width: 80%')));

		$form_container->output_cell($form->generate_yes_no_radio("showclickable[{$smilie['sid']}]", $smilie['showclickable']), array("class" => "align_center"));
$form_container->output_cell($form->generate_check_box("delete[{$smilie['sid']}]", 1, $mybb->input['delete']), array("class" => "align_center"));
$form_container->construct_row();

		$form_container->output_cell($form->generate_yes_no_radio("showclickable[{$smilie['sid']}]", $smilie['showclickable']), array("class" => "align_center"));
$form_container->output_cell($form->generate_check_box("delete[{$smilie['sid']}]", 1, $mybb->input['delete']), array("class" => "align_center"));
$form_container->construct_row();