Vergleich admin/modules/config/mod_tools.php - 1.6.2 - 1.6.17

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: mod_tools.php 5016 2010-06-12 00:24:02Z RyanGordon $

 * $Id$

 */

 */



 

// Disallow direct access to this file for security reasons
if(!defined("IN_MYBB"))


// Disallow direct access to this file for security reasons
if(!defined("IN_MYBB"))

Zeile 18Zeile 17

$page->add_breadcrumb_item($lang->mod_tools, "index.php?module=config-mod_tools");



$page->add_breadcrumb_item($lang->mod_tools, "index.php?module=config-mod_tools");


$plugins->run_hooks("admin_config_mod_tools_begin");


$plugins->run_hooks("admin_config_mod_tools_begin");


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

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

Zeile 31Zeile 30
	if(!$tool['tid'])
{
flash_message($lang->error_invalid_post_tool, 'error');

	if(!$tool['tid'])
{
flash_message($lang->error_invalid_post_tool, 'error');

		admin_redirect("index.php?module=config-mod_tools&action=post_tools");
}

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

		admin_redirect("index.php?module=config-mod_tools&action=post_tools");
}

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

		admin_redirect("index.php?module=config-mod_tools&action=post_tools");
}


		admin_redirect("index.php?module=config-mod_tools&action=post_tools");
}


Zeile 49Zeile 48

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


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

 
		$cache->update_forumsdisplay();


flash_message($lang->success_post_tool_deleted, 'success');
admin_redirect("index.php?module=config-mod_tools&action=post_tools");


flash_message($lang->success_post_tool_deleted, 'success');
admin_redirect("index.php?module=config-mod_tools&action=post_tools");

Zeile 62Zeile 62
if($mybb->input['action'] == "delete_thread_tool")
{
$plugins->run_hooks("admin_config_mod_tools_delete_thread_tool");

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

	

	

	$query = $db->simple_select("modtools", "*", "tid='{$mybb->input['tid']}'");
$tool = $db->fetch_array($query);


	$query = $db->simple_select("modtools", "*", "tid='{$mybb->input['tid']}'");
$tool = $db->fetch_array($query);


Zeile 88Zeile 88

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


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

 
		$cache->update_forumsdisplay();


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


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

Zeile 195Zeile 196
		if($mybb->input['approvethread'] != '' && $mybb->input['approvethread'] != 'approve' && $mybb->input['approvethread'] != 'unapprove' && $mybb->input['approvethread'] != 'toggle')
{
$mybb->input['approvethread'] = '';

		if($mybb->input['approvethread'] != '' && $mybb->input['approvethread'] != 'approve' && $mybb->input['approvethread'] != 'unapprove' && $mybb->input['approvethread'] != 'toggle')
{
$mybb->input['approvethread'] = '';

		}

		}

		
if($mybb->input['openthread'] != '' && $mybb->input['openthread'] != 'open' && $mybb->input['openthread'] != 'close' && $mybb->input['openthread'] != 'toggle')
{

		
if($mybb->input['openthread'] != '' && $mybb->input['openthread'] != 'open' && $mybb->input['openthread'] != 'close' && $mybb->input['openthread'] != 'toggle')
{

Zeile 208Zeile 209
			$move_checked[2] = "checked=\"checked\"";

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

			$move_checked[2] = "checked=\"checked\"";

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

			{

			{

				$errors[] = $lang->error_no_move_forum_selected;
}
else

				$errors[] = $lang->error_no_move_forum_selected;
}
else

			{

			{

				// Check that the destination forum is not a category
$query = $db->simple_select("forums", "type", "fid = '".intval($mybb->input['move_1_forum'])."'");
if($db->fetch_field($query, "type") == "c")

				// Check that the destination forum is not a category
$query = $db->simple_select("forums", "type", "fid = '".intval($mybb->input['move_1_forum'])."'");
if($db->fetch_field($query, "type") == "c")

Zeile 222Zeile 223
			}

if($mybb->input['move_2_redirect'] != 1 && $mybb->input['move_2_redirect'] != 0)

			}

if($mybb->input['move_2_redirect'] != 1 && $mybb->input['move_2_redirect'] != 0)

			{
$mybb->input['move_2_redirect'] = 0;
}


			{
$mybb->input['move_2_redirect'] = 0;
}


			if(!isset($mybb->input['move_3_redirecttime']))
{
$mybb->input['move_3_redirecttime'] = '';

			if(!isset($mybb->input['move_3_redirecttime']))
{
$mybb->input['move_3_redirecttime'] = '';

Zeile 242Zeile 243
		}

if($mybb->input['copy_type'] == 2)

		}

if($mybb->input['copy_type'] == 2)

		{

		{

			$copy_checked[1] = '';
$copy_checked[2] = "checked=\"checked\"";

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

			$copy_checked[1] = '';
$copy_checked[2] = "checked=\"checked\"";

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

			{

			{

				$errors[] = $lang->error_no_copy_forum_selected;
}
else

				$errors[] = $lang->error_no_copy_forum_selected;
}
else

Zeile 256Zeile 257
				if($db->fetch_field($query, "type") == "c")
{
$errors[] = $lang->error_forum_is_category;

				if($db->fetch_field($query, "type") == "c")
{
$errors[] = $lang->error_forum_is_category;

				}
}
}
else
{
$copy_checked[1] = "checked=\"checked\"";
$copy_checked[2] = '';

				}
}
}
else
{
$copy_checked[1] = "checked=\"checked\"";
$copy_checked[2] = '';


$mybb->input['copy_1_forum'] = '';
}


$mybb->input['copy_1_forum'] = '';
}

Zeile 307Zeile 308

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


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

 
			$cache->update_forumsdisplay();


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


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

Zeile 323Zeile 325
	);

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

	);

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





	$form = new Form("index.php?module=config-mod_tools&action=edit_thread_tool", 'post');
echo $form->generate_hidden_field("tid", $mybb->input['tid']);


	$form = new Form("index.php?module=config-mod_tools&action=edit_thread_tool", 'post');
echo $form->generate_hidden_field("tid", $mybb->input['tid']);


Zeile 362Zeile 364
		{
$move_checked[1] = "checked=\"checked\"";
$move_checked[2] = '';

		{
$move_checked[1] = "checked=\"checked\"";
$move_checked[2] = '';

		}
else
{

		}
else
{

			$move_checked[1] = '';
$move_checked[2] = "checked=\"checked\"";

			$move_checked[1] = '';
$move_checked[2] = "checked=\"checked\"";

		}

		}

		
if(!$thread_options['copythread'])
{

		
if(!$thread_options['copythread'])
{

Zeile 385Zeile 387
		$mybb->input['mergethreads'] = $thread_options['mergethreads'];
$mybb->input['deletepoll'] = $thread_options['deletepoll'];
$mybb->input['removeredirects'] = $thread_options['removeredirects'];

		$mybb->input['mergethreads'] = $thread_options['mergethreads'];
$mybb->input['deletepoll'] = $thread_options['deletepoll'];
$mybb->input['removeredirects'] = $thread_options['removeredirects'];

		$mybb->input['threadprefix'] = $thread_options['threadprefix'];
$mybb->input['newsubject'] = $thread_options['newsubject'];
$mybb->input['newreply'] = $thread_options['addreply'];
$mybb->input['newreplysubject'] = $thread_options['replysubject'];
}

$form_container = new FormContainer($lang->general_options);
$form_container->output_row($lang->name." <em>*</em>", '', $form->generate_text_box('title', $mybb->input['title'], array('id' => 'title')), 'title');
$form_container->output_row($lang->short_description." <em>*</em>", '', $form->generate_text_box('description', $mybb->input['description'], array('id' => 'description')), 'description');


$actions = "<script type=\"text/javascript\">
function checkAction(id)
{
var checked = '';

$$('.'+id+'s_check').each(function(e)
{
if(e.checked == true)
{
checked = e.value;
}
});
$$('.'+id+'s').each(function(e)
{
Element.hide(e);
});
if($(id+'_'+checked))
{
Element.show(id+'_'+checked);
}
}
</script>
<dl style=\"margin-top: 0; margin-bottom: 0; width: 100%;\">
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"forum_type\" value=\"1\" {$forum_checked[1]} class=\"forums_check\" onclick=\"checkAction('forum');\" style=\"vertical-align: middle;\" /> <strong>{$lang->all_forums}</strong></label></dt>
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"forum_type\" value=\"2\" {$forum_checked[2]} class=\"forums_check\" onclick=\"checkAction('forum');\" style=\"vertical-align: middle;\" /> <strong>{$lang->select_forums}</strong></label></dt>
<dd style=\"margin-top: 4px;\" id=\"forum_2\" class=\"forums\">
<table cellpadding=\"4\">
<tr>
<td valign=\"top\"><small>{$lang->forums_colon}</small></td>
<td>".$form->generate_forum_select('forum_1_forums[]', $mybb->input['forum_1_forums'], array('multiple' => true, 'size' => 5))."</td>
</tr>
</table>
</dd>
</dl>
<script type=\"text/javascript\">
checkAction('forum');
</script>";
$form_container->output_row($lang->available_in_forums." <em>*</em>", '', $actions);
$form_container->end();

$approve_unapprove = array(
'' => $lang->no_change,
'approve' => $lang->approve,
'unapprove' => $lang->unapprove,
'toggle' => $lang->toggle
);

		$mybb->input['threadprefix'] = $thread_options['threadprefix'];
$mybb->input['newsubject'] = $thread_options['newsubject'];
$mybb->input['newreply'] = $thread_options['addreply'];
$mybb->input['newreplysubject'] = $thread_options['replysubject'];
}

$form_container = new FormContainer($lang->general_options);
$form_container->output_row($lang->name." <em>*</em>", '', $form->generate_text_box('title', $mybb->input['title'], array('id' => 'title')), 'title');
$form_container->output_row($lang->short_description." <em>*</em>", '', $form->generate_text_box('description', $mybb->input['description'], array('id' => 'description')), 'description');


