mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-15 19:17:33 -07:00
Added "Random release" button in tracker.php (#1334)
* Added "Random release" button in tracker.php * Updated * Update CHANGELOG.md
This commit is contained in:
parent
8a81eabe30
commit
15a5ae7b2f
5 changed files with 14 additions and 2 deletions
|
@ -7,6 +7,7 @@
|
|||
|
||||
- Release 2.4.1 🦉 ([belomaxorka](https://github.com/belomaxorka), [kovalensky](https://github.com/kovalensky))
|
||||
- Added `bt_announce_url` autofill [\#1331](https://github.com/torrentpier/torrentpier/pull/1331) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Added "Random release" button in tracker.php [\#1334](https://github.com/torrentpier/torrentpier/pull/1334) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Added support for fastly cdn [\#1327](https://github.com/torrentpier/torrentpier/pull/1327) ([belomaxorka](https://github.com/belomaxorka), [kovalensky](https://github.com/kovalensky))
|
||||
- Use constants instead of string literals [\#1332](https://github.com/torrentpier/torrentpier/pull/1332) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Use `target="_blank"` in admin for profile_url() redirects [\#1330](https://github.com/torrentpier/torrentpier/pull/1330) ([belomaxorka](https://github.com/belomaxorka))
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"torrent",
|
||||
"tracker"
|
||||
],
|
||||
"homepage": "https://torrentpier.com",
|
||||
"homepage": "https://github.com/torrentpier",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
|
|
|
@ -1279,6 +1279,7 @@ $lang['BONUS_NOT_SUCCES'] = '<span class="leech">You do not have bonuses availab
|
|||
$lang['BONUS_RETURN'] = 'Return to the seed bonus exchange';
|
||||
|
||||
$lang['TRACKER'] = 'Tracker';
|
||||
$lang['RANDOM_RELEASE'] = 'Random release';
|
||||
$lang['OPEN_TOPICS'] = 'Open topics';
|
||||
$lang['OPEN_IN_SAME_WINDOW'] = 'open in same window';
|
||||
$lang['SHOW_TIME_TOPICS'] = 'show time of the creation topics';
|
||||
|
|
|
@ -62,7 +62,7 @@ ajax.callback.view_post = function(data) {
|
|||
<!-- ENDIF / AJAX_TOPICS -->
|
||||
|
||||
<a name="start"></a>
|
||||
<h1 class="pagetitle">{PAGE_TITLE}</h1>
|
||||
<h1 class="pagetitle">{PAGE_TITLE} · <a href="{U_TRACKER}?random_release=1">{L_RANDOM_RELEASE}</a></h1>
|
||||
|
||||
<div class="nav">
|
||||
<p class="floatL"><a href="{U_INDEX}">{T_INDEX}</a></p>
|
||||
|
|
10
tracker.php
10
tracker.php
|
@ -297,6 +297,16 @@ if (isset($_GET[$user_releases_key])) {
|
|||
}
|
||||
}
|
||||
|
||||
// Random release
|
||||
if (isset($_GET['random_release'])) {
|
||||
if ($random_release = DB()->fetch_row("SELECT topic_id FROM " . BB_BT_TORRENTS . " WHERE tor_status NOT IN(" . implode(', ', array_keys($bb_cfg['tor_frozen'])) . ") ORDER BY RAND() LIMIT 1")) {
|
||||
redirect(TOPIC_URL . $random_release['topic_id']);
|
||||
unset($random_release);
|
||||
} else {
|
||||
bb_die($lang['NO_MATCH']);
|
||||
}
|
||||
}
|
||||
|
||||
// Restore torrents list and search settings if we have valid $search_id
|
||||
$tor_list_ary = [];
|
||||
$tor_list_sql = '';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue