Code: Alles auswählen
if($postrow[$i]['post_move'] == 1)
Code: Alles auswählen
if($postrow[$i]['post_move'] == 1)
Code: Alles auswählen
// Move Message
if($postrow[$i]['post_move'] == 1)
{
$sql = "SELECT moved_type
FROM ". MOVED_TABLE ."
WHERE last_post_id = '". $postrow[$i]['post_id'] ."'
ORDER BY moved_id DESC LIMIT 1";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not get moved type', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$moved_type = $row['moved_type'];
if($moved_type == "move")
{
$select = "mv.moved_time, mv.last_post_id, f.forum_name AS forumparent, f2.forum_name AS forumtarget, u.username";
$from = "". MOVED_TABLE ." mv, ". FORUMS_TABLE ." f, ". FORUMS_TABLE ." f2, ". USERS_TABLE ." u ";
$where = "mv.last_post_id = '". $postrow[$i]['post_id'] ."'
AND mv.moved_parent = f.forum_id
AND mv.moved_target = f2.forum_id
AND mv.moved_mod = u.user_id";
}
if($moved_type == "split")
{
$select = "mv.moved_time, mv.last_post_id, f.forum_name as forumparent, t.topic_title, u.username";
$from = "". MOVED_TABLE ." mv, ". TOPICS_TABLE ." t, ". FORUMS_TABLE ." f, ". USERS_TABLE ." u ";
$where = "mv.last_post_id = '". $postrow[$i]['post_id'] ."'
AND mv.moved_parent = f.forum_id
AND mv.moved_oldtopic_id = t.topic_id
AND mv.moved_mod = u.user_id";
}
if($moved_type == "lock" || $moved_type == "unlock")
{
$select = "mv.moved_time, mv.last_post_id, u.username";
$from = "". MOVED_TABLE ." mv, ". USERS_TABLE ." u ";
$where = "mv.last_post_id = '". $postrow[$i]['post_id'] ."'
AND mv.moved_mod = u.user_id";
}
if($moved_type)
{
$sql = "SELECT $select
FROM $from
WHERE $where
ORDER BY mv.moved_time DESC LIMIT 1";
if ( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not get main move information', '', __LINE__, __FILE__, $sql);
}
$moved = $db->sql_fetchrow($result);
}
$mini_icon = $images['icon_minipost'];
$move_date = create_date($board_config['default_dateformat'], $moved['moved_time'], $board_config['board_timezone']);
$mover = $moved['username'];
$parent_topic = $moved['topic_title'];
$parent_forum = $moved['forumparent'];
$target_forum = $moved['forumtarget'];
if($moved_type == "move")
{
$move_message = sprintf($lang['Move_move_message'], $move_date, $mover, $parent_forum, $target_forum);
}
if($moved_type == "lock")
{
$move_message = sprintf($lang['Move_lock_message'], $move_date, $mover);
}
if($moved_type == "unlock")
{
$move_message = sprintf($lang['Move_unlock_message'], $move_date, $mover);
}
if($moved_type == "split")
{
$move_message = sprintf($lang['Move_split_message'], $move_date, $mover, $parent_topic, $parent_forum);
}
if($moved['last_post_id'] == $postrow[$i]['post_id'])
{
$template->assign_block_vars('postrow.move_message', array(
'MOVE_MESSAGE' => '<img src="'.$mini_icon.'" border="0" />'.$move_message)
);
}
else
{
$template->assign_block_vars('postrow.switch_spacer', array());
}
}// Move Message
Code: Alles auswählen
//
// Again this will be handled by the templating
// code at some point
//
Nein!tippimaus hat geschrieben:Man kann mit diesem Mod einen einzelnen Beitrag in ein anderes Thema verschieben?
http://www.phpbb.de/viewtopic.php?t=154517Verschoben: 05.09.2007 16:35 Uhr von Dr.Death
Ursprungsforum: phpBB 3.0: Administration und Benutzung Zielforum: Coding & Technik