$actions = "<script type=\"text/javascript\">
function checkAction(id)
{
var checked = '';

$$('.'+id+'s_check').each(function(e)
{
if(e.checked == true)
{
checked = e.value;
}
});
$$('.'+id+'s').each(function(e)
{
Element.hide(e);
});
if($(id+'_'+checked))
{
Element.show(id+'_'+checked);
}
}
</script>
<dl style=\"margin-top: 0; margin-bottom: 0; width: 100%;\">
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"forum_type\" value=\"1\" {$forum_checked[1]} class=\"forums_check\" onclick=\"checkAction('forum');\" style=\"vertical-align: middle;\" /> <strong>{$lang->all_forums}</strong></label></dt>
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"forum_type\" value=\"2\" {$forum_checked[2]} class=\"forums_check\" onclick=\"checkAction('forum');\" style=\"vertical-align: middle;\" /> <strong>{$lang->select_forums}</strong></label></dt>
<dd style=\"margin-top: 4px;\" id=\"forum_2\" class=\"forums\">
<table cellpadding=\"4\">
<tr>
<td valign=\"top\"><small>{$lang->forums_colon}</small></td>
<td>".$form->generate_forum_select('forum_1_forums[]', $mybb->input['forum_1_forums'], array('multiple' => true, 'size' => 5))."</td>
</tr>
</table>
</dd>
</dl>
<script type=\"text/javascript\">
checkAction('forum');
</script>";
$form_container->output_row($lang->available_in_forums." <em>*</em>", '', $actions);
$form_container->end();

$approve_unapprove = array(
'' => $lang->no_change,
'approve' => $lang->approve,
'unapprove' => $lang->unapprove,
'toggle' => $lang->toggle
);

	
$open_close = array(
'' => $lang->no_change,

	
$open_close = array(
'' => $lang->no_change,

Zeile 468Zeile 470
				<tr>
<td><small>{$lang->leave_redirect}</small></td>
<td>".$form->generate_yes_no_radio('move_2_redirect', $mybb->input['move_2_redirect'], array('style' => 'width: 2em;'))."</td>

				<tr>
<td><small>{$lang->leave_redirect}</small></td>
<td>".$form->generate_yes_no_radio('move_2_redirect', $mybb->input['move_2_redirect'], array('style' => 'width: 2em;'))."</td>

				</tr>

				</tr>

				<tr>
<td><small>{$lang->delete_redirect_after}</small></td>
<td>".$form->generate_text_box('move_3_redirecttime', $mybb->input['move_3_redirecttime'], array('style' => 'width: 2em;'))." {$lang->days}</td>

				<tr>
<td><small>{$lang->delete_redirect_after}</small></td>
<td>".$form->generate_text_box('move_3_redirecttime', $mybb->input['move_3_redirecttime'], array('style' => 'width: 2em;'))." {$lang->days}</td>

Zeile 549Zeile 551
		if(trim($mybb->input['description']) == "")
{
$errors[] = $lang->error_missing_description;

		if(trim($mybb->input['description']) == "")
{
$errors[] = $lang->error_missing_description;

		}

		}

		
if($mybb->input['forum_type'] == 2)
{

		
if($mybb->input['forum_type'] == 2)
{

Zeile 560Zeile 562
			{
$errors[] = $lang->error_no_forums_selected;
}

			{
$errors[] = $lang->error_no_forums_selected;
}

		}

		}

		else
{
$forum_checked[1] = "checked=\"checked\"";

		else
{
$forum_checked[1] = "checked=\"checked\"";

Zeile 576Zeile 578
		}

if($mybb->input['openthread'] != '' && $mybb->input['openthread'] != 'open' && $mybb->input['openthread'] != 'close' && $mybb->input['openthread'] != 'toggle')

		}

if($mybb->input['openthread'] != '' && $mybb->input['openthread'] != 'open' && $mybb->input['openthread'] != 'close' && $mybb->input['openthread'] != 'toggle')

		{

		{

			$mybb->input['openthread'] = '';

			$mybb->input['openthread'] = '';

		}

		}

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

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

		{

		{

			$mybb->input['threadprefix'] = '';
}


			$mybb->input['threadprefix'] = '';
}


Zeile 598Zeile 600
			{
// Check that the destination forum is not a category
$query = $db->simple_select("forums", "type", "fid = '".intval($mybb->input['move_1_forum'])."'");

			{
// Check that the destination forum is not a category
$query = $db->simple_select("forums", "type", "fid = '".intval($mybb->input['move_1_forum'])."'");

				if($db->fetch_field($query, "type") == "c")
{
$errors[] = $lang->error_forum_is_category;
}
}
}

				if($db->fetch_field($query, "type") == "c")
{
$errors[] = $lang->error_forum_is_category;
}
}
}

		else
{
$move_checked[1] = "checked=\"checked\"";

		else
{
$move_checked[1] = "checked=\"checked\"";

Zeile 657Zeile 659
				'addreply' => $mybb->input['newreply'],
'replysubject' => $mybb->input['newreplysubject'],
'threadprefix' => $mybb->input['threadprefix'],

				'addreply' => $mybb->input['newreply'],
'replysubject' => $mybb->input['newreplysubject'],
'threadprefix' => $mybb->input['threadprefix'],

			);

			);

			
$new_tool['type'] = 't';
$new_tool['threadoptions'] = $db->escape_string(serialize($thread_options));

			
$new_tool['type'] = 't';
$new_tool['threadoptions'] = $db->escape_string(serialize($thread_options));

Zeile 693Zeile 695

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


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

 
			$cache->update_forumsdisplay();

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

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

Zeile 786Zeile 789
	<dt><label style=\"display: block;\"><input type=\"radio\" name=\"forum_type\" value=\"1\" {$forum_checked[1]} class=\"forums_check\" onclick=\"checkAction('forum');\" style=\"vertical-align: middle;\" /> <strong>{$lang->all_forums}</strong></label></dt>
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"forum_type\" value=\"2\" {$forum_checked[2]} class=\"forums_check\" onclick=\"checkAction('forum');\" style=\"vertical-align: middle;\" /> <strong>{$lang->select_forums}</strong></label></dt>
<dd style=\"margin-top: 4px;\" id=\"forum_2\" class=\"forums\">

	<dt><label style=\"display: block;\"><input type=\"radio\" name=\"forum_type\" value=\"1\" {$forum_checked[1]} class=\"forums_check\" onclick=\"checkAction('forum');\" style=\"vertical-align: middle;\" /> <strong>{$lang->all_forums}</strong></label></dt>
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"forum_type\" value=\"2\" {$forum_checked[2]} class=\"forums_check\" onclick=\"checkAction('forum');\" style=\"vertical-align: middle;\" /> <strong>{$lang->select_forums}</strong></label></dt>
<dd style=\"margin-top: 4px;\" id=\"forum_2\" class=\"forums\">

			<table cellpadding=\"4\">

			<table cellpadding=\"4\">

				<tr>
<td valign=\"top\"><small>{$lang->forums_colon}</small></td>
<td>".$form->generate_forum_select('forum_1_forums[]', $mybb->input['forum_1_forums'], array('multiple' => true, 'size' => 5))."</td>

				<tr>
<td valign=\"top\"><small>{$lang->forums_colon}</small></td>
<td>".$form->generate_forum_select('forum_1_forums[]', $mybb->input['forum_1_forums'], array('multiple' => true, 'size' => 5))."</td>

Zeile 836Zeile 839
				<tr>
<td><small>{$lang->delete_redirect_after}</small></td>
<td>".$form->generate_text_box('move_3_redirecttime', $mybb->input['move_3_redirecttime'], array('style' => 'width: 2em;'))." {$lang->days}</td>

				<tr>
<td><small>{$lang->delete_redirect_after}</small></td>
<td>".$form->generate_text_box('move_3_redirecttime', $mybb->input['move_3_redirecttime'], array('style' => 'width: 2em;'))." {$lang->days}</td>

				</tr>
</table>
</dd>

				</tr>
</table>
</dd>

	</dl>
<script type=\"text/javascript\">
checkAction('move');

	</dl>
<script type=\"text/javascript\">
checkAction('move');

	</script>";

	</script>";

	$form_container->output_row($lang->move_thread." <em>*</em>", $lang->move_thread_desc, $actions);

$actions = "

	$form_container->output_row($lang->move_thread." <em>*</em>", $lang->move_thread_desc, $actions);

$actions = "

Zeile 865Zeile 868
	$form_container->output_row($lang->delete_thread." <em>*</em>", '', $form->generate_yes_no_radio('deletethread', $mybb->input['deletethread'], array('style' => 'width: 2em;')));
$form_container->output_row($lang->merge_thread." <em>*</em>", $lang->merge_thread_desc, $form->generate_yes_no_radio('mergethreads', $mybb->input['mergethreads'], array('style' => 'width: 2em;')));
$form_container->output_row($lang->delete_poll." <em>*</em>", '', $form->generate_yes_no_radio('deletepoll', $mybb->input['deletepoll'], array('style' => 'width: 2em;')));

	$form_container->output_row($lang->delete_thread." <em>*</em>", '', $form->generate_yes_no_radio('deletethread', $mybb->input['deletethread'], array('style' => 'width: 2em;')));
$form_container->output_row($lang->merge_thread." <em>*</em>", $lang->merge_thread_desc, $form->generate_yes_no_radio('mergethreads', $mybb->input['mergethreads'], array('style' => 'width: 2em;')));
$form_container->output_row($lang->delete_poll." <em>*</em>", '', $form->generate_yes_no_radio('deletepoll', $mybb->input['deletepoll'], array('style' => 'width: 2em;')));

	$form_container->output_row($lang->delete_redirects." <em>*</em>", '', $form->generate_yes_no_radio('removeredirects', $mybb->input['removeredirects'], array('style' => 'width: 2em;')));

