Minor improvements (#950)

This commit is contained in:
Roman Kelesidis 2023-10-05 09:36:46 +07:00 committed by GitHub
commit ca8a8a2036
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 119 additions and 81 deletions

View file

@ -13,7 +13,9 @@ if (!defined('IN_AJAX')) {
global $userdata, $lang, $bb_cfg; global $userdata, $lang, $bb_cfg;
$mode = (string)$this->request['mode']; if (!$mode = (string)$this->request['mode']) {
$this->ajax_die('invalid mode (empty)');
}
switch ($mode) { switch ($mode) {
case 'clear_cache': case 'clear_cache':

View file

@ -13,8 +13,13 @@ if (!defined('IN_AJAX')) {
global $userdata, $lang, $bb_cfg; global $userdata, $lang, $bb_cfg;
$mode = (string)$this->request['mode']; if (!$mode = (string)$this->request['mode']) {
$user_id = $this->request['user_id']; $this->ajax_die('invalid mode (empty)');
}
if (!$user_id = (int)$this->request['user_id']) {
$this->ajax_die($lang['NO_USER_ID_SPECIFIED']);
}
switch ($mode) { switch ($mode) {
case 'delete_profile': case 'delete_profile':

View file

@ -13,7 +13,9 @@ if (!defined('IN_AJAX')) {
global $userdata, $bb_cfg, $lang, $datastore, $log_action; global $userdata, $bb_cfg, $lang, $datastore, $log_action;
$mode = (string)$this->request['mode']; if (!$mode = (string)$this->request['mode']) {
$this->ajax_die('invalid mode (empty)');
}
switch ($mode) { switch ($mode) {
case 'tor_status': case 'tor_status':

View file

@ -13,7 +13,10 @@ if (!defined('IN_AJAX')) {
global $bb_cfg, $lang; global $bb_cfg, $lang;
$mode = (string)$this->request['mode']; if (!$mode = (string)$this->request['mode']) {
$this->ajax_die('invalid mode (empty)');
}
$map = new TorrentPier\Sitemap(); $map = new TorrentPier\Sitemap();
$html = ''; $html = '';

View file

@ -13,7 +13,9 @@ if (!defined('IN_AJAX')) {
global $bb_cfg, $lang, $userdata; global $bb_cfg, $lang, $userdata;
$mode = (string)$this->request['mode']; if (!$mode = (string)$this->request['mode']) {
$this->ajax_die('invalid mode (empty)');
}
$html = '<img src="./styles/images/good.gif">'; $html = '<img src="./styles/images/good.gif">';
switch ($mode) { switch ($mode) {

View file

@ -13,6 +13,7 @@ if (!defined('BB_ROOT')) {
global $bb_cfg, $t_data, $poster_id, $is_auth, $dl_link_css, $dl_status_css, $lang, $images; global $bb_cfg, $t_data, $poster_id, $is_auth, $dl_link_css, $dl_status_css, $lang, $images;
$tor_status_by_for_all = true;
$change_peers_bgr_over = true; $change_peers_bgr_over = true;
$bgr_class_1 = 'row1'; $bgr_class_1 = 'row1';
$bgr_class_2 = 'row2'; $bgr_class_2 = 'row2';
@ -201,7 +202,7 @@ if ($tor_reged && $tor_info) {
'TOR_FROZEN' => (!IS_AM) ? (isset($bb_cfg['tor_frozen'][$tor_info['tor_status']]) && !(isset($bb_cfg['tor_frozen_author_download'][$tor_info['tor_status']]) && $userdata['user_id'] == $tor_info['poster_id'])) ? true : '' : '', 'TOR_FROZEN' => (!IS_AM) ? (isset($bb_cfg['tor_frozen'][$tor_info['tor_status']]) && !(isset($bb_cfg['tor_frozen_author_download'][$tor_info['tor_status']]) && $userdata['user_id'] == $tor_info['poster_id'])) ? true : '' : '',
'TOR_STATUS_TEXT' => $lang['TOR_STATUS_NAME'][$tor_info['tor_status']], 'TOR_STATUS_TEXT' => $lang['TOR_STATUS_NAME'][$tor_info['tor_status']],
'TOR_STATUS_ICON' => $bb_cfg['tor_icons'][$tor_info['tor_status']], 'TOR_STATUS_ICON' => $bb_cfg['tor_icons'][$tor_info['tor_status']],
'TOR_STATUS_BY' => ($tor_info['checked_user_id'] && $is_auth['auth_mod']) ? ('<span title="' . bb_date($tor_info['checked_time']) . '"> &middot; ' . profile_url($tor_info) . ' &middot; <i>' . delta_time($tor_info['checked_time']) . $lang['TOR_BACK'] . '</i></span>') : '', 'TOR_STATUS_BY' => ($tor_info['checked_user_id'] && ($is_auth['auth_mod'] || $tor_status_by_for_all)) ? ('<span title="' . bb_date($tor_info['checked_time']) . '"> &middot; ' . profile_url($tor_info) . ' &middot; <i>' . delta_time($tor_info['checked_time']) . $lang['TOR_BACK'] . '</i></span>') : '',
'TOR_STATUS_SELECT' => build_select('sel_status', array_flip($lang['TOR_STATUS_NAME']), TOR_APPROVED), 'TOR_STATUS_SELECT' => build_select('sel_status', array_flip($lang['TOR_STATUS_NAME']), TOR_APPROVED),
'TOR_STATUS_REPLY' => $bb_cfg['tor_comment'] && !IS_GUEST && in_array($tor_info['tor_status'], $bb_cfg['tor_reply']) && $userdata['user_id'] == $tor_info['poster_id'] && $t_data['topic_status'] != TOPIC_LOCKED, 'TOR_STATUS_REPLY' => $bb_cfg['tor_comment'] && !IS_GUEST && in_array($tor_info['tor_status'], $bb_cfg['tor_reply']) && $userdata['user_id'] == $tor_info['poster_id'] && $t_data['topic_status'] != TOPIC_LOCKED,
//end torrent status mod //end torrent status mod

View file

@ -221,7 +221,7 @@ class Atom
$atom .= " </author>\n"; $atom .= " </author>\n";
$atom .= " <updated>" . $date . "T$time+00:00</updated>\n"; $atom .= " <updated>" . $date . "T$time+00:00</updated>\n";
$atom .= " <id>tag:rto.feed," . $date . ":/t/$topic_id</id>\n"; $atom .= " <id>tag:rto.feed," . $date . ":/t/$topic_id</id>\n";
$atom .= " <link href=\"viewtopic.php?t=$topic_id\" />\n"; $atom .= " <link href=\"" . TOPIC_URL . "$topic_id\" />\n";
$atom .= "</entry>\n"; $atom .= "</entry>\n";
} }
$atom .= "</feed>"; $atom .= "</feed>";

View file

@ -18,75 +18,98 @@
<p class="nav"><a href="{U_GROUP_URL}">{L_GROUP_RETURN}</a></p> <p class="nav"><a href="{U_GROUP_URL}">{L_GROUP_RETURN}</a></p>
<table class="forumline pad_4"> <table class="forumline pad_4">
<col class="row1" width="20%"> <col class="row1" width="20%">
<col class="row2" width="100%"> <col class="row2" width="100%">
<tr> <tr>
<th colspan="2">{L_GROUP_INFORMATION}</th> <th colspan="2">{L_GROUP_INFORMATION}</th>
</tr> </tr>
<tr> <tr>
<td>{L_GROUP_NAME}:</td> <td>{L_GROUP_NAME}:</td>
<td><input type="text" id="group_name" size="80" value="{GROUP_NAME}" onblur="manage_group(this.id, this.value);" /></td> <td><input type="text" id="group_name" size="80" value="{GROUP_NAME}"
</tr> onblur="manage_group(this.id, this.value);"/></td>
<tr> </tr>
<td>{L_GROUP_DESCRIPTION}:</td> <tr id="preview_description" class="hidden">
<td><div id="preview_description"></div> <td>{L_PREVIEW} ({L_GROUP_DESCRIPTION}):</td>
<p> <td>
<textarea cols="80" id="group_description" rows="6">{GROUP_DESCRIPTION}</textarea> <div class="description genmed"></div>
</p> </td>
<p> </tr>
<input type="button" value="{L_AJAX_PREVIEW}" onclick="ajax.exec({ action: 'posts', type: 'view_message', message: $('textarea#group_description').val()});ajax.callback.posts=function(data){$('div#preview_description').html(data.message_html);initPostBBCode('div#preview_description')}"> <tr>
<input type="button" value="{L_SAVE}" onclick="manage_group('group_description',$('textarea#group_description').val())"> <td>{L_GROUP_DESCRIPTION}:</td>
</p> <td>
</td> <p>
</tr> <textarea cols="80" id="group_description" rows="6">{GROUP_DESCRIPTION}</textarea>
<tr> </p>
<td>{L_SIGNATURE}:</td> <p>
<td><div id="preview_signature"></div> <input type="button" value="{L_AJAX_PREVIEW}"
<p> onclick="ajax.exec({ action: 'posts', type: 'view_message', message: $('textarea#group_description').val()}); ajax.callback.posts=function(data) { $('tr#preview_description').show(); $('tr#preview_description').html(data.message_html); initPostBBCode('div.description')}">
<textarea cols="80" id="group_signature" rows="3">{GROUP_SIGNATURE}</textarea> <input type="button" value="{L_SAVE}"
</p> onclick="manage_group('group_description',$('textarea#group_description').val())">
<p> </p>
<input type="button" value="{L_AJAX_PREVIEW}" onclick="ajax.exec({ action: 'posts', type: 'view_message', message: $('textarea#group_signature').val()});ajax.callback.posts=function(data){$('div#preview_signature').html(data.message_html);initPostBBCode('div#preview_signature')}"> </td>
<input type="button" value="{L_SAVE}" onclick="manage_group('group_signature',$('textarea#group_signature').val())"> </tr>
</p> <tr id="preview_signature" class="hidden">
</td> <td>{L_PREVIEW} ({L_SIGNATURE}):</td>
</tr> <td>
<tr> <div class="signature"></div>
<td>{L_GROUP_TYPE}:</td> </td>
<td> </tr>
<p> <tr>
<label><input type="radio" name="group_type" onchange="manage_group(this.name,this.value)" value="{S_GROUP_OPEN_TYPE}" {S_GROUP_OPEN_CHECKED} />{L_GROUP_OPEN}</label> &nbsp;&nbsp; <td>{L_SIGNATURE}:</td>
<label><input type="radio" name="group_type" onchange="manage_group(this.name,this.value)" value="{S_GROUP_CLOSED_TYPE}" {S_GROUP_CLOSED_CHECKED} />{L_GROUP_CLOSED}</label> &nbsp;&nbsp; <td>
<label><input type="radio" name="group_type" onchange="manage_group(this.name,this.value)" value="{S_GROUP_HIDDEN_TYPE}" {S_GROUP_HIDDEN_CHECKED} />{L_GROUP_HIDDEN}</label> <p>
</p> <textarea cols="80" id="group_signature" rows="3">{GROUP_SIGNATURE}</textarea>
</td> </p>
</tr> <p>
<tr> <input type="button" value="{L_AJAX_PREVIEW}"
<td>{L_RELEASE_GROUP}:</td> onclick="ajax.exec({ action: 'posts', type: 'view_message', message: $('textarea#group_signature').val()}); ajax.callback.posts=function(data) { $('tr#preview_signature').show(); $('tr#preview_signature').html(data.message_html); initPostBBCode('div.signature')}">
<td> <input type="button" value="{L_SAVE}"
<label><input type="radio" name="release_group" value="1" onclick="manage_group(this.name,this.value)" <!-- IF RELEASE_GROUP -->checked<!-- ENDIF --> />{L_YES}</label>&nbsp;&nbsp; onclick="manage_group('group_signature',$('textarea#group_signature').val())">
<label><input type="radio" name="release_group" value="0" onclick="manage_group(this.name,this.value)" <!-- IF not RELEASE_GROUP -->checked<!-- ENDIF --> />{L_NO}</label> </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>{L_GROUP_TYPE}:</td>
{L_AVATAR}: <br /><br /> <td>
<div id="avatar" align="center"> <p>
<p>{AVATAR_IMG}</p><br /> <label><input type="radio" name="group_type" onchange="manage_group(this.name,this.value)"
<p><input type="button" name="delete_avatar" value="{L_DELETE_IMAGE}" onclick="manage_group(this.name,this.value)" /></p> value="{S_GROUP_OPEN_TYPE}" {S_GROUP_OPEN_CHECKED} />{L_GROUP_OPEN}</label> &nbsp;&nbsp;
</div> <label><input type="radio" name="group_type" onchange="manage_group(this.name,this.value)"
</td> value="{S_GROUP_CLOSED_TYPE}" {S_GROUP_CLOSED_CHECKED} />{L_GROUP_CLOSED}</label> &nbsp;&nbsp;
<td valign="top"> <label><input type="radio" name="group_type" onchange="manage_group(this.name,this.value)"
<div id="avatar_explain" class="med">{AVATAR_EXPLAIN}</div> value="{S_GROUP_HIDDEN_TYPE}" {S_GROUP_HIDDEN_CHECKED} />{L_GROUP_HIDDEN}</label>
<!-- IF $bb_cfg['group_avatars']['up_allowed'] --> </p>
<br /> </td>
<form action="{S_GROUP_CONFIG_ACTION}" method="post" enctype="multipart/form-data"> </tr>
{S_HIDDEN_FIELDS} <tr>
<input type="hidden" name="MAX_FILE_SIZE" value="{$bb_cfg['group_avatars']['max_size']}" /> <td>{L_RELEASE_GROUP}:</td>
<input type="file" name="avatar" /> <td>
<input class="mainoption" type="submit" name="submit" value="{L_UPLOAD_AVATAR_FILE}" /> <label><input type="radio" name="release_group" value="1" onclick="manage_group(this.name,this.value)"
</form> <!-- IF RELEASE_GROUP -->checked<!-- ENDIF --> />{L_YES}</label>&nbsp;&nbsp;
<!-- ENDIF --> <label><input type="radio" name="release_group" value="0" onclick="manage_group(this.name,this.value)"
</td> <!-- IF not RELEASE_GROUP -->checked<!-- ENDIF --> />{L_NO}</label>
</tr> </td>
</tr>
<tr>
<td>
{L_AVATAR}: <br/><br/>
<div id="avatar" align="center">
<p>{AVATAR_IMG}</p><br/>
<p><input type="button" name="delete_avatar" value="{L_DELETE_IMAGE}"
onclick="manage_group(this.name,this.value)"/></p>
</div>
</td>
<td valign="top">
<div id="avatar_explain" class="med">{AVATAR_EXPLAIN}</div>
<!-- IF $bb_cfg['group_avatars']['up_allowed'] -->
<br/>
<form action="{S_GROUP_CONFIG_ACTION}" method="post" enctype="multipart/form-data">
{S_HIDDEN_FIELDS}
<input type="hidden" name="MAX_FILE_SIZE" value="{$bb_cfg['group_avatars']['max_size']}"/>
<input type="file" name="avatar"/>
<input class="mainoption" type="submit" name="submit" value="{L_UPLOAD_AVATAR_FILE}"/>
</form>
<!-- ENDIF -->
</td>
</tr>
</table> </table>

View file

@ -1,4 +1,4 @@
<span class="maintitle">{PAGE_TITLE}</span> <h1 class="pagetitle">{PAGE_TITLE}</h1>
<table width="100%"> <table width="100%">
<tr> <tr>

View file

@ -438,7 +438,7 @@ ajax.callback.index_data = function(data) {
<!-- IF GENDER --> <!-- IF GENDER -->
<tr> <tr>
<th>{L_GENDER}:</th> <th>{L_GENDER}:</th>
<td id="user_gender"><span class="editable">{GENDER}</span></td> <td id="user_gender"><b class="editable">{GENDER}</b></td>
</tr> </tr>
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF BIRTHDAY --> <!-- IF BIRTHDAY -->