mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
r223
git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@223 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
3507f4fc8d
commit
48b3a229d8
11 changed files with 40 additions and 21 deletions
|
@ -47,7 +47,8 @@ switch ($field)
|
|||
break;
|
||||
|
||||
case 'user_gender':
|
||||
if (!isset($lang['GENDER_SELECT'][$value]))
|
||||
if(!$bb_cfg['gender']) $this->ajax_die($lang['MODULE_OFF']);
|
||||
if (!isset($lang['GENDER_SELECT'][$value]))
|
||||
{
|
||||
$this->ajax_die($lang['ERROR']);
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ $bb_cfg['css_ver'] = 1;
|
|||
|
||||
// Increase number of revision after update
|
||||
$bb_cfg['tp_version'] = '2.1 Beta';
|
||||
$bb_cfg['tp_release_state'] = 'R219';
|
||||
$bb_cfg['tp_release_state'] = 'R223';
|
||||
$bb_cfg['tp_release_date'] = '17-08-2011';
|
||||
|
||||
$bb_cfg['board_disabled_msg'] = 'форум временно отключен'; // 'forums temporarily disabled'; // show this msg if board has been disabled via ON/OFF trigger
|
||||
|
@ -110,7 +110,7 @@ $bb_cfg['datastore_type'] = 'filecache';
|
|||
$bb_cfg['server_name'] = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : 'torrentpier.me'; // The domain name from which this board runs
|
||||
$bb_cfg['server_port'] = (!empty($_SERVER['SERVER_PORT'])) ? $_SERVER['SERVER_PORT'] : 80; // The port your server is running on
|
||||
$bb_cfg['script_path'] = '/'; // The path where FORUM is located relative to the domain name
|
||||
$bb_cfg['sitename'] = 'TorrentPier II - Torrent Tracker (see $bb_cfg[\'sitename\'] in config.php)'; // Name of your site
|
||||
$bb_cfg['sitename'] = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : 'TorrentPier II - Torrent Tracker (see $bb_cfg[\'sitename\'] in config.php)'; // Name of your site
|
||||
|
||||
// Server load
|
||||
$bb_cfg['max_srv_load'] = 0; // 0 - disable
|
||||
|
@ -259,7 +259,7 @@ $bb_cfg['topic_tpl']['overall_header'] = TEMPLATES_DIR .'topic_tpl_overall_heade
|
|||
$bb_cfg['topic_tpl']['rules_video'] = TEMPLATES_DIR .'topic_tpl_rules_video.html';
|
||||
|
||||
// Cookie
|
||||
$bb_cfg['cookie_domain'] = ''; # '.yourdomain.com'
|
||||
$bb_cfg['cookie_domain'] = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : ''; # '.yourdomain.com'
|
||||
$bb_cfg['cookie_path'] = '/'; # '/forum/'
|
||||
$bb_cfg['cookie_secure'] = (!empty($_SERVER['HTTPS']) ? 1 : 0); # 0
|
||||
$bb_cfg['cookie_prefix'] = 'bb_'; # 'bb_'
|
||||
|
|
|
@ -37,5 +37,8 @@ $bb_cfg['birthday']['max_user_age'] = 100;
|
|||
$bb_cfg['birthday']['min_user_age'] = 10;
|
||||
$bb_cfg['birthday']['check_day'] = 7;
|
||||
|
||||
// Gender
|
||||
$bb_cfg['gender'] = true;
|
||||
|
||||
// CallSeed
|
||||
$bb_cfg['callseed'] = false;
|
|
@ -29,16 +29,20 @@ $data['leechers'] = number_format($row['leechers']);
|
|||
$data['peers'] = number_format($row['seeders'] + $row['leechers']);
|
||||
$data['speed'] = $row['speed'];
|
||||
|
||||
global $bb_cfg, $lang;
|
||||
global $bb_cfg;
|
||||
|
||||
// gender stat
|
||||
$sql = DB()->fetch_rowset("SELECT user_gender FROM ". BB_USERS ." WHERE user_id NOT IN(". EXCLUDED_USERS_CSV .")");
|
||||
$data['male'] = $data['female'] = $data['unselect'] = 0;
|
||||
foreach($sql as $row)
|
||||
if ($bb_cfg['gender'])
|
||||
{
|
||||
if($row['user_gender'] == 1) $data['male']++;
|
||||
if($row['user_gender'] == 2) $data['female']++;
|
||||
if(!$row['user_gender']) $data['unselect']++;
|
||||
$sql = DB()->fetch_rowset("SELECT user_gender FROM ". BB_USERS ." WHERE user_id NOT IN(". EXCLUDED_USERS_CSV .")");
|
||||
$data['male'] = $data['female'] = $data['unselect'] = 0;
|
||||
|
||||
foreach($sql as $row)
|
||||
{
|
||||
if($row['user_gender'] == MALE) $data['male']++;
|
||||
if($row['user_gender'] == FEMALE) $data['female']++;
|
||||
if(!$row['user_gender']) $data['unselect']++;
|
||||
}
|
||||
}
|
||||
|
||||
// birthday stat
|
||||
|
@ -70,8 +74,8 @@ if($bb_cfg['birthday']['check_day'] && $bb_cfg['birthday']['enabled'])
|
|||
}
|
||||
}
|
||||
|
||||
$data['birthday_today_list'] = ($birthday_today_list) ? $lang['BIRTHDAY_TODAY'] . join(', ', $birthday_today_list) : $lang['NOBIRTHDAY_TODAY'];
|
||||
$data['birthday_week_list'] = ($birthday_week_list) ? sprintf($lang['BIRTHDAY_WEEK'], $bb_cfg['birthday']['check_day'], join(', ', $birthday_week_list)) : sprintf($lang['NOBIRTHDAY_WEEK'], $bb_cfg['birthday']['check_day']);
|
||||
$data['birthday_today_list'] = $birthday_today_list;
|
||||
$data['birthday_week_list'] = $birthday_week_list;
|
||||
}
|
||||
|
||||
$this->store('stats', $data);
|
||||
|
|
|
@ -271,6 +271,10 @@ define('POST_REPORT_URL', 'r');
|
|||
define('POST_REPORT_REASON_URL', 'r');
|
||||
// Report [END]
|
||||
|
||||
// Gender
|
||||
define('MALE', 1);
|
||||
define('FEMALE', 2);
|
||||
|
||||
// Torrents (reserved: -1)
|
||||
define('TOR_NOT_APPROVED', 0); // не проверено
|
||||
define('TOR_CLOSED', 1); // закрыто
|
||||
|
|
|
@ -103,8 +103,8 @@ $template->assign_vars(array(
|
|||
'EMAIL' => $email,
|
||||
'WWW' => $profiledata['user_website'],
|
||||
'ICQ' => $profiledata['user_icq'],
|
||||
'LAST_VISIT_TIME' => ($profiledata['user_lastvisit']) ? (bf($profiledata['user_opt'], 'user_opt', 'allow_viewonline') && !IS_ADMIN) ? '---' : bb_date($profiledata['user_lastvisit'], 'Y-m-d H:i') : $lang['NEVER'],
|
||||
'LAST_ACTIVITY_TIME' => ($profiledata['user_session_time']) ? (bf($profiledata['user_opt'], 'user_opt', 'allow_viewonline') && !IS_ADMIN) ? '---' : bb_date($profiledata['user_session_time'], 'Y-m-d H:i') : $lang['NEVER'],
|
||||
'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') : $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') : $lang['NEVER'],
|
||||
'LOCATION' => ($profiledata['user_from']) ? $profiledata['user_from'] : '',
|
||||
|
||||
'USER_ACTIVE' => $profiledata['user_active'],
|
||||
|
@ -112,7 +112,7 @@ $template->assign_vars(array(
|
|||
'OCCUPATION' => $profiledata['user_occ'],
|
||||
'INTERESTS' => $profiledata['user_interests'],
|
||||
'SKYPE' => $profiledata['user_skype'],
|
||||
'GENDER' => ($profiledata['user_gender']) ? $lang['GENDER_SELECT'][$profiledata['user_gender']] : '',
|
||||
'GENDER' => ($bb_cfg['gender'] && $profiledata['user_gender']) ? $lang['GENDER_SELECT'][$profiledata['user_gender']] : '',
|
||||
'BIRTHDAY' => ($bb_cfg['birthday']['enabled'] && $profiledata['user_birthday']) ? realdate($profiledata['user_birthday'], 'Y-m-d') : '',
|
||||
'AGE' => ($bb_cfg['birthday']['enabled'] && $profiledata['user_birthday']) ? birthday_age($profiledata['user_birthday']) : '',
|
||||
'AVATAR_IMG' => $avatar_img,
|
||||
|
|
|
@ -204,7 +204,7 @@ $template->assign_vars(array(
|
|||
'TOTAL_TOPICS' => sprintf($lang['POSTED_TOPICS_TOTAL'], $stats['topiccount']),
|
||||
'TOTAL_POSTS' => sprintf($lang['POSTED_ARTICLES_TOTAL'], $stats['postcount']),
|
||||
'TOTAL_USERS' => sprintf($lang['REGISTERED_USERS_TOTAL'], $stats['usercount']),
|
||||
'TOTAL_GENDER' => sprintf($lang['USERS_TOTAL_GENDER'], $stats['male'], $stats['female'], $stats['unselect']),
|
||||
'TOTAL_GENDER' => ($bb_cfg['gender']) ? sprintf($lang['USERS_TOTAL_GENDER'], $stats['male'], $stats['female'], $stats['unselect']) : '',
|
||||
'NEWEST_USER' => sprintf($lang['NEWEST_USER'], '<a href="'. PROFILE_URL . $stats['newestuser']['user_id'] .'">', $stats['newestuser']['username'], '</a>'),
|
||||
|
||||
// Tracker stats
|
||||
|
@ -339,10 +339,10 @@ if ($bb_cfg['show_latest_news'])
|
|||
|
||||
if($bb_cfg['birthday']['check_day'] && $bb_cfg['birthday']['enabled'])
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'WHOSBIRTHDAY_WEEK' => $stats['birthday_week_list'],
|
||||
'WHOSBIRTHDAY_TODAY' => $stats['birthday_today_list'],
|
||||
));
|
||||
$template->assign_vars(array(
|
||||
'WHOSBIRTHDAY_WEEK' => ($stats['birthday_week_list']) ? sprintf($lang['BIRTHDAY_WEEK'], $bb_cfg['birthday']['check_day'], join(', ', $stats['birthday_week_list'])) : sprintf($lang['NOBIRTHDAY_WEEK'], $bb_cfg['birthday']['check_day']),
|
||||
'WHOSBIRTHDAY_TODAY' => ($stats['birthday_today_list']) ? $lang['BIRTHDAY_TODAY'] . join(', ', $stats['birthday_today_list']) : $lang['NOBIRTHDAY_TODAY'],
|
||||
));
|
||||
}
|
||||
|
||||
// Allow cron
|
||||
|
|
|
@ -633,6 +633,7 @@ $lang['CURRENT_IMAGE'] = 'Current Image';
|
|||
|
||||
$lang['NOTIFY_ON_PRIVMSG'] = 'Notify on new Private Message';
|
||||
$lang['HIDE_USER'] = 'Hide your online status';
|
||||
$lang['HIDDEN_USER'] = 'Hidden user';
|
||||
|
||||
$lang['PROFILE_UPDATED'] = 'Your profile has been updated';
|
||||
$lang['PROFILE_UPDATED_INACTIVE'] = 'Your profile has been updated. However, you have changed vital details, thus your account is now inactive. Check your e-mail to find out how to reactivate your account, or if admin activation is required, wait for the administrator to reactivate it.';
|
||||
|
|
|
@ -640,6 +640,7 @@ $lang['CURRENT_IMAGE'] = 'Текущее изображение';
|
|||
|
||||
$lang['NOTIFY_ON_PRIVMSG'] = 'Уведомлять о новых личных сообщениях';
|
||||
$lang['HIDE_USER'] = 'Скрывать ваше пребывание на форуме';
|
||||
$lang['HIDDEN_USER'] = 'Скрыто пользователем';
|
||||
|
||||
$lang['PROFILE_UPDATED'] = 'Ваш профиль был изменён';
|
||||
$lang['PROFILE_UPDATED_INACTIVE'] = 'Ваш профиль был изменён, но вы изменили важные данные, так что теперь ваша учётная запись неактивна. Проверьте ваш почтовый ящик, чтобы узнать как вновь активировать учётную запись или, если требуется одобрение администратора, подождите, пока это сделает администратор.';
|
||||
|
|
|
@ -181,9 +181,12 @@
|
|||
<p>{PEERS_STAT}</p>
|
||||
<p>{SPEED_STAT}</p>
|
||||
|
||||
<!-- IF $bb_cfg['birthday']['enabled'] -->
|
||||
<div class="hr1" style="margin: 5px 0 4px;"></div>
|
||||
<p>{WHOSBIRTHDAY_TODAY}</p>
|
||||
<p>{WHOSBIRTHDAY_WEEK}</p>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<div class="hr1" style="margin: 5px 0 4px;"></div>
|
||||
|
||||
<p>{TOTAL_USERS_ONLINE}<!-- IF SHOW_ADMIN_OPTIONS --> {USERS_ONLINE_COUNTS}<!-- ENDIF --></p>
|
||||
|
|
|
@ -85,10 +85,12 @@ ajax.callback.gen_passkey = function(data){
|
|||
<tr>
|
||||
<th colspan="2">{L_PROFILE_INFO}</th>
|
||||
</tr>
|
||||
<!-- IF $bb_cfg['gender'] -->
|
||||
<tr>
|
||||
<td>{L_GENDER}:</td>
|
||||
<td>{USER_GENDER}</td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF BIRTHDAY -->
|
||||
<tr>
|
||||
<td>{L_BIRTHDAY}:</td>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue