Убрал "оценку" и "спасибо",так как стандартное меня не устраивает.
Если наши коллеги выложат свои красивооформленные; "оценку" и "спасибо",которые они используют на своих трекерах,то включу в блок.
А пока самое основное:
выглядит это так
потестить здесь
Сначала делаем как уже написано здесь
Открываем tracker\include\viewtopic_add1.php
ищем
Код: Выделить всё
!$dthanks ? $torrent_action[]='<form action="'. $viewtopic_url .'&opt=thanks#opt" method="post"><input type="submit" name="say_thanks" value="'.$user->lang['TORRENT_ACTION'].'" /> '.$user->lang['TORRENT_INFO_HEADER_SAYTHANKS'].'</form>' : '';
Код: Выделить всё
$x_thnx='<form action="'. $viewtopic_url .'&opt=thanks#opt" method="post"><input type="submit" name="say_thanks" value="'.$user->lang['TORRENT_INFO_HEADER_SAYTHANKS'].'" /></form>';
Код: Выделить всё
?>
Код: Выделить всё
$sql="SELECT t.id thanks_id, u.username, u.user_id, u.user_colour, tt.topic_title, tt.topic_first_post_id, s.*, ttt.size FROM ".TRACKER_THANKS_TABLE." t LEFT JOIN ".USERS_TABLE." u ON t.user_id=u.user_id LEFT JOIN ".ATTACHMENTS_TABLE." a ON t.torrent_id=a.attach_id LEFT JOIN ".TOPICS_TABLE." tt ON a.post_msg_id=tt.topic_first_post_id LEFT JOIN ".TRACKER_SNATCHED_TABLE." s ON t.user_id=s.userid AND t.torrent_id=s.torrent LEFT JOIN ".TRACKER_TORRENTS_TABLE." ttt ON t.torrent_id=ttt.id WHERE ttt.id='$torrent_id'";
$result=$db->sql_query($sql);
while($userlist=$db->sql_fetchrow($result))
{
$u_thnx .= !empty($userlist['username']) ? ($u_thnx!='' ? ", " : '') . get_username_string('full', $userlist['user_id'], $userlist['username'], $userlist['user_colour'], $userlist['username']) : 'Unknown';
}
$postrow=array_merge($postrow, array(
'X_THNX'=> $x_thnx,
'U_THNX'=> !$u_thnx ? "Пока никто не поблагодарил" : "Список поблагодаривших: " . $u_thnx,
'X_ADD'=> $user->format_date($torrents[$torrent_id]['added']),
'X_FORB'=>$torrents[$torrent_id]['forb']!=0 ? $user->lang['TRACKER_FORB_MARK'][$torrents[$torrent_id]['forb']] : '',
'X_FORB_U'=>$torrents[$torrent_id]['forb']!=0 ? $user->lang['TORRENT_STATUS_USER_ID'].":". "<a href='memberlist.php?mode=viewprofile&u=".$torrents[$torrent_id]['forb_user_id']."' /><b> ".$torrents[$torrent_id]['username']." </b></a><br />" : '',
'X_FORB_D'=>$torrents[$torrent_id]['forb']!=0 ? $user->lang['TORRENT_STATUS_UPDATED'].":". $user->format_date($torrents[$torrent_id]['forb_date']) : '',
'X_FORB_S'=>$form_forb,
'X_SIZE'=>get_formatted_filesize($torrents[$torrent_id]['size']) . " (" . number_format($torrents[$torrent_id]['size'], 0, '.', ' ').' '.$user->lang['BYTES'] . ")",
'X_HASH'=>$info_hash . $torrents[$torrent_id]['name'],
));
$template->assign_vars(array(
'X_SIZE_S'=> $user->lang['TORRENT_SIZE'].": <b>". get_formatted_filesize($torrents[$torrent_id]['size'])."</b>",
'X_ADD_S'=>$user->lang['TORRENT_ADDED'].": <b>". $user->format_date($torrents[$torrent_id]['added'])."</b>",
'X_DOWN_S'=>$user->lang['TORRENT_COMPLETED'].": <b>". $torrents[$torrent_id]['times_completed']."</b>",
'X_SEED_S'=>$user->lang['TORRENT_SEEDERS'].": <b>". $torrents[$torrent_id]['seeders']."</b> [ ".get_formatted_filesize(my_int_val($total_updown_speed['up_speed']), 1, false, 1)." ]",
'X_LEECH_S'=>$user->lang['TORRENT_LEECHERS'].": <b>". $torrents[$torrent_id]['leechers']."</b> [ ".get_formatted_filesize(my_int_val($total_updown_speed['down_speed']), 1, false, 1)." ]",
'X_LS_S'=>$user->lang['TORRENT_LASTSEED'] .": <b>". ($last_seedleech['last_seed'] ? sprintf($user->lang['TORRENT_LAST_SEEDLEECH'], get_time_diff($last_seedleech['last_seed'], $dt)) : $user->lang['NO'])."</b>",
'X_LL_S'=>$user->lang['TORRENT_LASTLEECH'] .": <b>". ($last_seedleech['last_leech'] ? sprintf($user->lang['TORRENT_LAST_SEEDLEECH'], get_time_diff($last_seedleech['last_leech'], $dt)) : $user->lang['NO'])."</b>",
));
открываем styles\ваш стиль\template\viewtopic_tracker_body.html
ищем
Код: Выделить всё
<!-- IF postrow.TORRENT_INFO_OPT -->
Код: Выделить всё
<!-- Start XelaDin's TorrentPier Table -->
<tr>
<td valign="top" colspan="2">
<table align="left" border="1" bordercolor="#333366" width="100%">
<tr>
<td width="200">Зарегистрирован:</td>
<td>{postrow.X_ADD}</td>
<!-- IF postrow.S_HAS_TRACKER_SCREENSHOT and S_SCREENSHOT_BLOCK -->
<td rowspan="6" align="center" width="120" valign="middle">
<div class="myblock" style="width:{postrow.TORR_TABLE_WIDTH}px;">
<div class="scr_sl">
<div id="sliderScreen" style="width:{postrow.TORR_TABLE_WIDTH}px;height:auto;overflow:hidden;">
<ul style="margin-left: 0px;">
<!-- BEGIN torrent_screenshot_fields -->
<li style="width:{postrow.TORR_TABLE_WIDTH}px;height:auto;overflow:hidden;list-style:none;">
<a class="fancybox" href="{postrow.torrent_screenshot_fields.SCREENSHOT_LINK}" rel="group-screenshot"><img{postrow.torrent_screenshot_fields.SCREENSHOT_WH} src="{postrow.torrent_screenshot_fields.SCREENSHOT_SRC}" alt="" /></a>
</li>
<!-- END torrent_screenshot_fields -->
</ul>
</div>
</div>
</div>
</td>
<!-- ENDIF -->
</tr>
<tr>
<td>Статус:</td>
<td><div style="float: right; clear: left; padding: 0px 4px 0px;">{postrow.X_FORB_S}</div>{postrow.X_FORB} {postrow.X_FORB_U} {postrow.X_FORB_D}</td>
</tr>
<tr>
<td>Размер:</td>
<td>{postrow.X_SIZE}</td>
</tr>
<tr>
<td>Хеш:</td>
<td>{postrow.X_HASH}</td>
</tr>
<tr>
<td>
<!-- IF postrow.S_HAS_TRACKER_TORRENT and S_TORR_BLOCK -->
<div class="torr_sl">
<!-- BEGIN torrent_fields -->
<div style="white-space:none;">
<span style="line-height:1.5em;">
{postrow.MESS_FORUM_IMAGE} {postrow.torrent_fields.TORRENT_BONUS} {postrow.torrent_fields.TORRENT_FREE} {postrow.torrent_fields.TORRENT_UP} {postrow.torrent_fields.TORRENT_FORB} {postrow.torrent_fields.TORRENT_REQ_UPLOAD} {postrow.torrent_fields.TORRENT_REQ_RATIO} {postrow.torrent_fields.TORRENT_WAIT}
{postrow.torrent_fields.TORRENT_MAGNET_TXT}
{postrow.torrent_fields.TORRENT_DOWNLOAD_IMG}
</span>
</div>
<!-- END torrent_fields -->
</div>
<!-- ENDIF -->
</td>
<td>
ВНИМАНИЕ!!!!!!!!!!!!!!!!!!!!!!!!!!!СЮДА ВСТАВЛЯЕМ ПОЛУЧЕННЫЙ КОД С САЙТА addthis.com
</td>
</tr>
</table>
</td></tr>
<!-- Finish XelaDin's TorrentPier Table -->
<tr></tr> - новая строка
</td></td> - новый столбик в строке
по желанию;
находим
Код: Выделить всё
<td valign="top" style="width:{postrow.TORR_TABLE_WIDTH}px;">
<!-- IF postrow.S_HAS_TORRENT and S_TORR_BLOCKS -->
<table class="torrblock" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
<!-- IF postrow.S_HAS_TRACKER_TORRENT and S_TORR_BLOCK -->
<div class="myblock" style="width:{postrow.TORR_TABLE_WIDTH}px;">
<div class="row3">
<span><a class="torr_cl" href="#">{L_ATTACHMENTS_TORRENT}: </a></span>
</div>
<div class="torr_sl">
<!-- BEGIN torrent_fields -->
<div style="white-space:none;">
<span style="line-height:1.5em;">
{postrow.MESS_FORUM_IMAGE} {postrow.torrent_fields.TORRENT_BONUS} {postrow.torrent_fields.TORRENT_FREE} {postrow.torrent_fields.TORRENT_UP} {postrow.torrent_fields.TORRENT_FORB} {postrow.torrent_fields.TORRENT_REQ_UPLOAD} {postrow.torrent_fields.TORRENT_REQ_RATIO} {postrow.torrent_fields.TORRENT_WAIT} {postrow.torrent_fields.TORRENT_DOWNLOAD_IMG} {postrow.torrent_fields.TORRENT_MAGNET_TXT}
<br />{postrow.torrent_fields.TORRENT_COMMENT} {postrow.torrent_fields.TORRENT_DOWNLOAD_TXT}
<br />[ {L_TORRENT_SIZE} <b>{postrow.torrent_fields.TORRENT_FILESIZE}</b> {postrow.torrent_fields.TORRENT_SIZE_LANG} / {L_TORRENT_VIEWED} <b>{postrow.torrent_fields.TORRENT_DOWNLOADED}</b> ]
</span>
</div>
<!-- END torrent_fields -->
</div>
</div>
<!-- ENDIF -->
<!-- IF postrow.S_HAS_TRACKER_POSTER and S_POSTER_BLOCK -->
<div class="myblock" style="width:{postrow.TORR_TABLE_WIDTH}px;">
<div class="row3">
<span><a class="post_cl" href="#">{L_ATTACHMENTS_POSTER}: </a></span>
</div>
<div class="post_sl">
<div id="sliderPoster" style="width:{postrow.TORR_TABLE_WIDTH}px;height:auto;overflow:hidden;">
<ul style="margin-left: 0px;">
<!-- BEGIN torrent_poster_fields -->
<li style="width:{postrow.TORR_TABLE_WIDTH}px;height:auto;overflow:hidden;list-style:none;">
<a class="fancybox" href="{postrow.torrent_poster_fields.POSTER_LINK}" rel="group-poster"><img{postrow.torrent_poster_fields.POSTER_WH} src="{postrow.torrent_poster_fields.POSTER_SRC}" alt="" /></a>
<br />{postrow.torrent_poster_fields.POSTER_COMMENT} <a href="{postrow.torrent_poster_fields.POSTER_LINK}" title="{postrow.torrent_poster_fields.POSTER_ALTITLE}">{postrow.torrent_poster_fields.POSTER_DOWNLOAD_NAME}</a>
<br />[ {L_TORRENT_SIZE} <b>{postrow.torrent_poster_fields.POSTER_FILESIZE}</b> {postrow.torrent_poster_fields.POSTER_SIZE_LANG} / {L_TORRENT_VIEWED} <b>{postrow.torrent_poster_fields.POSTER_DOWNLOADED}</b> ]
</li>
<!-- END torrent_poster_fields -->
</ul>
</div>
</div>
</div>
<!-- ENDIF -->
<!-- IF postrow.S_HAS_TRACKER_SCREENSHOT and S_SCREENSHOT_BLOCK -->
<div class="myblock" style="width:{postrow.TORR_TABLE_WIDTH}px;">
<div class="row3">
<span><a class="scr_cl" href="#">{L_ATTACHMENTS_SCREENSHOT}: </a></span>
</div>
<div class="scr_sl">
<div id="sliderScreen" style="width:{postrow.TORR_TABLE_WIDTH}px;height:auto;overflow:hidden;">
<ul style="margin-left: 0px;">
<!-- BEGIN torrent_screenshot_fields -->
<li style="width:{postrow.TORR_TABLE_WIDTH}px;height:auto;overflow:hidden;list-style:none;">
<a class="fancybox" href="{postrow.torrent_screenshot_fields.SCREENSHOT_LINK}" rel="group-screenshot"><img{postrow.torrent_screenshot_fields.SCREENSHOT_WH} src="{postrow.torrent_screenshot_fields.SCREENSHOT_SRC}" alt="" /></a>
<br />{postrow.torrent_screenshot_fields.SCREENSHOT_COMMENT} <a href="{postrow.torrent_screenshot_fields.SCREENSHOT_LINK}" title="{postrow.torrent_screenshot_fields.SCREENSHOT_ALTITLE}">{postrow.torrent_screenshot_fields.SCREENSHOT_DOWNLOAD_NAME}</a>
<br />[ {L_TORRENT_SIZE} <b>{postrow.torrent_screenshot_fields.SCREENSHOT_FILESIZE}</b> {postrow.torrent_screenshot_fields.SCREENSHOT_SIZE_LANG} / {L_TORRENT_VIEWED} <b>{postrow.torrent_screenshot_fields.SCREENSHOT_DOWNLOADED}</b> ]
</li>
<!-- END torrent_screenshot_fields -->
</ul>
</div>
</div>
</div>
<!-- ENDIF -->
<!-- IF postrow.TORRENT_INFO_OPT2 and S_INFO_OPT2_BLOCK -->
<div class="myblock" style="width:{postrow.TORR_TABLE_WIDTH}px;">
<div class="row3">
<span><a class="info_cl" href="#">{L_TORRENT_INFO}: </a></span>
</div>
<div class="info_sl">
<!-- BEGIN torrent_info_fields -->
<b>{postrow.torrent_info_fields.INFO_KEY}</b>: {postrow.torrent_info_fields.INFO_VALUE}<br />
<!-- END torrent_info_fields -->
</div>
</div>
<!-- ENDIF -->
<!-- IF postrow.TORRENT_INFO_OPT3 and S_INFO_OPT3_BLOCK -->
<div class="myblock" style="width:{postrow.TORR_TABLE_WIDTH}px;">
<div class="row3">
<span><a class="opt_cl" href="#">{L_TORRENT_OPTION}: </a></span>
</div>
<div class="opt_sl">
<!-- BEGIN torrent_opt_fields -->
{postrow.torrent_opt_fields.OPT_VALUE}<br />
<!-- END torrent_opt_fields -->
</div>
</div>
<!-- ENDIF -->
<!-- IF S_HAS_VOTE and S_VOTE_BLOCK -->
<div class="myblock" style="width:{postrow.TORR_TABLE_WIDTH}px;">
<form method="post" action="{S_POLL_ACTION}">
<div class="row3">
<span><a class="vote_cl" href="#">{POLL_QUESTION}: </a></span>
</div>
<div class="vote_sl">
<span>{L_POLL_LENGTH}<!-- IF S_CAN_VOTE and L_POLL_LENGTH --><br /><!-- ENDIF --><!-- IF S_CAN_VOTE -->{L_MAX_VOTES}<!-- ENDIF --></span>
<!-- IF S_CAN_VOTE -->
<!-- BEGIN poll_option -->
<div style="white-space:none;">
<!-- IF S_CAN_VOTE and not S_DISPLAY_RESULTS --><span style="width:auto;line-height:1.5em;"><br /><!-- IF S_IS_MULTI_CHOICE --><input type="checkbox" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ELSE --><input type="radio" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ENDIF --> {poll_option.POLL_OPTION_CAPTION}</span><!-- ENDIF -->
<!-- IF S_DISPLAY_RESULTS --><span style="width:{poll_option.POLL_OPTION_PERCENT};line-height:1.5em;">{POLL_LEFT_CAP_IMG}{postrow.poll_option.POLL_OPTION_IMG}{POLL_RIGHT_CAP_IMG} [{poll_option.POLL_OPTION_RESULT}]
<b><!-- IF poll_option.POLL_OPTION_RESULT == 0 -->0%<!-- ELSE -->{poll_option.POLL_OPTION_PERCENT}<!-- ENDIF --></b></span><!-- ENDIF -->
</div>
<!-- END poll_option -->
<!-- ENDIF -->
<!-- IF not S_CAN_VOTE -->
<!-- BEGIN poll_option -->
<div style="white-space:none;">
<!-- IF S_CAN_VOTE --><span style="width:auto;line-height:1.5em;"><!-- IF S_IS_MULTI_CHOICE --><input type="checkbox" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ELSE --><input type="radio" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ENDIF --></span><!-- ENDIF -->
<!-- IF S_DISPLAY_RESULTS --><span style="width:{poll_option.POLL_OPTION_PERCENT};line-height:1.5em;">{POLL_LEFT_CAP_IMG}{postrow.poll_option.POLL_OPTION_IMG}{POLL_RIGHT_CAP_IMG} [{poll_option.POLL_OPTION_RESULT}]
<b><!-- IF poll_option.POLL_OPTION_RESULT == 0 -->0%<!-- ELSE -->{poll_option.POLL_OPTION_PERCENT}<!-- ENDIF --></b>
<!-- IF postrow.poll_option.POLL_OPTION_VOTED -->
<span title="{L_POLL_VOTED_OPTION}"><b>x</b></span>
<!-- ENDIF -->
</span><!-- ENDIF -->
</div>
<!-- END poll_option -->
<!-- ENDIF -->
<!-- IF S_DISPLAY_RESULTS -->
<div style="text-align:center;">
<span style="line-height:1.5em;">{L_TOTAL_VOTES} : {TOTAL_VOTES}</span>
</div>
<!-- ENDIF -->
<!-- IF S_CAN_VOTE and not S_DISPLAY_RESULTS -->
<div style="text-align:center;">
<span style="line-height:1.5em;"><input type="submit" name="update" value="{L_SUBMIT_VOTE}" class="button1" /></span>
</div>
<!-- ENDIF -->
<!-- IF not S_DISPLAY_RESULTS -->
<div style="text-align:center;">
<span style="line-height:1.5em;"><a href="{U_VIEW_RESULTS}">{L_VIEW_RESULTS}</a></span>
</div>
<!-- ENDIF -->
</div>
{S_FORM_TOKEN}
{S_HIDDEN_FIELDS}
</form>
</div>
<!-- ENDIF -->
</td>
</tr>
</table>
<!-- ENDIF -->
</td>
</tr>
Код: Выделить всё
<!-- IF postrow.S_HAS_TRACKER_POSTER and S_POSTER_BLOCK -->
<div class="myblock" style="width:{postrow.TORR_TABLE_WIDTH}px;">
<div class="post_sl">
<div id="sliderPoster" style="width:{postrow.TORR_TABLE_WIDTH}px;height:auto;overflow:hidden;">
<ul style="margin-left: 0px;">
<!-- BEGIN torrent_poster_fields -->
<li style="width:{postrow.TORR_TABLE_WIDTH}px;height:auto;overflow:hidden;list-style:none;">
<a class="fancybox" href="{postrow.torrent_poster_fields.POSTER_LINK}" rel="group-poster"><img{postrow.torrent_poster_fields.POSTER_WH} src="{postrow.torrent_poster_fields.POSTER_SRC}" alt="" /></a>
</li>
<!-- END torrent_poster_fields -->
</ul>
</div>
</div>
</div>
<!-- ENDIF -->