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

Started by Zenden on 2012-01-14 20:10 — 13 replies, 4161 views

#1
Автор: вроде бы я, хотя идея и первоначальная разработка принадлежит бродхамеру
Описание: анонимность
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. ни кипешуем, дышем ровно. Много кода. Мог засунуть, что то лишнее из других наработок. Также мог, что то забыть. Также возможно, просто не захотел делиться всей своей писаниной. Также, ни чем, ни кому не обязан.
Не нравится каламбур, не читайте.
для модеров и админов все в штатном режиме отображается.
#2
А смысл?
#3
Zenden, а можно скрины как все это выглядит??? 🙂
#4
сказочник, харошь срать, если тебе не нужно так молчи.
Меня просили, я поделился.
#5
Zenden, А я спросил, по-существу! В чем заключается смысл мода?
#6
gas, хватит троллить. На скриншотах все видно. А смысл додумывай сам. Когда тебя копирасты за тестикулы ухватят, поймешь быстро.
#7
Nikolaich, Я конечно понимаю, но когда я писал выше написанное сообщение - скриншотов не было, собственно почему и спрашивал.
#8
а не проще при отправке темы в БД заменять user_id автора на user_id бота? Если уж пошла такая гулянка.....

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

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