More updates for Euclid, minor update to subSilver, fixed bug #490798

git-svn-id: file:///svn/phpbb/trunk@1550 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2001-12-11 02:21:52 +00:00
parent 8f6866beaa
commit 1e11060934
5 changed files with 162 additions and 100 deletions

View file

@ -200,7 +200,7 @@ function make_jumpbox($match_forum_id = 0)
//
// Simple version of jumpbox, just lists authed forums
//
function make_forum_select($box_name)
function make_forum_select($box_name, $ignore_forum = false)
{
global $db, $userdata;
@ -217,7 +217,7 @@ function make_forum_select($box_name)
$forum_list = "";
while( $row = $db->sql_fetchrow($q_forums) )
{
if( $is_auth_ary[$row['forum_id']]['auth_read'] )
if( $is_auth_ary[$row['forum_id']]['auth_read'] && $ignore_forum != $row['forum_id'] )
{
$forum_list .= "<option value=\"" . $row['forum_id'] . "\">" . $row['forum_name'] . "</option>";
}

View file

@ -46,7 +46,6 @@ $lang['Forum'] = "Forum";
$lang['Category'] = "Category";
$lang['Topic'] = "Topic";
$lang['Topics'] = "Topics";
$lang['Reply'] = "Reply";
$lang['Replies'] = "Replies";
$lang['Views'] = "Views";
$lang['Post'] = "Post";
@ -82,7 +81,6 @@ $lang['No'] = "No";
$lang['Enabled'] = "Enabled";
$lang['Disabled'] = "Disabled";
$lang['Error'] = "Error";
$lang['Success'] = "Success";
$lang['Next'] = "Next";
$lang['Previous'] = "Previous";
@ -305,7 +303,6 @@ $lang['Confirm_delete_poll'] = "Are you sure you want to delete this poll?";
$lang['Flood_Error'] = "You cannot make another post so soon after your last, please try again in a short while";
$lang['Empty_subject'] = "You must specify a subject when posting a new topic";
$lang['Empty_message'] = "You must enter a message when posting";
$lang['Announce_and_sticky'] = "You cannot post a topic that is both an announcement and a sticky topic";
$lang['Forum_locked'] = "This forum is locked you cannot post, reply to or edit topics";
$lang['Topic_locked'] = "This topic is locked you cannot edit posts or make replies";
$lang['No_post_id'] = "You must select a post to edit";
@ -715,7 +712,6 @@ $lang['You_been_banned'] = "You have been banned from this forum<br />Please con
//
// Viewonline
//
$lang['Who_is_online'] = "Who is online";
$lang['Reg_users_online'] = "There are %d Registered and "; // There ae 5 Registered and
$lang['Hidden_users_online'] = "%d Hidden users online"; // 6 Hidden users online
$lang['Guest_users_online'] = "There are %d Guest users online"; // There are 10 Guest users online
@ -754,6 +750,7 @@ $lang['Topics_Removed'] = "The selected topics have been successfully removed fr
$lang['Topics_Locked'] = "The selected topics have been locked";
$lang['Topics_Moved'] = "The selected topics have been moved";
$lang['Topics_Unlocked'] = "The selected topics have been unlocked";
$lang['No_Topics_Moved'] = "No topics were moved";
$lang['Confirm_delete_topic'] = "Are you sure you want to remove the selected topic/s?";
$lang['Confirm_lock_topic'] = "Are you sure you want to lock the selected topic/s?";

View file

@ -489,6 +489,9 @@ switch($mode)
{
$new_forum_id = $HTTP_POST_VARS['new_forum'];
$old_forum_id = $forum_id;
if( $new_forum_id != $old_forum_id )
{
$topics = ( isset($HTTP_POST_VARS['topic_id_list']) ) ? $HTTP_POST_VARS['topic_id_list'] : array($topic_id);
$topic_list = "";
@ -548,26 +551,32 @@ switch($mode)
sync("forum", $new_forum_id);
sync("forum", $old_forum_id);
$message = $lang['Topics_Moved'] . "<br /><br />";
}
else
{
$message = $lang['No_Topics_Moved'] . "<br /><br />";
}
if( !empty($topic_id) )
{
$redirect_page = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id");
$message = sprintf($lang['Click_return_topic'], "<a href=\"$redirect_page\">", "</a>");
$message .= sprintf($lang['Click_return_topic'], "<a href=\"$redirect_page\">", "</a>");
}
else
{
$redirect_page = append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id");
$message = sprintf($lang['Click_return_modcp'], "<a href=\"$redirect_page\">", "</a>");
$message .= sprintf($lang['Click_return_modcp'], "<a href=\"$redirect_page\">", "</a>");
}
$return_forum_url = append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$old_forum_id");
$returnforum = sprintf($lang['Click_return_forum'], "<a href=\"$return_forum_url\">", "</a>");
$message = $message . "<br \><br \>$returnforum";
$message = $message . "<br \><br \>" . sprintf($lang['Click_return_forum'], "<a href=\"" . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$old_forum_id") . "\">", "</a>");
$template->assign_vars(array(
"META" => '<meta http-equiv="refresh" content="3;url=' . $redirect_page . '">')
);
message_die(GENERAL_MESSAGE, $lang['Topics_Moved'] . "<br /><br />" . $message);
message_die(GENERAL_MESSAGE, $message);
}
else
{
@ -608,7 +617,7 @@ switch($mode)
"L_YES" => $lang['Yes'],
"L_NO" => $lang['No'],
"S_FORUM_BOX" => make_forum_select("new_forum"),
"S_FORUM_BOX" => make_forum_select("new_forum", $forum_id),
"S_MODCP_ACTION" => append_sid("modcp.$phpEx"),
"S_HIDDEN_FIELDS" => $hidden_fields)
);
@ -739,7 +748,7 @@ switch($mode)
$new_topic_id = $db->sql_nextid();
if($HTTP_POST_VARS['split_type_all'])
if( $HTTP_POST_VARS['split_type_all'] )
{
$post_id_sql = "";
for($i = 0; $i < count($posts); $i++)
@ -755,7 +764,7 @@ switch($mode)
SET topic_id = $new_topic_id
WHERE post_id IN ($post_id_sql)";
}
else if($HTTP_POST_VARS['split_type_beyond'])
else if( $HTTP_POST_VARS['split_type_beyond'] )
{
$sql = "UPDATE " . POSTS_TABLE . "
SET topic_id = $new_topic_id
@ -818,11 +827,16 @@ switch($mode)
"L_SUBMIT" => $lang['Submit'],
"L_SPLIT_AFTER" => $lang['Split_after'],
"L_POST_SUBJECT" => $lang['Post_subject'],
"L_MARK_ALL" => $lang['Mark_all'],
"L_UNMARK_ALL" => $lang['Unmark_all'],
"FORUM_NAME" => $forum_name,
"U_VIEW_FORUM" => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"),
"S_SPLIT_ACTION" => append_sid("modcp.$phpEx"),
"S_HIDDEN_FIELDS" => $s_hidden_fields,
"FORUM_INPUT" => make_forum_select("new_forum_id", $forum_id))
"S_FORUM_SELECT" => make_forum_select("new_forum_id"))
);
for($i = 0; $i < $total_posts; $i++)
@ -869,7 +883,7 @@ switch($mode)
$message = make_clickable($message);
if($board_config['allow_smilies'] && $postrow[$i]['enable_smilies'])
if( $board_config['allow_smilies'] && $postrow[$i]['enable_smilies'] )
{
$message = smilies_pass($message);
}

