Mod. Gotowe < [ 1.9.5 ] - Topic Moderator (Mini Moderator)
ORI - 02-10-2005, 13:26
Ok qbs, dzieki
irekk - 02-10-2005, 14:11
--== ZAMYKANIE TEMATU ==--
instrukcja zaktualizowana ale zebys nie musial szperac dodalem tam to:
viewtopic.php
Kod: | # znajdź:
// Topic watch information
# przed tym dodaj:
if( $userdata['user_level'] < 1 && $user_id == $forum_topic_data['topic_poster'] && in_array($forum_id, $mot_forums) && $board_config['modowntopics_edit'] && !in_array($user_id, $mot_banned) )
{
$topic_mod = ($forum_topic_data['topic_status'] == TOPIC_UNLOCKED) ? "<a href=\"modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=lock&sid=" . $session_id . '"><b>' . $lang['Lock_topic'] . '</b> <img src="' . $images['topic_mod_lock'] . '" alt="' . $lang['Lock_topic'] . '" title="' . $lang['Lock_topic'] . '" border="0" /></a> ' : '';
} |
modcp.php
Kod: | # znajdź:
init_userprefs($userdata);
// End session management
# po tym dodaj:
if($mode == 'lock')
{
$sql = "SELECT topic_poster, forum_id
FROM " . TOPICS_TABLE . "
WHERE topic_id = $topic_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Error while obtain topic poster information', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$mot_tposter = $row['topic_poster'];
$mot_fid = $row['forum_id']; print $board_config['modowntopics_fids'];
$modown_forums = explode(',', str_replace(' ', '', $board_config['modowntopics_fids']) );
$modown_banned = explode(',', str_replace(' ', '', $board_config['modowntopics_banned']) );
$modown_allow = 0;
if($mode == 'lock'&& $board_config['modowntopics_edit'])
{
$modown_allow = 1;
}
$modown = ( in_array($mot_fid, $modown_forums) && $mot_tposter == $userdata['user_id'] && !in_array($userdata['user_id'], $modown_banned) && $modown_allow ) ? 1 : 0;
}
---------------------
# znajdź:
if ( !$is_auth['auth_mod'] )
{
message_die(GENERAL_MESSAGE, $lang['Not_Moderator'], $lang['Not_Authorised']);
}
// End Auth Check
# zamien na:
if ( !$is_auth['auth_mod'] && !$modown )
{
message_die(GENERAL_MESSAGE, $lang['Not_Moderator'], $lang['Not_Authorised']);
}
// End Auth Check |
ORI - 02-10-2005, 14:21
qbs, szybko dzialasz jeszcze raz dzieki
Edit: W ramach wdziecznosci za zamykanie tematu zrobiłem plik do korekty Check Files
irekk - 02-10-2005, 14:40
hehe wrzucilem do pierwszego i jeszcze raz dzieki za pomoc w testach
ORI - 02-10-2005, 14:42
qbs, przyjemnosc po mojej stronie
pipicz - 21-12-2005, 08:38
W pliku *.tlp polecam sobie zmienić liczby, chyba 255 na więcej bo można wpisać tylko do 67 userów.
pearman - 21-12-2005, 11:08
dlugosc komorki w tabeli config to 255 wiec zmiana nic nie da
|
|
|