Minor improvements

This commit is contained in:
Roman Kelesidis 2024-12-14 15:24:16 +07:00
commit 8dd8705b11
17 changed files with 30 additions and 30 deletions

View file

@ -2,7 +2,7 @@
<p align="center"> <p align="center">
Bull-powered BitTorrent tracker engine Bull-powered BitTorrent tracker engine
<br> <br/>
</p> </p>
<p align="center"> <p align="center">

View file

@ -116,7 +116,7 @@ if ($client_full || !$stats_cache = CACHE('tr_cache')->get('tracker_clients_stat
$n = 1; $n = 1;
foreach (array_slice($clients_percentage, 0, $numwant) as $client => $value) { foreach (array_slice($clients_percentage, 0, $numwant) as $client => $value) {
$client_list .= ($client_full) ? ("$client => $value<br>") : "$n. " . get_user_torrent_client($client) . " $value<br>"; $client_list .= ($client_full) ? ("$client => $value<br/>") : "$n. " . get_user_torrent_client($client) . " $value<br/>";
$n++; $n++;
} }
@ -164,10 +164,10 @@ echo "\n
<td align=center> <td align=center>
$client_list $client_list
<br> <br/>
\n"; \n";
echo (count($clients_percentage) > $numwant) ? ('<a href="' . 'tracker.php?client_numwant=' . ($numwant + 100) . '">' . 'Show more' . '</a><br>') : ''; echo (count($clients_percentage) > $numwant) ? ('<a href="' . 'tracker.php?client_numwant=' . ($numwant + 100) . '">' . 'Show more' . '</a><br/>') : '';
echo $client_full ? '<br><b>Get more length and numbers via modifying the parameters in the url<b>' : (!empty($client_list) ? '<a href="tracker.php?client_length=6&client_numwant=10">Peer_ids with more length (version debugging)</a>' : ''); echo $client_full ? '<br/><b>Get more length and numbers via modifying the parameters in the url<b>' : (!empty($client_list) ? '<a href="tracker.php?client_length=6&client_numwant=10">Peer_ids with more length (version debugging)</a>' : '');
echo '</td></tr>'; echo '</td></tr>';
echo '</table>'; echo '</table>';
echo !$client_full ? '<p style = "text-align:right;">Simple stats for clients are being cached for one hour.</p>' : ''; echo !$client_full ? '<p style = "text-align:right;">Simple stats for clients are being cached for one hour.</p>' : '';

View file

@ -54,7 +54,7 @@ require_once BB_PATH . '/library/defines.php';
// Composer // Composer
if (!is_file(BB_PATH . '/vendor/autoload.php')) { if (!is_file(BB_PATH . '/vendor/autoload.php')) {
die('🔩 Manual install: <a href="https://getcomposer.org/download/" target="_blank" rel="noreferrer" style="color:#0a25bb;">Install composer</a> and run <code style="background:#222;color:#00e01f;padding:2px 6px;border-radius:3px;">composer install</code>.<br>☕️ Quick install: Run <code style="background:#222;color:#00e01f;padding:2px 6px;border-radius:3px;">php install.php</code> in CLI mode.'); die('🔩 Manual install: <a href="https://getcomposer.org/download/" target="_blank" rel="noreferrer" style="color:#0a25bb;">Install composer</a> and run <code style="background:#222;color:#00e01f;padding:2px 6px;border-radius:3px;">composer install</code>.<br/>☕️ Quick install: Run <code style="background:#222;color:#00e01f;padding:2px 6px;border-radius:3px;">php install.php</code> in CLI mode.');
} }
require_once BB_PATH . '/vendor/autoload.php'; require_once BB_PATH . '/vendor/autoload.php';
@ -75,7 +75,7 @@ try {
$dotenv = Dotenv\Dotenv::createMutable(BB_PATH); $dotenv = Dotenv\Dotenv::createMutable(BB_PATH);
$dotenv->load(); $dotenv->load();
} catch (\Dotenv\Exception\InvalidPathException $pathException) { } catch (\Dotenv\Exception\InvalidPathException $pathException) {
die('🔩 Manual install: Rename from <code style="background:#222;color:#00e01f;padding:2px 6px;border-radius:3px;">.env.example</code> to <code style="background:#222;color:#00e01f;padding:2px 6px;border-radius:3px;">.env</code>, and configure it.<br>☕️ Quick install: Run <code style="background:#222;color:#00e01f;padding:2px 6px;border-radius:3px;">php install.php</code> in CLI mode.'); die('🔩 Manual install: Rename from <code style="background:#222;color:#00e01f;padding:2px 6px;border-radius:3px;">.env.example</code> to <code style="background:#222;color:#00e01f;padding:2px 6px;border-radius:3px;">.env</code>, and configure it.<br/>☕️ Quick install: Run <code style="background:#222;color:#00e01f;padding:2px 6px;border-radius:3px;">php install.php</code> in CLI mode.');
} }
// Load config // Load config

View file

@ -90,13 +90,13 @@ switch ($mode) {
// Log action // Log action
$log_msg = sprintf($lang['TOR_STATUS_LOG_ACTION'], $bb_cfg['tor_icons'][$new_status] . ' <b> ' . $lang['TOR_STATUS_NAME'][$new_status] . '</b>', $bb_cfg['tor_icons'][$tor['tor_status']] . ' <b> ' . $lang['TOR_STATUS_NAME'][$tor['tor_status']] . '</b>'); $log_msg = sprintf($lang['TOR_STATUS_LOG_ACTION'], $bb_cfg['tor_icons'][$new_status] . ' <b> ' . $lang['TOR_STATUS_NAME'][$new_status] . '</b>', $bb_cfg['tor_icons'][$tor['tor_status']] . ' <b> ' . $lang['TOR_STATUS_NAME'][$tor['tor_status']] . '</b>');
if ($comment && $comment != $lang['COMMENT']) { if ($comment && $comment != $lang['COMMENT']) {
$log_msg .= "<br>{$lang['COMMENT']}: <b>$comment</b>."; $log_msg .= "<br/>{$lang['COMMENT']}: <b>$comment</b>.";
} }
$log_action->mod('mod_topic_change_tor_status', [ $log_action->mod('mod_topic_change_tor_status', [
'forum_id' => $tor['forum_id'], 'forum_id' => $tor['forum_id'],
'topic_id' => $tor['topic_id'], 'topic_id' => $tor['topic_id'],
'topic_title' => $tor['topic_title'], 'topic_title' => $tor['topic_title'],
'log_msg' => $log_msg . '<br>-------------', 'log_msg' => $log_msg . '<br/>-------------',
]); ]);
$this->response['status'] = $bb_cfg['tor_icons'][$new_status] . ' <b> ' . $lang['TOR_STATUS_NAME'][$new_status] . '</b> &middot; ' . profile_url($userdata) . ' &middot; <i>' . delta_time(TIMENOW) . $lang['TOR_BACK'] . '</i>'; $this->response['status'] = $bb_cfg['tor_icons'][$new_status] . ' <b> ' . $lang['TOR_STATUS_NAME'][$new_status] . '</b> &middot; ' . profile_url($userdata) . ' &middot; <i>' . delta_time(TIMENOW) . $lang['TOR_BACK'] . '</i>';

View file

@ -50,27 +50,27 @@ if (isset($ffpInfo->streams)) {
$audioDub = array_map(function ($stream) { $audioDub = array_map(function ($stream) {
global $lang; global $lang;
$result = '<span class="warnColor2">' . sprintf($lang['AUDIO_TRACK'], (!isset($stream->index) || $stream->index === 0) ? 1 : $stream->index) . '</span><br>'; $result = '<span class="warnColor2">' . sprintf($lang['AUDIO_TRACK'], (!isset($stream->index) || $stream->index === 0) ? 1 : $stream->index) . '</span><br/>';
if (isset($stream->tags->language)) { if (isset($stream->tags->language)) {
if (isset($stream->tags->title)) { if (isset($stream->tags->title)) {
$result .= '<b>' . mb_strtoupper($stream->tags->language, 'UTF-8') . ' (' . $stream->tags->title . ')' . '</b>'; $result .= '<b>' . mb_strtoupper($stream->tags->language, 'UTF-8') . ' (' . $stream->tags->title . ')' . '</b>';
} else { } else {
$result .= '<b>' . mb_strtoupper($stream->tags->language, 'UTF-8') . '</b>'; $result .= '<b>' . mb_strtoupper($stream->tags->language, 'UTF-8') . '</b>';
} }
$result .= '<br>'; $result .= '<br/>';
} }
if (!empty($stream->codec_name)) { if (!empty($stream->codec_name)) {
$result .= sprintf($lang['AUDIO_CODEC'], $stream->codec_long_name, mb_strtoupper($stream->codec_name, 'UTF-8')) . '<br>'; $result .= sprintf($lang['AUDIO_CODEC'], $stream->codec_long_name, mb_strtoupper($stream->codec_name, 'UTF-8')) . '<br/>';
} }
if (!empty($stream->bit_rate)) { if (!empty($stream->bit_rate)) {
$result .= sprintf($lang['BITRATE'], humn_bitrate((int)$stream->bit_rate)) . '<br>'; $result .= sprintf($lang['BITRATE'], humn_bitrate((int)$stream->bit_rate)) . '<br/>';
} }
if (!empty($stream->sample_rate)) { if (!empty($stream->sample_rate)) {
$result .= sprintf($lang['SAMPLE_RATE'], humn_sample_rate((int)$stream->sample_rate)) . '<br>'; $result .= sprintf($lang['SAMPLE_RATE'], humn_sample_rate((int)$stream->sample_rate)) . '<br/>';
} }
if (!empty($stream->channels)) { if (!empty($stream->channels)) {
$result .= sprintf($lang['CHANNELS'], $stream->channels) . '<br>'; $result .= sprintf($lang['CHANNELS'], $stream->channels) . '<br/>';
} }
if (!empty($stream->channel_layout)) { if (!empty($stream->channel_layout)) {
$result .= sprintf($lang['CHANNELS_LAYOUT'], $stream->channel_layout); $result .= sprintf($lang['CHANNELS_LAYOUT'], $stream->channel_layout);
@ -90,10 +90,10 @@ if (isset($ffpInfo->streams)) {
// Validate output data // Validate output data
$result = '<hr>'; $result = '<hr>';
if (!empty($data['resolution'])) { if (!empty($data['resolution'])) {
$result .= $data['resolution'] . '<br>'; $result .= $data['resolution'] . '<br/>';
} }
if (!empty($data['filesize'])) { if (!empty($data['filesize'])) {
$result .= $data['filesize'] . '<br>'; $result .= $data['filesize'] . '<br/>';
} }
if (!empty($data['video_codec'])) { if (!empty($data['video_codec'])) {
$result .= $data['video_codec']; $result .= $data['video_codec'];

View file

@ -49,7 +49,7 @@ switch ($mode) {
'forum_id' => $tor['forum_id'], 'forum_id' => $tor['forum_id'],
'topic_id' => $tor['topic_id'], 'topic_id' => $tor['topic_id'],
'topic_title' => $tor['topic_title'], 'topic_title' => $tor['topic_title'],
'log_msg' => $log_msg . '<br>-------------', 'log_msg' => $log_msg . '<br/>-------------',
]); ]);
} }
$this->response['status'] = $bb_cfg['tor_icons'][$status]; $this->response['status'] = $bb_cfg['tor_icons'][$status];

View file

@ -332,7 +332,7 @@ function send_no_cache_headers()
} }
/** /**
* Converts "<br>" tags to "\n" line breaks * Converts "<br/>" tags to "\n" line breaks
* *
* @param string $string * @param string $string
* @return string * @return string

View file

@ -1442,7 +1442,7 @@ $lang['CHANGE_TOR_TYPE'] = 'Type the torrent successfully changed';
$lang['DEL_TORRENT'] = 'Are you sure you want to delete the torrent?'; $lang['DEL_TORRENT'] = 'Are you sure you want to delete the torrent?';
$lang['DEL_MOVE_TORRENT'] = 'Are you sure you want to delete and move the topic?'; $lang['DEL_MOVE_TORRENT'] = 'Are you sure you want to delete and move the topic?';
$lang['UNEXECUTED_RELEASE'] = 'Do you have a shapeless release before creating a new fix his unformed!'; $lang['UNEXECUTED_RELEASE'] = 'Do you have a shapeless release before creating a new fix his unformed!';
$lang['TOR_STATUS_LOG_ACTION'] = 'New status: %s.<br>Previous status: %s.'; $lang['TOR_STATUS_LOG_ACTION'] = 'New status: %s.<br/>Previous status: %s.';
// tor_comment // tor_comment
$lang['TOR_MOD_TITLE'] = 'Changing the status of distribution - %s'; $lang['TOR_MOD_TITLE'] = 'Changing the status of distribution - %s';

View file

@ -757,7 +757,7 @@ class Attach
// Handling errors while uploading // Handling errors while uploading
if (isset($this->error) && ($this->error !== UPLOAD_ERR_OK)) { if (isset($this->error) && ($this->error !== UPLOAD_ERR_OK)) {
if (isset($lang['UPLOAD_ERRORS'][$this->error])) { if (isset($lang['UPLOAD_ERRORS'][$this->error])) {
bb_die($lang['UPLOAD_ERROR_COMMON'] . '<br><br>' . $lang['UPLOAD_ERRORS'][$this->error]); bb_die($lang['UPLOAD_ERROR_COMMON'] . '<br/><br/>' . $lang['UPLOAD_ERRORS'][$this->error]);
} else { } else {
bb_die($lang['UPLOAD_ERROR_COMMON']); bb_die($lang['UPLOAD_ERROR_COMMON']);
} }

View file

@ -114,7 +114,7 @@ class Upload
// Handling errors while uploading // Handling errors while uploading
if (isset($this->file['error']) && ($this->file['error'] !== UPLOAD_ERR_OK)) { if (isset($this->file['error']) && ($this->file['error'] !== UPLOAD_ERR_OK)) {
if (isset($lang['UPLOAD_ERRORS'][$this->file['error']])) { if (isset($lang['UPLOAD_ERRORS'][$this->file['error']])) {
$this->errors[] = $lang['UPLOAD_ERROR_COMMON'] . '<br><br>' . $lang['UPLOAD_ERRORS'][$this->file['error']]; $this->errors[] = $lang['UPLOAD_ERROR_COMMON'] . '<br/><br/>' . $lang['UPLOAD_ERRORS'][$this->file['error']];
} else { } else {
$this->errors[] = $lang['UPLOAD_ERROR_COMMON']; $this->errors[] = $lang['UPLOAD_ERROR_COMMON'];
} }

View file

@ -224,7 +224,7 @@ class User
if ($banInfo = getBanInfo((int)$this->id)) { if ($banInfo = getBanInfo((int)$this->id)) {
$this->session_end(); $this->session_end();
if (!empty($banInfo['ban_reason'])) { if (!empty($banInfo['ban_reason'])) {
bb_die($lang['YOU_BEEN_BANNED'] . '<br><br>' . $lang['REASON'] . ':&nbsp;' . '<b>' . $banInfo['ban_reason'] . '</b>'); bb_die($lang['YOU_BEEN_BANNED'] . '<br/><br/>' . $lang['REASON'] . ':&nbsp;' . '<b>' . $banInfo['ban_reason'] . '</b>');
} else { } else {
bb_die($lang['YOU_BEEN_BANNED']); bb_die($lang['YOU_BEEN_BANNED']);
} }

View file

@ -111,7 +111,7 @@ ajax.callback.sitemap = function(data) {
</td> </td>
<td> <td>
<textarea name="static_sitemap" rows="5" cols="70">{STATIC_SITEMAP}</textarea><br /> <textarea name="static_sitemap" rows="5" cols="70">{STATIC_SITEMAP}</textarea><br />
<br><p>{L_SITEMAP_ADD_EXP_1} <br><br><b style="color: #993300;">{L_SITEMAP_ADD_EXP_2}</b></p> <br/><p>{L_SITEMAP_ADD_EXP_1} <br/><br/><b style="color: #993300;">{L_SITEMAP_ADD_EXP_2}</b></p>
</td> </td>
</tr> </tr>
<tr> <tr>

View file

@ -27,4 +27,4 @@
</form> </form>
<br> <br/>

View file

@ -85,7 +85,7 @@
} }
</script> </script>
<br> <br/>
<!-- BEGIN integrity_check --> <!-- BEGIN integrity_check -->
<!-- IF integrity_check.INTEGRITY_SUCCESS --> <!-- IF integrity_check.INTEGRITY_SUCCESS -->
<div class="alert alert-success" style="width: 95%;"> <div class="alert alert-success" style="width: 95%;">

View file

@ -1,6 +1,6 @@
<!-- IF #IN_DEMO_MODE --> <!-- IF #IN_DEMO_MODE -->
<div class="tCenter"> <div class="tCenter">
<span class="leech">{L_TP_VERSION}: {$bb_cfg['tp_version']}</span><br> <span class="leech">{L_TP_VERSION}: {$bb_cfg['tp_version']}</span><br/>
<span class="seed">{L_USERNAME}: admin / {L_PASSWORD}: admin</span> <span class="seed">{L_USERNAME}: admin / {L_PASSWORD}: admin</span>
</div> </div>
<!-- ENDIF --> <!-- ENDIF -->

View file

@ -598,7 +598,7 @@ function build_poll_add_form (src_el)
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF QUICK_REPLY --> <!-- IF QUICK_REPLY -->
<br> <br/>
<form action="{QR_POST_ACTION}" method="post" name="post" onsubmit="if(checkForm(this)){ dis_submit_btn(); }else{ return false; }"> <form action="{QR_POST_ACTION}" method="post" name="post" onsubmit="if(checkForm(this)){ dis_submit_btn(); }else{ return false; }">
<input type="hidden" name="mode" value="reply" /> <input type="hidden" name="mode" value="reply" />
<input type="hidden" name="{#POST_TOPIC_URL#}" value="{QR_TOPIC_ID}" /> <input type="hidden" name="{#POST_TOPIC_URL#}" value="{QR_TOPIC_ID}" />

View file

@ -160,8 +160,8 @@
{postrow.attach.tor_reged.TRACKER_LINK} {postrow.attach.tor_reged.TRACKER_LINK}
[ <span title="{postrow.attach.tor_reged.REGED_DELTA}">{postrow.attach.tor_reged.REGED_TIME}</span> ] [ <span title="{postrow.attach.tor_reged.REGED_DELTA}">{postrow.attach.tor_reged.REGED_TIME}</span> ]
<!-- IF not postrow.attach.tor_reged.TOR_FROZEN --> <!-- IF not postrow.attach.tor_reged.TOR_FROZEN -->
<br><!-- IF postrow.attach.tor_reged.HASH --><br>info_hash: <span class="copyElement" data-clipboard-text="{postrow.attach.tor_reged.HASH}" title="{L_COPY_TO_CLIPBOARD}">{postrow.attach.tor_reged.HASH}</span><!-- ENDIF --> <br/><!-- IF postrow.attach.tor_reged.HASH --><br/>info_hash: <span class="copyElement" data-clipboard-text="{postrow.attach.tor_reged.HASH}" title="{L_COPY_TO_CLIPBOARD}">{postrow.attach.tor_reged.HASH}</span><!-- ENDIF -->
<!-- IF postrow.attach.tor_reged.HASH_V2 --><br>info_hash v2: <span class="copyElement" data-clipboard-text="{postrow.attach.tor_reged.HASH_V2}" title="{L_COPY_TO_CLIPBOARD}">{postrow.attach.tor_reged.HASH_V2}</span><!-- ENDIF --> <!-- IF postrow.attach.tor_reged.HASH_V2 --><br/>info_hash v2: <span class="copyElement" data-clipboard-text="{postrow.attach.tor_reged.HASH_V2}" title="{L_COPY_TO_CLIPBOARD}">{postrow.attach.tor_reged.HASH_V2}</span><!-- ENDIF -->
<!-- ENDIF --> <!-- ENDIF -->
</td> </td>
<td width="15%" rowspan="4" class="tCenter pad_6"> <td width="15%" rowspan="4" class="tCenter pad_6">