Пока в состоянии бета тк может че и на изменяю в зависимости от запросов юзеров.
Сам выбор будет в постинге, там где ввод необходимого ратио или аплоада для скачки тора.
1) Скачать архив, залить в корень, запустить инсталл.пхп
2) Открываем файл ../posting.php
Находим:
Код: Выделить всё
$torrent_requpload = intval(request_var('torrent_requpload', 0));
$torrent_requpload > 999 || $torrent_requpload < 0 ? $torrent_requpload=0 : '';
Код: Выделить всё
$torrent_top = intval(request_var('torrent_top', 0));
$torrent_top > 1 || $torrent_top < 0 ? $torrent_top=0 : '';
Код: Выделить всё
if($forum_data['astracker'] && $post_id==$post_data['topic_first_post_id'])
{
$result=$db->sql_query('SELECT free, req_ratio, req_upload FROM '. TRACKER_TORRENTS_TABLE . " WHERE post_msg_id = $post_id LIMIT 1");
$torrent_opt=$db->sql_fetchrow($result);
$torrent_free=$torrent_opt['free'];
$torrent_reqratio=$torrent_opt['req_ratio'];
$torrent_requpload=$torrent_opt['req_upload'];
$db->sql_freeresult($result);
}
Код: Выделить всё
if($forum_data['astracker'] && $post_id==$post_data['topic_first_post_id'])
{
$result=$db->sql_query('SELECT free, req_ratio, req_upload, top FROM '. TRACKER_TORRENTS_TABLE . " WHERE post_msg_id = $post_id LIMIT 1");
$torrent_opt=$db->sql_fetchrow($result);
$torrent_free=$torrent_opt['free'];
$torrent_reqratio=$torrent_opt['req_ratio'];
$torrent_requpload=$torrent_opt['req_upload'];
$torrent_top=$torrent_opt['top'];
$db->sql_freeresult($result);
}
Код: Выделить всё
$flash_status = ($bbcode_status && $auth->acl_get('f_flash', $forum_id) && $config['allow_post_flash']) ? true : false;
$quote_status = true;
Код: Выделить всё
if($user->data['group_id'] == 5 || $user->data['group_id'] == 15)
{
$template->assign_vars(array(
'MOJNO_OPCIU_TOPA' => true
));
}
Код: Выделить всё
'TORRENT_REQUPLOAD_VAL'=>$torrent_requpload,
'CURR_TORRENT_REQUPLOAD'=>'<input class="post" type="text" name="torrent_requpload" size="3" maxlength="3" value="'.$torrent_requpload.'" /> '.$user->lang['GB'].'.',
Код: Выделить всё
'TORRENT_TOP'=>$torrent_top,
'CURR_TOP'=>'<input class="post" type="text" name="torrent_top" size="1" maxlength="1" value="'.$torrent_top.'" /> "1" - если выводим в ротатор, "0" - если нет.',
Находим:
Код: Выделить всё
global $db, $auth, $user, $config, $phpEx, $template, $phpbb_root_path, $is_cansetfree, $is_cansetreqratioupload, $torrent_free, $torrent_reqratio, $torrent_requpload;
Код: Выделить всё
global $db, $auth, $user, $config, $phpEx, $template, $phpbb_root_path, $is_cansetfree, $is_cansetreqratioupload, $torrent_free, $torrent_reqratio, $torrent_requpload, $torrent_top;
Код: Выделить всё
$sql='UPDATE '. TRACKER_TORRENTS_TABLE ." SET free='". $torrent_free ."', req_ratio='". $torrent_reqratio ."', req_upload='". $torrent_requpload ."' WHERE topic_id='{$data['topic_id']}'";
Код: Выделить всё
$sql='UPDATE '. TRACKER_TORRENTS_TABLE ." SET free='". $torrent_free ."', req_ratio='". $torrent_reqratio ."', top='". $torrent_top ."', req_upload='". $torrent_requpload ."' WHERE topic_id='{$data['topic_id']}'";
Открыть файл: ..\styles\ваш_стиль\template\posting_tracker_body.html
Найти:
Код: Выделить всё
<td class="row1"><b class="genmed">{L_TORRENT_REQUPLOAD}:</b></td>
<td class="row2">{CURR_TORRENT_REQUPLOAD}</td>
</tr>
<!-- ENDIF -->
Код: Выделить всё
<!-- IF MOJNO_OPCIU_TOPA -->
<tr>
<td class="row1" valign="top"><b class="genmed">Вывести в ротатор:</b></td>
<td class="row2">{CURR_TOP}</td>
</tr>
<!-- ENDIF -->
Открыть файл: ..\styles\ваш_стиль\template\posting_editor.html
Найти:
Код: Выделить всё
<dt><b>{L_TORRENT_REQUPLOAD}:</b></dt>
<dd>{CURR_TORRENT_REQUPLOAD}</dd>
</dl>
<!-- ENDIF -->
Код: Выделить всё
<!-- IF MOJNO_OPCIU_TOPA -->
<dl>
<dt><b>Вывести в ротатор:</b></dt>
<dd>{CURR_TOP}</dd>
</dl>
<!-- ENDIF -->
6) Открыть файл ../portal/block/ppkBB3cker_ltorrents.php
Найти:
Код: Выделить всё
$query=$db->sql_query("SELECT a.attach_id, a.post_msg_id, a.extension, a.real_filename, p.post_subject, a.physical_filename, p.topic_id, p.forum_id, t.times_completed, t.leechers, t.seeders FROM ".ATTACHMENTS_TABLE." a INNER JOIN ".POSTS_TABLE." p ON a.post_msg_id = p.post_id INNER JOIN ". TRACKER_TORRENTS_TABLE ." t ON t.topic_id = p.topic_id WHERE a.extension <> 'torrent' AND a.real_filename LIKE '%poster%' ORDER BY t.times_completed DESC LIMIT 0, 25");
Код: Выделить всё
$query=$db->sql_query("SELECT a.attach_id, a.post_msg_id, a.extension, a.real_filename, p.post_subject, a.physical_filename, p.topic_id, p.forum_id, t.times_completed, t.leechers, t.seeders FROM ".ATTACHMENTS_TABLE." a INNER JOIN ".POSTS_TABLE." p ON a.post_msg_id = p.post_id INNER JOIN ". TRACKER_TORRENTS_TABLE ." t ON t.topic_id = p.topic_id WHERE a.extension <> 'torrent' AND a.real_filename LIKE '%poster%' AND t.top = 1");
Вроде все.