Анонимность при создании релизов

Zenden

Пользователь
Автор: вроде бы я, хотя идея и первоначальная разработка принадлежит бродхамеру
Описание: анонимность
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;
открываем index.php
ищем
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']))),
открываем posting.php
находим
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);
открываем tracker.php
находим
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']))),
открываем viewforum.php
ищем
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'])),
открываем viewtopic.php
находим
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,
открываем posting.tpl
находим
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>
открываем functions_post.php
находим
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";
открываем lang_main.php
вставляем
PHP:
$lang['AUTH_ANONYMOUS'] = 'Аноним';
$lang['CREAT_TOPIC_ANONYMOUS'] = 'Создать анонимный топик.';
p.s. ни кипешуем, дышем ровно. Много кода. Мог засунуть, что то лишнее из других наработок. Также мог, что то забыть. Также возможно, просто не захотел делиться всей своей писаниной. Также, ни чем, ни кому не обязан.
Не нравится каламбур, не читайте.
для модеров и админов все в штатном режиме отображается.
 

Вложения

  • Снимок.PNG
    Снимок.PNG
    19.3 KB · Просмотры: 233
  • Снимок1.PNG
    Снимок1.PNG
    232.2 KB · Просмотры: 244
N

Nikolaich

Гость
gas, хватит троллить. На скриншотах все видно. А смысл додумывай сам. Когда тебя копирасты за тестикулы ухватят, поймешь быстро.
 
G

gas

Гость
Nikolaich, Я конечно понимаю, но когда я писал выше написанное сообщение - скриншотов не было, собственно почему и спрашивал.
 

druid

Пользователь
а не проще при отправке темы в БД заменять user_id автора на user_id бота? Если уж пошла такая гулянка.....

Ведь в этом моде анонимность не полная, автор в БД то всё равно хранится
 

dimka3210

Пользователь
а не проще при отправке темы в БД заменять user_id автора на user_id бота? Если уж пошла такая гулянка.....

Ведь в этом моде анонимность не полная, автор в БД то всё равно хранится
не проще. вдруг придётся кого то забанить. ты забанишь бота?
 
Сверху