qbs Wysłany: Nie 21 Maj, 2006 |
|
|
Je?eli chcecie aby na waszych forach, po ka?dorazowej edycji post?w przez osobe z obs?ugi forum by?y one oznaczane jako nieprzeczytane to w pliku functions_post.php znajd?cie:
PHP Code:<?php
if ( $mode == 'editpost' && $board_config['search_enable'])
{
remove_search_post($post_id);
}
?>
i zamie?cie na:
PHP Code:<?php
if ( $mode == 'editpost' && $board_config['search_enable'])
{
remove_search_post($post_id);
}
if ( $mode == 'editpost' && $forum_id && $topic_id && $post_id && $userdata['user_level'] )
{
$userdata_user_id = $userdata['user_id'];
$sql = "INSERT INTO " . READ_HIST_TABLE . " (user_id, post_id, topic_id, forum_id)
SELECT poster_id, $post_id, $topic_id, $forum_id
FROM " . POSTS_TABLE . "
WHERE topic_id = $topic_id
AND poster_id <> $userdata_user_id
AND poster_id > 1";
$result = $db->sql_query($sql);
}
?>
lub, jesli chcecie by post by? oznaczany jako nieprzeczytany po edycji przez jego autora lub obs?ug?, zamie?cie na:
PHP Code:<?php
if ( $mode == 'editpost' && $board_config['search_enable'])
{
remove_search_post($post_id);
}
if ( $mode == 'editpost' && $forum_id && $topic_id && $post_id )
{
$userdata_user_id = $userdata['user_id'];
$sql = "INSERT INTO " . READ_HIST_TABLE . " (user_id, post_id, topic_id, forum_id)
SELECT poster_id, $post_id, $topic_id, $forum_id
FROM " . POSTS_TABLE . "
WHERE topic_id = $topic_id
AND poster_id <> $userdata_user_id
AND poster_id > 1";
$result = $db->sql_query($sql);
}
?>
___________________________________________________________________________________________________
w przypadku jesli chcemy aby powiadamialo kazda osobe ktora przegladala temat zapytanie w powyzszym kodzie powinno wygladac:
PHP Code:<?php
$sql = "INSERT INTO " . READ_HIST_TABLE . " (user_id, post_id, topic_id, forum_id)
SELECT user_id, $post_id, $topic_id, $forum_id
FROM " . TOPIC_VIEW_TABLE . "
WHERE topic_id = $topic_id
AND user_id <> $userdata_user_id
AND user_id > 1";
?>
___________________________________________________________________________________________________
a dla osob ktore lubia prawdziwy hardcore i marza o tym by ich hosting przezegnal (powiadamianie kazdego uzytkownika forum) STANOWCZO ODRADZAM
PHP Code:<?php
$sql = "INSERT INTO " . READ_HIST_TABLE . " (user_id, post_id, topic_id, forum_id)
SELECT user_id, $post_id, $topic_id, $forum_id
FROM " . USERS_TABLE . "
WHERE user_id <> $userdata_user_id
AND user_id > 1";
?> |
|