mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Various changes
git-svn-id: file:///svn/phpbb/trunk@1047 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
01f0a5d16c
commit
a87703788e
4 changed files with 50 additions and 28 deletions
|
@ -182,43 +182,44 @@ function make_jumpbox()
|
||||||
return($boxstring);
|
return($boxstring);
|
||||||
}
|
}
|
||||||
|
|
||||||
function make_forum_box($box_name, $default_forum = -1)
|
//
|
||||||
|
// Simple version of jumpbox, just lists authed forums
|
||||||
|
//
|
||||||
|
function make_forum_select($box_name)
|
||||||
{
|
{
|
||||||
global $db;
|
global $db, $userdata;
|
||||||
|
|
||||||
$limit_forums = "";
|
$is_auth_ary = auth(AUTH_READ, AUTH_LIST_ALL, $userdata);
|
||||||
|
|
||||||
$sql = "SELECT forum_id, forum_name
|
$sql = "SELECT forum_id, forum_name
|
||||||
FROM " . FORUMS_TABLE . "
|
FROM " . FORUMS_TABLE . "
|
||||||
ORDER BY cat_id, forum_order";
|
ORDER BY cat_id, forum_order";
|
||||||
if(!$q_forums = $db->sql_query($sql))
|
if( !$q_forums = $db->sql_query($sql) )
|
||||||
{
|
{
|
||||||
message_die(GENERAL_ERROR, "Couldn't obtain forums information.", "", __LINE__, __FILE__, $sql);
|
message_die(GENERAL_ERROR, "Couldn't obtain forums information.", "", __LINE__, __FILE__, $sql);
|
||||||
}
|
}
|
||||||
$total_forums = $db->sql_numrows($q_forums);
|
|
||||||
$forum_rows = $db->sql_fetchrowset($q_forums);
|
|
||||||
|
|
||||||
$boxstring = '<select name="'.$box_name.'">';
|
$forum_list = "";
|
||||||
if($total_forums)
|
while( $row = $db->sql_fetchrow($q_forums) )
|
||||||
{
|
{
|
||||||
for($y = 0; $y < $total_forums; $y++)
|
if( $is_auth_ary[$row['forum_id']]['auth_read'] )
|
||||||
{
|
{
|
||||||
$name = stripslashes($forum_rows[$y]['forum_name']);
|
$forum_list .= "<option value=\"" . $row['forum_id'] . "\">" . $row['forum_name'] . "</option>";
|
||||||
$boxstring .= "<option value=\"".$forum_rows[$y]['forum_id']."\"";
|
|
||||||
if($forum_rows[$y]['forum_id'] == $default_forum)
|
|
||||||
{
|
|
||||||
$boxstring .= " selected=\"selected\"";
|
|
||||||
}
|
|
||||||
$boxstring .= ">$name</option>\n";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( $forum_list == "" )
|
||||||
|
{
|
||||||
|
$forum_list .= "<option value=\"-1\">-- ! No Forums ! --</option>\n";
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$boxstring .= "<option value=\"-1\">-- ! No Forums ! --</option>\n";
|
$forum_list = '<select name="' . $box_name . '">' . $forum_list . '</select>';
|
||||||
}
|
}
|
||||||
|
|
||||||
return($boxstring);
|
return($forum_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Initialise user settings on page load
|
// Initialise user settings on page load
|
||||||
function init_userprefs($userdata)
|
function init_userprefs($userdata)
|
||||||
|
|
|
@ -605,7 +605,7 @@ $lang['Not_Authorised'] = "Not Authorised";
|
||||||
// Moderator Control Panel
|
// Moderator Control Panel
|
||||||
//
|
//
|
||||||
$lang['Mod_CP'] = "Moderator Control Panel";
|
$lang['Mod_CP'] = "Moderator Control Panel";
|
||||||
$lang['Mod_CP_explain'] = "Using the form below you can perform mass moderation operations on this forum. You can lock, unlock, move or delete any number of topics";
|
$lang['Mod_CP_explain'] = "Using the form below you can perform mass moderation operations on this forum. You can lock, unlock, move or delete any number of topics. If this forum is defined as private in some way you can also modify which users can and cannot access it.";
|
||||||
$lang['Select'] = "Select";
|
$lang['Select'] = "Select";
|
||||||
$lang['Delete'] = "Delete";
|
$lang['Delete'] = "Delete";
|
||||||
$lang['Move'] = "Move";
|
$lang['Move'] = "Move";
|
||||||
|
@ -620,6 +620,7 @@ $lang['Confirm_delete_topic'] = "Are you sure you want to remove the selected to
|
||||||
$lang['Confirm_lock_topic'] = "Are you sure you want to lock the selected topic/s?";
|
$lang['Confirm_lock_topic'] = "Are you sure you want to lock the selected topic/s?";
|
||||||
$lang['Confirm_unlock_topic'] = "Are you sure you want to unlock the selected topic/s?";
|
$lang['Confirm_unlock_topic'] = "Are you sure you want to unlock the selected topic/s?";
|
||||||
$lang['Confirm_move_topic'] = "Are you sure you want to move the selected topic/s?";
|
$lang['Confirm_move_topic'] = "Are you sure you want to move the selected topic/s?";
|
||||||
|
$lang['Move_to_forum'] = "Move to forum";
|
||||||
$lang['Split_Topic'] = "Split Topic Control Panel";
|
$lang['Split_Topic'] = "Split Topic Control Panel";
|
||||||
$lang['Split_Topic_explain'] = "Using the form below you can split a topic in two, either by selecting the posts individually or by splitting at a selected post";
|
$lang['Split_Topic_explain'] = "Using the form below you can split a topic in two, either by selecting the posts individually or by splitting at a selected post";
|
||||||
$lang['Split_title'] = "New topic title";
|
$lang['Split_title'] = "New topic title";
|
||||||
|
|
|
@ -455,11 +455,10 @@ switch($mode)
|
||||||
{
|
{
|
||||||
if( empty($HTTP_POST_VARS['topic_id_list']) && empty($topic_id) )
|
if( empty($HTTP_POST_VARS['topic_id_list']) && empty($topic_id) )
|
||||||
{
|
{
|
||||||
message_die(GENERAL_MESSAGE, $lang['None_selected'], $lang['Error']);
|
message_die(GENERAL_MESSAGE, $lang['None_selected']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '"><input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '">';
|
$hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '"><input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '">';
|
||||||
$hidden_fields .= $lang['New_forum'] . ': ' . make_forum_box('new_forum'). '</select><br><br>';
|
|
||||||
|
|
||||||
if( isset($HTTP_POST_VARS['topic_id_list']) )
|
if( isset($HTTP_POST_VARS['topic_id_list']) )
|
||||||
{
|
{
|
||||||
|
@ -478,17 +477,22 @@ switch($mode)
|
||||||
// Set template files
|
// Set template files
|
||||||
//
|
//
|
||||||
$template->set_filenames(array(
|
$template->set_filenames(array(
|
||||||
"confirm" => "confirm_body.tpl")
|
"movetopic" => "modcp_move.tpl")
|
||||||
);
|
);
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
"MESSAGE_TITLE" => $lang['Confirm'],
|
"MESSAGE_TITLE" => $lang['Confirm'],
|
||||||
"MESSAGE_TEXT" => $lang['Confirm_move_topic'],
|
"MESSAGE_TEXT" => $lang['Confirm_move_topic'],
|
||||||
|
|
||||||
|
"L_MOVE_TO_FORUM" => $lang['Move_to_forum'],
|
||||||
"L_YES" => $lang['Yes'],
|
"L_YES" => $lang['Yes'],
|
||||||
"L_NO" => $lang['No'],
|
"L_NO" => $lang['No'],
|
||||||
"S_CONFIRM_ACTION" => append_sid("modcp.$phpEx"),
|
|
||||||
"S_HIDDEN_FIELDS" => $hidden_fields));
|
"S_FORUM_BOX" => make_forum_select("new_forum"),
|
||||||
$template->pparse("confirm");
|
"S_MODCP_ACTION" => append_sid("modcp.$phpEx"),
|
||||||
|
"S_HIDDEN_FIELDS" => $hidden_fields)
|
||||||
|
);
|
||||||
|
$template->pparse("movetopic");
|
||||||
|
|
||||||
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
|
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
|
||||||
|
|
||||||
|
@ -691,7 +695,7 @@ switch($mode)
|
||||||
$topic_time = time();
|
$topic_time = time();
|
||||||
|
|
||||||
$sql = "INSERT INTO " . TOPICS_TABLE . "
|
$sql = "INSERT INTO " . TOPICS_TABLE . "
|
||||||
(topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote)
|
(topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type)
|
||||||
VALUES ('$post_subject', $first_poster, " . $topic_time . ", $new_forum_id, " . TOPIC_UNLOCKED . ", " . POST_NORMAL . ")";
|
VALUES ('$post_subject', $first_poster, " . $topic_time . ", $new_forum_id, " . TOPIC_UNLOCKED . ", " . POST_NORMAL . ")";
|
||||||
if(!$result = $db->sql_query($sql, BEGIN_TRANSACTION))
|
if(!$result = $db->sql_query($sql, BEGIN_TRANSACTION))
|
||||||
{
|
{
|
||||||
|
@ -779,7 +783,7 @@ switch($mode)
|
||||||
"S_SPLIT_ACTION" => append_sid("modcp.$phpEx"),
|
"S_SPLIT_ACTION" => append_sid("modcp.$phpEx"),
|
||||||
"S_HIDDEN_FIELDS" => $s_hidden_fields,
|
"S_HIDDEN_FIELDS" => $s_hidden_fields,
|
||||||
|
|
||||||
"FORUM_INPUT" => make_forum_box("new_forum_id", $forum_id))
|
"FORUM_INPUT" => make_forum_select("new_forum_id", $forum_id))
|
||||||
);
|
);
|
||||||
|
|
||||||
for($i = 0; $i < $total_posts; $i++)
|
for($i = 0; $i < $total_posts; $i++)
|
||||||
|
@ -968,6 +972,9 @@ switch($mode)
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'auth':
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
"L_MOD_CP" => $lang['Mod_CP'],
|
"L_MOD_CP" => $lang['Mod_CP'],
|
||||||
|
|
13
phpBB/templates/PSO/modcp_move.tpl
Normal file
13
phpBB/templates/PSO/modcp_move.tpl
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
|
||||||
|
<form action="{S_MODCP_ACTION}" method="post"><table width="80%" cellpadding="1" cellspacing="0" border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td class="tablebg"><table width="100%" cellpadding="4" cellspacing="1" border="0">
|
||||||
|
<tr>
|
||||||
|
<th class="secondary"><b>{MESSAGE_TITLE}</b></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="row2" align="center"><br /><span class="gen">{L_MOVE_TO_FORUM} {S_FORUM_BOX}<br /><br />{MESSAGE_TEXT}</span><br /><br />{S_HIDDEN_FIELDS}<input type="submit" name="confirm" value="{L_YES}" /> <input type="submit" name="cancel" value="{L_NO}" /><br /><br /></td>
|
||||||
|
</tr>
|
||||||
|
</table></td>
|
||||||
|
</tr>
|
||||||
|
</table></form>
|
Loading…
Add table
Reference in a new issue