Geplaatst: 03 feb 2006, 23:59
Deze komt er ja, ik hoop dat ik zondag tijd heb om deze te schrijven
Mooi ik kijk er al een beetje naar uit dan-=|Rik|=- schreef:Deze komt er ja, ik hoop dat ik zondag tijd heb om deze te schrijven
Geweldig :thumb: Werkt goed, mooi pulldown menu. Dit vergroot zeker de simpelheid om het in te stellen.-=|Rik|=- schreef:De update is nu beschikbaar.
$lang['MT_special_desc'] = 'Hier kan je opgeven of sticky aen mededelingen verplaatst moeten worden als ze gesloten worden.';-=|Rik|=- schreef:Ow, vertel
Code: Selecteer alles
#-----[ OPEN ]------------------------------------------
#
modcp.php
#
#-----[ FIND ]------------------------------------------
#
$sql = "UPDATE " . TOPICS_TABLE . "
SET topic_status = " . TOPIC_LOCKED . "
WHERE topic_id IN ($topic_id_sql)
AND forum_id = $forum_id
AND topic_moved_id = 0";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update topics table', '', __LINE__, __FILE__, $sql);
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// START OF THE MOVE TOPICS WHEN LOCKED MODIFICATION
//
if($board_config['move_when_locked'])
{
//
// Let's check for special topics :)
//
$sql = "SELECT * FROM " . TOPICS_TABLE . "
WHERE topic_id IN ($topic_id_sql)
AND forum_id = $forum_id
AND topic_moved_id = 0";
if ( !($special_result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'This failure is caused by the Move Topics Mod.<br />Couldn\'t obtain special topics data.', '', __LINE__, __FILE__, $sql);
}
while($row = $db->sql_fetchrow($special_result))
{
if((($board_config['move_special_topic'] == 2) && ($row['topic_type'] != POST_GLOBAL_ANNOUNCE)) || (($board_config['move_special_topic'] == 1) && ($row['topic_type'] < POST_ANNOUNCE)) || (($board_config['move_special_topic'] == 0) && ($row['topic_type'] == POST_NORMAL)) || (($board_config['move_global_topic'] == 1) && ($row['topic_type'] == POST_GLOBAL_ANNOUNCE)))
{
//
// Start moving topic and posts
//
$sql = "UPDATE " . TOPICS_TABLE . "
SET forum_id = '". $board_config['move_when_locked_id'] ."'
WHERE topic_id = '". $row['topic_id'] ."'
AND forum_id = $forum_id
AND topic_moved_id = 0";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'This failure is caused by the Move Topics Mod.<br />Could not update topics table', '', __LINE__, __FILE__, $sql);
}
$sql = "UPDATE " . POSTS_TABLE . "
SET forum_id = '". $board_config['move_when_locked_id'] ."'
WHERE topic_id = '". $row['topic_id'] ."'
AND forum_id = $forum_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'This failure is caused by the Move Topics Mod.<br />Could not update posts table', '', __LINE__, __FILE__, $sql);
}
}
}
//
// Resync index :)
//
sync('forum', $forum_id);
sync('forum', $board_config['move_when_locked_id']);
}
//
// END OF THE MOVE TOPICS WHEN LOCKED MODIFICATION
//