Ich habe gerade diesen Mod eingebaut kann aber nicht finden wie ich Beiträge verschieben kann. Könnt ihr mir helfen?
Code: Alles auswählen
##############################################################
## MOD Title: Fast Move (Schnellverschieben)
## MOD Author: Leuchte < mail@leuchte.net > http://www.leuchte.net
##[color=red] [b]MOD Description: Mit diesem Mod können Beiträge bequem vom Thema aus verschoben werden.
##[/b][/color]
## MOD Version: 1.0.1
##
## Installation Level: Leicht
## Installation Time: 5 Minuten
## Files To Edit: 2
##
## viewtopic.php
## templates/subSilver/viewtopic_body.tpl
##
## Included Files: 0
##############################################################
## For Security Purposes, Please Check: http://www.leuchte.net/mods/ for the
## latest version of this MOD.
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
## MOD History:
##
## 2006-04-10 - Nun koennen auch wirklich Shadows erstellt werden
## 2004-10-06 - Initial Release
##
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
#
#-----[ AFTER, ADD ]------------------------------------------
#
include($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
#
#-----[ FIND ]------------------------------------------
#
make_jumpbox('viewforum.'.$phpEx, $forum_id);
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Fast Move
if ( $_POST['moveconfirm'] && $is_auth['auth_mod'] )
{
$new_forum_id = intval($HTTP_POST_VARS['new_forum']);
$old_forum_id = $forum_id;
if(isset($HTTP_POST_VARS['move_leave_shadow']))
{
$sql = "SELECT forum_id, topic_title, topic_poster, topic_time, topic_status, topic_type, topic_vote, topic_views, topic_replies, topic_first_post_id, topic_last_post_id, topic_moved_id FROM ". TOPICS_TABLE ."
WHERE topic_id = '$topic_id'";
if(!($result = $db->sql_query($sql)))
{
message_die(GENERAL_ERROR, 'Could not get topic data', '', __LINE__, __FILE__, $sql);
}
$shadow_row = $db->sql_fetchrow($result);
// Insert topic in the old forum that indicates that the forum has moved.
$sql = "INSERT INTO " . TOPICS_TABLE . " (forum_id, topic_title, topic_poster, topic_time, topic_status, topic_type, topic_vote, topic_views, topic_replies, topic_first_post_id, topic_last_post_id, topic_moved_id)
VALUES ($old_forum_id, '" . addslashes(str_replace("\'", "''", $topic_title)) . "', '" . str_replace("\'", "''", $shadow_row['topic_poster']) . "', " . $shadow_row['topic_time'] . ", " . TOPIC_MOVED . ", " . POST_NORMAL . ", " . $shadow_row['topic_vote'] . ", " . $shadow_row['topic_views'] . ", " . $shadow_row['topic_replies'] . ", " . $shadow_row['topic_first_post_id'] . ", " . $shadow_row['topic_last_post_id'] . ", $topic_id)";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not insert shadow topic', '', __LINE__, __FILE__, $sql);
}
}
$sql = "UPDATE " . TOPICS_TABLE . "
SET forum_id = $new_forum_id
WHERE topic_id = $topic_id";
if(!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not update old topic', '', __LINE__, __FILE__, $sql);
}
$sql = "UPDATE " . POSTS_TABLE . "
SET forum_id = $new_forum_id
WHERE topic_id = $topic_id";
if(!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not update post topic ids', '', __LINE__, __FILE__, $sql);
}
// Sync the forum indexes
sync('forum', $new_forum_id);
sync('forum', $old_forum_id);
$move_url = append_sid("viewtopic.php?t=". $topic_id);
$message = $lang['Topics_Moved'] . '<br /><br />';
$message .= sprintf($lang['Click_return_topic'], '<a href="'. $move_url .'">', '</a>');
message_die(GENERAL_MESSAGE, $message);
}
if ( $is_auth['auth_mod'] )
{
$template->assign_block_vars('mod', array(
'L_MOVE_TITLE' => $lang['Move_topic'],
'L_MOVE_TO_FORUM' => $lang['Move_to_forum'],
'L_LEAVESHADOW' => $lang['Leave_shadow_topic'],
'L_YES' => $lang['Yes'],
'S_FORUM_SELECT' => make_forum_select('new_forum', $forum_id),
'S_MOVE_ACTION' => append_sid("viewtopic.php?t=". $topic_id),
'S_HIDDEN_FIELDS' => $hidden_fields)
);
}
// Fast Move
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewtopic_body.tpl
#
#-----[ FIND ]------------------------------------------
#
{S_SELECT_POST_DAYS} {S_SELECT_POST_ORDER} <input type="submit" value="{L_GO}" class="liteoption" name="submit" /></span></td>
</form></tr>
</table></td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- BEGIN mod -->
<form action="{mod.S_MOVE_ACTION}" method="post">
<tr align="center">
<td class="catBottom" colspan="2" height="28"><span class="gensmall">{mod.S_FORUM_SELECT} {mod.L_LEAVESHADOW} <input type="checkbox" name="move_leave_shadow" checked="checked" /> {mod.S_HIDDEN_FIELDS}{mod.L_MOVE_TITLE}:
<input class="mainoption" type="submit" name="moveconfirm" value="{mod.L_YES}" /></span></td>
</tr>
</form>
<!-- END mod -->
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM