mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
r512
Делаем список торрентов в профиле скрытым по умолчанию + небольшая надстройка для смены шаба git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@512 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
1202d632a9
commit
77e6278fc0
4 changed files with 7 additions and 3 deletions
|
@ -12,7 +12,7 @@ switch ($mode)
|
|||
$user_id = (int) $this->request['user_id'];
|
||||
if(!$user_id) $this->ajax_die($lang['NO_USER_ID_SPECIFIED']);
|
||||
$user_info = get_userdata($user_id);
|
||||
if(bf($user_info['user_opt'], 'user_opt', 'allow_dls') && !IS_AM && $user_id != $userdata['user_id']) $this->ajax_die($lang['CUR_ACTIVE_DLS_DISALLOWED']);
|
||||
if(!bf($user_info['user_opt'], 'user_opt', 'allow_dls') && !IS_AM && $user_id != $userdata['user_id']) $this->ajax_die($lang['CUR_ACTIVE_DLS_DISALLOWED']);
|
||||
|
||||
$excluded_forums_csv = $user->get_excluded_forums(AUTH_VIEW);
|
||||
$not_auth_forums_sql = ($excluded_forums_csv) ? "
|
||||
|
|
|
@ -92,12 +92,14 @@ function templates_select($default_style, $select_name = 'tpl_name')
|
|||
global $bb_cfg;
|
||||
|
||||
$templates_select = '<select name="'. $select_name .'">';
|
||||
$x = 0;
|
||||
foreach ($bb_cfg['templates'] as $folder => $name)
|
||||
{
|
||||
$selected = '';
|
||||
if ($folder == $default_style) $selected = ' selected="selected"';
|
||||
$templates_select .= '<option value="'. $folder .'"'. $selected .'>'. $name .'</option>';
|
||||
$x++;
|
||||
}
|
||||
$templates_select .= '</select> ';
|
||||
return $templates_select;
|
||||
return ($x > 1) ? $templates_select : '';
|
||||
}
|
|
@ -123,7 +123,7 @@ $template->assign_vars(array(
|
|||
'ICQ' => $profiledata['user_icq'],
|
||||
'LAST_VISIT_TIME' => ($profiledata['user_lastvisit']) ? (bf($profiledata['user_opt'], 'user_opt', 'allow_viewonline') && !IS_ADMIN) ? $lang['HIDDEN_USER'] : bb_date($profiledata['user_lastvisit'], 'Y-m-d H:i', 'false') : $lang['NEVER'],
|
||||
'LAST_ACTIVITY_TIME' => ($profiledata['user_session_time']) ? (bf($profiledata['user_opt'], 'user_opt', 'allow_viewonline') && !IS_ADMIN) ? $lang['HIDDEN_USER'] : bb_date($profiledata['user_session_time'], 'Y-m-d H:i', 'false') : $lang['NEVER'],
|
||||
'ALLOW_DLS' => (!bf($profiledata['user_opt'], 'user_opt', 'allow_dls') || (IS_AM || $profile_user_id)),
|
||||
'ALLOW_DLS' => bf($profiledata['user_opt'], 'user_opt', 'allow_dls'),
|
||||
'LOCATION' => $profiledata['user_from'],
|
||||
|
||||
'USER_ACTIVE' => $profiledata['user_active'],
|
||||
|
|
|
@ -140,6 +140,7 @@ document.write('<input type="hidden" name="user_timezone" value="'+tz+'" />');
|
|||
<tr>
|
||||
<th colspan="2">{L_PREFERENCES}</th>
|
||||
</tr>
|
||||
<!-- IF TEMPLATES_SELECT -->
|
||||
<tr>
|
||||
<td>{L_FORUM_STYLE}</td>
|
||||
<td>
|
||||
|
@ -148,6 +149,7 @@ document.write('<input type="hidden" name="user_timezone" value="'+tz+'" />');
|
|||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF not SIG_DISALLOWED -->
|
||||
<tr colspan="2" id="view_message" class="hidden">
|
||||
<td colspan="2">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue