Łaczenie postów by przemo
Łaczenie postów by przemo
Witam szukam już od dawna moda łaczenie postów by przemo i nie mogę znaleźć. Na phpBB2.pl w downloadzie jest update tego ale samego moda nie ma jest tam odnośnik do tego moda lecz adres jest błedy. Proszę o pomoc
- phpBB Assistant
- Zasłużony
- Posty: 1188
- Rejestracja: 07 sierpnia 2005, 17:13
- Lokalizacja: phpbb_config
- Kontakt:
KoDav, jaką masz wersję phpBB?
MASZ PROBLEM Z FORUM phpbb ? WEJDŹ TUTAJ: http://phpbb-assistant.com - ZROBIMY ZA CIEBIE WSZYSTKO!
serwis laptopów naprawa tabletów
serwis laptopów naprawa tabletów
Otwórz posting.php
Znajdź:
Daj niżej:
Znajdź:
Kod: Zaznacz cały
else if ( $submit || $confirm )
{
Kod: Zaznacz cały
// Wlacz laczenie postow (true - wlaczone, false - wylaczone)
$split_messages = true;
// Wlacz laczenie postow dla adminow
$split_messages_admin = true;
// Wlacz laczenie postow dla moderatorow
$split_messages_mod = true;
// Nie lacz w forach (wartosci oddziel przecinkami np: '3, 6, 8';
$split_messages_except = '';
if ( $mode == 'reply' && $userdata['user_id'] != ANONYMOUS )
{
$do_split = false;
if ( $userdata['user_level'] == ADMIN )
{
$do_split = (!$split_messages_admin) ? false : true;
}
else
{
$do_split = ($userdata['user_level'] == MOD && !$split_messages_mod) ? false : true;
}
if ( !empty($split_messages_except) && $do_split )
{
if ( strstr($split_messages_except, ',') )
{
$fids = explode(',', $split_messages_except);
while( list($foo, $id) = each($fids) )
{
$fid[] = intval( trim($id) );
}
}
else
{
$fid[] = intval( trim($split_messages_except) );
}
reset($fid);
$do_split = ( in_array($forum_id, $fid) == true ) ? false : true;
}
if ( $do_split )
{
$poster_id = $userdata['user_id'];
$sql = "SELECT post_id, poster_id, MAX(post_time) FROM " . POSTS_TABLE . "
WHERE topic_id = $topic_id
GROUP BY post_time
ORDER BY post_time DESC LIMIT 1";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain post', '', __LINE__, __FILE__, $sql);
}
$post_id_last_row = $db->sql_fetchrow($result);
$post_id = $post_id_last_row['post_id'];
$poster_topic_id = $post_id_last_row['poster_id'];
if ( $post_id_last_row['poster_id'] == $poster_id )
{
$sql = "SELECT pt.post_text, pt.bbcode_uid, p.enable_bbcode, p.enable_html, p.enable_smilies
FROM " . POSTS_TEXT_TABLE . " pt, " . POSTS_TABLE . " p
WHERE p.post_id = $post_id
AND pt.post_id = $post_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain post information', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$buid = $row['bbcode_uid'];
$add_data = create_date($board_config['default_dateformat'], time(), $board_config['board_timezone']);
$separator = " \n\n[size=9:" . $buid . "][ [i:" . $buid . "][b:" . $buid . "]Dodano[/b:" . $buid . "]: " . $add_data . "[/i:" . $buid . "] ][/size:" . $buid . "]\n";
$message = prepare_message($HTTP_POST_VARS['message'], $row['enable_html'], $row['enable_bbcode'], $row['enable_smilies'], $buid, $forum_id);
$last_message = prepare_message(str_replace(array("'", "\\"), array("''", "\\\\"), unprepare_message($row['post_text'])), $row['enable_html'], $row['enable_bbcode'], $row['enable_smilies'], $buid, $forum_id);
$splited = $last_message . $separator . str_replace("\'", "''", $message);
if ( strlen($splited) > 65500 )
{
message_die(GENERAL_MESSAGE, 'Your message is too long. It can not be more than 65500 chars.');
}
if ( trim(str_replace("''", "\'", $last_message)) == trim(str_replace('\"', '"', $message)) )
{
message_die(GENERAL_ERROR, 'Detected that same message !');
}
$sql = "UPDATE " . POSTS_TEXT_TABLE . "
SET post_text = '$splited'
WHERE post_id = $post_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update splited message', '', __LINE__, __FILE__, $sql);
}
include($phpbb_root_path . 'includes/functions_search.'.$phpEx);
add_search_words(0, $post_id, stripslashes($message));
$meta = '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">';
$return_message = $lang['Stored'] . '<br /><br />' . sprintf($lang['Click_view_message'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>');
$template->assign_vars(array(
'META' => $meta . $return_meta)
);
message_die(GENERAL_MESSAGE, $return_message);
}
}
}
Zainstaluj sobie jeszcze tą poprawkę: http://www.phpbb2.pl/download.php?d=391