View file

@ -1,12 +1,30 @@
<form method="post" action="{S_SPLIT_ACTION}"><table width="98%" cellspacing="0" cellpadding="4" border="0" align="center">
<script language="Javascript" type="text/javascript">
<!--
//
// Should really check the browser to stop this whining ...
//
function select_switch(status)
{
for (i = 0; i < document.split_list.length; i++)
{
document.split_list.elements[i].checked = status;
}
}
//-->
</script>
<form action="{S_SPLIT_ACTION}" method="post" name="split_list">
<table width="98%" cellspacing="0" cellpadding="4" border="0" align="center">
<tr>
<td align="left" valign="bottom" nowrap><span class="gensmall"><a href="{U_INDEX}">{SITENAME}&nbsp;{L_INDEX}</a> -> <a href="{U_VIEW_FORUM}">{FORUM_NAME}</a></span></td>
<td align="left" valign="bottom" nowrap><span class="gensmall"><a href="{U_INDEX}">{L_INDEX}</a> -> <a href="{U_VIEW_FORUM}">{FORUM_NAME}</a></span></td>
</tr>
</table>
<table width="98%" cellpadding="1" cellspacing="0" border="0" align="center">
<table width="98%" cellspacing="0" cellpadding="0" border="0" align="center">
<tr>
<td class="tablebg"><table width="100%" cellpadding="4" cellspacing="1" border="0">
<td class="tablebg"><table width="100%" cellspacing="1" cellpadding="4" border="0">
<tr>
<td class="cat" colspan="3" align="center"><span class="cattitle">{L_SPLIT_TOPIC}</span><br /><span class="gensmall">{L_SPLIT_TOPIC_EXPLAIN}</span></td>
</tr>
@ -16,62 +34,97 @@
</tr>
<tr>
<td class="row1"><span class="gen">{L_SPLIT_FORUM}</span></td>
<td class="row2" colspan="2"><span class="courier">{FORUM_INPUT}</span></td>
<td class="row2" colspan="2"><span class="courier">{S_FORUM_SELECT}</span></td>
</tr>
<tr>
<td class="cat" colspan="3"><table width="60%" cellspacing="0" cellpadding="0" border="0" align="center">
<td class="cat" colspan="3" height="30" align="center"><input class="liteoptiontable" type="submit" name="split_type_all" value="{L_SPLIT_POSTS}">&nbsp;<input class="liteoptiontable" type="submit" name="split_type_beyond" value="{L_SPLIT_AFTER}"></td>
</tr>
<tr>
<td width="50%" align="center"><input class="button" type="submit" name="split_type_all" value="{L_SPLIT_POSTS}"></td>
<td width="50%" align="center"><input class="button" type="submit" name="split_type_beyond" value="{L_SPLIT_AFTER}"></td>
<th width="160" height="25"><table width="160" cellspacing="0" cellpadding="0" border="0">
<tr>
<th>{L_AUTHOR}</th>
</tr>
</table></th>
<th width="100%" height="25"><table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<th width="95%">{L_MESSAGE}</th>
</tr>
</table></th>
</tr>
</table></td>
</tr>
<tr>
<th>{L_AUTHOR}</th>
<th>{L_MESSAGE}</th>
<th>{L_SELECT}</th>
<td class="cat" height="2"><img src="images/spacer.gif" height="2"></td>
</tr>
<!-- BEGIN postrow -->
<tr bgcolor="{postrow.ROW_COLOR}">
<td align="left" valign="top"><a name="{postrow.U_POST_ID}"></a><table width="170" cellspacing="0" cellpadding="0" border="0">
</table>
<!-- BEGIN postrow -->
<table width="98%" cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td valign="top"><span class="gen"><b>{postrow.POSTER_NAME}</b></span><br /></td>
<td class="tablebg"><table border="0" cellpadding="4" cellspacing="1" width="100%">
<tr bgcolor="{postrow.ROW_COLOR}">
<td width="160" align="left" valign="top"><a name="{postrow.U_POST_ID}"></a><table width="160" cellspacing="0" cellpadding="0" border="0">
<tr>
<td valign="top"><span class="gen"><b>{postrow.POSTER_NAME}</b></span></td>
</tr>
</table></td>
<td width="100%" valign="top"><table width="100%" cellspacing="1" cellpadding="0" border="0">
<tr>
<td valign="top"><table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td valign="middle"><img src="images/icon_minipost.gif" alt="Post image icon" /><span class="gensmall">{L_POSTED}: {postrow.POST_DATE}&nbsp;&nbsp;&nbsp;&nbsp;{L_POST_SUBJECT}: {postrow.POST_SUBJECT}</span></td>
</tr>
<tr>
<td colspan="2"><hr /></td>
<td valign="middle"><span class="gensmall">{L_POST_SUBJECT}: {postrow.POST_SUBJECT}</span></td>
</tr>
</table></td>
</tr>
<tr>
<td width="100%" height="100%" valign="top"><span class="gen">{postrow.MESSAGE}</span></td>
<td width="100%" height="100%" valign="top"><hr /><span class="gen">{postrow.MESSAGE}</span></td>
</tr>
</table></td>
<td width="5%" align="center">&nbsp;<input type="checkbox" name="post_id_list[]" value="{postrow.POST_ID}">&nbsp;</td>
</tr>
<!-- END postrow -->
<tr bgcolor="{postrow.ROW_COLOR}">
<td align="left" valign="middle"><table cellspacing="0" cellpadding="0" border="0">
<tr>
<td class="cat" colspan="3"><table width="60%" cellspacing="0" cellpadding="0" border="0" align="center">
<tr>
<td width="50%" align="center"><input class="button" type="submit" name="split_type_all" value="{L_SPLIT_POSTS}"></td>
<td width="50%" align="center"><input class="button" type="submit" name="split_type_beyond" value="{L_SPLIT_AFTER}"></td>
<td valign="middle"><a href="#top"><img src="templates/Euclid/images/topic.gif" border="0" alt="" /></a></td>
<td>&nbsp;&nbsp;</td>
<td valign="middle"><span class="gensmall">{postrow.POST_DATE}</span></td>
</tr>
</table></td>
<td valign="middle"><table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td align="right" valign="middle"><span class="gen">{L_SELECT}: <input type="checkbox" name="post_id_list[]" value="{postrow.POST_ID}" /></span></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td class="cat" height="2"><img src="images/spacer.gif" height="2"></td>
</tr>
</table>
<!-- END postrow -->
<table width="98%" cellspacing="0" cellpadding="0" border="0" align="center">
<tr>
<td class="tablebg"><table width="100%" cellspacing="1" cellpadding="4" border="0">
<tr>
<td class="cat" colspan="3" height="30" align="center"><input class="liteoptiontable" type="submit" name="split_type_all" value="{L_SPLIT_POSTS}">&nbsp;<input class="liteoptiontable" type="submit" name="split_type_beyond" value="{L_SPLIT_AFTER}"></td>
</tr>
</table></td>
</tr>
</table>
{S_HIDDEN_FIELDS}</form>
<table width="98%" cellspacing="0" cellpadding="4" border="0" align="center">
<tr>
<td align="right"><span class="gensmall"><a href="javascript:select_switch(true);">{L_MARK_ALL}</a> :: <a href="javascript:select_switch(false);">{L_UNMARK_ALL}</a></span></td>
</tr>
</table>
<table cellspacing="2" border="0" width="98%" align="center">
<tr>
<td width="40%"><span class="gensmall"><b>{S_TIMEZONE}</b></span></td>
</tr>
</table>
{S_HIDDEN_FIELDS}
</form>

View file

@ -21,7 +21,7 @@
</tr>
<tr>
<td class="row1" nowrap="nowrap"><span class="gen">{L_SPLIT_FORUM}</span></td>
<td class="row2" colspan="2"><span class="courier">{FORUM_INPUT}</span></td>
<td class="row2" colspan="2"><span class="courier">{S_FORUM_SELECT}</span></td>
</tr>
<tr>
<td class="cat" colspan="3" height="28">
@ -48,7 +48,7 @@
<td width="100%" valign="top" class="{postrow.ROW_CLASS}">
<table width="100%" cellspacing="0" cellpadding="3" border="0">
<tr>
<td valign="middle"><img src="images/icon_minipost.gif" alt="Post image icon"><span class="postdetails">{L_POSTED}:
<td valign="middle"><img src="templates/subSilver/images/icon_minipost.gif" alt="Post image icon"><span class="postdetails">{L_POSTED}:
{postrow.POST_DATE}&nbsp;&nbsp;&nbsp;&nbsp;{L_POST_SUBJECT}: {postrow.POST_SUBJECT}</span></td>
</tr>
<tr>
@ -58,9 +58,7 @@
</tr>
</table>
</td>
<td width="5%" align="center" class="{postrow.ROW_CLASS}">&nbsp;
<input type="checkbox" name="post_id_list[]" value="{postrow.POST_ID}" />
&nbsp;</td>
<td width="5%" align="center" class="{postrow.ROW_CLASS}"><input type="checkbox" name="post_id_list[]" value="{postrow.POST_ID}" /></td>
</tr>
<tr>
<td colspan="3" height="1" class="row3"><img src="templates/subSilver/images/spacer.gif" width="1" height="1" alt="."></td>