$query = $db->simple_select('threadprefixes', 'pid, prefix');
if($db->num_rows($query) > 0)
{
$thread_prefixes = array(
'-1' => $lang->no_change,
'0' => $lang->no_prefix
);

	$form_container->output_row($lang->delete_redirects." <em>*</em>", '', $form->generate_yes_no_radio('removeredirects', $mybb->input['removeredirects'], array('style' => 'width: 2em;')));

$query = $db->simple_select('threadprefixes', 'pid, prefix');
if($db->num_rows($query) > 0)
{
$thread_prefixes = array(
'-1' => $lang->no_change,
'0' => $lang->no_prefix
);

	
while($prefix = $db->fetch_array($query))
{

	
while($prefix = $db->fetch_array($query))
{

Zeile 954Zeile 957
			{
// Check that the destination forum is not a category
$query = $db->simple_select("forums", "type", "fid = '".intval($mybb->input['move_1_forum'])."'");

			{
// Check that the destination forum is not a category
$query = $db->simple_select("forums", "type", "fid = '".intval($mybb->input['move_1_forum'])."'");

				if($db->fetch_field($query, "type") == "c")

				if($db->fetch_field($query, "type") == "c")

				{
$errors[] = $lang->error_forum_is_category;
}

				{
$errors[] = $lang->error_forum_is_category;
}

Zeile 995Zeile 998
		if($mybb->input['splitposts'] < -2)
{
$mybb->input['splitposts'] = -1;

		if($mybb->input['splitposts'] < -2)
{
$mybb->input['splitposts'] = -1;

		}

		}

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

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

Zeile 1036Zeile 1039
				'copythread' => intval($mybb->input['copy_1_forum']),
'newsubject' => $mybb->input['newsubject'],
'addreply' => $mybb->input['newreply'],

				'copythread' => intval($mybb->input['copy_1_forum']),
'newsubject' => $mybb->input['newsubject'],
'addreply' => $mybb->input['newreply'],

				'replysubject' => $mybb->input['newreplysubject']


				'replysubject' => $mybb->input['newreplysubject'],
'threadprefix' => intval($mybb->input['threadprefix'])

			);

if(stripos($mybb->input['splitpostsnewsubject'], '{subject}') === false)

			);

if(stripos($mybb->input['splitpostsnewsubject'], '{subject}') === false)

Zeile 1079Zeile 1083

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


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

 
			$cache->update_forumsdisplay();

			
flash_message($lang->success_mod_tool_updated, 'success');
admin_redirect("index.php?module=config-mod_tools&action=post_tools");

			
flash_message($lang->success_mod_tool_updated, 'success');
admin_redirect("index.php?module=config-mod_tools&action=post_tools");

Zeile 1155Zeile 1160
		
$mybb->input['copy_1_forum'] = $thread_options['copythread'];
$mybb->input['deletethread'] = $thread_options['deletethread'];

		
$mybb->input['copy_1_forum'] = $thread_options['copythread'];
$mybb->input['deletethread'] = $thread_options['deletethread'];

 
		$mybb->input['threadprefix'] = $thread_options['threadprefix'];

		$mybb->input['newsubject'] = $thread_options['newsubject'];
$mybb->input['newreply'] = $thread_options['addreply'];
$mybb->input['newreplysubject'] = $thread_options['replysubject'];

		$mybb->input['newsubject'] = $thread_options['newsubject'];
$mybb->input['newreply'] = $thread_options['addreply'];
$mybb->input['newreplysubject'] = $thread_options['replysubject'];

Zeile 1177Zeile 1183
		if($post_options['splitpostsclose'] == 'close')
{
$mybb->input['splitpostsclose'] = '1';

		if($post_options['splitpostsclose'] == 'close')
{
$mybb->input['splitpostsclose'] = '1';

		}
else

		}
else

		{	
$mybb->input['splitpostsclose'] = '0';

		{	
$mybb->input['splitpostsclose'] = '0';

		}

		}

		
if($post_options['splitpostsstick'] == 'stick')
{
$mybb->input['splitpostsstick'] = '1';

		
if($post_options['splitpostsstick'] == 'stick')
{
$mybb->input['splitpostsstick'] = '1';

		}

		}

		else
{
$mybb->input['splitpostsstick'] = '0';

		else
{
$mybb->input['splitpostsstick'] = '0';

		}


		}


		if($post_options['splitpostsunapprove'] == 'unapprove')
{
$mybb->input['splitpostsunapprove'] = '1';

		if($post_options['splitpostsunapprove'] == 'unapprove')
{
$mybb->input['splitpostsunapprove'] = '1';

Zeile 1254Zeile 1260
	$form_container->end();

$approve_unapprove = array(

	$form_container->end();

$approve_unapprove = array(

		'' => $lang->no_change,
'approve' => $lang->approve,
'unapprove' => $lang->unapprove,
'toggle' => $lang->toggle
);

$form_container = new FormContainer($lang->inline_post_moderation);
$form_container->output_row($lang->delete_posts." <em>*</em>", '', $form->generate_yes_no_radio('deleteposts', $mybb->input['deleteposts']));
$form_container->output_row($lang->merge_posts." <em>*</em>", $lang->merge_posts_desc, $form->generate_yes_no_radio('mergeposts', $mybb->input['mergeposts']));
$form_container->output_row($lang->approve_unapprove_posts." <em>*</em>", '', $form->generate_select_box('approveposts', $approve_unapprove, $mybb->input['approveposts'], array('id' => 'approveposts')), 'approveposts');
$form_container->end();

$selectoptions = "<option value=\"-1\"{$do_not_split_checked}>{$lang->do_not_split}</option>\n";
$selectoptions .= "<option value=\"-2\"{$split_same_checked} style=\"border-bottom: 1px solid #000;\">{$lang->split_to_same_forum}</option>\n";

$form_container = new FormContainer($lang->split_posts);
$form_container->output_row($lang->split_posts2." <em>*</em>", '', $form->generate_forum_select('splitposts', $mybb->input['splitposts']));
$form_container->output_row($lang->close_split_thread." <em>*</em>", '', $form->generate_yes_no_radio('splitpostsclose', $mybb->input['splitpostsclose']));
$form_container->output_row($lang->stick_split_thread." <em>*</em>", '', $form->generate_yes_no_radio('splitpostsstick', $mybb->input['splitpostsstick']));
$form_container->output_row($lang->unapprove_split_thread." <em>*</em>", '', $form->generate_yes_no_radio('splitpostsunapprove', $mybb->input['splitpostsunapprove']));
$form_container->output_row($lang->split_thread_subject, $lang->split_thread_subject_desc, $form->generate_text_box('splitpostsnewsubject', $mybb->input['splitpostsnewsubject'], array('id' => 'splitpostsnewsubject ')), 'newreplysubject');
$form_container->output_row($lang->add_new_split_reply, $lang->add_new_split_reply_desc, $form->generate_text_area('splitpostsaddreply', $mybb->input['splitpostsaddreply'], array('id' => 'splitpostsaddreply')), 'splitpostsaddreply');
$form_container->output_row($lang->split_reply_subject, $lang->split_reply_subject_desc, $form->generate_text_box('splitpostsreplysubject', $mybb->input['splitpostsreplysubject'], array('id' => 'splitpostsreplysubject')), 'splitpostsreplysubject');
$form_container->end();

$open_close = array(
'' => $lang->no_change,
'open' => $lang->open,
'close' => $lang->close,
'toggle' => $lang->toggle
);

$form_container = new FormContainer($lang->thread_moderation);
$form_container->output_row($lang->approve_unapprove." <em>*</em>", '', $form->generate_select_box('approvethread', $approve_unapprove, $mybb->input['approvethread'], array('id' => 'approvethread')), 'approvethread');
$form_container->output_row($lang->open_close_thread." <em>*</em>", '', $form->generate_select_box('openthread', $open_close, $mybb->input['openthread'], array('id' => 'openthread')), 'openthread');


$actions = "
<dl style=\"margin-top: 0; margin-bottom: 0; width: 100%;\">
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"move_type\" value=\"1\" {$move_checked[1]} class=\"moves_check\" onclick=\"checkAction('move');\" style=\"vertical-align: middle;\" /> <strong>{$lang->do_not_move_thread}</strong></label></dt>
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"move_type\" value=\"2\" {$move_checked[2]} class=\"moves_check\" onclick=\"checkAction('move');\" style=\"vertical-align: middle;\" /> <strong>{$lang->move_thread}</strong></label></dt>
<dd style=\"margin-top: 4px;\" id=\"move_2\" class=\"moves\">
<table cellpadding=\"4\">
<tr>
<td><small>{$lang->forum_to_move_to}</small></td>
<td>".$form->generate_forum_select('move_1_forum', $mybb->input['move_1_forum'])."</td>
</tr>
<tr>
<td><small>{$lang->leave_redirect}</small></td>
<td>".$form->generate_yes_no_radio('move_2_redirect', $mybb->input['move_2_redirect'])."</td>
</tr>
<tr>
<td><small>{$lang->delete_redirect_after}</small></td>

		'' => $lang->no_change,
'approve' => $lang->approve,
'unapprove' => $lang->unapprove,
'toggle' => $lang->toggle
);

$form_container = new FormContainer($lang->inline_post_moderation);
$form_container->output_row($lang->delete_posts." <em>*</em>", '', $form->generate_yes_no_radio('deleteposts', $mybb->input['deleteposts']));
$form_container->output_row($lang->merge_posts." <em>*</em>", $lang->merge_posts_desc, $form->generate_yes_no_radio('mergeposts', $mybb->input['mergeposts']));
$form_container->output_row($lang->approve_unapprove_posts." <em>*</em>", '', $form->generate_select_box('approveposts', $approve_unapprove, $mybb->input['approveposts'], array('id' => 'approveposts')), 'approveposts');
$form_container->end();

$selectoptions = "<option value=\"-1\"{$do_not_split_checked}>{$lang->do_not_split}</option>\n";
$selectoptions .= "<option value=\"-2\"{$split_same_checked} style=\"border-bottom: 1px solid #000;\">{$lang->split_to_same_forum}</option>\n";

$form_container = new FormContainer($lang->split_posts);
$form_container->output_row($lang->split_posts2." <em>*</em>", '', $form->generate_forum_select('splitposts', $mybb->input['splitposts']));
$form_container->output_row($lang->close_split_thread." <em>*</em>", '', $form->generate_yes_no_radio('splitpostsclose', $mybb->input['splitpostsclose']));
$form_container->output_row($lang->stick_split_thread." <em>*</em>", '', $form->generate_yes_no_radio('splitpostsstick', $mybb->input['splitpostsstick']));
$form_container->output_row($lang->unapprove_split_thread." <em>*</em>", '', $form->generate_yes_no_radio('splitpostsunapprove', $mybb->input['splitpostsunapprove']));
$form_container->output_row($lang->split_thread_subject, $lang->split_thread_subject_desc, $form->generate_text_box('splitpostsnewsubject', $mybb->input['splitpostsnewsubject'], array('id' => 'splitpostsnewsubject ')), 'newreplysubject');
$form_container->output_row($lang->add_new_split_reply, $lang->add_new_split_reply_desc, $form->generate_text_area('splitpostsaddreply', $mybb->input['splitpostsaddreply'], array('id' => 'splitpostsaddreply')), 'splitpostsaddreply');
$form_container->output_row($lang->split_reply_subject, $lang->split_reply_subject_desc, $form->generate_text_box('splitpostsreplysubject', $mybb->input['splitpostsreplysubject'], array('id' => 'splitpostsreplysubject')), 'splitpostsreplysubject');
$form_container->end();

$open_close = array(
'' => $lang->no_change,
'open' => $lang->open,
'close' => $lang->close,
'toggle' => $lang->toggle
);

$form_container = new FormContainer($lang->thread_moderation);
$form_container->output_row($lang->approve_unapprove." <em>*</em>", '', $form->generate_select_box('approvethread', $approve_unapprove, $mybb->input['approvethread'], array('id' => 'approvethread')), 'approvethread');
$form_container->output_row($lang->open_close_thread." <em>*</em>", '', $form->generate_select_box('openthread', $open_close, $mybb->input['openthread'], array('id' => 'openthread')), 'openthread');


$actions = "
<dl style=\"margin-top: 0; margin-bottom: 0; width: 100%;\">
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"move_type\" value=\"1\" {$move_checked[1]} class=\"moves_check\" onclick=\"checkAction('move');\" style=\"vertical-align: middle;\" /> <strong>{$lang->do_not_move_thread}</strong></label></dt>
<dt><label style=\"display: block;\"><input type=\"radio\" name=\"move_type\" value=\"2\" {$move_checked[2]} class=\"moves_check\" onclick=\"checkAction('move');\" style=\"vertical-align: middle;\" /> <strong>{$lang->move_thread}</strong></label></dt>
<dd style=\"margin-top: 4px;\" id=\"move_2\" class=\"moves\">
<table cellpadding=\"4\">
<tr>
<td><small>{$lang->forum_to_move_to}</small></td>
<td>".$form->generate_forum_select('move_1_forum', $mybb->input['move_1_forum'])."</td>
</tr>
<tr>
<td><small>{$lang->leave_redirect}</small></td>
<td>".$form->generate_yes_no_radio('move_2_redirect', $mybb->input['move_2_redirect'])."</td>
</tr>
<tr>
<td><small>{$lang->delete_redirect_after}</small></td>

					<td>".$form->generate_text_box('move_3_redirecttime', $mybb->input['move_3_redirecttime'], array('style' => 'width: 2em;'))." {$lang->days}</td>
</tr>
</table>

					<td>".$form->generate_text_box('move_3_redirecttime', $mybb->input['move_3_redirecttime'], array('style' => 'width: 2em;'))." {$lang->days}</td>
</tr>
</table>

Zeile 1335Zeile 1341
	</script>";
$form_container->output_row($lang->copy_thread." <em>*</em>", '', $actions);
$form_container->output_row($lang->delete_thread." <em>*</em>", '', $form->generate_yes_no_radio('deletethread', $mybb->input['deletethread']));

	</script>";
$form_container->output_row($lang->copy_thread." <em>*</em>", '', $actions);
$form_container->output_row($lang->delete_thread." <em>*</em>", '', $form->generate_yes_no_radio('deletethread', $mybb->input['deletethread']));

 

$query = $db->simple_select('threadprefixes', 'pid, prefix');
if($db->num_rows($query) > 0)
{
$thread_prefixes = array(
'-1' => $lang->no_change,
'0' => $lang->no_prefix
);

while($prefix = $db->fetch_array($query))
{
$thread_prefixes[$prefix['pid']] = $prefix['prefix'];
}

$form_container->output_row($lang->apply_thread_prefix." <em>*</em>", '', $form->generate_select_box('threadprefix', $thread_prefixes, $mybb->input['threadprefix'], array('id' => 'threadprefix')), 'threadprefix');
}


	$form_container->output_row($lang->new_subject." <em>*</em>", $lang->new_subject_desc, $form->generate_text_box('newsubject', $mybb->input['newsubject']));
$form_container->end();


	$form_container->output_row($lang->new_subject." <em>*</em>", $lang->new_subject_desc, $form->generate_text_box('newsubject', $mybb->input['newsubject']));
$form_container->end();


Zeile 1395Zeile 1418
		{
$mybb->input['openthread'] = '';
}

		{
$mybb->input['openthread'] = '';
}

		







if(!intval($mybb->input['threadprefix']))
{
$mybb->input['threadprefix'] = '';
}


		if($mybb->input['move_type'] == 2)
{
$move_checked[1] = '';

		if($mybb->input['move_type'] == 2)
{
$move_checked[1] = '';

Zeile 1474Zeile 1502
		{
$mybb->input['splitpostsstick'] = 'stick';
}

		{
$mybb->input['splitpostsstick'] = 'stick';
}

		else
{
$mybb->input['splitpostsstick'] = '';
}


		else
{
$mybb->input['splitpostsstick'] = '';
}


		if($mybb->input['splitpostsunapprove'] == 1)
{
$mybb->input['splitpostsunapprove'] = 'unapprove';
}
else

		if($mybb->input['splitpostsunapprove'] == 1)
{
$mybb->input['splitpostsunapprove'] = 'unapprove';
}
else

		{

		{

			$mybb->input['splitpostsunapprove'] = '';
}


			$mybb->input['splitpostsunapprove'] = '';
}


Zeile 1500Zeile 1528
				'copythread' => intval($mybb->input['copy_1_forum']),
'newsubject' => $mybb->input['newsubject'],
'addreply' => $mybb->input['newreply'],

				'copythread' => intval($mybb->input['copy_1_forum']),
'newsubject' => $mybb->input['newsubject'],
'addreply' => $mybb->input['newreply'],

				'replysubject' => $mybb->input['newreplysubject']


				'replysubject' => $mybb->input['newreplysubject'],
'threadprefix' => $mybb->input['threadprefix']

			);

if(stripos($mybb->input['splitpostsnewsubject'], '{subject}') === false)

			);

if(stripos($mybb->input['splitpostsnewsubject'], '{subject}') === false)

Zeile 1543Zeile 1572

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


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

 
			$cache->update_forumsdisplay();

			
flash_message($lang->success_mod_tool_created, 'success');
admin_redirect("index.php?module=config-mod_tools&action=post_tools");

			
flash_message($lang->success_mod_tool_created, 'success');
admin_redirect("index.php?module=config-mod_tools&action=post_tools");

Zeile 1596Zeile 1626
		$copy_checked[2] = '';
$mybb->input['copy_1_forum'] = '';
$mybb->input['deletethread'] = '0';

		$copy_checked[2] = '';
$mybb->input['copy_1_forum'] = '';
$mybb->input['deletethread'] = '0';

 
		$mybb->input['threadprefix'] = '-1';

		$mybb->input['newsubject'] = '{subject}';
$mybb->input['newreply'] = '';
$mybb->input['newreplysubject'] = '{subject}';

		$mybb->input['newsubject'] = '{subject}';
$mybb->input['newreply'] = '';
$mybb->input['newreplysubject'] = '{subject}';

Zeile 1631Zeile 1662
            }
});
$$('.'+id+'s').each(function(e)

            }
});
$$('.'+id+'s').each(function(e)

        {

        {

        	Element.hide(e);
});
if($(id+'_'+checked))

        	Element.hide(e);
});
if($(id+'_'+checked))

