Ik heb 'Move topics when closed' Mod geinstalleerd en alles ingesteld
in mijn ACP maar als ik een topic aanmaak en die sluit ik, dan wordt
hij niet verplaatst naar het ingevulde forum. Weten jullie hier een
oplossing voor


SQL uitgevoerd?Gamemaniak schreef:Neej, ik krijg geen errors en ik heb alles nagekeken maar ik kan geen foutenXGE_Lithium schreef:Tja.. we kunnen er zo niet veel mee![]()
Dus je krijgt verder geen error ofzo?
Probeer dan eens te kijken of je iets fout hebt gedaan met instaleren
vinden...
Code: Selecteer alles
#
#-----[ SQL ]------------------------------------------
# change phpbb_ to the database prefix you use
#
INSERT INTO phpbb_config VALUES('move_when_locked_stat','-1');
INSERT INTO phpbb_config VALUES('move_when_locked_id','1');
INSERT INTO phpbb_config VALUES('leave_special_topic_stat','-1');
Ik doelde eigenlijk meer op dit stukje:Gamemaniak schreef:Jah, allebei gedaan, sql uitgevoerd en board_config_body.tpl aangepast
en geuploadIk snap zelf niet wat ik fout gedaan kan hebben
Code: Selecteer alles
Make sure to edit this file for every theme you use!
Jah, dat heb ik gedaanXGE_Lithium schreef: Ik doelde eigenlijk meer op dit stukje:Heb je dat ook gedaan?Code: Selecteer alles
Make sure to edit this file for every theme you use!
Ok ik heb nu de nieuwste versie geinstalleerd, maar hij werkt nog steeds-=|Rik|=- schreef:De laatste versie van de mod is 1.2.0
http://www.phpbb.nl/viewtopic.php?t=13168
En wat heb je ingesteld staan in je administratie paneel.
Code: Selecteer alles
case 'lock':
Code: Selecteer alles
case 'unlock':
Nee-=|Rik|=- schreef:Heb je andere modificaties geïnstalleerd waarvoor je iets hebt moeten veranderen in modcp.php?
Code: Selecteer alles
case 'lock':
if ( empty($HTTP_POST_VARS['topic_id_list']) && empty($topic_id) )
{
message_die(GENERAL_MESSAGE, $lang['None_selected']);
}
$topics = ( isset($HTTP_POST_VARS['topic_id_list']) ) ? $HTTP_POST_VARS['topic_id_list'] : array($topic_id);
$topic_id_sql = '';
for($i = 0; $i < count($topics); $i++)
{
$topic_id_sql .= ( ( $topic_id_sql != '' ) ? ', ' : '' ) . intval($topics[$i]);
}
$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);
}
if ( !empty($topic_id) )
{
$redirect_page = "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&sid=" . $userdata['session_id'];
$message = sprintf($lang['Click_return_topic'], '<a href="' . $redirect_page . '">', '</a>');
}
else
{
$redirect_page = "modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id'];
$message = sprintf($lang['Click_return_modcp'], '<a href="' . $redirect_page . '">', '</a>');
}
$message = $message . '<br \><br \>' . sprintf($lang['Click_return_forum'], '<a href="' . "viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id'] . '">', '</a>');
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . $redirect_page . '">')
);
message_die(GENERAL_MESSAGE, $lang['Topics_Locked'] . '<br /><br />' . $message);
break;
case 'unlock':
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_stat'] != -1 && $board_config['move_when_locked_stat'] == 1)
{
$move_to_forum = $board_config['move_when_locked_id'];
//
// 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, 'Could not update topics table', '', __LINE__, __FILE__, $sql);
}
while($row = $db->sql_fetchrow($special_result))
{
$move_topic_id_system = $row['topic_id'];
if((((($board_config['leave_special_topic_stat'] == -1) && ($row['topic_type'] != 3)) || (($board_config['leave_special_topic_stat'] == 1) && (($row['topic_type'] == 1) || ($row['topic_type'] == 0))) || (($board_config['leave_special_topic_stat'] == 2) && ($row['topic_type'] == 0))) || (($board_config['leave_global_topic_stat'] == -1) && ($row['topic_type'] == 3))))
{
//
// Start moving topic and posts
//
$sql = "UPDATE " . TOPICS_TABLE . "
SET forum_id = $move_to_forum
WHERE topic_id = $move_topic_id_system
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);
}
$sql = "UPDATE " . POSTS_TABLE . "
SET forum_id = $move_to_forum
WHERE topic_id = $move_topic_id_system
AND forum_id = $forum_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update topics table', '', __LINE__, __FILE__, $sql);
}
}
}
//
// Resync index :)
//
sync('forum', $forum_id);
sync('forum', $move_to_forum);
}
//
// END OF THE MOVE TOPICS WHEN LOCKED MODIFICATION
//