Стабильная версия, рекомендуемая для обновления и перехода. Спасибо _XZ_ за предоставленные наработки. git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@300 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
pherum83 2011-10-14 22:09:09 +00:00
commit 594a8b207b
10 changed files with 69 additions and 79 deletions

View file

@ -123,6 +123,7 @@ switch ($field)
{
$this->ajax_die($lang['INVALID_DATE'] . $this->request['value']);
}
$value = $value - (3600 * -1);
$this->response['new_value'] = bb_date($value);
break;

View file

@ -25,7 +25,7 @@ switch($mode)
case 'delete_topics':
if (empty($this->request['confirmed']) && $userdata['user_id'] == $user_id) $this->prompt_for_confirm($lang['DELETE_USER_POSTS_ME']);
if (empty($this->request['confirmed'])) $this->prompt_for_confirm('Óäàëèòü âñå ñîîáùåíèÿ è âñå íà÷àòûå þçåðîì òîïèêè öåëèêîì?');
if (empty($this->request['confirmed'])) $this->prompt_for_confirm('Удалить все сообщения и все начатые юзером топики целиком?');
if (IS_ADMIN)
{
@ -40,7 +40,7 @@ switch($mode)
case 'delete_message':
if (empty($this->request['confirmed']) && $userdata['user_id'] == $user_id) $this->prompt_for_confirm($lang['DELETE_USER_POSTS_ME']);
if (empty($this->request['confirmed'])) $this->prompt_for_confirm('Óäàëèòü âñå ñîîáùåíèÿ, êðîìå çàãëàâíûõ?');
if (empty($this->request['confirmed'])) $this->prompt_for_confirm('Удалить все сообщения, кроме заглавных?');
if (IS_ADMIN)
{

View file

@ -53,8 +53,8 @@ $bb_cfg = $tr_cfg = $page_cfg = array();
// Increase number of revision after update
$bb_cfg['tp_version'] = '2.1 Stable';
$bb_cfg['tp_release_state'] = 'R299';
$bb_cfg['tp_release_date'] = '12-10-2011';
$bb_cfg['tp_release_state'] = 'R300';
$bb_cfg['tp_release_date'] = '15-10-2011';
// Database
$charset = 'utf8';
@ -102,7 +102,7 @@ $bb_cfg['cache']['engines'] = array(
$bb_cfg['datastore_type'] = 'filecache';
// Server
$bb_cfg['server_name'] = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : 'torrentpier.me'; // The domain name from which this board runs
$bb_cfg['server_name'] = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : ''; // 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

View file

@ -1562,66 +1562,55 @@ function bb_date ($gmepoch, $format = false, $tz = null)
{
global $bb_cfg, $lang, $userdata;
if (is_null($tz))
{
if (empty($userdata['session_logged_in']))
{ $tz = $bb_cfg['board_timezone']; }
else $tz = $userdata['user_timezone'];
}
if (!$format)
{
$format = $bb_cfg['default_dateformat'];
}
$date = gmdate($format, $gmepoch + (3600 * $tz));
if (!$format) $format = $bb_cfg['default_dateformat'];
if (empty($lang))require_once($bb_cfg['default_lang_dir'] .'lang_main.php');
if (empty($lang))
{
require_once($bb_cfg['default_lang_dir'] .'lang_main.php');
}
$thetime = ($bb_cfg['translate_dates']) ? strtr(strtoupper($date), $lang['DATETIME']) : $date;
if(is_numeric($tz))
if (is_null($tz) || $tz == 'false')
{
if (empty($userdata['session_logged_in']))
{
$tz = $bb_cfg['board_timezone'];
$tz2 = $bb_cfg['board_timezone'];
}
else $tz = $userdata['user_timezone'];
else $tz2 = $userdata['user_timezone'];
}
elseif (is_numeric($tz)) $tz2 = $tz;
$date = gmdate($format, $gmepoch + (3600 * $tz2));
if($tz != 'false')
{
$time_format = " H:i";
$date = getdate();
$today = $date['mday'];
$month = $date['mon'];
$year = $date['year'];
$today = gmdate("d", TIMENOW + (3600 * $tz2));
$month = gmdate("m", TIMENOW + (3600 * $tz2));
$year = gmdate("Y", TIMENOW + (3600 * $tz2));
$forum_date_today = @gmdate ("d", $gmepoch + (3600 * $tz));
$forum_date_month = @gmdate ("m", $gmepoch + (3600 * $tz));
$forum_date_year = @gmdate ("Y", $gmepoch + (3600 * $tz));
$date_today = gmdate("d", $gmepoch + (3600 * $tz2));
$date_month = gmdate("m", $gmepoch + (3600 * $tz2));
$date_year = gmdate("Y", $gmepoch + (3600 * $tz2));
if ($forum_date_today == $today && $forum_date_month == $month && $forum_date_year == $year)
if ($date_today == $today && $date_month == $month && $date_year == $year)
{
$thetime = $lang['TODAY'] . @gmdate($time_format, $gmepoch + (3600 * $tz));
$date = 'today' . gmdate($time_format, $gmepoch + (3600 * $tz2));
}
elseif ($today != 1 && $forum_date_today == ($today-1) && $forum_date_month == $month && $forum_date_year == $year)
elseif ($today != 1 && $date_today == ($today-1) && $date_month == $month && $date_year == $year)
{
$thetime = $lang['YESTERDAY'] . @gmdate($time_format, $gmepoch + (3600 * $tz));
$date = 'yesterday' . gmdate($time_format, $gmepoch + (3600 * $tz2));
}
elseif ($today == 1 && $month != 1)
{
$yesterday = date ("t", mktime(0, 0, 0, ($month-1), 1, $year));
if ($forum_date_today == $yesterday && $forum_date_month == ($month-1) && $forum_date_year == $year)
$thetime = $lang['YESTERDAY'] . @gmdate($time_format, $gmepoch + (3600 * $tz));
if ($date_today == $yesterday && $date_month == ($month-1) && $date_year == $year)
$date = 'yesterday' . gmdate($time_format, $gmepoch + (3600 * $tz2));
}
elseif ($today == 1 && $month == 1)
{
$yesterday = date ("t", mktime(0, 0, 0, 12, 1, ($year -1)));
if ($forum_date_today == $yesterday && $forum_date_month == 12 && $forum_date_year == ($year-1))
$thetime = $lang['YESTERDAY'] . @gmdate($time_format, $gmepoch + (3600 * $tz));
if ($date_today == $yesterday && $date_month == 12 && $date_year == ($year-1))
$date = 'yesterday' . gmdate($time_format, $gmepoch + (3600 * $tz));
}
}
return ($thetime);
return ($bb_cfg['translate_dates']) ? strtr(strtoupper($date), $lang['DATETIME']) : $date;
}
// Birthday

View file

@ -1007,8 +1007,8 @@ $lang['TZ']['11'] = 'GMT + 11 Hours';
$lang['TZ']['12'] = 'GMT + 12 Hours';
$lang['TZ']['13'] = 'GMT + 13 Hours';
$lang['TODAY'] = 'Today';
$lang['YESTERDAY'] = 'Yesterday';
$lang['DATETIME']['TODAY'] = 'Today';
$lang['DATETIME']['YESTERDAY'] = 'Yesterday';
$lang['DATETIME']['SUNDAY'] = 'Sunday';
$lang['DATETIME']['MONDAY'] = 'Monday';
@ -1598,7 +1598,8 @@ $lang['USER_DELETE_ME'] = 'Sorry, your account is forbidden to remove!';
$lang['USER_DELETE_CSV'] = 'Sorry, this account is not allowed to delete!';
$lang['USER_DELETE_CONFIRM'] = 'Are you sure you want to delete this user?';
$lang['USER_DELETED'] = 'User was successfully deleted';
$lang['DELETE_USER_POSTS'] = 'Delete all user posts';
$lang['DELETE_USER_ALL_POSTS'] = 'Delete all user posts';
$lang['DELETE_USER_POSTS'] = 'Delete all messages, except for capital';
$lang['DELETE_USER_POSTS_ME'] = 'Are you sure you want to delete all my posts?';
$lang['DELETE_USER_POSTS_CONFIRM'] = 'Are you sure you want to delete all of your users?';
$lang['USER_DELETED_POSTS'] = 'Posts were successfully removed';

View file

@ -1014,8 +1014,8 @@ $lang['TZ']['11'] = 'GMT + 11';
$lang['TZ']['12'] = 'GMT + 12';
$lang['TZ']['13'] = 'GMT + 13';
$lang['TODAY'] = 'Сегодня';
$lang['YESTERDAY'] = 'Вчера';
$lang['DATETIME']['TODAY'] = 'Сегодня';
$lang['DATETIME']['YESTERDAY'] = 'Вчера';
$lang['DATETIME']['SUNDAY'] = 'Воскресенье';
$lang['DATETIME']['MONDAY'] = 'Понедельник';
@ -1603,7 +1603,8 @@ $lang['USER_DELETE_ME'] = 'Извините, свой аккаунт запре
$lang['USER_DELETE_CSV'] = 'Извините, этот аккаунт запрещено удалять!';
$lang['USER_DELETE_CONFIRM'] = 'Вы действительно хотите удалить этого пользователя?';
$lang['USER_DELETED'] = 'Пользователь был успешно удалён';
$lang['DELETE_USER_POSTS'] = 'Удалить все сообщения пользователя';
$lang['DELETE_USER_ALL_POSTS'] = 'Удалить все сообщения пользователя';
$lang['DELETE_USER_POSTS'] = 'Удалить все сообщения, кроме заглавных';
$lang['DELETE_USER_POSTS_ME'] = 'Вы действительно хотите удалить все свои сообщения?';
$lang['DELETE_USER_POSTS_CONFIRM'] = 'Вы действительно хотите удалить все свои пользователя?';
$lang['USER_DELETED_POSTS'] = 'Сообщения успешно удалены';

View file

@ -20,7 +20,7 @@ if (!empty($_POST['message']))
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title><?php echo $bb_cfg['sitename']?></title>
<title><?php echo $bb_cfg['server_name']; ?></title>
<style type="text/css">
body { min-width: 760px; color: #000000; background: #E3E3E3; font: bold 16px Verdana; }
.msg { font: 12px Verdana; }

View file

@ -132,9 +132,6 @@ img { border: 0px; }
.dlComplete, .seed, .seedmed, .seedsmall { color: #006600; }
.dlCancel { color: #666666; }
/* DL list color me */
.itsme { color: #0000FF !important; font-size: 12px; font-weight: bold; text-decoration: none;}
a.dlWill, a.dlWill:visited { color: #0066CC; text-decoration: none; }
a.dlDown, a.dlDown:visited { color: #800000; text-decoration: none; }
a.dlComplete, a.dlComplete:visited { color: #006600; text-decoration: none; }

View file

@ -50,6 +50,7 @@
<!-- IF H_C_AL_MESS -->
<div class="row1 med tCenter pad_4 border bw_TRBL" style="margin: 4px 0;">{L_HIDE_CAT_MESS}</div>
<div class="spacer_6"></div>
<!-- ENDIF -->
<!-- BEGIN c -->

View file

@ -246,8 +246,8 @@ ajax.callback.manage_user = function(data) {
<!-- IF IS_ADMIN -->
<tr id="delete" style="display: none;">
<td colspan="2" class="med tCenter">
[ <a href="#" onclick="ajax.exec({action : 'manage_user', mode: 'delete_topics', user_id : '{PROFILE_USER_ID}'}); return false;" class="adm">топики целиком</a> ]&nbsp;
[ <a href="#" onclick="ajax.exec({action : 'manage_user', mode: 'delete_message', user_id : '{PROFILE_USER_ID}'}); return false;" class="adm">все, кроме заглавных</a> ]
[ <a href="#" onclick="ajax.exec({action : 'manage_user', mode: 'delete_topics', user_id : '{PROFILE_USER_ID}'}); return false;" class="adm">{L_DELETE_USER_ALL_POSTS}</a> ]&nbsp;
[ <a href="#" onclick="ajax.exec({action : 'manage_user', mode: 'delete_message', user_id : '{PROFILE_USER_ID}'}); return false;" class="adm">{L_DELETE_USER_POSTS}</a> ]
</td>
</tr>
<!-- ENDIF -->