Zeile 1648Zeile 1679
				<tr>
<td valign=\"top\"><small>{$lang->forums_colon}</small></td>
<td>".$form->generate_forum_select('forum_1_forums[]', $mybb->input['forum_1_forums'], array('multiple' => true, 'size' => 5))."</td>

				<tr>
<td valign=\"top\"><small>{$lang->forums_colon}</small></td>
<td>".$form->generate_forum_select('forum_1_forums[]', $mybb->input['forum_1_forums'], array('multiple' => true, 'size' => 5))."</td>

				</tr>
</table>

				</tr>
</table>

		</dd>
</dl>
<script type=\"text/javascript\">

		</dd>
</dl>
<script type=\"text/javascript\">

Zeile 1740Zeile 1771
	</script>";
$form_container->output_row($lang->copy_thread." <em>*</em>", '', $actions);
$form_container->output_row($lang->delete_thread." <em>*</em>", '', $form->generate_yes_no_radio('deletethread', $mybb->input['deletethread']));

	</script>";
$form_container->output_row($lang->copy_thread." <em>*</em>", '', $actions);
$form_container->output_row($lang->delete_thread." <em>*</em>", '', $form->generate_yes_no_radio('deletethread', $mybb->input['deletethread']));

 

$query = $db->simple_select('threadprefixes', 'pid, prefix');
if($db->num_rows($query) > 0)
{
$thread_prefixes = array(
'-1' => $lang->no_change,
'0' => $lang->no_prefix
);

while($prefix = $db->fetch_array($query))
{
$thread_prefixes[$prefix['pid']] = $prefix['prefix'];
}

$form_container->output_row($lang->apply_thread_prefix." <em>*</em>", '', $form->generate_select_box('threadprefix', $thread_prefixes, $mybb->input['threadprefix'], array('id' => 'threadprefix')), 'threadprefix');
}


	$form_container->output_row($lang->new_subject." <em>*</em>", $lang->new_subject_desc, $form->generate_text_box('newsubject', $mybb->input['newsubject']));
$form_container->end();


	$form_container->output_row($lang->new_subject." <em>*</em>", $lang->new_subject_desc, $form->generate_text_box('newsubject', $mybb->input['newsubject']));
$form_container->end();