#1
Автор: вроде бы я, хотя идея и первоначальная разработка принадлежит бродхамеру
Описание: анонимность
открываем displaying_torrent.php
ищем
ищем
находим
находим
ищем
находим
находим
находим
вставляем
Не нравится каламбур, не читайте.
для модеров и админов все в штатном режиме отображается.
Описание: анонимность
ALTER TABLE `bb_topics` ADD `topic_anonymous` tinyint(1) NOT NULL DEFAULT '0';
открываем displaying_torrent.php
ищем
else if ($s_mode == 'names')
{
$sql = "SELECT tr.user_id, tr.ip, tr.port, tr.remain, tr.seeder, u.username, u.user_rankзаменяем else if ($s_mode == 'names')
{
$sql = "SELECT tr.user_id, tr.ip, tr.port, tr.remain, tr.seeder, u.username, u.user_rank, u.user_optищем$name = profile_url($peer). $rel_sign;заменяем (правила из черновика но должны работать)
$name = (!IS_AM && bf($peer['user_opt'], 'user_opt', 'allow_dls') && (!IS_AM || !($bt_user_id == $uid))) ? $lang['AUTH_ANONYMOUS'] : profile_url($peer). $rel_sign;открываем index.php
ищем
t.topic_id AS last_topic_id, t.topic_title AS last_topic_title,заменяем
t.topic_id AS last_topic_id, t.topic_title AS last_topic_title, t.topic_anonymous,найти
'LAST_POST_USER' => profile_url(array('username' => str_short($f['last_post_username'], 15), 'user_id' => $f['last_post_user_id'], 'user_rank' => $f['last_post_user_rank'])),заменяем 'LAST_POST_USER' => (!IS_ADMIN && $f['topic_anonymous'] && (!($f['last_post_user_id'] == $userdata['user_id']))) ? $lang['AUTH_ANONYMOUS'] : (profile_url(array('username' => str_short($f['last_post_username'], 15), 'user_id' => $f['last_post_user_id'], 'user_rank' => $f['last_post_user_rank']))),открываем posting.phpнаходим
$poll_title = ( isset($_POST['poll_title']) && $is_auth['auth_pollcreate'] ) ? clean_title($_POST['poll_title']) : '';ниже вставляем
$anonymous = ( !empty($_POST['topic_anonymous']) ) ? 1 : 0;находим
submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, DB()->escape($username), DB()->escape($subject), DB()->escape($message), DB()->escape($poll_title), $poll_options, $poll_length, $update_post_time);заменяем
submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, DB()->escape($username), DB()->escape($subject), DB()->escape($message), DB()->escape($poll_title), $poll_options, $poll_length, $update_post_time, $anonymous);открываем tracker.php
находим
t.topic_title, t.topic_time, t.topic_replies, t.topic_views, sn.seeders, sn.leechers, tor.info_hashзаменяем
t.topic_title, t.topic_time, t.topic_replies, t.topic_views, t.topic_anonymous, sn.seeders, sn.leechers, tor.info_hashнаходим
'POSTER_ID' => $poster_id,
'USERNAME' => ($hide_author) ? '' : profile_url(array('username' => $tor['username'], 'user_rank' => $tor['user_rank'])),заменяем 'POSTER_ID' => $tor['topic_anonymous'] ? '' : $poster_id,
'USERNAME' => (!IS_ADMIN && $tor['topic_anonymous'] && (!($poster_id == $user_id))) ? $lang['AUTH_ANONYMOUS'] : (($hide_author) ? '' : profile_url(array('username' => $tor['username'], 'user_rank' => $tor['user_rank']))),открываем viewforum.phpищем
t.topic_last_post_time, t.topic_id AS last_topic_id, t.topic_title AS last_topic_title,заменяем
t.topic_last_post_time, t.topic_id AS last_topic_id, t.topic_title AS last_topic_title, t.topic_anonymous,ищем
$last_post_user = profile_url(array('username' => $sf_data['sf_last_username'], 'user_id' => $sf_data['sf_last_user_id'], 'user_rank' => $sf_data['user_rank']));заменяем $last_post_user = (!IS_AM && $sf_data['topic_anonymous']) ? $lang['AUTH_ANONYMOUS'] : profile_url(array('username' => $sf_data['sf_last_username'], 'user_id' => $sf_data['sf_last_user_id'], 'user_rank' => $sf_data['user_rank']));ищем 'TOPIC_AUTHOR' => profile_url(array('username' => str_short($topic['first_username'], 15), 'user_id' => $topic['first_user_id'], 'user_rank' => $topic['first_user_rank'])),
'LAST_POSTER' => profile_url(array('username' => str_short($topic['last_username'], 15), 'user_id' => $topic['last_user_id'], 'user_rank' => $topic['last_user_rank'])),заменяем 'TOPIC_AUTHOR' => $topic['topic_anonymous'] ? $lang['AUTH_ANONYMOUS'] : profile_url(array('username' => str_short($topic['first_username'], 15), 'user_id' => $topic['first_user_id'], 'user_rank' => $topic['first_user_rank'])),
'LAST_POSTER' => $topic['topic_anonymous'] ? $lang['AUTH_ANONYMOUS'] : profile_url(array('username' => str_short($topic['last_username'], 15), 'user_id' => $topic['last_user_id'], 'user_rank' => $topic['last_user_rank'])),открываем viewtopic.phpнаходим
'POSTER_NAME' => profile_url(array('username' => $poster, 'user_rank' => $user_rank)),
'POSTER_NAME_JS' => addslashes($poster),
'POSTER_RANK' => $poster_rank,
'RANK_IMAGE' => $rank_image,
'POSTER_JOINED' => ($bb_cfg['show_poster_joined']) ? $poster_longevity : '',
'POSTER_JOINED_DATE' => $poster_joined,
'POSTER_POSTS' => ($bb_cfg['show_poster_posts']) ? $poster_posts : '',
'POSTER_FROM' => ($bb_cfg['show_poster_from']) ? wbr($poster_from) : '',заменяем 'IS_NEWEST' => ($postrow[$i]['post_id'] == $newest),
'POSTER_NAME' => ($t_data['topic_anonymous'] && !IS_AM && $i == 0) ? $lang['AUTH_ANONYMOUS'] : profile_url(array('username' => $poster, 'user_rank' => $postrow[$i]['user_rank'])),
'POSTER_NAME_JS' => $t_data['topic_anonymous'] ? $lang['AUTHOR_THEME'] : addslashes($poster),
'POSTER_RANK' => ($t_data['topic_anonymous'] && !IS_AM && $i == 0) ? '' : $poster_rank,
'RANK_IMAGE' => ($t_data['topic_anonymous'] && !IS_AM && $i == 0) ? '' : $rank_image,
'POSTER_JOINED' => ($t_data['topic_anonymous'] && !IS_AM && $i == 0) ? '' : (($bb_cfg['show_poster_joined']) ? $poster_longevity : ''),
'POSTER_JOINED_DATE' => ($t_data['topic_anonymous'] && !IS_AM && $i == 0) ? '' : $poster_joined,
'POSTER_POSTS' => ($t_data['topic_anonymous'] && !IS_AM && $i == 0) ? '' : (($bb_cfg['show_poster_posts']) ? $poster_posts : ''),
'POSTER_FROM' => ($t_data['topic_anonymous'] && !IS_AM && $i == 0) ? '' : (($bb_cfg['show_poster_from']) ? wbr($poster_from) : ''),
)находим 'POSTER_ID' => $poster_id,
'POSTER_AUTHOR' => ($poster_id == $t_data['topic_poster']),заменяем 'POSTER_ID' => ($t_data['topic_anonymous'] && !IS_AM && $i == 0) ? '' : $poster_id,
'POSTER_AUTHOR' => ($poster_id == $t_data['topic_poster'] && $i != 0) ? true : false,ищем'POSTER_AVATAR' => $poster_avatar,заменяем
'POSTER_AVATAR' => ($t_data['topic_anonymous'] && !IS_AM && $i == 0) ? '' : $poster_avatar,ищем
'PM' => $pm_btn,
'PROFILE' => $profile_btn,заменяем 'PM' => ($t_data['topic_anonymous'] && !IS_AM && $i == 0) ? '' : $pm_btn,
'PROFILE' => ($t_data['topic_anonymous'] && !IS_AM && $i == 0) ? '' : $profile_btn,открываем posting.tplнаходим
<!-- IF SHOW_NOTIFY_CHECKBOX -->
<tr>
<td><input type="checkbox" id="notify" name="notify" {S_NOTIFY_CHECKED} /></td>
<td><label for="notify">{L_NOTIFY}</label></td>
</tr>
<!-- ENDIF -->
</table>
</div>ниже вставляем <div class="floatL">
<table class="borderless inline">
<tr>
<td><input type="checkbox" id="topic_anonymous" name="topic_anonymous"></td>
<td><label for="topic_anonymous">{L_CREAT_TOPIC_ANONYMOUS}</label></td>
</tr>
</table>
</div>открываем functions_post.phpнаходим
function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, $post_username, $post_subject, $post_message, $poll_title, &$poll_options, &$poll_length, $update_post_time)заменяем
function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, $post_username, $post_subject, $post_message, $poll_title, &$poll_options, &$poll_length, $update_post_time, $topic_anonymous=0)находим
$sql = ($mode != "editpost") ? "INSERT INTO " . BB_TOPICS . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_dl_type, topic_vote) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_dl_type, $topic_vote)" : "UPDATE " . BB_TOPICS . " SET topic_title = '$post_subject', topic_type = $topic_type, topic_dl_type = $topic_dl_type " . ((@$post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . " WHERE topic_id = $topic_id";заменяем $sql = ($mode != "editpost") ? "INSERT INTO " . BB_TOPICS . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_dl_type, topic_vote, topic_anonymous) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_dl_type, $topic_vote, $topic_anonymous)" : "UPDATE " . BB_TOPICS . " SET topic_title = '$post_subject', topic_type = $topic_type, topic_dl_type = $topic_dl_type " . ((@$post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . " WHERE topic_id = $topic_id";открываем lang_main.phpвставляем
$lang['AUTH_ANONYMOUS'] = 'Аноним'; $lang['CREAT_TOPIC_ANONYMOUS'] = 'Создать анонимный топик.';p.s. ни кипешуем, дышем ровно. Много кода. Мог засунуть, что то лишнее из других наработок. Также мог, что то забыть. Также возможно, просто не захотел делиться всей своей писаниной. Также, ни чем, ни кому не обязан.
Не нравится каламбур, не читайте.
для модеров и админов все в штатном режиме отображается.