Vergleich admin/modules/config/mycode.php - 1.8.0 - 1.8.3

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 50Zeile 50
	$mycode_update = array(
'active' => $new_status,
);

	$mycode_update = array(
'active' => $new_status,
);

 

$plugins->run_hooks("admin_config_mycode_toggle_status_commit");


$db->update_query("mycode", $mycode_update, "cid='".$mybb->get_input('cid', 1)."'");

$cache->update_mycode();


$db->update_query("mycode", $mycode_update, "cid='".$mybb->get_input('cid', 1)."'");

$cache->update_mycode();


$plugins->run_hooks("admin_config_mycode_toggle_status_commit");

 

// Log admin action
log_admin_action($mycode['cid'], $mycode['title'], $new_status);


// Log admin action
log_admin_action($mycode['cid'], $mycode['title'], $new_status);





	flash_message($phrase, 'success');
admin_redirect('index.php?module=config-mycode');
}

	flash_message($phrase, 'success');
admin_redirect('index.php?module=config-mycode');
}

Zeile 86Zeile 86
if($mybb->input['action'] == "add")
{
$plugins->run_hooks("admin_config_mycode_add");

if($mybb->input['action'] == "add")
{
$plugins->run_hooks("admin_config_mycode_add");


if($mybb->request_method == "post")
{


if($mybb->request_method == "post")
{

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

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

		}


		}


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

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

		}

		}


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


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

		}

		}


if($mybb->input['test'])
{


if($mybb->input['test'])
{

Zeile 122Zeile 122
			);

$cid = $db->insert_query("mycode", $new_mycode);

			);

$cid = $db->insert_query("mycode", $new_mycode);


$cache->update_mycode();

 

$plugins->run_hooks("admin_config_mycode_add_commit");


$plugins->run_hooks("admin_config_mycode_add_commit");

 

$cache->update_mycode();


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


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

Zeile 173Zeile 173
	$form_container->output_row($lang->regular_expression." <em>*</em>", $lang->regular_expression_desc.'<br /><strong>'.$lang->example.'</strong> \[b\](.*?)\[/b\]', $form->generate_text_area('regex', $mybb->input['regex'], array('id' => 'regex')), 'regex');
$form_container->output_row($lang->replacement." <em>*</em>", $lang->replacement_desc.'<br /><strong>'.$lang->example.'</strong> &lt;strong&gt;$1&lt;/strong&gt;', $form->generate_text_area('replacement', $mybb->input['replacement'], array('id' => 'replacement')), 'replacement');
$form_container->output_row($lang->enabled." <em>*</em>", '', $form->generate_yes_no_radio('active', $mybb->input['active']));

	$form_container->output_row($lang->regular_expression." <em>*</em>", $lang->regular_expression_desc.'<br /><strong>'.$lang->example.'</strong> \[b\](.*?)\[/b\]', $form->generate_text_area('regex', $mybb->input['regex'], array('id' => 'regex')), 'regex');
$form_container->output_row($lang->replacement." <em>*</em>", $lang->replacement_desc.'<br /><strong>'.$lang->example.'</strong> &lt;strong&gt;$1&lt;/strong&gt;', $form->generate_text_area('replacement', $mybb->input['replacement'], array('id' => 'replacement')), 'replacement');
$form_container->output_row($lang->enabled." <em>*</em>", '', $form->generate_yes_no_radio('active', $mybb->input['active']));

	$form_container->output_row($lang->parse_order, $lang->parse_order_desc, $form->generate_text_box('parseorder', $mybb->input['parseorder'], array('id' => 'parseorder')), 'parseorder');

	$form_container->output_row($lang->parse_order, $lang->parse_order_desc, $form->generate_numeric_field('parseorder', $mybb->input['parseorder'], array('id' => 'parseorder')), 'parseorder');

	$form_container->end();

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

	$form_container->end();

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

Zeile 247Zeile 247
				'active' => $db->escape_string($mybb->input['active']),
'parseorder' => (int)$mybb->input['parseorder']
);

				'active' => $db->escape_string($mybb->input['active']),
'parseorder' => (int)$mybb->input['parseorder']
);

 

$plugins->run_hooks("admin_config_mycode_edit_commit");


$db->update_query("mycode", $updated_mycode, "cid='".$mybb->get_input('cid', 1)."'");

$cache->update_mycode();


$db->update_query("mycode", $updated_mycode, "cid='".$mybb->get_input('cid', 1)."'");

$cache->update_mycode();


$plugins->run_hooks("admin_config_mycode_edit_commit");

 

// Log admin action
log_admin_action($mycode['cid'], $mybb->input['title']);


// Log admin action
log_admin_action($mycode['cid'], $mybb->input['title']);

Zeile 296Zeile 296
	$form_container->output_row($lang->regular_expression." <em>*</em>", $lang->regular_expression_desc.'<br /><strong>'.$lang->example.'</strong> \[b\](.*?)\[/b\]', $form->generate_text_area('regex', $mybb->input['regex'], array('id' => 'regex')), 'regex');
$form_container->output_row($lang->replacement." <em>*</em>", $lang->replacement_desc.'<br /><strong>'.$lang->example.'</strong> &lt;strong&gt;$1&lt;/strong&gt;', $form->generate_text_area('replacement', $mybb->input['replacement'], array('id' => 'replacement')), 'replacement');
$form_container->output_row($lang->enabled." <em>*</em>", '', $form->generate_yes_no_radio('active', $mybb->input['active']));

	$form_container->output_row($lang->regular_expression." <em>*</em>", $lang->regular_expression_desc.'<br /><strong>'.$lang->example.'</strong> \[b\](.*?)\[/b\]', $form->generate_text_area('regex', $mybb->input['regex'], array('id' => 'regex')), 'regex');
$form_container->output_row($lang->replacement." <em>*</em>", $lang->replacement_desc.'<br /><strong>'.$lang->example.'</strong> &lt;strong&gt;$1&lt;/strong&gt;', $form->generate_text_area('replacement', $mybb->input['replacement'], array('id' => 'replacement')), 'replacement');
$form_container->output_row($lang->enabled." <em>*</em>", '', $form->generate_yes_no_radio('active', $mybb->input['active']));

	$form_container->output_row($lang->parse_order, $lang->parse_order_desc, $form->generate_text_box('parseorder', $mybb->input['parseorder'], array('id' => 'parseorder')), 'parseorder');

	$form_container->output_row($lang->parse_order, $lang->parse_order_desc, $form->generate_numeric_field('parseorder', $mybb->input['parseorder'], array('id' => 'parseorder')), 'parseorder');

	$form_container->end();

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

	$form_container->end();

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

Zeile 348Zeile 348
	if($mybb->request_method == "post")
{
$db->delete_query("mycode", "cid='{$mycode['cid']}'");

	if($mybb->request_method == "post")
{
$db->delete_query("mycode", "cid='{$mycode['cid']}'");


$cache->update_mycode();

 

$plugins->run_hooks("admin_config_mycode_delete_commit");


$plugins->run_hooks("admin_config_mycode_delete_commit");

 

$cache->update_mycode();


// Log admin action
log_admin_action($mycode['cid'], $mycode['title']);


// Log admin action
log_admin_action($mycode['cid'], $mycode['title']);