Автор: вроде бы я, хотя идея и первоначальная разработка принадлежит бродхамеру
Описание: анонимность
открываем displaying_torrent.php
ищем
заменяем
ищем
заменяем (правила из черновика но должны работать)
открываем index.php
ищем
заменяем
найти
заменяем
открываем posting.php
находим
ниже вставляем
находим
заменяем
открываем tracker.php
находим
заменяем
находим
заменяем
открываем viewforum.php
ищем
заменяем
ищем
заменяем
ищем
заменяем
открываем viewtopic.php
находим
заменяем
находим
заменяем
ищем
заменяем
ищем
заменяем
открываем posting.tpl
находим
ниже вставляем
открываем functions_post.php
находим
заменяем
находим
заменяем
открываем lang_main.php
вставляем
p.s. ни кипешуем, дышем ровно. Много кода. Мог засунуть, что то лишнее из других наработок. Также мог, что то забыть. Также возможно, просто не захотел делиться всей своей писаниной. Также, ни чем, ни кому не обязан.
Не нравится каламбур, не читайте.
для модеров и админов все в штатном режиме отображается.
Описание: анонимность
PHP:
ALTER TABLE `bb_topics` ADD `topic_anonymous` tinyint(1) NOT NULL DEFAULT '0';
открываем displaying_torrent.php
ищем
PHP:
else if ($s_mode == 'names')
{
$sql = "SELECT tr.user_id, tr.ip, tr.port, tr.remain, tr.seeder, u.username, u.user_rank
PHP:
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
PHP:
$name = profile_url($peer). $rel_sign;
PHP:
$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;
ищем
PHP:
t.topic_id AS last_topic_id, t.topic_title AS last_topic_title,
PHP:
t.topic_id AS last_topic_id, t.topic_title AS last_topic_title, t.topic_anonymous,
PHP:
'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'])),
PHP:
'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']))),
находим
PHP:
$poll_title = ( isset($_POST['poll_title']) && $is_auth['auth_pollcreate'] ) ? clean_title($_POST['poll_title']) : '';
PHP:
$anonymous = ( !empty($_POST['topic_anonymous']) ) ? 1 : 0;
PHP:
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);
PHP:
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);
находим
PHP:
t.topic_title, t.topic_time, t.topic_replies, t.topic_views, sn.seeders, sn.leechers, tor.info_hash
PHP:
t.topic_title, t.topic_time, t.topic_replies, t.topic_views, t.topic_anonymous, sn.seeders, sn.leechers, tor.info_hash
PHP:
'POSTER_ID' => $poster_id,
'USERNAME' => ($hide_author) ? '' : profile_url(array('username' => $tor['username'], 'user_rank' => $tor['user_rank'])),
PHP:
'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']))),
ищем
PHP:
t.topic_last_post_time, t.topic_id AS last_topic_id, t.topic_title AS last_topic_title,
PHP:
t.topic_last_post_time, t.topic_id AS last_topic_id, t.topic_title AS last_topic_title, t.topic_anonymous,
PHP:
$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']));
PHP:
$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']));
PHP:
'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'])),
PHP:
'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'])),
находим
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) : '',
PHP:
'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) : ''),
)
PHP:
'POSTER_ID' => $poster_id,
'POSTER_AUTHOR' => ($poster_id == $t_data['topic_poster']),
PHP:
'POSTER_ID' => ($t_data['topic_anonymous'] && !IS_AM && $i == 0) ? '' : $poster_id,
'POSTER_AUTHOR' => ($poster_id == $t_data['topic_poster'] && $i != 0) ? true : false,
PHP:
'POSTER_AVATAR' => $poster_avatar,
PHP:
'POSTER_AVATAR' => ($t_data['topic_anonymous'] && !IS_AM && $i == 0) ? '' : $poster_avatar,
PHP:
'PM' => $pm_btn,
'PROFILE' => $profile_btn,
PHP:
'PM' => ($t_data['topic_anonymous'] && !IS_AM && $i == 0) ? '' : $pm_btn,
'PROFILE' => ($t_data['topic_anonymous'] && !IS_AM && $i == 0) ? '' : $profile_btn,
находим
HTML:
<!-- 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>
HTML:
<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>
находим
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)
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, $topic_anonymous=0)
PHP:
$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";
PHP:
$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";
вставляем
PHP:
$lang['AUTH_ANONYMOUS'] = 'Аноним';
$lang['CREAT_TOPIC_ANONYMOUS'] = 'Создать анонимный топик.';
Не нравится каламбур, не читайте.
для модеров и админов все в штатном режиме отображается.