2017-12-27
This commit is contained in:
parent
31e0ae387d
commit
616c84ef0d
20 changed files with 2230 additions and 425 deletions
|
@ -80,23 +80,20 @@ class Routing
|
|||
}
|
||||
|
||||
// разделы
|
||||
$r->add('GET', '/forum/{id:[1-9]\d*}/{name}[/{page:[1-9]\d*}]', 'Forum:view', 'Forum');
|
||||
$r->add('GET', '/forum/{id:[1-9]\d*}/new/topic', 'Post:newTopic', 'NewTopic');
|
||||
$r->add('POST', '/forum/{id:[1-9]\d*}/new/topic', 'Post:newTopicPost');
|
||||
$r->add('GET', '/forum/{id:[1-9]\d*}/{name}[/{page:[1-9]\d*}]', 'Forum:view', 'Forum' );
|
||||
$r->add(['GET', 'POST'], '/forum/{id:[1-9]\d*}/new/topic', 'Post:newTopic', 'NewTopic');
|
||||
// темы
|
||||
$r->add('GET', '/topic/{id:[1-9]\d*}/{name}[/{page:[1-9]\d*}]', 'Topic:viewTopic', 'Topic');
|
||||
$r->add('GET', '/topic/{id:[1-9]\d*}/view/new', 'Topic:viewNew', 'TopicViewNew');
|
||||
$r->add('GET', '/topic/{id:[1-9]\d*}/view/unread', 'Topic:viewUnread', 'TopicViewUnread');
|
||||
$r->add('GET', '/topic/{id:[1-9]\d*}/view/last', 'Topic:viewLast', 'TopicViewLast');
|
||||
$r->add('GET', '/topic/{id:[1-9]\d*}/new/reply[/{quote:[1-9]\d*}]', 'Post:newReply', 'NewReply');
|
||||
$r->add('POST', '/topic/{id:[1-9]\d*}/new/reply', 'Post:newReplyPost');
|
||||
$r->add('GET', '/topic/{id:[1-9]\d*}/{name}[/{page:[1-9]\d*}]', 'Topic:viewTopic', 'Topic' );
|
||||
$r->add('GET', '/topic/{id:[1-9]\d*}/view/new', 'Topic:viewNew', 'TopicViewNew' );
|
||||
$r->add('GET', '/topic/{id:[1-9]\d*}/view/unread', 'Topic:viewUnread', 'TopicViewUnread');
|
||||
$r->add('GET', '/topic/{id:[1-9]\d*}/view/last', 'Topic:viewLast', 'TopicViewLast' );
|
||||
$r->add('GET', '/topic/{id:[1-9]\d*}/new/reply[/{quote:[1-9]\d*}]', 'Post:newReply', 'NewReply' );
|
||||
$r->add('POST', '/topic/{id:[1-9]\d*}/new/reply', 'Post:newReply' );
|
||||
// сообщения
|
||||
$r->add('GET', '/post/{id:[1-9]\d*}#p{id}', 'Topic:viewPost', 'ViewPost');
|
||||
$r->add('GET', '/post/{id:[1-9]\d*}/edit', 'Edit:edit', 'EditPost');
|
||||
$r->add('POST', '/post/{id:[1-9]\d*}/edit', 'Edit:editPost');
|
||||
$r->add('GET', '/post/{id:[1-9]\d*}/delete', 'Delete:delete', 'DeletePost');
|
||||
$r->add('POST', '/post/{id:[1-9]\d*}/delete', 'Delete:deletePost');
|
||||
$r->add('GET', '/post/{id:[1-9]\d*}/report', 'Report:report', 'ReportPost');
|
||||
$r->add('GET', '/post/{id:[1-9]\d*}#p{id}', 'Topic:viewPost', 'ViewPost' );
|
||||
$r->add(['GET', 'POST'], '/post/{id:[1-9]\d*}/edit', 'Edit:edit', 'EditPost' );
|
||||
$r->add(['GET', 'POST'], '/post/{id:[1-9]\d*}/delete', 'Delete:delete', 'DeletePost');
|
||||
$r->add('GET', '/post/{id:[1-9]\d*}/report', 'Report:report', 'ReportPost');
|
||||
|
||||
}
|
||||
// админ и модератор
|
||||
|
@ -106,29 +103,31 @@ class Routing
|
|||
}
|
||||
// только админ
|
||||
if ($user->isAdmin) {
|
||||
$r->add('GET', '/admin/statistics/info', 'AdminStatistics:info', 'AdminInfo');
|
||||
$r->add('GET', '/admin/groups', 'AdminGroups:view', 'AdminGroups');
|
||||
$r->add('POST', '/admin/groups/new[/{base:[1-9]\d*}]', 'AdminGroups:editPost', 'AdminGroupsNew');
|
||||
$r->add('POST', '/admin/groups/default', 'AdminGroups:defaultPost', 'AdminGroupsDefault');
|
||||
$r->add('GET', '/admin/groups/{id:[1-9]\d*}/edit', 'AdminGroups:edit', 'AdminGroupsEdit');
|
||||
$r->add('POST', '/admin/groups/{id:[1-9]\d*}/edit', 'AdminGroups:editPost');
|
||||
$r->add('GET', '/admin/groups/{id:[1-9]\d*}/delete', 'AdminGroups:delete', 'AdminGroupsDelete');
|
||||
$r->add('POST', '/admin/groups/{id:[1-9]\d*}/delete', 'AdminGroups:deletePost');
|
||||
$r->add('GET', '/admin/statistics/info', 'AdminStatistics:info', 'AdminInfo' );
|
||||
$r->add(['GET', 'POST'], '/admin/options', 'AdminOptions:edit', 'AdminOptions' );
|
||||
$r->add('GET', '/admin/groups', 'AdminGroups:view', 'AdminGroups' );
|
||||
$r->add('POST', '/admin/groups/default', 'AdminGroups:defaultSet', 'AdminGroupsDefault');
|
||||
$r->add('POST', '/admin/groups/new[/{base:[1-9]\d*}]', 'AdminGroups:edit', 'AdminGroupsNew' );
|
||||
$r->add(['GET', 'POST'], '/admin/groups/{id:[1-9]\d*}/edit', 'AdminGroups:edit', 'AdminGroupsEdit' );
|
||||
$r->add(['GET', 'POST'], '/admin/groups/{id:[1-9]\d*}/delete', 'AdminGroups:delete', 'AdminGroupsDelete' );
|
||||
$r->add('GET', '/admin/censoring', 'AdminCensoring:view', 'AdminCensoring' );
|
||||
|
||||
}
|
||||
|
||||
$uri = $_SERVER['REQUEST_URI'];
|
||||
if (($pos = strpos($uri, '?')) !== false) {
|
||||
$uri = substr($uri, 0, $pos);
|
||||
}
|
||||
$uri = rawurldecode($uri);
|
||||
$uri = rawurldecode($uri);
|
||||
$method = $_SERVER['REQUEST_METHOD'];
|
||||
|
||||
$route = $r->route($_SERVER['REQUEST_METHOD'], $uri);
|
||||
$route = $r->route($method, $uri);
|
||||
$page = null;
|
||||
switch ($route[0]) {
|
||||
case $r::OK:
|
||||
// ... 200 OK
|
||||
list($page, $action) = explode(':', $route[1], 2);
|
||||
$page = $this->c->$page->$action($route[2]);
|
||||
$page = $this->c->$page->$action($route[2], $method);
|
||||
break;
|
||||
case $r::NOT_FOUND:
|
||||
// ... 404 Not Found
|
||||
|
|
|
@ -506,7 +506,9 @@ class Validator
|
|||
protected function vMin($v, $value, $attr)
|
||||
{
|
||||
if (is_string($value)) {
|
||||
if (mb_strlen($value, 'UTF-8') < $attr) {
|
||||
if ((strpos($attr, 'bytes') && strlen($value) < (int) $attr)
|
||||
|| mb_strlen($value, 'UTF-8') < $attr
|
||||
) {
|
||||
$this->addError('The :alias minimum is :attr characters');
|
||||
}
|
||||
} elseif (is_numeric($value)) {
|
||||
|
@ -527,7 +529,9 @@ class Validator
|
|||
protected function vMax($v, $value, $attr)
|
||||
{
|
||||
if (is_string($value)) {
|
||||
if (mb_strlen($value, 'UTF-8') > $attr) {
|
||||
if ((strpos($attr, 'bytes') && strlen($value) > (int) $attr)
|
||||
|| mb_strlen($value, 'UTF-8') > $attr
|
||||
) {
|
||||
$this->addError('The :alias maximum is :attr characters');
|
||||
}
|
||||
} elseif (is_numeric($value)) {
|
||||
|
|
|
@ -90,11 +90,31 @@ class DataModel extends Model
|
|||
{
|
||||
// без отслеживания
|
||||
if (strpos($name, '__') === 0) {
|
||||
$name = substr($name, 2);
|
||||
$track = null;
|
||||
$name = substr($name, 2);
|
||||
// с отслеживанием
|
||||
} else {
|
||||
$track = false;
|
||||
if (array_key_exists($name, $this->a)) {
|
||||
$track = true;
|
||||
$old = $this->a[$name];
|
||||
// fix
|
||||
if (is_int($val) && is_numeric($old) && is_int(0 + $old)) {
|
||||
$old = (int) $old;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
parent::__set($name, $val);
|
||||
|
||||
if (null === $track) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((! $track && array_key_exists($name, $this->a))
|
||||
|| ($track && $old !== $this->a[$name])
|
||||
) {
|
||||
$this->modified[$name] = true;
|
||||
}
|
||||
return parent::__set($name, $val);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ class Admin extends Page
|
|||
|
||||
if ($user->isAdmin) {
|
||||
$nav['Admin menu'] = [
|
||||
'options' => ['admin_options.php', \ForkBB\__('Admin options')],
|
||||
'options' => [$r->link('AdminOptions'), \ForkBB\__('Admin options')],
|
||||
'permissions' => ['admin_permissions.php', \ForkBB\__('Permissions')],
|
||||
'categories' => ['admin_categories.php', \ForkBB\__('Categories')],
|
||||
'forums' => ['admin_forums.php', \ForkBB\__('Forums')],
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
namespace ForkBB\Models\Pages\Admin;
|
||||
|
||||
use ForkBB\Core\Container;
|
||||
use ForkBB\Core\Validator;
|
||||
use ForkBB\Models\Group\Model as Group;
|
||||
use ForkBB\Models\Pages\Admin;
|
||||
|
||||
|
@ -63,7 +62,7 @@ class Groups extends Admin
|
|||
'value' => $this->c->config->o_default_user_group,
|
||||
'title' => \ForkBB\__('New group label'),
|
||||
'info' => \ForkBB\__('New group help'),
|
||||
'autofocus' => true,
|
||||
# 'autofocus' => true,
|
||||
],
|
||||
],
|
||||
]],
|
||||
|
@ -108,7 +107,7 @@ class Groups extends Admin
|
|||
*
|
||||
* @return Page
|
||||
*/
|
||||
public function defaultPost()
|
||||
public function defaultSet()
|
||||
{
|
||||
$v = $this->c->Validator->setRules([
|
||||
'token' => 'token:AdminGroupsDefault',
|
||||
|
@ -127,61 +126,15 @@ class Groups extends Admin
|
|||
}
|
||||
|
||||
/**
|
||||
* Подготавливает данные для шаблона редактирования группы
|
||||
*
|
||||
* @param array $args
|
||||
*
|
||||
* @return Page
|
||||
*/
|
||||
public function edit(array $args)
|
||||
{
|
||||
if (isset($args['base'])) {
|
||||
$group = $this->c->groups->get((int) $args['base']);
|
||||
} else {
|
||||
$group = $this->c->groups->get((int) $args['id']);
|
||||
}
|
||||
|
||||
if (null === $group) {
|
||||
return $this->c->Message->message('Bad request');
|
||||
}
|
||||
|
||||
$group = clone $group;
|
||||
|
||||
if (isset($args['base'])) {
|
||||
$vars = ['base' => $group->g_id];
|
||||
$group->g_title = '';
|
||||
$group->g_id = null;
|
||||
$marker = 'AdminGroupsNew';
|
||||
$this->titles = \ForkBB\__('Create new group');
|
||||
$this->titleForm = \ForkBB\__('Create new group');
|
||||
$this->classForm = 'f-create-group-form';
|
||||
} else {
|
||||
$vars = ['id' => $group->g_id];
|
||||
$marker = 'AdminGroupsEdit';
|
||||
$this->titles = \ForkBB\__('Edit group');
|
||||
$this->titleForm = \ForkBB\__('Edit group');
|
||||
$this->classForm = 'f-edit-group-form';
|
||||
}
|
||||
|
||||
if (isset($args['_data'])) {
|
||||
$group->replAttrs($args['_data']);
|
||||
}
|
||||
|
||||
$this->nameTpl = 'admin/form';
|
||||
$this->form = $this->viewForm($group, $marker, $vars);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Редактирование группы
|
||||
* Создание новой группы
|
||||
* Запись данных по новой/измененной группе
|
||||
*
|
||||
* @param array $args
|
||||
* @param string $method
|
||||
*
|
||||
* @return Page
|
||||
*/
|
||||
public function editPost(array $args)
|
||||
public function edit(array $args, $method)
|
||||
{
|
||||
// начало создания новой группы
|
||||
if (empty($args['id']) && empty($args['base'])) {
|
||||
|
@ -195,84 +148,110 @@ class Groups extends Admin
|
|||
if (! $v->validation($_POST)) {
|
||||
$this->fIswev = $v->getErrors();
|
||||
return $this->view();
|
||||
} else {
|
||||
return $this->edit(['base' => $v->basegroup]);
|
||||
}
|
||||
|
||||
$gid = $v->basegroup;
|
||||
$next = false;
|
||||
// продолжение редактирования/создания
|
||||
} else {
|
||||
$gid = (int) (isset($args['id']) ? $args['id'] : $args['base']);
|
||||
$next = true;
|
||||
}
|
||||
|
||||
if (isset($args['base'])) {
|
||||
$group = $this->c->groups->get((int) $args['base']);
|
||||
} else {
|
||||
$group = $this->c->groups->get((int) $args['id']);
|
||||
}
|
||||
$group = $this->c->groups->get($gid);
|
||||
|
||||
if (null === $group) {
|
||||
return $this->c->Message->message('Bad request');
|
||||
}
|
||||
|
||||
$group = clone $group;
|
||||
$group = clone $group;
|
||||
$notNext = $this->c->GROUP_ADMIN . ',' . $this->c->GROUP_GUEST;
|
||||
|
||||
$next = $this->c->GROUP_ADMIN . ',' . $this->c->GROUP_GUEST;
|
||||
|
||||
if (isset($args['base'])) {
|
||||
$marker = 'AdminGroupsNew';
|
||||
$group->g_id = null;
|
||||
if (isset($args['id'])) {
|
||||
$marker = 'AdminGroupsEdit';
|
||||
$vars = ['id' => $group->g_id];
|
||||
$notNext .= ',' . $group->g_id;
|
||||
$this->titles = \ForkBB\__('Edit group');
|
||||
$this->titleForm = \ForkBB\__('Edit group');
|
||||
$this->classForm = 'editgroup';
|
||||
} else {
|
||||
$marker = 'AdminGroupsEdit';
|
||||
$next .= ',' . $group->g_id;
|
||||
$marker = 'AdminGroupsNew';
|
||||
$vars = ['base' => $group->g_id];
|
||||
$group->g_title = '';
|
||||
$group->g_id = null;
|
||||
$this->titles = \ForkBB\__('Create new group');
|
||||
$this->titleForm = \ForkBB\__('Create new group');
|
||||
$this->classForm = 'creategroup';
|
||||
}
|
||||
|
||||
$reserve = [];
|
||||
foreach ($this->groupsList as $key => $cur) {
|
||||
if ($group->g_id !== $key) {
|
||||
$reserve[] = $cur[0];
|
||||
if ('POST' === $method && $next) {
|
||||
$reserve = [];
|
||||
foreach ($this->groupsList as $key => $cur) {
|
||||
if ($group->g_id !== $key) {
|
||||
$reserve[] = $cur[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$v = $this->c->Validator->setRules([
|
||||
'token' => 'token:' . $marker,
|
||||
'g_title' => 'required|string:trim|max:50|not_in:' . implode(',', $reserve),
|
||||
'g_user_title' => 'string:trim|max:50',
|
||||
'g_promote_next_group' => 'integer|min:0|not_in:' . $next,
|
||||
'g_promote_min_posts' => 'integer|min:0|max:9999999999',
|
||||
'g_moderator' => 'integer|in:0,1',
|
||||
'g_mod_edit_users' => 'integer|in:0,1',
|
||||
'g_mod_rename_users' => 'integer|in:0,1',
|
||||
'g_mod_change_passwords' => 'integer|in:0,1',
|
||||
'g_mod_promote_users' => 'integer|in:0,1',
|
||||
'g_mod_ban_users' => 'integer|in:0,1',
|
||||
'g_read_board' => 'integer|in:0,1',
|
||||
'g_view_users' => 'integer|in:0,1',
|
||||
'g_post_replies' => 'integer|in:0,1',
|
||||
'g_post_topics' => 'integer|in:0,1',
|
||||
'g_edit_posts' => 'integer|in:0,1',
|
||||
'g_delete_posts' => 'integer|in:0,1',
|
||||
'g_delete_topics' => 'integer|in:0,1',
|
||||
'g_deledit_interval' => 'integer|min:0|max:999999',
|
||||
'g_set_title' => 'integer|in:0,1',
|
||||
'g_post_links' => 'integer|in:0,1',
|
||||
'g_search' => 'integer|in:0,1',
|
||||
'g_search_users' => 'integer|in:0,1',
|
||||
'g_send_email' => 'integer|in:0,1',
|
||||
'g_post_flood' => 'integer|min:0|max:999999',
|
||||
'g_search_flood' => 'integer|min:0|max:999999',
|
||||
'g_email_flood' => 'integer|min:0|max:999999',
|
||||
'g_report_flood' => 'integer|min:0|max:999999',
|
||||
])->setArguments([
|
||||
'token' => $args,
|
||||
])->setMessages([
|
||||
'g_title.required' => 'You must enter a group title',
|
||||
'g_title.not_in' => 'Title already exists',
|
||||
]);
|
||||
$v = $this->c->Validator->setRules([
|
||||
'token' => 'token:' . $marker,
|
||||
'g_title' => 'required|string:trim|max:50|not_in:' . implode(',', $reserve),
|
||||
'g_user_title' => 'string:trim|max:50',
|
||||
'g_promote_next_group' => 'integer|min:0|not_in:' . $notNext,
|
||||
'g_promote_min_posts' => 'integer|min:0|max:9999999999',
|
||||
'g_moderator' => 'integer|in:0,1',
|
||||
'g_mod_edit_users' => 'integer|in:0,1',
|
||||
'g_mod_rename_users' => 'integer|in:0,1',
|
||||
'g_mod_change_passwords' => 'integer|in:0,1',
|
||||
'g_mod_promote_users' => 'integer|in:0,1',
|
||||
'g_mod_ban_users' => 'integer|in:0,1',
|
||||
'g_read_board' => 'integer|in:0,1',
|
||||
'g_view_users' => 'integer|in:0,1',
|
||||
'g_post_replies' => 'integer|in:0,1',
|
||||
'g_post_topics' => 'integer|in:0,1',
|
||||
'g_edit_posts' => 'integer|in:0,1',
|
||||
'g_delete_posts' => 'integer|in:0,1',
|
||||
'g_delete_topics' => 'integer|in:0,1',
|
||||
'g_deledit_interval' => 'integer|min:0|max:999999',
|
||||
'g_set_title' => 'integer|in:0,1',
|
||||
'g_post_links' => 'integer|in:0,1',
|
||||
'g_search' => 'integer|in:0,1',
|
||||
'g_search_users' => 'integer|in:0,1',
|
||||
'g_send_email' => 'integer|in:0,1',
|
||||
'g_post_flood' => 'integer|min:0|max:999999',
|
||||
'g_search_flood' => 'integer|min:0|max:999999',
|
||||
'g_email_flood' => 'integer|min:0|max:999999',
|
||||
'g_report_flood' => 'integer|min:0|max:999999',
|
||||
])->setArguments([
|
||||
'token' => $vars,
|
||||
])->setMessages([
|
||||
'g_title.required' => 'You must enter a group title',
|
||||
'g_title.not_in' => 'Title already exists',
|
||||
]);
|
||||
|
||||
if ($v->validation($_POST)) {
|
||||
return $this->save($group, $v->getData());
|
||||
}
|
||||
|
||||
if (! $v->validation($_POST)) {
|
||||
$this->fIswev = $v->getErrors();
|
||||
$args['_data'] = $v->getData();
|
||||
return $this->edit($args);
|
||||
$group->replAttrs($v->getData());
|
||||
}
|
||||
|
||||
$data = $v->getData();
|
||||
$this->nameTpl = 'admin/form';
|
||||
$this->form = $this->viewForm($group, $marker, $vars);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Запись данных по новой/измененной группе
|
||||
*
|
||||
* @param Group $group
|
||||
* @param array $args
|
||||
*
|
||||
* @return Page
|
||||
*/
|
||||
public function save(Group $group, array $data)
|
||||
{
|
||||
if (empty($data['g_moderator'])) {
|
||||
$data['g_mod_edit_users'] = 0;
|
||||
$data['g_mod_rename_users'] = 0;
|
||||
|
@ -296,7 +275,7 @@ class Groups extends Admin
|
|||
$newId = $this->c->groups->insert($group);
|
||||
//????
|
||||
$this->c->DB->exec('INSERT INTO ::forum_perms (group_id, forum_id, read_forum, post_replies, post_topics) SELECT ?i:new, forum_id, read_forum, post_replies, post_topics FROM ::forum_perms WHERE group_id=?i:old', [':new' => $newId, ':old' => $args['base']]);
|
||||
|
||||
//????
|
||||
} else {
|
||||
$message = \ForkBB\__('Group edited redirect');
|
||||
$this->c->groups->update($group);
|
||||
|
@ -333,7 +312,7 @@ class Groups extends Admin
|
|||
'btns' => [
|
||||
'submit' => [
|
||||
'type' => 'submit',
|
||||
'value' => \ForkBB\__('Submit'),
|
||||
'value' => \ForkBB\__('Save'),
|
||||
'accesskey' => 's',
|
||||
],
|
||||
],
|
||||
|
@ -346,7 +325,7 @@ class Groups extends Admin
|
|||
'value' => $group->g_title,
|
||||
'title' => \ForkBB\__('Group title label'),
|
||||
'required' => true,
|
||||
'autofocus' => true,
|
||||
# 'autofocus' => true,
|
||||
];
|
||||
$fieldset['g_user_title'] = [
|
||||
'type' => 'text',
|
||||
|
@ -593,13 +572,14 @@ class Groups extends Admin
|
|||
}
|
||||
|
||||
/**
|
||||
* Подготавливает данные для шаблона
|
||||
* Удаление группы
|
||||
*
|
||||
* @param array $args
|
||||
*
|
||||
* @param string $method
|
||||
*
|
||||
* @return Page
|
||||
*/
|
||||
public function delete(array $args)
|
||||
public function delete(array $args, $method)
|
||||
{
|
||||
$group = $this->c->groups->get((int) $args['id']);
|
||||
|
||||
|
@ -608,6 +588,49 @@ class Groups extends Admin
|
|||
}
|
||||
|
||||
$count = $this->c->users->UsersNumber($group);
|
||||
if ($count) {
|
||||
$move = 'required|integer|in:';
|
||||
$groups = [];
|
||||
foreach ($this->groupsList as $key => $cur) {
|
||||
if ($key === $this->c->GROUP_GUEST || $key === $group->g_id) {
|
||||
continue;
|
||||
}
|
||||
$groups[$key] = $cur[0];
|
||||
}
|
||||
$move .= implode(',', array_keys($groups));
|
||||
} else {
|
||||
$move = 'absent';
|
||||
}
|
||||
|
||||
if ('POST' === $method) {
|
||||
$v = $this->c->Validator->setRules([
|
||||
'token' => 'token:AdminGroupsDelete',
|
||||
'movegroup' => $move,
|
||||
'confirm' => 'integer',
|
||||
'delete' => 'string',
|
||||
'cancel' => 'string',
|
||||
])->setArguments([
|
||||
'token' => $args,
|
||||
]);
|
||||
|
||||
if (! $v->validation($_POST) || null === $v->delete) {
|
||||
return $this->c->Redirect->page('AdminGroups')->message(\ForkBB\__('Cancel redirect'));
|
||||
} elseif ($v->confirm !== 1) {
|
||||
return $this->c->Redirect->page('AdminGroups')->message(\ForkBB\__('No confirm redirect'));
|
||||
}
|
||||
|
||||
$this->c->DB->beginTransaction();
|
||||
|
||||
if ($v->movegroup) {
|
||||
$this->c->groups->delete($group, $this->c->groups->get($v->movegroup));
|
||||
} else {
|
||||
$this->c->groups->delete($group);
|
||||
}
|
||||
|
||||
$this->c->DB->commit();
|
||||
|
||||
return $this->c->Redirect->page('AdminGroups')->message(\ForkBB\__('Group removed redirect'));
|
||||
}
|
||||
|
||||
$form = [
|
||||
'action' => $this->c->Router->link('AdminGroupsDelete', $args),
|
||||
|
@ -629,14 +652,6 @@ class Groups extends Admin
|
|||
];
|
||||
|
||||
if ($count) {
|
||||
$groups = [];
|
||||
foreach ($this->groupsList as $key => $cur) {
|
||||
if ($key === $this->c->GROUP_GUEST || $key === $group->g_id) {
|
||||
continue;
|
||||
}
|
||||
$groups[$key] = $cur[0];
|
||||
}
|
||||
|
||||
$form['sets'][] = [
|
||||
'fields' => [
|
||||
'movegroup' => [
|
||||
|
@ -673,68 +688,9 @@ class Groups extends Admin
|
|||
$this->nameTpl = 'admin/form';
|
||||
$this->titles = \ForkBB\__('Group delete');
|
||||
$this->titleForm = \ForkBB\__('Group delete');
|
||||
$this->classForm = 'f-delete-group-form';
|
||||
$this->classForm = 'deletegroup';
|
||||
$this->form = $form;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Удаление группы
|
||||
*
|
||||
* @param array $args
|
||||
*
|
||||
* @return Page
|
||||
*/
|
||||
public function deletePost(array $args)
|
||||
{
|
||||
$group = $this->c->groups->get((int) $args['id']);
|
||||
|
||||
if (null === $group || ! $group->canDelete) {
|
||||
return $this->c->Message->message('Bad request');
|
||||
}
|
||||
|
||||
$count = $this->c->users->UsersNumber($group);
|
||||
if ($count) {
|
||||
$move = 'required|integer|in:';
|
||||
$groups = [];
|
||||
foreach ($this->groupsList as $key => $cur) {
|
||||
if ($key === $this->c->GROUP_GUEST || $key === $group->g_id) {
|
||||
continue;
|
||||
}
|
||||
$groups[$key] = $cur[0];
|
||||
}
|
||||
$move .= implode(',', array_keys($groups));
|
||||
} else {
|
||||
$move = 'absent';
|
||||
}
|
||||
|
||||
$v = $this->c->Validator->setRules([
|
||||
'token' => 'token:AdminGroupsDelete',
|
||||
'movegroup' => $move,
|
||||
'confirm' => 'integer',
|
||||
'delete' => 'string',
|
||||
'cancel' => 'string',
|
||||
])->setArguments([
|
||||
'token' => $args,
|
||||
]);
|
||||
|
||||
if (! $v->validation($_POST) || null === $v->delete) {
|
||||
return $this->c->Redirect->page('AdminGroups')->message(\ForkBB\__('Cancel redirect'));
|
||||
} elseif ($v->confirm !== 1) {
|
||||
return $this->c->Redirect->page('AdminGroups')->message(\ForkBB\__('No confirm redirect'));
|
||||
}
|
||||
|
||||
$this->c->DB->beginTransaction();
|
||||
|
||||
if ($v->movegroup) {
|
||||
$this->c->groups->delete($group, $this->c->groups->get($v->movegroup));
|
||||
} else {
|
||||
$this->c->groups->delete($group);
|
||||
}
|
||||
|
||||
$this->c->DB->commit();
|
||||
|
||||
return $this->c->Redirect->page('AdminGroups')->message(\ForkBB\__('Group removed redirect'));
|
||||
}
|
||||
}
|
||||
|
|
729
app/Models/Pages/Admin/Options.php
Normal file
729
app/Models/Pages/Admin/Options.php
Normal file
|
@ -0,0 +1,729 @@
|
|||
<?php
|
||||
|
||||
namespace ForkBB\Models\Pages\Admin;
|
||||
|
||||
use ForkBB\Core\Validator;
|
||||
use ForkBB\Models\Pages\Admin;
|
||||
|
||||
class Options extends Admin
|
||||
{
|
||||
/**
|
||||
* Редактирование натроек форума
|
||||
*
|
||||
* @param array $args
|
||||
* @param string $method
|
||||
*
|
||||
* @return Page
|
||||
*/
|
||||
public function edit(array $args, $method)
|
||||
{
|
||||
$this->c->Lang->load('admin_options');
|
||||
|
||||
$config = clone $this->c->config;
|
||||
|
||||
if ('POST' === $method) {
|
||||
$v = $this->c->Validator->addValidators([
|
||||
'check_timeout' => [$this, 'vCheckTimeout'],
|
||||
])->setRules([
|
||||
'token' => 'token:AdminOptions',
|
||||
'o_board_title' => 'required|string:trim|max:255',
|
||||
'o_board_desc' => 'string:trim|max:65000 bytes',
|
||||
'o_default_timezone' => 'required|string:trim|in:-12,-11,-10,-9.5,-9,-8.5,-8,-7,-6,-5,-4,-3.5,-3,-2,-1,0,1,2,3,3.5,4,4.5,5,5.5,5.75,6,6.5,7,8,8.75,9,9.5,10,10.5,11,11.5,12,12.75,13,14',
|
||||
'o_default_dst' => 'required|integer|in:0,1',
|
||||
'o_default_lang' => 'required|string:trim|in:' . implode(',', $this->c->Func->getLangs()),
|
||||
'o_default_style' => 'required|string:trim|in:' . implode(',', $this->c->Func->getStyles()),
|
||||
'o_time_format' => 'required|string:trim|max:25',
|
||||
'o_date_format' => 'required|string:trim|max:25',
|
||||
'o_timeout_visit' => 'required|integer|min:0|max:99999',
|
||||
'o_timeout_online' => 'required|integer|min:0|max:99999|check_timeout',
|
||||
'o_redirect_delay' => 'required|integer|min:0|max:99999',
|
||||
'o_show_user_info' => 'required|integer|in:0,1',
|
||||
'o_show_post_count' => 'required|integer|in:0,1',
|
||||
'o_smilies' => 'required|integer|in:0,1',
|
||||
'o_smilies_sig' => 'required|integer|in:0,1',
|
||||
'o_make_links' => 'required|integer|in:0,1',
|
||||
'o_topic_review' => 'required|integer|min:0|max:50',
|
||||
'o_disp_topics_default' => 'required|integer|min:10|max:50',
|
||||
'o_disp_posts_default' => 'required|integer|min:10|max:50',
|
||||
'o_indent_num_spaces' => 'required|integer|min:0|max:99',
|
||||
'o_quote_depth' => 'required|integer|min:0|max:9',
|
||||
'o_quickpost' => 'required|integer|in:0,1',
|
||||
'o_users_online' => 'required|integer|in:0,1',
|
||||
'o_censoring' => 'required|integer|in:0,1',
|
||||
'o_signatures' => 'required|integer|in:0,1',
|
||||
'o_show_dot' => 'required|integer|in:0,1',
|
||||
'o_topic_views' => 'required|integer|in:0,1',
|
||||
'o_quickjump' => 'required|integer|in:0,1',
|
||||
'o_gzip' => 'required|integer|in:0,1',
|
||||
'o_search_all_forums' => 'required|integer|in:0,1',
|
||||
'o_additional_navlinks' => 'string:trim|max:65000 bytes',
|
||||
'o_feed_type' => 'required|integer|in:0,1,2',
|
||||
'o_feed_ttl' => 'required|integer|in:0,5,15,30,60',
|
||||
'o_report_method' => 'required|integer|in:0,1,2',
|
||||
'o_mailing_list' => 'string:trim|max:65000 bytes',
|
||||
'o_avatars' => 'required|integer|in:0,1',
|
||||
'o_avatars_dir' => 'required|string:trim|max:255', //?????
|
||||
'o_avatars_width' => 'required|integer|min:50|max:999',
|
||||
'o_avatars_height' => 'required|integer|min:50|max:999',
|
||||
'o_avatars_size' => 'required|integer|min:0|max:9999999',
|
||||
'o_admin_email' => 'required|string:trim|max:80|email',
|
||||
'o_webmaster_email' => 'required|string:trim|max:80|email',
|
||||
'o_forum_subscriptions' => 'required|integer|in:0,1',
|
||||
'o_topic_subscriptions' => 'required|integer|in:0,1',
|
||||
'o_smtp_host' => 'string:trim|max:255',
|
||||
'o_smtp_user' => 'string:trim|max:255',
|
||||
'o_smtp_pass' => 'string:trim|max:255', //??????
|
||||
'changeSmtpPassword' => 'integer', //??????
|
||||
'o_smtp_ssl' => 'required|integer|in:0,1',
|
||||
'o_regs_allow' => 'required|integer|in:0,1',
|
||||
'o_regs_verify' => 'required|integer|in:0,1',
|
||||
'o_regs_report' => 'required|integer|in:0,1',
|
||||
'o_rules' => 'required|integer|in:0,1',
|
||||
'o_rules_message' => 'string:trim|max:65000 bytes',
|
||||
'o_default_email_setting' => 'required|integer|in:0,1,2',
|
||||
'o_announcement' => 'required|integer|in:0,1',
|
||||
'o_announcement_message' => 'string:trim|max:65000 bytes',
|
||||
'o_maintenance' => 'required|integer|in:0,1',
|
||||
'o_maintenance_message' => 'string:trim|max:65000 bytes',
|
||||
])->setArguments([
|
||||
])->setMessages([
|
||||
'o_board_title' => 'Must enter title message',
|
||||
'o_admin_email' => 'Invalid e-mail message',
|
||||
'o_webmaster_email' => 'Invalid webmaster e-mail message',
|
||||
]);
|
||||
|
||||
$valid = $v->validation($_POST);
|
||||
$data = $v->getData();
|
||||
|
||||
if (1 !== $data['changeSmtpPassword']) { //????
|
||||
unset($data['o_smtp_pass']);
|
||||
}
|
||||
unset($data['changeSmtpPassword'], $data['token']);
|
||||
|
||||
foreach ($data as $attr => $value) {
|
||||
$config->$attr = $value;
|
||||
}
|
||||
|
||||
if ($valid) {
|
||||
$config->save();
|
||||
|
||||
return $this->c->Redirect->page('AdminOptions')->message(\ForkBB\__('Options updated redirect'));
|
||||
}
|
||||
|
||||
$this->fIswev = $v->getErrors();
|
||||
}
|
||||
|
||||
$this->aIndex = 'options';
|
||||
$this->nameTpl = 'admin/form';
|
||||
$this->form = $this->viewForm($config);
|
||||
$this->titleForm = \ForkBB\__('Options head');
|
||||
$this->classForm = 'editoptions';
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Дополнительная проверка времени online
|
||||
*
|
||||
* @param Validator $v
|
||||
* @param int $timeout
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function vCheckTimeout(Validator $v, $timeout)
|
||||
{
|
||||
if ($timeout >= $v->o_timeout_visit) {
|
||||
$v->addError('Timeout error message');
|
||||
}
|
||||
return $timeout;
|
||||
}
|
||||
|
||||
/**
|
||||
* Формирует данные для формы
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function viewForm($config)
|
||||
{
|
||||
$form = [
|
||||
'action' => $this->c->Router->link('AdminOptions'),
|
||||
'hidden' => [
|
||||
'token' => $this->c->Csrf->create('AdminOptions'),
|
||||
],
|
||||
'sets' => [],
|
||||
'btns' => [
|
||||
'submit' => [
|
||||
'type' => 'submit',
|
||||
'value' => \ForkBB\__('Save'),
|
||||
'accesskey' => 's',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
$yn = [1 => \ForkBB\__('Yes'), 0 => \ForkBB\__('No')];
|
||||
$langs = $this->c->Func->getLangs();
|
||||
$langs = array_combine($langs, $langs);
|
||||
$styles = $this->c->Func->getStyles();
|
||||
$styles = array_combine($styles, $styles);
|
||||
|
||||
$form['sets'][] = [
|
||||
'legend' => \ForkBB\__('Essentials subhead'),
|
||||
'fields' => [
|
||||
'o_board_title' => [
|
||||
'type' => 'text',
|
||||
'maxlength' => 255,
|
||||
'value' => $config->o_board_title,
|
||||
'title' => \ForkBB\__('Board title label'),
|
||||
'info' => \ForkBB\__('Board title help'),
|
||||
'required' => true,
|
||||
# 'autofocus' => true,
|
||||
],
|
||||
'o_board_desc' => [
|
||||
'type' => 'textarea',
|
||||
'value' => $config->o_board_desc,
|
||||
'title' => \ForkBB\__('Board desc label'),
|
||||
'info' => \ForkBB\__('Board desc help'),
|
||||
],
|
||||
'o_default_timezone' => [
|
||||
'type' => 'select',
|
||||
'options' => [
|
||||
'-12' => \ForkBB\__('UTC-12:00'),
|
||||
'-11' => \ForkBB\__('UTC-11:00'),
|
||||
'-10' => \ForkBB\__('UTC-10:00'),
|
||||
'-9.5' => \ForkBB\__('UTC-09:30'),
|
||||
'-9' => \ForkBB\__('UTC-09:00'),
|
||||
'-8.5' => \ForkBB\__('UTC-08:30'),
|
||||
'-8' => \ForkBB\__('UTC-08:00'),
|
||||
'-7' => \ForkBB\__('UTC-07:00'),
|
||||
'-6' => \ForkBB\__('UTC-06:00'),
|
||||
'-5' => \ForkBB\__('UTC-05:00'),
|
||||
'-4' => \ForkBB\__('UTC-04:00'),
|
||||
'-3.5' => \ForkBB\__('UTC-03:30'),
|
||||
'-3' => \ForkBB\__('UTC-03:00'),
|
||||
'-2' => \ForkBB\__('UTC-02:00'),
|
||||
'-1' => \ForkBB\__('UTC-01:00'),
|
||||
'0' => \ForkBB\__('UTC'),
|
||||
'1' => \ForkBB\__('UTC+01:00'),
|
||||
'2' => \ForkBB\__('UTC+02:00'),
|
||||
'3' => \ForkBB\__('UTC+03:00'),
|
||||
'3.5' => \ForkBB\__('UTC+03:30'),
|
||||
'4' => \ForkBB\__('UTC+04:00'),
|
||||
'4.5' => \ForkBB\__('UTC+04:30'),
|
||||
'5' => \ForkBB\__('UTC+05:00'),
|
||||
'5.5' => \ForkBB\__('UTC+05:30'),
|
||||
'5.75' => \ForkBB\__('UTC+05:45'),
|
||||
'6' => \ForkBB\__('UTC+06:00'),
|
||||
'6.5' => \ForkBB\__('UTC+06:30'),
|
||||
'7' => \ForkBB\__('UTC+07:00'),
|
||||
'8' => \ForkBB\__('UTC+08:00'),
|
||||
'8.75' => \ForkBB\__('UTC+08:45'),
|
||||
'9' => \ForkBB\__('UTC+09:00'),
|
||||
'9.5' => \ForkBB\__('UTC+09:30'),
|
||||
'10' => \ForkBB\__('UTC+10:00'),
|
||||
'10.5' => \ForkBB\__('UTC+10:30'),
|
||||
'11' => \ForkBB\__('UTC+11:00'),
|
||||
'11.5' => \ForkBB\__('UTC+11:30'),
|
||||
'12' => \ForkBB\__('UTC+12:00'),
|
||||
'12.75' => \ForkBB\__('UTC+12:45'),
|
||||
'13' => \ForkBB\__('UTC+13:00'),
|
||||
'14' => \ForkBB\__('UTC+14:00'),
|
||||
],
|
||||
'value' => $config->o_default_timezone,
|
||||
'title' => \ForkBB\__('Timezone label'),
|
||||
'info' => \ForkBB\__('Timezone help'),
|
||||
],
|
||||
'o_default_dst' => [
|
||||
'type' => 'radio',
|
||||
'value' => $config->o_default_dst,
|
||||
'values' => $yn,
|
||||
'title' => \ForkBB\__('DST label'),
|
||||
'info' => \ForkBB\__('DST help'),
|
||||
],
|
||||
'o_default_lang' => [
|
||||
'type' => 'select',
|
||||
'options' => $langs,
|
||||
'value' => $config->o_default_lang,
|
||||
'title' => \ForkBB\__('Language label'),
|
||||
'info' => \ForkBB\__('Language help'),
|
||||
],
|
||||
'o_default_style' => [
|
||||
'type' => 'select',
|
||||
'options' => $styles,
|
||||
'value' => $config->o_default_style,
|
||||
'title' => \ForkBB\__('Default style label'),
|
||||
'info' => \ForkBB\__('Default style help'),
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
$timestamp = time() + ($this->c->user->timezone + $this->c->user->dst) * 3600;
|
||||
$time = \ForkBB\dt($timestamp, false, $config->o_date_format, $config->o_time_format, true, true);
|
||||
$date = \ForkBB\dt($timestamp, true, $config->o_date_format, $config->o_time_format, false, true);
|
||||
|
||||
$form['sets'][] = [
|
||||
'legend' => \ForkBB\__('Timeouts subhead'),
|
||||
'fields' => [
|
||||
'o_time_format' => [
|
||||
'type' => 'text',
|
||||
'maxlength' => 25,
|
||||
'value' => $config->o_time_format,
|
||||
'title' => \ForkBB\__('Time format label'),
|
||||
'info' => \ForkBB\__('Time format help', $time),
|
||||
'required' => true,
|
||||
],
|
||||
'o_date_format' => [
|
||||
'type' => 'text',
|
||||
'maxlength' => 25,
|
||||
'value' => $config->o_date_format,
|
||||
'title' => \ForkBB\__('Date format label'),
|
||||
'info' => \ForkBB\__('Date format help', $date),
|
||||
'required' => true,
|
||||
],
|
||||
'o_timeout_visit' => [
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 99999,
|
||||
'value' => $config->o_timeout_visit,
|
||||
'title' => \ForkBB\__('Visit timeout label'),
|
||||
'info' => \ForkBB\__('Visit timeout help'),
|
||||
],
|
||||
'o_timeout_online' => [
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 99999,
|
||||
'value' => $config->o_timeout_online,
|
||||
'title' => \ForkBB\__('Online timeout label'),
|
||||
'info' => \ForkBB\__('Online timeout help'),
|
||||
],
|
||||
'o_redirect_delay' => [
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 99999,
|
||||
'value' => $config->o_redirect_delay,
|
||||
'title' => \ForkBB\__('Redirect time label'),
|
||||
'info' => \ForkBB\__('Redirect time help'),
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
$form['sets'][] = [
|
||||
'legend' => \ForkBB\__('Display subhead'),
|
||||
'fields' => [
|
||||
'o_show_user_info' => [
|
||||
'type' => 'radio',
|
||||
'value' => $config->o_show_user_info,
|
||||
'values' => $yn,
|
||||
'title' => \ForkBB\__('Info in posts label'),
|
||||
'info' => \ForkBB\__('Info in posts help'),
|
||||
],
|
||||
'o_show_post_count' => [
|
||||
'type' => 'radio',
|
||||
'value' => $config->o_show_post_count,
|
||||
'values' => $yn,
|
||||
'title' => \ForkBB\__('Post count label'),
|
||||
'info' => \ForkBB\__('Post count help'),
|
||||
],
|
||||
'o_smilies' => [
|
||||
'type' => 'radio',
|
||||
'value' => $config->o_smilies,
|
||||
'values' => $yn,
|
||||
'title' => \ForkBB\__('Smilies label'),
|
||||
'info' => \ForkBB\__('Smilies help'),
|
||||
],
|
||||
'o_smilies_sig' => [
|
||||
'type' => 'radio',
|
||||
'value' => $config->o_smilies_sig,
|
||||
'values' => $yn,
|
||||
'title' => \ForkBB\__('Smilies sigs label'),
|
||||
'info' => \ForkBB\__('Smilies sigs help'),
|
||||
],
|
||||
'o_make_links' => [
|
||||
'type' => 'radio',
|
||||
'value' => $config->o_make_links,
|
||||
'values' => $yn,
|
||||
'title' => \ForkBB\__('Clickable links label'),
|
||||
'info' => \ForkBB\__('Clickable links help'),
|
||||
],
|
||||
'o_topic_review' => [
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 50,
|
||||
'value' => $config->o_topic_review,
|
||||
'title' => \ForkBB\__('Topic review label'),
|
||||
'info' => \ForkBB\__('Topic review help'),
|
||||
],
|
||||
'o_disp_topics_default' => [
|
||||
'type' => 'number',
|
||||
'min' => 10,
|
||||
'max' => 50,
|
||||
'value' => $config->o_disp_topics_default,
|
||||
'title' => \ForkBB\__('Topics per page label'),
|
||||
'info' => \ForkBB\__('Topics per page help'),
|
||||
],
|
||||
'o_disp_posts_default' => [
|
||||
'type' => 'number',
|
||||
'min' => 10,
|
||||
'max' => 50,
|
||||
'value' => $config->o_disp_posts_default,
|
||||
'title' => \ForkBB\__('Posts per page label'),
|
||||
'info' => \ForkBB\__('Posts per page help'),
|
||||
],
|
||||
'o_indent_num_spaces' => [
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 99,
|
||||
'value' => $config->o_indent_num_spaces,
|
||||
'title' => \ForkBB\__('Indent label'),
|
||||
'info' => \ForkBB\__('Indent help'),
|
||||
],
|
||||
'o_quote_depth' => [
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 9,
|
||||
'value' => $config->o_quote_depth,
|
||||
'title' => \ForkBB\__('Quote depth label'),
|
||||
'info' => \ForkBB\__('Quote depth help'),
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
$form['sets'][] = [
|
||||
'legend' => \ForkBB\__('Features subhead'),
|
||||
'fields' => [
|
||||
'o_quickpost' => [
|
||||
'type' => 'radio',
|
||||
'value' => $config->o_quickpost,
|
||||
'values' => $yn,
|
||||
'title' => \ForkBB\__('Quick post label'),
|
||||
'info' => \ForkBB\__('Quick post help'),
|
||||
],
|
||||
'o_users_online' => [
|
||||
'type' => 'radio',
|
||||
'value' => $config->o_users_online,
|
||||
'values' => $yn,
|
||||
'title' => \ForkBB\__('Users online label'),
|
||||
'info' => \ForkBB\__('Users online help'),
|
||||
],
|
||||
'o_censoring' => [
|
||||
'type' => 'radio',
|
||||
'value' => $config->o_censoring,
|
||||
'values' => $yn,
|
||||
'title' => \ForkBB\__('Censor words label'),
|
||||
'info' => \ForkBB\__('Censor words help', $this->c->Router->link('AdminCensoring')),
|
||||
],
|
||||
'o_signatures' => [
|
||||
'type' => 'radio',
|
||||
'value' => $config->o_signatures,
|
||||
'values' => $yn,
|
||||
'title' => \ForkBB\__('Signatures label'),
|
||||
'info' => \ForkBB\__('Signatures help'),
|
||||
],
|
||||
'o_show_dot' => [
|
||||
'type' => 'radio',
|
||||
'value' => $config->o_show_dot,
|
||||
'values' => $yn,
|
||||
'title' => \ForkBB\__('User has posted label'),
|
||||
'info' => \ForkBB\__('User has posted help'),
|
||||
],
|
||||
'o_topic_views' => [
|
||||
'type' => 'radio',
|
||||
'value' => $config->o_topic_views,
|
||||
'values' => $yn,
|
||||
'title' => \ForkBB\__('Topic views label'),
|
||||
'info' => \ForkBB\__('Topic views help'),
|
||||
],
|
||||
'o_quickjump' => [
|
||||
'type' => 'radio',
|
||||
'value' => $config->o_quickjump,
|
||||
'values' => $yn,
|
||||
'title' => \ForkBB\__('Quick jump label'),
|
||||
'info' => \ForkBB\__('Quick jump help'),
|
||||
],
|
||||
'o_gzip' => [ //????
|
||||
'type' => 'radio',
|
||||
'value' => $config->o_gzip,
|
||||
'values' => $yn,
|
||||
'title' => \ForkBB\__('GZip label'),
|
||||
'info' => \ForkBB\__('GZip help'),
|
||||
],
|
||||
'o_search_all_forums' => [ //????
|
||||
'type' => 'radio',
|
||||
'value' => $config->o_search_all_forums,
|
||||
'values' => $yn,
|
||||
'title' => \ForkBB\__('Search all label'),
|
||||
'info' => \ForkBB\__('Search all help'),
|
||||
],
|
||||
'o_additional_navlinks' => [
|
||||
'type' => 'textarea',
|
||||
'value' => $config->o_additional_navlinks,
|
||||
'title' => \ForkBB\__('Menu items label'),
|
||||
'info' => \ForkBB\__('Menu items help'),
|
||||
],
|
||||
|
||||
],
|
||||
];
|
||||
|
||||
$form['sets'][] = [
|
||||
'legend' => \ForkBB\__('Feed subhead'),
|
||||
'fields' => [
|
||||
'o_feed_type' => [
|
||||
'type' => 'radio',
|
||||
'value' => $config->o_feed_typet,
|
||||
'values' => [
|
||||
0 => \ForkBB\__('No feeds'),
|
||||
1 => \ForkBB\__('RSS'),
|
||||
2 => \ForkBB\__('Atom'),
|
||||
],
|
||||
'title' => \ForkBB\__('Default feed label'),
|
||||
'info' => \ForkBB\__('Default feed help'),
|
||||
],
|
||||
'o_feed_ttl' => [
|
||||
'type' => 'select',
|
||||
'options' => [
|
||||
0 => \ForkBB\__('No cache'),
|
||||
5 => \ForkBB\__('%d Minutes', 5),
|
||||
15 => \ForkBB\__('%d Minutes', 15),
|
||||
30 => \ForkBB\__('%d Minutes', 30),
|
||||
60 => \ForkBB\__('%d Minutes', 60),
|
||||
],
|
||||
'value' => $config->o_feed_ttl,
|
||||
'title' => \ForkBB\__('Feed TTL label'),
|
||||
'info' => \ForkBB\__('Feed TTL help'),
|
||||
],
|
||||
|
||||
],
|
||||
];
|
||||
|
||||
$form['sets'][] = [
|
||||
'legend' => \ForkBB\__('Reports subhead'),
|
||||
'fields' => [
|
||||
'o_report_method' => [
|
||||
'type' => 'radio',
|
||||
'value' => $config->o_report_method,
|
||||
'values' => [
|
||||
0 => \ForkBB\__('Internal'),
|
||||
1 => \ForkBB\__('By e-mail'),
|
||||
2 => \ForkBB\__('Both'),
|
||||
],
|
||||
'title' => \ForkBB\__('Reporting method label'),
|
||||
'info' => \ForkBB\__('Reporting method help'),
|
||||
],
|
||||
'o_mailing_list' => [
|
||||
'type' => 'textarea',
|
||||
'value' => $config->o_mailing_list,
|
||||
'title' => \ForkBB\__('Mailing list label'),
|
||||
'info' => \ForkBB\__('Mailing list help'),
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
$form['sets'][] = [
|
||||
'legend' => \ForkBB\__('Avatars subhead'),
|
||||
'fields' => [
|
||||
'o_avatars' => [
|
||||
'type' => 'radio',
|
||||
'value' => $config->o_avatars,
|
||||
'values' => $yn,
|
||||
'title' => \ForkBB\__('Use avatars label'),
|
||||
'info' => \ForkBB\__('Use avatars help'),
|
||||
],
|
||||
'o_avatars_dir' => [ //????
|
||||
'type' => 'text',
|
||||
'maxlength' => 255,
|
||||
'value' => $config->o_avatars_dir,
|
||||
'title' => \ForkBB\__('Upload directory label'),
|
||||
'info' => \ForkBB\__('Upload directory help'),
|
||||
'required' => true,
|
||||
],
|
||||
'o_avatars_width' => [
|
||||
'type' => 'number',
|
||||
'min' => 50,
|
||||
'max' => 999,
|
||||
'value' => $config->o_avatars_width,
|
||||
'title' => \ForkBB\__('Max width label'),
|
||||
'info' => \ForkBB\__('Max width help'),
|
||||
],
|
||||
'o_avatars_height' => [
|
||||
'type' => 'number',
|
||||
'min' => 50,
|
||||
'max' => 999,
|
||||
'value' => $config->o_avatars_height,
|
||||
'title' => \ForkBB\__('Max height label'),
|
||||
'info' => \ForkBB\__('Max height help'),
|
||||
],
|
||||
'o_avatars_size' => [
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 9999999,
|
||||
'value' => $config->o_avatars_size,
|
||||
'title' => \ForkBB\__('Max size label'),
|
||||
'info' => \ForkBB\__('Max size help'),
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
$form['sets'][] = [
|
||||
'legend' => \ForkBB\__('E-mail subhead'),
|
||||
'fields' => [
|
||||
'o_admin_email' => [
|
||||
'type' => 'text',
|
||||
'maxlength' => 80,
|
||||
'value' => $config->o_admin_email,
|
||||
'title' => \ForkBB\__('Admin e-mail label'),
|
||||
'info' => \ForkBB\__('Admin e-mail help'),
|
||||
'required' => true,
|
||||
],
|
||||
'o_webmaster_email' => [
|
||||
'type' => 'text',
|
||||
'maxlength' => 80,
|
||||
'value' => $config->o_webmaster_email,
|
||||
'title' => \ForkBB\__('Webmaster e-mail label'),
|
||||
'info' => \ForkBB\__('Webmaster e-mail help'),
|
||||
'required' => true,
|
||||
],
|
||||
'o_forum_subscriptions' => [
|
||||
'type' => 'radio',
|
||||
'value' => $config->o_forum_subscriptions,
|
||||
'values' => $yn,
|
||||
'title' => \ForkBB\__('Forum subscriptions label'),
|
||||
'info' => \ForkBB\__('Forum subscriptions help'),
|
||||
],
|
||||
'o_topic_subscriptions' => [
|
||||
'type' => 'radio',
|
||||
'value' => $config->o_topic_subscriptions,
|
||||
'values' => $yn,
|
||||
'title' => \ForkBB\__('Topic subscriptions label'),
|
||||
'info' => \ForkBB\__('Topic subscriptions help'),
|
||||
],
|
||||
'o_smtp_host' => [
|
||||
'type' => 'text',
|
||||
'maxlength' => 255,
|
||||
'value' => $config->o_smtp_host,
|
||||
'title' => \ForkBB\__('SMTP address label'),
|
||||
'info' => \ForkBB\__('SMTP address help'),
|
||||
],
|
||||
'o_smtp_user' => [
|
||||
'type' => 'text',
|
||||
'maxlength' => 255,
|
||||
'value' => $config->o_smtp_user,
|
||||
'title' => \ForkBB\__('SMTP username label'),
|
||||
'info' => \ForkBB\__('SMTP username help'),
|
||||
],
|
||||
'o_smtp_pass' => [
|
||||
'type' => 'password',
|
||||
'maxlength' => 255,
|
||||
'value' => $config->o_smtp_pass ? ' ' : null,
|
||||
'title' => \ForkBB\__('SMTP password label'),
|
||||
'info' => \ForkBB\__('SMTP password help'),
|
||||
],
|
||||
'changeSmtpPassword' => [
|
||||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'title' => '',
|
||||
'label' => \ForkBB\__('SMTP change password help'),
|
||||
],
|
||||
'o_smtp_ssl' => [
|
||||
'type' => 'radio',
|
||||
'value' => $config->o_smtp_ssl,
|
||||
'values' => $yn,
|
||||
'title' => \ForkBB\__('SMTP SSL label'),
|
||||
'info' => \ForkBB\__('SMTP SSL help'),
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
$form['sets'][] = [
|
||||
'legend' => \ForkBB\__('Registration subhead'),
|
||||
'fields' => [
|
||||
'o_regs_allow' => [
|
||||
'type' => 'radio',
|
||||
'value' => $config->o_regs_allow,
|
||||
'values' => $yn,
|
||||
'title' => \ForkBB\__('Allow new label'),
|
||||
'info' => \ForkBB\__('Allow new help'),
|
||||
],
|
||||
'o_regs_verify' => [
|
||||
'type' => 'radio',
|
||||
'value' => $config->o_regs_verify,
|
||||
'values' => $yn,
|
||||
'title' => \ForkBB\__('Verify label'),
|
||||
'info' => \ForkBB\__('Verify help'),
|
||||
],
|
||||
'o_regs_report' => [
|
||||
'type' => 'radio',
|
||||
'value' => $config->o_regs_report,
|
||||
'values' => $yn,
|
||||
'title' => \ForkBB\__('Report new label'),
|
||||
'info' => \ForkBB\__('Report new help'),
|
||||
],
|
||||
'o_rules' => [
|
||||
'type' => 'radio',
|
||||
'value' => $config->o_rules,
|
||||
'values' => $yn,
|
||||
'title' => \ForkBB\__('Use rules label'),
|
||||
'info' => \ForkBB\__('Use rules help'),
|
||||
],
|
||||
'o_rules_message' => [
|
||||
'type' => 'textarea',
|
||||
'value' => $config->o_rules_message,
|
||||
'title' => \ForkBB\__('Rules label'),
|
||||
'info' => \ForkBB\__('Rules help'),
|
||||
],
|
||||
'o_default_email_setting' => [
|
||||
'type' => 'radio',
|
||||
'dl' => 'block',
|
||||
'value' => $config->o_default_email_setting,
|
||||
'values' => [
|
||||
0 => \ForkBB\__('Display e-mail label'),
|
||||
1 => \ForkBB\__('Hide allow form label'),
|
||||
2 => \ForkBB\__('Hide both label'),
|
||||
],
|
||||
'title' => \ForkBB\__('E-mail default label'),
|
||||
'info' => \ForkBB\__('E-mail default help'),
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
$form['sets'][] = [
|
||||
'legend' => \ForkBB\__('Announcement subhead'),
|
||||
'fields' => [
|
||||
'o_announcement' => [
|
||||
'type' => 'radio',
|
||||
'value' => $config->o_announcement,
|
||||
'values' => $yn,
|
||||
'title' => \ForkBB\__('Display announcement label'),
|
||||
'info' => \ForkBB\__('Display announcement help'),
|
||||
],
|
||||
'o_announcement_message' => [
|
||||
'type' => 'textarea',
|
||||
'value' => $config->o_announcement_message,
|
||||
'title' => \ForkBB\__('Announcement message label'),
|
||||
'info' => \ForkBB\__('Announcement message help'),
|
||||
],
|
||||
|
||||
],
|
||||
];
|
||||
|
||||
$form['sets'][] = [
|
||||
'legend' => \ForkBB\__('Maintenance subhead'),
|
||||
'fields' => [
|
||||
'o_maintenance' => [
|
||||
'type' => 'radio',
|
||||
'value' => $config->o_maintenance,
|
||||
'values' => $yn,
|
||||
'title' => \ForkBB\__('Maintenance mode label'),
|
||||
'info' => \ForkBB\__('Maintenance mode help'),
|
||||
],
|
||||
'o_maintenance_message' => [
|
||||
'type' => 'textarea',
|
||||
'value' => $config->o_maintenance_message,
|
||||
'title' => \ForkBB\__('Maintenance message label'),
|
||||
'info' => \ForkBB\__('Maintenance message help'),
|
||||
],
|
||||
|
||||
],
|
||||
];
|
||||
|
||||
return $form;
|
||||
}
|
||||
}
|
|
@ -110,7 +110,7 @@ class Auth extends Page
|
|||
* @param Validator $v
|
||||
* @param string $password
|
||||
*
|
||||
* @return array
|
||||
* @return string
|
||||
*/
|
||||
public function vLoginProcess(Validator $v, $password)
|
||||
{
|
||||
|
@ -244,7 +244,7 @@ class Auth extends Page
|
|||
* @param Validator $v
|
||||
* @param string $email
|
||||
*
|
||||
* @return array
|
||||
* @return string
|
||||
*/
|
||||
public function vCheckEmail(Validator $v, $email)
|
||||
{
|
||||
|
|
|
@ -9,13 +9,14 @@ class Delete extends Page
|
|||
use CrumbTrait;
|
||||
|
||||
/**
|
||||
* Подготовка данных для шаблона удаления сообщения/темы
|
||||
* Удаление сообщения/темы
|
||||
*
|
||||
* @param array $args
|
||||
* @param string $method
|
||||
*
|
||||
* @return Page
|
||||
*/
|
||||
public function delete(array $args)
|
||||
public function delete(array $args, $method)
|
||||
{
|
||||
$post = $this->c->posts->load((int) $args['id']);
|
||||
|
||||
|
@ -28,6 +29,37 @@ class Delete extends Page
|
|||
|
||||
$this->c->Lang->load('delete');
|
||||
|
||||
if ($method === 'POST') {
|
||||
$v = $this->c->Validator->setRules([
|
||||
'token' => 'token:DeletePost',
|
||||
'confirm' => 'integer',
|
||||
'delete' => 'string',
|
||||
'cancel' => 'string',
|
||||
])->setArguments([
|
||||
'token' => $args,
|
||||
]);
|
||||
|
||||
if (! $v->validation($_POST) || null === $v->delete) {
|
||||
return $this->c->Redirect->page('ViewPost', $args)->message(\ForkBB\__('Cancel redirect'));
|
||||
} elseif ($v->confirm !== 1) {
|
||||
return $this->c->Redirect->page('ViewPost', $args)->message(\ForkBB\__('No confirm redirect'));
|
||||
}
|
||||
|
||||
$this->c->DB->beginTransaction();
|
||||
|
||||
if ($deleteTopic) {
|
||||
$redirect = $this->c->Redirect->page('Forum', ['id' => $topic->forum_id])->message(\ForkBB\__('Topic del redirect'));
|
||||
$this->c->topics->delete($topic);
|
||||
} else {
|
||||
$redirect = $this->c->Redirect->page('ViewPost', ['id' => $this->c->posts->previousPost($post)])->message(\ForkBB\__('Post del redirect'));
|
||||
$this->c->posts->delete($post);
|
||||
}
|
||||
|
||||
$this->c->DB->commit();
|
||||
|
||||
return $redirect;
|
||||
}
|
||||
|
||||
$this->nameTpl = 'post';
|
||||
$this->onlinePos = 'topic-' . $topic->id;
|
||||
$this->canonical = $post->linkDelete;
|
||||
|
@ -81,54 +113,4 @@ class Delete extends Page
|
|||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Обработка данных от формы удаления сообщения/темы
|
||||
*
|
||||
* @param array $args
|
||||
*
|
||||
* @return Page
|
||||
*/
|
||||
public function deletePost(array $args)
|
||||
{
|
||||
$post = $this->c->posts->load((int) $args['id']);
|
||||
|
||||
if (empty($post) || ! $post->canDelete) {
|
||||
return $this->c->Message->message('Bad request');
|
||||
}
|
||||
|
||||
$topic = $post->parent;
|
||||
$deleteTopic = $post->id === $topic->first_post_id;
|
||||
|
||||
$this->c->Lang->load('delete');
|
||||
|
||||
$v = $this->c->Validator->setRules([
|
||||
'token' => 'token:DeletePost',
|
||||
'confirm' => 'integer',
|
||||
'delete' => 'string',
|
||||
'cancel' => 'string',
|
||||
])->setArguments([
|
||||
'token' => $args,
|
||||
]);
|
||||
|
||||
if (! $v->validation($_POST) || null === $v->delete) {
|
||||
return $this->c->Redirect->page('ViewPost', $args)->message(\ForkBB\__('Cancel redirect'));
|
||||
} elseif ($v->confirm !== 1) {
|
||||
return $this->c->Redirect->page('ViewPost', $args)->message(\ForkBB\__('No confirm redirect'));
|
||||
}
|
||||
|
||||
$this->c->DB->beginTransaction();
|
||||
|
||||
if ($deleteTopic) {
|
||||
$redirect = $this->c->Redirect->page('Forum', ['id' => $topic->forum_id])->message(\ForkBB\__('Topic del redirect'));
|
||||
$this->c->topics->delete($topic);
|
||||
} else {
|
||||
$redirect = $this->c->Redirect->page('ViewPost', ['id' => $this->c->posts->previousPost($post)])->message(\ForkBB\__('Post del redirect'));
|
||||
$this->c->posts->delete($post);
|
||||
}
|
||||
|
||||
$this->c->DB->commit();
|
||||
|
||||
return $redirect;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,13 +13,14 @@ class Edit extends Page
|
|||
use PostValidatorTrait;
|
||||
|
||||
/**
|
||||
* Подготовка данных для шаблона редактироания сообщения
|
||||
* Редактирование сообщения
|
||||
*
|
||||
* @param array $args
|
||||
* @param string $method
|
||||
*
|
||||
* @return Page
|
||||
*/
|
||||
public function edit(array $args)
|
||||
public function edit(array $args, $method)
|
||||
{
|
||||
$post = $this->c->posts->load((int) $args['id']);
|
||||
|
||||
|
@ -30,8 +31,23 @@ class Edit extends Page
|
|||
$topic = $post->parent;
|
||||
$editSubject = $post->id === $topic->first_post_id;
|
||||
|
||||
if (! isset($args['_vars'])) {
|
||||
$args['_vars'] = [
|
||||
$this->c->Lang->load('post');
|
||||
|
||||
if ($method === 'POST') {
|
||||
$v = $this->messageValidator($topic, 'EditPost', $args, true, $editSubject);
|
||||
|
||||
if ($v->validation($_POST) && null === $v->preview) {
|
||||
return $this->endEdit($post, $v);
|
||||
}
|
||||
|
||||
$this->fIswev = $v->getErrors();
|
||||
$args['_vars'] = $v->getData(); //????
|
||||
|
||||
if (null !== $v->preview && ! $v->getErrors()) {
|
||||
$this->previewHtml = $this->c->Parser->parseMessage(null, (bool) $v->hide_smilies);
|
||||
}
|
||||
} else {
|
||||
$args['_vars'] = [ //????
|
||||
'message' => $post->message,
|
||||
'subject' => $topic->subject,
|
||||
'hide_smilies' => $post->hide_smilies,
|
||||
|
@ -41,8 +57,6 @@ class Edit extends Page
|
|||
];
|
||||
}
|
||||
|
||||
$this->c->Lang->load('post');
|
||||
|
||||
$this->nameTpl = 'post';
|
||||
$this->onlinePos = 'topic-' . $topic->id;
|
||||
$this->canonical = $post->linkEdit;
|
||||
|
@ -54,42 +68,6 @@ class Edit extends Page
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Обработка данных от формы редактирования сообщения
|
||||
*
|
||||
* @param array $args
|
||||
*
|
||||
* @return Page
|
||||
*/
|
||||
public function editPost(array $args)
|
||||
{
|
||||
$post = $this->c->posts->load((int) $args['id']);
|
||||
|
||||
if (empty($post) || ! $post->canEdit) {
|
||||
return $this->c->Message->message('Bad request');
|
||||
}
|
||||
|
||||
$topic = $post->parent;
|
||||
$editSubject = $post->id === $topic->first_post_id;
|
||||
|
||||
$this->c->Lang->load('post');
|
||||
|
||||
$v = $this->messageValidator($topic, 'EditPost', $args, true, $editSubject);
|
||||
|
||||
if ($v->validation($_POST) && null === $v->preview) {
|
||||
return $this->endEdit($post, $v);
|
||||
}
|
||||
|
||||
$this->fIswev = $v->getErrors();
|
||||
$args['_vars'] = $v->getData();
|
||||
|
||||
if (null !== $v->preview && ! $v->getErrors()) {
|
||||
$this->previewHtml = $this->c->Parser->parseMessage(null, (bool) $v->hide_smilies);
|
||||
}
|
||||
|
||||
return $this->edit($args, $post);
|
||||
}
|
||||
|
||||
/**
|
||||
* Сохранение сообщения
|
||||
*
|
||||
|
|
|
@ -15,15 +15,16 @@ class Post extends Page
|
|||
use PostValidatorTrait;
|
||||
|
||||
/**
|
||||
* Подготовка данных для шаблона создания темы
|
||||
* Создание новой темы
|
||||
*
|
||||
* @param array $args
|
||||
* @param string $method
|
||||
*
|
||||
* @return Page
|
||||
*/
|
||||
public function newTopic(array $args, Forum $forum = null)
|
||||
public function newTopic(array $args, $method)
|
||||
{
|
||||
$forum = $forum ?: $this->c->forums->get((int) $args['id']);
|
||||
$forum = $this->c->forums->get((int) $args['id']);
|
||||
|
||||
if (empty($forum) || $forum->redirect_url || ! $forum->canCreateTopic) {
|
||||
return $this->c->Message->message('Bad request');
|
||||
|
@ -31,6 +32,21 @@ class Post extends Page
|
|||
|
||||
$this->c->Lang->load('post');
|
||||
|
||||
if ('POST' === $method) {
|
||||
$v = $this->messageValidator($forum, 'NewTopic', $args, false, true);
|
||||
|
||||
if ($v->validation($_POST) && null === $v->preview) {
|
||||
return $this->endPost($forum, $v);
|
||||
}
|
||||
|
||||
$this->fIswev = $v->getErrors();
|
||||
$args['_vars'] = $v->getData(); //????
|
||||
|
||||
if (null !== $v->preview && ! $v->getErrors()) {
|
||||
$this->previewHtml = $this->c->Parser->parseMessage(null, (bool) $v->hide_smilies);
|
||||
}
|
||||
}
|
||||
|
||||
$this->nameTpl = 'post';
|
||||
$this->onlinePos = 'forum-' . $forum->id;
|
||||
$this->canonical = $this->c->Router->link('NewTopic', ['id' => $forum->id]);
|
||||
|
@ -42,47 +58,15 @@ class Post extends Page
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Обработчка данных от формы создания темы
|
||||
*
|
||||
* @param array $args
|
||||
*
|
||||
* @return Page
|
||||
*/
|
||||
public function newTopicPost(array $args)
|
||||
{
|
||||
$forum = $this->c->forums->get((int) $args['id']);
|
||||
|
||||
if (empty($forum) || $forum->redirect_url || ! $forum->canCreateTopic) {
|
||||
return $this->c->Message->message('Bad request');
|
||||
}
|
||||
|
||||
$this->c->Lang->load('post');
|
||||
|
||||
$v = $this->messageValidator($forum, 'NewTopic', $args, false, true);
|
||||
|
||||
if ($v->validation($_POST) && null === $v->preview) {
|
||||
return $this->endPost($forum, $v);
|
||||
}
|
||||
|
||||
$this->fIswev = $v->getErrors();
|
||||
$args['_vars'] = $v->getData();
|
||||
|
||||
if (null !== $v->preview && ! $v->getErrors()) {
|
||||
$this->previewHtml = $this->c->Parser->parseMessage(null, (bool) $v->hide_smilies);
|
||||
}
|
||||
|
||||
return $this->newTopic($args, $forum);
|
||||
}
|
||||
|
||||
/**
|
||||
* Подготовка данных для шаблона создания сообщения
|
||||
*
|
||||
* @param array $args
|
||||
* @param string $method
|
||||
*
|
||||
* @return Page
|
||||
*/
|
||||
public function newReply(array $args)
|
||||
public function newReply(array $args, $method)
|
||||
{
|
||||
$topic = $this->c->topics->load((int) $args['id']);
|
||||
|
||||
|
@ -90,7 +74,22 @@ class Post extends Page
|
|||
return $this->c->Message->message('Bad request');
|
||||
}
|
||||
|
||||
if (isset($args['quote'])) {
|
||||
$this->c->Lang->load('post');
|
||||
|
||||
if ('POST' === $method) {
|
||||
$v = $this->messageValidator($topic, 'NewReply', $args);
|
||||
|
||||
if ($v->validation($_POST) && null === $v->preview) {
|
||||
return $this->endPost($topic, $v);
|
||||
}
|
||||
|
||||
$this->fIswev = $v->getErrors();
|
||||
$args['_vars'] = $v->getData(); //????
|
||||
|
||||
if (null !== $v->preview && ! $v->getErrors()) {
|
||||
$this->previewHtml = $this->c->Parser->parseMessage(null, (bool) $v->hide_smilies);
|
||||
}
|
||||
} elseif (isset($args['quote'])) {
|
||||
$post = $this->c->posts->load((int) $args['quote'], $topic->id);
|
||||
|
||||
if (empty($post)) {
|
||||
|
@ -99,12 +98,10 @@ class Post extends Page
|
|||
|
||||
$message = '[quote="' . $post->poster . '"]' . $post->message . '[/quote]';
|
||||
|
||||
$args['_vars'] = ['message' => $message];
|
||||
$args['_vars'] = ['message' => $message]; //????
|
||||
unset($args['quote']);
|
||||
}
|
||||
|
||||
$this->c->Lang->load('post');
|
||||
|
||||
$this->nameTpl = 'post';
|
||||
$this->onlinePos = 'topic-' . $topic->id;
|
||||
$this->canonical = $this->c->Router->link('NewReply', ['id' => $topic->id]);
|
||||
|
@ -116,39 +113,6 @@ class Post extends Page
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Обработка данных от формы создания сообщения
|
||||
*
|
||||
* @param array $args
|
||||
*
|
||||
* @return Page
|
||||
*/
|
||||
public function newReplyPost(array $args)
|
||||
{
|
||||
$topic = $this->c->topics->load((int) $args['id']);
|
||||
|
||||
if (empty($topic) || $topic->moved_to || ! $topic->canReply) {
|
||||
return $this->c->Message->message('Bad request');
|
||||
}
|
||||
|
||||
$this->c->Lang->load('post');
|
||||
|
||||
$v = $this->messageValidator($topic, 'NewReply', $args);
|
||||
|
||||
if ($v->validation($_POST) && null === $v->preview) {
|
||||
return $this->endPost($topic, $v);
|
||||
}
|
||||
|
||||
$this->fIswev = $v->getErrors();
|
||||
$args['_vars'] = $v->getData();
|
||||
|
||||
if (null !== $v->preview && ! $v->getErrors()) {
|
||||
$this->previewHtml = $this->c->Parser->parseMessage(null, (bool) $v->hide_smilies);
|
||||
}
|
||||
|
||||
return $this->newReply($args);
|
||||
}
|
||||
|
||||
/**
|
||||
* Создание темы/сообщения
|
||||
*
|
||||
|
|
|
@ -68,7 +68,7 @@ class Register extends Page
|
|||
* @param Validator $v
|
||||
* @param string $email
|
||||
*
|
||||
* @return array
|
||||
* @return string
|
||||
*/
|
||||
public function vCheckEmail(Validator $v, $email)
|
||||
{
|
||||
|
@ -91,7 +91,7 @@ class Register extends Page
|
|||
* @param Validator $v
|
||||
* @param string $username
|
||||
*
|
||||
* @return array
|
||||
* @return string
|
||||
*/
|
||||
public function vCheckUsername(Validator $v, $username)
|
||||
{
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
namespace ForkBB\Models\Pages;
|
||||
|
||||
use ForkBB\Models\Page;
|
||||
use ForkBB\Models\Topic\Model as ModelTopic;
|
||||
|
||||
class Topic extends Page
|
||||
{
|
||||
|
@ -72,11 +73,11 @@ class Topic extends Page
|
|||
|
||||
/**
|
||||
* @param string $type
|
||||
* @param Models\Topic $topic
|
||||
* @param ModelTopic $topic
|
||||
*
|
||||
* @param Page
|
||||
*/
|
||||
protected function go($type, $topic)
|
||||
protected function go($type, ModelTopic $topic)
|
||||
{
|
||||
switch ($type) {
|
||||
case 'new':
|
||||
|
|
|
@ -20,7 +20,7 @@ class IsUniqueName extends Action
|
|||
':name' => $user->username,
|
||||
':other' => preg_replace('%[^\p{L}\p{N}]%u', '', $user->username), //????
|
||||
];
|
||||
$result = $this->c->DB->query('SELECT username FROM ::users WHERE UPPER(username)=UPPER(?s:name) OR UPPER(username)=UPPER(?s:other)', $vars)->fetchAll();
|
||||
$result = $this->c->DB->query('SELECT username FROM ::users WHERE LOWER(username)=LOWER(?s:name) OR LOWER(username)=LOWER(?s:other)', $vars)->fetchAll();
|
||||
return ! count($result);
|
||||
}
|
||||
}
|
||||
|
|
577
app/lang/English/admin_options.po
Normal file
577
app/lang/English/admin_options.po
Normal file
|
@ -0,0 +1,577 @@
|
|||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"Project-Id-Version: ForkBB\n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: ForkBB <mio.visman@yandex.ru>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: en\n"
|
||||
|
||||
msgid "Must enter title message"
|
||||
msgstr "You must enter a board title."
|
||||
|
||||
msgid "Invalid e-mail message"
|
||||
msgstr "The admin email address you entered is invalid."
|
||||
|
||||
msgid "Invalid webmaster e-mail message"
|
||||
msgstr "The webmaster email address you entered is invalid."
|
||||
|
||||
msgid "Enter announcement here"
|
||||
msgstr "Enter your announcement here."
|
||||
|
||||
msgid "Enter rules here"
|
||||
msgstr "Enter your rules here."
|
||||
|
||||
msgid "Default maintenance message"
|
||||
msgstr "The forums are temporarily down for maintenance. Please try again in a few minutes."
|
||||
|
||||
msgid "Timeout error message"
|
||||
msgstr "The value of \"Timeout online\" must be smaller than the value of \"Timeout visit\"."
|
||||
|
||||
msgid "Options updated redirect"
|
||||
msgstr "Options updated. Redirecting …"
|
||||
|
||||
msgid "Options head"
|
||||
msgstr "Options"
|
||||
|
||||
msgid "Essentials subhead"
|
||||
msgstr "Essentials"
|
||||
|
||||
msgid "Board title label"
|
||||
msgstr "Board title"
|
||||
|
||||
msgid "Board title help"
|
||||
msgstr "The title of this bulletin board (shown at the top of every page). This field may <strong>not</strong> contain HTML."
|
||||
|
||||
msgid "Board desc label"
|
||||
msgstr "Board description"
|
||||
|
||||
msgid "Board desc help"
|
||||
msgstr "A short description of this bulletin board (shown at the top of every page). This field may contain HTML."
|
||||
|
||||
msgid "Timezone label"
|
||||
msgstr "Default time zone"
|
||||
|
||||
msgid "Timezone help"
|
||||
msgstr "The default time zone for guests and users attempting to register for the board."
|
||||
|
||||
msgid "DST label"
|
||||
msgstr "Adjust for DST"
|
||||
|
||||
msgid "DST help"
|
||||
msgstr "Check if daylight savings is in effect (advances times by 1 hour)."
|
||||
|
||||
msgid "Language label"
|
||||
msgstr "Default language"
|
||||
|
||||
msgid "Language help"
|
||||
msgstr "The default language for guests and users who haven\'t changed from the default in their profile. If you remove a language pack, this must be updated."
|
||||
|
||||
msgid "Default style label"
|
||||
msgstr "Default style"
|
||||
|
||||
msgid "Default style help"
|
||||
msgstr "The default style for guests and users who haven\'t changed from the default in their profile."
|
||||
|
||||
msgid "UTC-12:00"
|
||||
msgstr "(UTC-12:00) International Date Line West"
|
||||
|
||||
msgid "UTC-11:00"
|
||||
msgstr "(UTC-11:00) Niue, Samoa"
|
||||
|
||||
msgid "UTC-10:00"
|
||||
msgstr "(UTC-10:00) Hawaii-Aleutian, Cook Island"
|
||||
|
||||
msgid "UTC-09:30"
|
||||
msgstr "(UTC-09:30) Marquesas Islands"
|
||||
|
||||
msgid "UTC-09:00"
|
||||
msgstr "(UTC-09:00) Alaska, Gambier Island"
|
||||
|
||||
msgid "UTC-08:30"
|
||||
msgstr "(UTC-08:30) Pitcairn Islands"
|
||||
|
||||
msgid "UTC-08:00"
|
||||
msgstr "(UTC-08:00) Pacific"
|
||||
|
||||
msgid "UTC-07:00"
|
||||
msgstr "(UTC-07:00) Mountain"
|
||||
|
||||
msgid "UTC-06:00"
|
||||
msgstr "(UTC-06:00) Central"
|
||||
|
||||
msgid "UTC-05:00"
|
||||
msgstr "(UTC-05:00) Eastern"
|
||||
|
||||
msgid "UTC-04:00"
|
||||
msgstr "(UTC-04:00) Atlantic"
|
||||
|
||||
msgid "UTC-03:30"
|
||||
msgstr "(UTC-03:30) Newfoundland"
|
||||
|
||||
msgid "UTC-03:00"
|
||||
msgstr "(UTC-03:00) Amazon, Central Greenland"
|
||||
|
||||
msgid "UTC-02:00"
|
||||
msgstr "(UTC-02:00) Mid-Atlantic"
|
||||
|
||||
msgid "UTC-01:00"
|
||||
msgstr "(UTC-01:00) Azores, Cape Verde, Eastern Greenland"
|
||||
|
||||
msgid "UTC"
|
||||
msgstr "(UTC) Western European, Greenwich"
|
||||
|
||||
msgid "UTC+01:00"
|
||||
msgstr "(UTC+01:00) Central European, West African"
|
||||
|
||||
msgid "UTC+02:00"
|
||||
msgstr "(UTC+02:00) Eastern European, Central African"
|
||||
|
||||
msgid "UTC+03:00"
|
||||
msgstr "(UTC+03:00) Moscow, St.Petersburg, Eastern African"
|
||||
|
||||
msgid "UTC+03:30"
|
||||
msgstr "(UTC+03:30) Iran"
|
||||
|
||||
msgid "UTC+04:00"
|
||||
msgstr "(UTC+04:00) Gulf, Izhevsk, Samara"
|
||||
|
||||
msgid "UTC+04:30"
|
||||
msgstr "(UTC+04:30) Afghanistan"
|
||||
|
||||
msgid "UTC+05:00"
|
||||
msgstr "(UTC+05:00) Pakistan, Yekaterinburg"
|
||||
|
||||
msgid "UTC+05:30"
|
||||
msgstr "(UTC+05:30) India, Sri Lanka"
|
||||
|
||||
msgid "UTC+05:45"
|
||||
msgstr "(UTC+05:45) Nepal"
|
||||
|
||||
msgid "UTC+06:00"
|
||||
msgstr "(UTC+06:00) Bangladesh, Bhutan, Novosibirsk"
|
||||
|
||||
msgid "UTC+06:30"
|
||||
msgstr "(UTC+06:30) Cocos Islands, Myanmar"
|
||||
|
||||
msgid "UTC+07:00"
|
||||
msgstr "(UTC+07:00) Indochina, Krasnoyarsk"
|
||||
|
||||
msgid "UTC+08:00"
|
||||
msgstr "(UTC+08:00) Greater China, Australian Western, Irkutsk"
|
||||
|
||||
msgid "UTC+08:45"
|
||||
msgstr "(UTC+08:45) Southeastern Western Australia"
|
||||
|
||||
msgid "UTC+09:00"
|
||||
msgstr "(UTC+09:00) Japan, Korea, Yakutsk"
|
||||
|
||||
msgid "UTC+09:30"
|
||||
msgstr "(UTC+09:30) Australian Central"
|
||||
|
||||
msgid "UTC+10:00"
|
||||
msgstr "(UTC+10:00) Australian Eastern, Vladivostok, Magadan"
|
||||
|
||||
msgid "UTC+10:30"
|
||||
msgstr "(UTC+10:30) Lord Howe"
|
||||
|
||||
msgid "UTC+11:00"
|
||||
msgstr "(UTC+11:00) Solomon Island, Chokurdakh"
|
||||
|
||||
msgid "UTC+11:30"
|
||||
msgstr "(UTC+11:30) Norfolk Island"
|
||||
|
||||
msgid "UTC+12:00"
|
||||
msgstr "(UTC+12:00) New Zealand, Fiji, Petropavlovsk-Kamchatsky"
|
||||
|
||||
msgid "UTC+12:45"
|
||||
msgstr "(UTC+12:45) Chatham Islands"
|
||||
|
||||
msgid "UTC+13:00"
|
||||
msgstr "(UTC+13:00) Tonga, Phoenix Islands"
|
||||
|
||||
msgid "UTC+14:00"
|
||||
msgstr "(UTC+14:00) Line Islands"
|
||||
|
||||
msgid "Timeouts subhead"
|
||||
msgstr "Time and timeouts"
|
||||
|
||||
msgid "Time format label"
|
||||
msgstr "Time format"
|
||||
|
||||
msgid "Time format help"
|
||||
msgstr "[Current format: %s]. See <a href=\"https://secure.php.net/manual/en/function.date.php\">PHP manual</a> for formatting options."
|
||||
|
||||
msgid "Date format label"
|
||||
msgstr "Date format"
|
||||
|
||||
msgid "Date format help"
|
||||
msgstr "[Current format: %s]. See <a href=\"https://secure.php.net/manual/en/function.date.php\">PHP manual</a> for formatting options."
|
||||
|
||||
msgid "Visit timeout label"
|
||||
msgstr "Visit timeout"
|
||||
|
||||
msgid "Visit timeout help"
|
||||
msgstr "Number of seconds a user must be idle before his/hers last visit data is updated (primarily affects new message indicators)."
|
||||
|
||||
msgid "Online timeout label"
|
||||
msgstr "Online timeout"
|
||||
|
||||
msgid "Online timeout help"
|
||||
msgstr "Number of seconds a user must be idle before being removed from the online users list."
|
||||
|
||||
msgid "Redirect time label"
|
||||
msgstr "Redirect time"
|
||||
|
||||
msgid "Redirect time help"
|
||||
msgstr "Number of seconds to wait when redirecting. If set to 0, no redirect page will be displayed (not recommended)."
|
||||
|
||||
msgid "Display subhead"
|
||||
msgstr "Display"
|
||||
|
||||
msgid "Info in posts label"
|
||||
msgstr "User info in posts"
|
||||
|
||||
msgid "Info in posts help"
|
||||
msgstr "Show information about the poster under the username in topic view. The information affected is location, register date, post count and the contact links (email and URL)."
|
||||
|
||||
msgid "Post count label"
|
||||
msgstr "User post count"
|
||||
|
||||
msgid "Post count help"
|
||||
msgstr "Show the number of posts a user has made (affects topic view, profile and user list)."
|
||||
|
||||
msgid "Smilies label"
|
||||
msgstr "Smilies in posts"
|
||||
|
||||
msgid "Smilies help"
|
||||
msgstr "Convert smilies to small graphic icons."
|
||||
|
||||
msgid "Smilies sigs label"
|
||||
msgstr "Smilies in signatures"
|
||||
|
||||
msgid "Smilies sigs help"
|
||||
msgstr "Convert smilies to small graphic icons in user signatures."
|
||||
|
||||
msgid "Clickable links label"
|
||||
msgstr "Make clickable links"
|
||||
|
||||
msgid "Clickable links help"
|
||||
msgstr "When enabled, ForkBB will automatically detect any URLs in posts and make them clickable hyperlinks."
|
||||
|
||||
msgid "Topic review label"
|
||||
msgstr "Topic review"
|
||||
|
||||
msgid "Topic review help"
|
||||
msgstr "Maximum number of posts to display when posting (newest first). Set to 0 to disable."
|
||||
|
||||
msgid "Topics per page label"
|
||||
msgstr "Topics per page"
|
||||
|
||||
msgid "Topics per page help"
|
||||
msgstr "The default number of topics to display per page in a forum. Users can personalize this setting."
|
||||
|
||||
msgid "Posts per page label"
|
||||
msgstr "Posts per page"
|
||||
|
||||
msgid "Posts per page help"
|
||||
msgstr "The default number of posts to display per page in a topic. Users can personalize this setting."
|
||||
|
||||
msgid "Indent label"
|
||||
msgstr "Indent size"
|
||||
|
||||
msgid "Indent help"
|
||||
msgstr "If set to 8, a regular tab will be used when displaying text within the [code][/code] tag. Otherwise this many spaces will be used to indent the text."
|
||||
|
||||
msgid "Quote depth label"
|
||||
msgstr "Maximum [quote] depth"
|
||||
|
||||
msgid "Quote depth help"
|
||||
msgstr "The maximum times a [quote] tag can go inside other [quote] tags, any tags deeper than this will be discarded."
|
||||
|
||||
msgid "Features subhead"
|
||||
msgstr "Features"
|
||||
|
||||
msgid "Quick post label"
|
||||
msgstr "Quick reply"
|
||||
|
||||
msgid "Quick post help"
|
||||
msgstr "When enabled, ForkBB will add a quick reply form at the bottom of topics. This way users can post directly from the topic view."
|
||||
|
||||
msgid "Users online label"
|
||||
msgstr "Users online"
|
||||
|
||||
msgid "Users online help"
|
||||
msgstr "Display info on the index page about guests and registered users currently browsing the board."
|
||||
|
||||
msgid "Censor words label"
|
||||
msgstr "Censor words"
|
||||
|
||||
msgid "Censor words help"
|
||||
msgstr "Enable this to censor specific words in the board. <a href=\"%s\">Change</a> the word list."
|
||||
|
||||
msgid "Signatures label"
|
||||
msgstr "Signatures"
|
||||
|
||||
msgid "Signatures help"
|
||||
msgstr "Allow users to attach a signature to their posts."
|
||||
|
||||
msgid "User has posted label"
|
||||
msgstr "User has posted earlier"
|
||||
|
||||
msgid "User has posted help"
|
||||
msgstr "This feature displays a dot in front of topics in the forum page in case the currently logged in user has posted in that topic earlier. Disable if you are experiencing high server load."
|
||||
|
||||
msgid "Topic views label"
|
||||
msgstr "Topic views"
|
||||
|
||||
msgid "Topic views help"
|
||||
msgstr "Keep track of the number of views a topic has. Disable if you are experiencing high server load in a busy forum."
|
||||
|
||||
msgid "Quick jump label"
|
||||
msgstr "Quick jump"
|
||||
|
||||
msgid "Quick jump help"
|
||||
msgstr "Enable the quick jump (jump to forum) drop list."
|
||||
|
||||
msgid "GZip label"
|
||||
msgstr "GZip output"
|
||||
|
||||
msgid "GZip help"
|
||||
msgstr "If enabled, ForkBB will gzip the output sent to browsers. This will reduce bandwidth usage, but use a little more CPU. This feature requires that PHP is configured with zlib (--with-zlib). Note: If you already have one of the Apache modules mod_gzip or mod_deflate set up to compress PHP scripts, you should disable this feature."
|
||||
|
||||
msgid "Search all label"
|
||||
msgstr "Search all forums"
|
||||
|
||||
msgid "Search all help"
|
||||
msgstr "When disabled, searches will only be allowed in one forum at a time. Disable if server load is high due to excessive searching."
|
||||
|
||||
msgid "Menu items label"
|
||||
msgstr "Additional menu items"
|
||||
|
||||
msgid "Menu items help"
|
||||
msgstr "By entering HTML hyperlinks into this textbox, any number of items can be added to the navigation menu at the top of all pages. The format for adding new links is X = <a href="URL">LINK</a> where X is the position at which the link should be inserted (e.g. 0 to insert at the beginning and 2 to insert after "User list"). Separate entries with a linebreak."
|
||||
|
||||
msgid "Feed subhead"
|
||||
msgstr "Syndication"
|
||||
|
||||
msgid "Default feed label"
|
||||
msgstr "Default feed type"
|
||||
|
||||
msgid "Default feed help"
|
||||
msgstr "Select the type of syndication feed to display. Note: Choosing none will not disable feeds, only hide them by default."
|
||||
|
||||
msgid "No feeds"
|
||||
msgstr "None"
|
||||
|
||||
msgid "RSS"
|
||||
msgstr "RSS"
|
||||
|
||||
msgid "Atom"
|
||||
msgstr "Atom"
|
||||
|
||||
msgid "Feed TTL label"
|
||||
msgstr "Duration to cache feeds"
|
||||
|
||||
msgid "Feed TTL help"
|
||||
msgstr "Feeds can be cached to lower the resource usage of feeds."
|
||||
|
||||
msgid "No cache"
|
||||
msgstr "Don\'t cache"
|
||||
|
||||
msgid "%d Minutes"
|
||||
msgstr "%d minutes"
|
||||
|
||||
msgid "Reports subhead"
|
||||
msgstr "Reports"
|
||||
|
||||
msgid "Reporting method label"
|
||||
msgstr "Reporting method"
|
||||
|
||||
msgid "Internal"
|
||||
msgstr "Internal"
|
||||
|
||||
msgid "By e-mail"
|
||||
msgstr "Email"
|
||||
|
||||
msgid "Both"
|
||||
msgstr "Both"
|
||||
|
||||
msgid "Reporting method help"
|
||||
msgstr "Select the method for handling topic/post reports. You can choose whether topic/post reports should be handled by the internal report system, emailed to the addresses on the mailing list (see below) or both."
|
||||
|
||||
msgid "Mailing list label"
|
||||
msgstr "Mailing list"
|
||||
|
||||
msgid "Mailing list help"
|
||||
msgstr "A comma separated list of subscribers. The people on this list are the recipients of reports."
|
||||
|
||||
msgid "Avatars subhead"
|
||||
msgstr "Avatars"
|
||||
|
||||
msgid "Use avatars label"
|
||||
msgstr "Use avatars"
|
||||
|
||||
msgid "Use avatars help"
|
||||
msgstr "When enabled, users will be able to upload an avatar which will be displayed under their title."
|
||||
|
||||
msgid "Upload directory label"
|
||||
msgstr "Upload directory"
|
||||
|
||||
msgid "Upload directory help"
|
||||
msgstr "The upload directory for avatars (relative to the ForkBB root directory). PHP must have write permissions to this directory."
|
||||
|
||||
msgid "Max width label"
|
||||
msgstr "Max width"
|
||||
|
||||
msgid "Max width help"
|
||||
msgstr "The maximum allowed width of avatars in pixels (60 is recommended)."
|
||||
|
||||
msgid "Max height label"
|
||||
msgstr "Max height"
|
||||
|
||||
msgid "Max height help"
|
||||
msgstr "The maximum allowed height of avatars in pixels (60 is recommended)."
|
||||
|
||||
msgid "Max size label"
|
||||
msgstr "Max size"
|
||||
|
||||
msgid "Max size help"
|
||||
msgstr "The maximum allowed size of avatars in bytes (10240 is recommended)."
|
||||
|
||||
msgid "E-mail subhead"
|
||||
msgstr "Email"
|
||||
|
||||
msgid "Admin e-mail label"
|
||||
msgstr "Admin email"
|
||||
|
||||
msgid "Admin e-mail help"
|
||||
msgstr "The email address of the board administrator."
|
||||
|
||||
msgid "Webmaster e-mail label"
|
||||
msgstr "Webmaster email"
|
||||
|
||||
msgid "Webmaster e-mail help"
|
||||
msgstr "This is the address that all emails sent by the board will be addressed from."
|
||||
|
||||
msgid "Forum subscriptions label"
|
||||
msgstr "Forum subscriptions"
|
||||
|
||||
msgid "Forum subscriptions help"
|
||||
msgstr "Enable users to subscribe to forums (receive email when someone creates a new topic)."
|
||||
|
||||
msgid "Topic subscriptions label"
|
||||
msgstr "Topic subscriptions"
|
||||
|
||||
msgid "Topic subscriptions help"
|
||||
msgstr "Enable users to subscribe to topics (receive email when someone replies)."
|
||||
|
||||
msgid "SMTP address label"
|
||||
msgstr "SMTP server address"
|
||||
|
||||
msgid "SMTP address help"
|
||||
msgstr "The address of an external SMTP server to send emails with. You can specify a custom port number if the SMTP server doesn\'t run on the default port 25 (example: mail.myhost.com:3580). Leave blank to use the local mail program."
|
||||
|
||||
msgid "SMTP username label"
|
||||
msgstr "SMTP username"
|
||||
|
||||
msgid "SMTP username help"
|
||||
msgstr "Username for SMTP server. Only enter a username if it is required by the SMTP server (most servers <strong>do not</strong> require authentication)."
|
||||
|
||||
msgid "SMTP password label"
|
||||
msgstr "SMTP password"
|
||||
|
||||
msgid "SMTP change password help"
|
||||
msgstr "Check this if you want to change or delete the currently stored password."
|
||||
|
||||
msgid "SMTP password help"
|
||||
msgstr "Password for SMTP server. Only enter a password if it is required by the SMTP server (most servers <strong>do not</strong> require authentication). Please enter your password twice to confirm."
|
||||
|
||||
msgid "SMTP SSL label"
|
||||
msgstr "Encrypt SMTP using SSL"
|
||||
|
||||
msgid "SMTP SSL help"
|
||||
msgstr "Encrypts the connection to the SMTP server using SSL. Should only be used if your SMTP server requires it and your version of PHP supports SSL."
|
||||
|
||||
msgid "Registration subhead"
|
||||
msgstr "Registration"
|
||||
|
||||
msgid "Allow new label"
|
||||
msgstr "Allow new registrations"
|
||||
|
||||
msgid "Allow new help"
|
||||
msgstr "Controls whether this board accepts new registrations. Disable only under special circumstances."
|
||||
|
||||
msgid "Verify label"
|
||||
msgstr "Verify registrations"
|
||||
|
||||
msgid "Verify help"
|
||||
msgstr "When enabled, users are emailed a random password when they register. They can then log in and change the password in their profile if they see fit. This feature also requires users to verify new email addresses if they choose to change from the one they registered with. This is an effective way of avoiding registration abuse and making sure that all users have "correct" email addresses in their profiles."
|
||||
|
||||
msgid "Report new label"
|
||||
msgstr "Report new registrations"
|
||||
|
||||
msgid "Report new help"
|
||||
msgstr "If enabled, ForkBB will notify users on the mailing list (see above) when a new user registers in the forums."
|
||||
|
||||
msgid "Use rules label"
|
||||
msgstr "User forum rules"
|
||||
|
||||
msgid "Use rules help"
|
||||
msgstr "When enabled, users must agree to a set of rules when registering (enter text below). The rules will always be available through a link in the navigation table at the top of every page."
|
||||
|
||||
msgid "Rules label"
|
||||
msgstr "Enter your rules here"
|
||||
|
||||
msgid "Rules help"
|
||||
msgstr "Here you can enter any rules or other information that the user must review and accept when registering. If you enabled rules above you have to enter something here, otherwise it will be disabled. This text will not be parsed like regular posts and thus may contain HTML."
|
||||
|
||||
msgid "E-mail default label"
|
||||
msgstr "Default email setting"
|
||||
|
||||
msgid "E-mail default help"
|
||||
msgstr "Choose the default privacy setting for new user registrations."
|
||||
|
||||
msgid "Display e-mail label"
|
||||
msgstr "Display email address to other users."
|
||||
|
||||
msgid "Hide allow form label"
|
||||
msgstr "Hide email address but allow form e-mail."
|
||||
|
||||
msgid "Hide both label"
|
||||
msgstr "Hide email address and disallow form email."
|
||||
|
||||
msgid "Announcement subhead"
|
||||
msgstr "Announcements"
|
||||
|
||||
msgid "Display announcement label"
|
||||
msgstr "Display announcement"
|
||||
|
||||
msgid "Display announcement help"
|
||||
msgstr "Enable this to display the below message in the board."
|
||||
|
||||
msgid "Announcement message label"
|
||||
msgstr "Announcement message"
|
||||
|
||||
msgid "Announcement message help"
|
||||
msgstr "This text will not be parsed like regular posts and thus may contain HTML."
|
||||
|
||||
msgid "Maintenance subhead"
|
||||
msgstr "Maintenance"
|
||||
|
||||
msgid "Maintenance mode label"
|
||||
msgstr "Maintenance mode"
|
||||
|
||||
msgid "Maintenance mode help"
|
||||
msgstr "When enabled, the board will only be available to administrators. This should be used if the board needs to be taken down temporarily for maintenance. <strong>WARNING! Do not log out when the board is in maintenance mode.</strong> You will not be able to login again."
|
||||
|
||||
msgid "Maintenance message label"
|
||||
msgstr "Maintenance message"
|
||||
|
||||
msgid "Maintenance message help"
|
||||
msgstr "The message that will be displayed to users when the board is in maintenance mode. If left blank, a default message will be used. This text will not be parsed like regular posts and thus may contain HTML."
|
577
app/lang/Russian/admin_options.po
Normal file
577
app/lang/Russian/admin_options.po
Normal file
|
@ -0,0 +1,577 @@
|
|||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||
"Project-Id-Version: ForkBB\n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: ForkBB <mio.visman@yandex.ru>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: ru\n"
|
||||
|
||||
msgid "Must enter title message"
|
||||
msgstr "Вы должны ввести заголовок форума."
|
||||
|
||||
msgid "Invalid e-mail message"
|
||||
msgstr "Email админа введен неверно."
|
||||
|
||||
msgid "Invalid webmaster e-mail message"
|
||||
msgstr "Email вебмастера введен неверно."
|
||||
|
||||
msgid "Enter announcement here"
|
||||
msgstr "Введите сюда своё объявление."
|
||||
|
||||
msgid "Enter rules here"
|
||||
msgstr "Введите сюда правила форума."
|
||||
|
||||
msgid "Default maintenance message"
|
||||
msgstr "Форум временно закрыт на обслуживание. Пожалуйста, попробуйте зайти через несколько минут."
|
||||
|
||||
msgid "Timeout error message"
|
||||
msgstr "Значение \"Таймаут online\" должно быть меньше чем \"Таймаут визита\"."
|
||||
|
||||
msgid "Options updated redirect"
|
||||
msgstr "Опции сохранены. Переадресация …"
|
||||
|
||||
msgid "Options head"
|
||||
msgstr "Опции"
|
||||
|
||||
msgid "Essentials subhead"
|
||||
msgstr "Основное"
|
||||
|
||||
msgid "Board title label"
|
||||
msgstr "Заголовок"
|
||||
|
||||
msgid "Board title help"
|
||||
msgstr "Заголовок этого форума (выводится в шапке каждой страницы). Это поле <strong>не может</strong> содержать HTML."
|
||||
|
||||
msgid "Board desc label"
|
||||
msgstr "Описание"
|
||||
|
||||
msgid "Board desc help"
|
||||
msgstr "Краткое описание этого форума (выводится в шапке каждой страницы). Это поле может содержать HTML."
|
||||
|
||||
msgid "Timezone label"
|
||||
msgstr "Часовой пояс по умолчанию"
|
||||
|
||||
msgid "Timezone help"
|
||||
msgstr "Часовой пояс для гостей и новых пользователей."
|
||||
|
||||
msgid "DST label"
|
||||
msgstr "Поправка на летнее время"
|
||||
|
||||
msgid "DST help"
|
||||
msgstr "Отметьте, если в вашем регионе применяется поправка на летнее время (сдвигает время на 1 час)."
|
||||
|
||||
msgid "Language label"
|
||||
msgstr "Язык по умолчанию"
|
||||
|
||||
msgid "Language help"
|
||||
msgstr "Язык по умолчанию для гостей и пользователей, кто не поменял его в своём профиле. Если вы уберете основные языковые файлы, это значение необходимо будет поправить."
|
||||
|
||||
msgid "Default style label"
|
||||
msgstr "Стиль по умолчанию"
|
||||
|
||||
msgid "Default style help"
|
||||
msgstr "Стиль по умолчанию для гостей и пользователей, кто не поменял его в своём профиле."
|
||||
|
||||
msgid "UTC-12:00"
|
||||
msgstr "(UTC-12:00) Меридиан смены дат (запад)"
|
||||
|
||||
msgid "UTC-11:00"
|
||||
msgstr "(UTC-11:00) Самоа"
|
||||
|
||||
msgid "UTC-10:00"
|
||||
msgstr "(UTC-10:00) Гавайи"
|
||||
|
||||
msgid "UTC-09:30"
|
||||
msgstr "(UTC-09:30) Маркизские о-ва"
|
||||
|
||||
msgid "UTC-09:00"
|
||||
msgstr "(UTC-09:00) Аляска"
|
||||
|
||||
msgid "UTC-08:30"
|
||||
msgstr "(UTC-08:30) о-ва Питкэрн"
|
||||
|
||||
msgid "UTC-08:00"
|
||||
msgstr "(UTC-08:00) Тихоокеанское время"
|
||||
|
||||
msgid "UTC-07:00"
|
||||
msgstr "(UTC-07:00) Ла Пас, Чихуахуа"
|
||||
|
||||
msgid "UTC-06:00"
|
||||
msgstr "(UTC-06:00) Саскачеван, Мехико"
|
||||
|
||||
msgid "UTC-05:00"
|
||||
msgstr "(UTC-05:00) Богота, Кито, Лима"
|
||||
|
||||
msgid "UTC-04:00"
|
||||
msgstr "(UTC-04:00) Сантьяго, Джорджтаун"
|
||||
|
||||
msgid "UTC-03:30"
|
||||
msgstr "(UTC-03:30) Ньюфаундленд"
|
||||
|
||||
msgid "UTC-03:00"
|
||||
msgstr "(UTC-03:00) Буэнос-Айрес, Гренландия"
|
||||
|
||||
msgid "UTC-02:00"
|
||||
msgstr "(UTC-02:00) Среднеатлантическое время"
|
||||
|
||||
msgid "UTC-01:00"
|
||||
msgstr "(UTC-01:00) Азорские о-ва"
|
||||
|
||||
msgid "UTC"
|
||||
msgstr "(UTC) Гринвич, Рейкявик"
|
||||
|
||||
msgid "UTC+01:00"
|
||||
msgstr "(UTC+01:00) Варшава, Сараево, Париж"
|
||||
|
||||
msgid "UTC+02:00"
|
||||
msgstr "(UTC+02:00) Калининград, Киев, Афины, Иерусалим"
|
||||
|
||||
msgid "UTC+03:00"
|
||||
msgstr "(UTC+03:00) Москва, Санкт-Петербург, Багдад"
|
||||
|
||||
msgid "UTC+03:30"
|
||||
msgstr "(UTC+03:30) Тегеран"
|
||||
|
||||
msgid "UTC+04:00"
|
||||
msgstr "(UTC+04:00) Ижевск, Самара, Баку, Ереван"
|
||||
|
||||
msgid "UTC+04:30"
|
||||
msgstr "(UTC+04:30) Кабул"
|
||||
|
||||
msgid "UTC+05:00"
|
||||
msgstr "(UTC+05:00) Екатеринбург, Исламабад, Карачи"
|
||||
|
||||
msgid "UTC+05:30"
|
||||
msgstr "(UTC+05:30) Бомбей, Калькутта, Мадрас, Нью-Дели"
|
||||
|
||||
msgid "UTC+05:45"
|
||||
msgstr "(UTC+05:45) Катманду"
|
||||
|
||||
msgid "UTC+06:00"
|
||||
msgstr "(UTC+06:00) Новосибирск, Астана"
|
||||
|
||||
msgid "UTC+06:30"
|
||||
msgstr "(UTC+06:30) Рангун, Мьянма"
|
||||
|
||||
msgid "UTC+07:00"
|
||||
msgstr "(UTC+07:00) Красноярск, Бангкок"
|
||||
|
||||
msgid "UTC+08:00"
|
||||
msgstr "(UTC+08:00) Иркутск, Гонконг, Пекин"
|
||||
|
||||
msgid "UTC+08:45"
|
||||
msgstr "(UTC+08:45) Юговосточная Австралия"
|
||||
|
||||
msgid "UTC+09:00"
|
||||
msgstr "(UTC+09:00) Якутск, Токио, Сеул"
|
||||
|
||||
msgid "UTC+09:30"
|
||||
msgstr "(UTC+09:30) Аделаида, Дарвин"
|
||||
|
||||
msgid "UTC+10:00"
|
||||
msgstr "(UTC+10:00) Владивосток, Магадан, Сидней"
|
||||
|
||||
msgid "UTC+10:30"
|
||||
msgstr "(UTC+10:30) остров Лорд Хау"
|
||||
|
||||
msgid "UTC+11:00"
|
||||
msgstr "(UTC+11:00) Чокурдах, Соломоновы о-ва"
|
||||
|
||||
msgid "UTC+11:30"
|
||||
msgstr "(UTC+11:30) Норфолкские о-ва"
|
||||
|
||||
msgid "UTC+12:00"
|
||||
msgstr "(UTC+12:00) Анадырь, Петропавловск-Камчатский"
|
||||
|
||||
msgid "UTC+12:45"
|
||||
msgstr "(UTC+12:45) о-ва Чатем"
|
||||
|
||||
msgid "UTC+13:00"
|
||||
msgstr "(UTC+13:00) Нуку-алофа"
|
||||
|
||||
msgid "UTC+14:00"
|
||||
msgstr "(UTC+14:00) о-ва Лайн"
|
||||
|
||||
msgid "Timeouts subhead"
|
||||
msgstr "Время и таймауты"
|
||||
|
||||
msgid "Time format label"
|
||||
msgstr "Формат времени"
|
||||
|
||||
msgid "Time format help"
|
||||
msgstr "[Текущий формат: %s]. Загляните в <a href=\"https://secure.php.net/manual/ru/function.date.php\">Руководство по PHP</a> за подробностями."
|
||||
|
||||
msgid "Date format label"
|
||||
msgstr "Формат даты"
|
||||
|
||||
msgid "Date format help"
|
||||
msgstr "[Текущий формат: %s]. Загляните в <a href=\"https://secure.php.net/manual/ru/function.date.php\">Руководство по PHP</a> за подробностями."
|
||||
|
||||
msgid "Visit timeout label"
|
||||
msgstr "Таймаут визита"
|
||||
|
||||
msgid "Visit timeout help"
|
||||
msgstr "Количество секунд бездействия пользователя до того как его "время последнего визита" будет изменено (влияет на индикатор новых сообщений)."
|
||||
|
||||
msgid "Online timeout label"
|
||||
msgstr "Таймаут online"
|
||||
|
||||
msgid "Online timeout help"
|
||||
msgstr "Количество секунд бездействия пользователя до того как он будет удалён из списка online."
|
||||
|
||||
msgid "Redirect time label"
|
||||
msgstr "Время на переадресацию"
|
||||
|
||||
msgid "Redirect time help"
|
||||
msgstr "Пауза в секундах при переадресации. Если установить в 0, страница переадресации не будет показана (не рекомендуется)."
|
||||
|
||||
msgid "Display subhead"
|
||||
msgstr "Вид форума"
|
||||
|
||||
msgid "Info in posts label"
|
||||
msgstr "Информация о пользователе"
|
||||
|
||||
msgid "Info in posts help"
|
||||
msgstr "Показывать информацию об авторе сообщения на странице с темой. Сюда входят данные о месте жительства, дата регистрации, счетчик сообщений и контакты (email и вебстраница)."
|
||||
|
||||
msgid "Post count label"
|
||||
msgstr "Счетчик сообщений"
|
||||
|
||||
msgid "Post count help"
|
||||
msgstr "Показывать количество сообщений, отправленных пользователями (в темах, профиле и списке пользователей)."
|
||||
|
||||
msgid "Smilies label"
|
||||
msgstr "Смайлы в сообщениях"
|
||||
|
||||
msgid "Smilies help"
|
||||
msgstr "Преобразовывать смайлы в графические иконки."
|
||||
|
||||
msgid "Smilies sigs label"
|
||||
msgstr "Смайлы в подписи"
|
||||
|
||||
msgid "Smilies sigs help"
|
||||
msgstr "Преобразовывать смайлы в подписях."
|
||||
|
||||
msgid "Clickable links label"
|
||||
msgstr "Распознавать ссылки"
|
||||
|
||||
msgid "Clickable links help"
|
||||
msgstr "Если включено, ForkBB будет автоматически распознавать URL-ы в сообщениях и делать их кликабельными гиперссылками."
|
||||
|
||||
msgid "Topic review label"
|
||||
msgstr "Просмотр темы"
|
||||
|
||||
msgid "Topic review help"
|
||||
msgstr "Максимальное количество отображаемых сообщений при ответе (новые сверху). Установите в 0 чтобы выключить."
|
||||
|
||||
msgid "Topics per page label"
|
||||
msgstr "Тем на страницу"
|
||||
|
||||
msgid "Topics per page help"
|
||||
msgstr "Значение по умолчанию сколько заголовков тем выводить на странице раздела. Пользователь может установить своё значение."
|
||||
|
||||
msgid "Posts per page label"
|
||||
msgstr "Сообщений на страницу"
|
||||
|
||||
msgid "Posts per page help"
|
||||
msgstr "Значение по умолчанию сколько сообщений выводить на странице с темой. Пользователь может установить своё значение."
|
||||
|
||||
msgid "Indent label"
|
||||
msgstr "Размер отступа"
|
||||
|
||||
msgid "Indent help"
|
||||
msgstr "Если поставить 8, отступы внутри тегов [code][/code] будут делаться табуляцими. Иначе отступы будут отбиваться пробелами."
|
||||
|
||||
msgid "Quote depth label"
|
||||
msgstr "Максимальная глубина [quote]"
|
||||
|
||||
msgid "Quote depth help"
|
||||
msgstr "Сколько раз тег [quote] может вкладываться в другие [quote], все теги свыше указанного порога будут игнорироваться."
|
||||
|
||||
msgid "Features subhead"
|
||||
msgstr "Тонкости"
|
||||
|
||||
msgid "Quick post label"
|
||||
msgstr "Быстрый ответ"
|
||||
|
||||
msgid "Quick post help"
|
||||
msgstr "Если включено, ForkBB добавит форму быстрого ответа внизу страницы с темой. Таким образом пользователи могут отправлять ответ быстрее."
|
||||
|
||||
msgid "Users online label"
|
||||
msgstr "Пользователи online"
|
||||
|
||||
msgid "Users online help"
|
||||
msgstr "Показывать на главной странице форума информацию о гостях и зарегистрированных пользователях online."
|
||||
|
||||
msgid "Censor words label"
|
||||
msgstr "Цензура"
|
||||
|
||||
msgid "Censor words help"
|
||||
msgstr "Включите эту опцию чтобы фильтровать нецензурные слова. <a href=\"%s\">Изменить</a> список слов."
|
||||
|
||||
msgid "Signatures label"
|
||||
msgstr "Подписи"
|
||||
|
||||
msgid "Signatures help"
|
||||
msgstr "Разрешить пользователям использовать подписи под своими сообщениями."
|
||||
|
||||
msgid "User has posted label"
|
||||
msgstr "Метка где писал"
|
||||
|
||||
msgid "User has posted help"
|
||||
msgstr "Показывать точки перед заголовками тем на странице раздела в случае, если пользователь писал в этой теме. Выключите, если хотите снизить загрузку сервера."
|
||||
|
||||
msgid "Topic views label"
|
||||
msgstr "Счетчик просмотров"
|
||||
|
||||
msgid "Topic views help"
|
||||
msgstr "Отслеживать сколько раз тема просматривалась. Выключите, если хотите снизить загрузку сервера."
|
||||
|
||||
msgid "Quick jump label"
|
||||
msgstr "Быстрый переход"
|
||||
|
||||
msgid "Quick jump help"
|
||||
msgstr "Разрешить быстрый переход на другой раздел (выпадающий список разделов)."
|
||||
|
||||
msgid "GZip label"
|
||||
msgstr "Сжатие GZip"
|
||||
|
||||
msgid "GZip help"
|
||||
msgstr "Если включено, ForkBB будет использовать сжатие gzip для всех страниц форума. Это уменьшает траффик, но немного нагружает CPU. Для работы необходимо чтобы PHP поддерживал zlib (--with-zlib). Замечание: Если вы уже используете модуль Apache mod_gzip или mod_deflate для сжатия страниц, не включайте эту опцию."
|
||||
|
||||
msgid "Search all label"
|
||||
msgstr "Поиск по всем разделам"
|
||||
|
||||
msgid "Search all help"
|
||||
msgstr "Если выключено, поиск будет разрешен только по одному разделу за раз. Выключите в случае если поисковые запросы ведут к высокой загрузке сервера."
|
||||
|
||||
msgid "Menu items label"
|
||||
msgstr "Дополнительные пункты меню"
|
||||
|
||||
msgid "Menu items help"
|
||||
msgstr "Можно добавить любое количество пунктов в меню. Каждый пункт в формате X = <a href="URL">LINK</a> где X это позиция, в которую надо вставить ссылку (например, 0 - в начало или 2 - следом за "Пользователи"). Каждый пункт должен начинаться с новой строки."
|
||||
|
||||
msgid "Feed subhead"
|
||||
msgstr "Ленты"
|
||||
|
||||
msgid "Default feed label"
|
||||
msgstr "Лента по умолчанию"
|
||||
|
||||
msgid "Default feed help"
|
||||
msgstr "Выберите ссылку, какой тип ленты следует выводить. Замечание: вариант "Убрать" не запретит ленту, а только спрячет ссылку."
|
||||
|
||||
msgid "No feeds"
|
||||
msgstr "Убрать"
|
||||
|
||||
msgid "RSS"
|
||||
msgstr "RSS"
|
||||
|
||||
msgid "Atom"
|
||||
msgstr "Atom"
|
||||
|
||||
msgid "Feed TTL label"
|
||||
msgstr "Кэширование"
|
||||
|
||||
msgid "Feed TTL help"
|
||||
msgstr "Включите, если хотите снизить нагрузку на сервер."
|
||||
|
||||
msgid "No cache"
|
||||
msgstr "Не кэшировать"
|
||||
|
||||
msgid "%d Minutes"
|
||||
msgstr "%d минут"
|
||||
|
||||
msgid "Reports subhead"
|
||||
msgstr "Сигналы"
|
||||
|
||||
msgid "Reporting method label"
|
||||
msgstr "Подача сигнала"
|
||||
|
||||
msgid "Internal"
|
||||
msgstr "Админка"
|
||||
|
||||
msgid "By e-mail"
|
||||
msgstr "Email"
|
||||
|
||||
msgid "Both"
|
||||
msgstr "И то, и другое"
|
||||
|
||||
msgid "Reporting method help"
|
||||
msgstr "Выберите способ манипулирования пользовательскими сигналами. Варианты: отображать сообщения в специальном разделе админки, отправлять админам на почту (список рассылки есть ниже) или оба варианта разом."
|
||||
|
||||
msgid "Mailing list label"
|
||||
msgstr "Список рассылки"
|
||||
|
||||
msgid "Mailing list help"
|
||||
msgstr "Список адресов через запятую. Люди из этого списка будут получать сигналы по Email."
|
||||
|
||||
msgid "Avatars subhead"
|
||||
msgstr "Аватары"
|
||||
|
||||
msgid "Use avatars label"
|
||||
msgstr "Использовать аватары"
|
||||
|
||||
msgid "Use avatars help"
|
||||
msgstr "Если включено, пользователи смогут грузить собственные аватары, которые будут отображаться под их статусом."
|
||||
|
||||
msgid "Upload directory label"
|
||||
msgstr "Папка для загрузки"
|
||||
|
||||
msgid "Upload directory help"
|
||||
msgstr "Папка загрузки аватар (относительно корня форума). Необходимо дать PHP права на запись в эту папку."
|
||||
|
||||
msgid "Max width label"
|
||||
msgstr "Макс. ширина"
|
||||
|
||||
msgid "Max width help"
|
||||
msgstr "Макс. разрешённая ширина аватары в пикселях (рекомендуется 60)."
|
||||
|
||||
msgid "Max height label"
|
||||
msgstr "Макс. высота"
|
||||
|
||||
msgid "Max height help"
|
||||
msgstr "Макс. разрешённая высота аватары в пикселях (рекомендуется 60)."
|
||||
|
||||
msgid "Max size label"
|
||||
msgstr "Макс. размер"
|
||||
|
||||
msgid "Max size help"
|
||||
msgstr "Макс. разрешённый размер аватары в байтах (рекомендуется 10240)."
|
||||
|
||||
msgid "E-mail subhead"
|
||||
msgstr "Почта"
|
||||
|
||||
msgid "Admin e-mail label"
|
||||
msgstr "Почта Админа"
|
||||
|
||||
msgid "Admin e-mail help"
|
||||
msgstr "Адрес администратора форума."
|
||||
|
||||
msgid "Webmaster e-mail label"
|
||||
msgstr "Почта Вебмастера"
|
||||
|
||||
msgid "Webmaster e-mail help"
|
||||
msgstr "Этот адрес будет показан в поле "от кого" при рассылке с форума."
|
||||
|
||||
msgid "Forum subscriptions label"
|
||||
msgstr "Подписки разделов"
|
||||
|
||||
msgid "Forum subscriptions help"
|
||||
msgstr "Разрешить пользователям подписываться на разделы (получать email, если будет создана новая тема)."
|
||||
|
||||
msgid "Topic subscriptions label"
|
||||
msgstr "Подписки тем"
|
||||
|
||||
msgid "Topic subscriptions help"
|
||||
msgstr "Разрешить пользователям подписываться на темы (получать email, если кто-то ответил)."
|
||||
|
||||
msgid "SMTP address label"
|
||||
msgstr "Сервер SMTP"
|
||||
|
||||
msgid "SMTP address help"
|
||||
msgstr "Адрес внешнего SMTP сервера на который отправлять письма. Можно дополнить номером порта если SMTP не использует порт по умолчанию 25 (пример: mail.myhost.com:3580). Оставьте пустым чтобы почтой занималась локальная программа mail."
|
||||
|
||||
msgid "SMTP username label"
|
||||
msgstr "SMTP username"
|
||||
|
||||
msgid "SMTP username help"
|
||||
msgstr "Пользователь сервера SMTP. Заполняйте только если сервер этого требует (большинство серверов <strong>НЕ</strong> требуют авторизации)."
|
||||
|
||||
msgid "SMTP password label"
|
||||
msgstr "SMTP password"
|
||||
|
||||
msgid "SMTP change password help"
|
||||
msgstr "Установите галку, если хотите поменять или удалить пароль"
|
||||
|
||||
msgid "SMTP password help"
|
||||
msgstr "Пароль для сервера SMTP. Заполняйте только если сервер этого требует (большинство серверов <strong>НЕ</strong> требуют авторизации)."
|
||||
|
||||
msgid "SMTP SSL label"
|
||||
msgstr "SMTP через SSL"
|
||||
|
||||
msgid "SMTP SSL help"
|
||||
msgstr "Шифровать соединение с сервером SMTP через SSL. Включать только если сервер SMTP требует этого и ваша версия PHP поддерживает SSL."
|
||||
|
||||
msgid "Registration subhead"
|
||||
msgstr "Регистрация"
|
||||
|
||||
msgid "Allow new label"
|
||||
msgstr "Разрешить новые регистрации"
|
||||
|
||||
msgid "Allow new help"
|
||||
msgstr "Определяет разрешена ли регистрация новых пользователей на форуме. Выключите, если на то есть особые причины."
|
||||
|
||||
msgid "Verify label"
|
||||
msgstr "Подтверждение регистрации"
|
||||
|
||||
msgid "Verify help"
|
||||
msgstr "Если включено, после регистрации пользователи получают на указанный email письмо со случайным паролем. После получения письма пользователь может зайти на форум и поменять пароль в своём профиле, если посчитает нужным. Эта опция также заставляет пользователей подтвердить новый email в случае, если они захотят его сменить. Это эффективный способ избежать мусорных регистраций и позволяет гарантировать, что пользователь ввел свой настоящий email."
|
||||
|
||||
msgid "Report new label"
|
||||
msgstr "Отчет о регистрации"
|
||||
|
||||
msgid "Report new help"
|
||||
msgstr "Если включено, ForkBB будет извещать людей из списка рассылки (см. выше) о вновь зарегистрированных пользователях."
|
||||
|
||||
msgid "Use rules label"
|
||||
msgstr "Правила форума"
|
||||
|
||||
msgid "Use rules help"
|
||||
msgstr "Если включено, новый пользователь должен подтвердить согласие с правилами (см. текст ниже). Правила будут всегда доступны по ссылке в главном меню."
|
||||
|
||||
msgid "Rules label"
|
||||
msgstr "Текст правил"
|
||||
|
||||
msgid "Rules help"
|
||||
msgstr "Вы можете ввести правила или иную информацию, с которой пользователь должен согласиться чтобы пройти регистрацию. Если вы включили показ правил выше, необходимо ввести сюда хоть что-нибудь, иначе опция будет выключена. Текст может содержать HTML."
|
||||
|
||||
msgid "E-mail default label"
|
||||
msgstr "Приватность email"
|
||||
|
||||
msgid "E-mail default help"
|
||||
msgstr "Выберите уровень приватности по умолчанию для вновь регистрируемых пользователей."
|
||||
|
||||
msgid "Display e-mail label"
|
||||
msgstr "Показывать email другим пользователя."
|
||||
|
||||
msgid "Hide allow form label"
|
||||
msgstr "Спрятать email, но разрешить отправку писем через специальную форму."
|
||||
|
||||
msgid "Hide both label"
|
||||
msgstr "Спрятать email и запретить отправку писем."
|
||||
|
||||
msgid "Announcement subhead"
|
||||
msgstr "Объявления"
|
||||
|
||||
msgid "Display announcement label"
|
||||
msgstr "Показывать объявление"
|
||||
|
||||
msgid "Display announcement help"
|
||||
msgstr "Включите чтобы текст ниже отображался на форуме."
|
||||
|
||||
msgid "Announcement message label"
|
||||
msgstr "Текст объявления"
|
||||
|
||||
msgid "Announcement message help"
|
||||
msgstr "Этот текст может содержать HTML."
|
||||
|
||||
msgid "Maintenance subhead"
|
||||
msgstr "Обслуживание"
|
||||
|
||||
msgid "Maintenance mode label"
|
||||
msgstr "Режим обслуживания"
|
||||
|
||||
msgid "Maintenance mode help"
|
||||
msgstr "Если включено, форум будет доступен только для админов. Может использоваться, если надо временно выключить сайт для проведения каких-то работ. <strong>ВНИМАНИЕ! Не выходите с форума пока действует режим обслуживания.</strong> Вы не сможете войти обратно."
|
||||
|
||||
msgid "Maintenance message label"
|
||||
msgstr "Текст сообщения"
|
||||
|
||||
msgid "Maintenance message help"
|
||||
msgstr "Сообщение, которое будет показываться посетителям форума пока действует режим обслуживания. Если оставить пустым, будет использован текст по умолчанию. Текст может содержать HTML."
|
|
@ -1,5 +1,5 @@
|
|||
@extends ('layouts/admin')
|
||||
<section class="f-admin @if ($p->classForm) {!! $p->classForm !!} @endif">
|
||||
<section class="f-admin @if ($p->classForm) f-{!! $p->classForm !!}-form @endif">
|
||||
<h2>{!! $p->titleForm !!}</h2>
|
||||
<div class="f-fdiv">
|
||||
@if ($form = $p->form)
|
||||
|
|
|
@ -15,19 +15,21 @@
|
|||
@endif
|
||||
</div>
|
||||
</section>
|
||||
<section class="f-admin">
|
||||
<section class="f-admin f-grlist">
|
||||
<h2>{!! __('Edit groups subhead') !!}</h2>
|
||||
<div>
|
||||
<p>{!! __('Edit groups info') !!}</p>
|
||||
<ol class="f-grlist">
|
||||
<fieldset>
|
||||
<p>{!! __('Edit groups info') !!}</p>
|
||||
<ol>
|
||||
@foreach ($p->groupsList as $cur)
|
||||
<li>
|
||||
<a href="{!! $cur[1] !!}">{{ $cur[0] }}</a>
|
||||
<li>
|
||||
<a href="{!! $cur[1] !!}">{{ $cur[0] }}</a>
|
||||
@if ($cur[2])
|
||||
<a class="f-btn" href="{!! $cur[2] !!}">{!! __('Delete link') !!}</a>
|
||||
<a class="f-btn" href="{!! $cur[2] !!}">{!! __('Delete link') !!}</a>
|
||||
@endif
|
||||
</li>
|
||||
</li>
|
||||
@endforeach
|
||||
</ol>
|
||||
</ol>
|
||||
</fieldset>
|
||||
</div>
|
||||
</section>
|
||||
|
|
|
@ -1,20 +1,24 @@
|
|||
@extends ('layouts/admin')
|
||||
<section class="f-admin">
|
||||
<section class="f-admin f-welcome">
|
||||
<h2>{!! __('Forum admin head') !!}</h2>
|
||||
<div>
|
||||
<p>{!! __('Welcome to admin') !!}</p>
|
||||
<ul>
|
||||
<li><span>{!! __('Welcome 1') !!}</span></li>
|
||||
<li><span>{!! __('Welcome 2') !!}</span></li>
|
||||
<li><span>{!! __('Welcome 3') !!}</span></li>
|
||||
<li><span>{!! __('Welcome 4') !!}</span></li>
|
||||
<li><span>{!! __('Welcome 5') !!}</span></li>
|
||||
<li><span>{!! __('Welcome 6') !!}</span></li>
|
||||
<li><span>{!! __('Welcome 7') !!}</span></li>
|
||||
<li><span>{!! __('Welcome 8') !!}</span></li>
|
||||
<li><span>{!! __('Welcome 9') !!}</span></li>
|
||||
</ul>
|
||||
<fieldset>
|
||||
<p>{!! __('Welcome to admin') !!}</p>
|
||||
<ul>
|
||||
<li><span>{!! __('Welcome 1') !!}</span></li>
|
||||
<li><span>{!! __('Welcome 2') !!}</span></li>
|
||||
<li><span>{!! __('Welcome 3') !!}</span></li>
|
||||
<li><span>{!! __('Welcome 4') !!}</span></li>
|
||||
<li><span>{!! __('Welcome 5') !!}</span></li>
|
||||
<li><span>{!! __('Welcome 6') !!}</span></li>
|
||||
<li><span>{!! __('Welcome 7') !!}</span></li>
|
||||
<li><span>{!! __('Welcome 8') !!}</span></li>
|
||||
<li><span>{!! __('Welcome 9') !!}</span></li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
</div>
|
||||
</section>
|
||||
<section class="f-admin">
|
||||
<h2>{!! __('About head') !!}</h2>
|
||||
<div class="f-fdiv">
|
||||
<fieldset>
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
</select>
|
||||
@elseif ('text' === $cur['type'])
|
||||
<input @if (isset($cur['required'])) required @endif @if (isset($cur['autofocus'])) autofocus @endif class="f-ctrl" id="id-{{ $key }}" name="{{ $key }}" type="text" @if (! empty($cur['maxlength'])) maxlength="{{ $cur['maxlength'] }}" @endif @if (isset($cur['pattern'])) pattern="{{ $cur['pattern'] }}" @endif @if (isset($cur['value'])) value="{{ $cur['value'] }}" @endif>
|
||||
@elseif ('password' === $cur['type'])
|
||||
<input @if (isset($cur['required'])) required @endif @if (isset($cur['autofocus'])) autofocus @endif class="f-ctrl" id="id-{{ $key }}" name="{{ $key }}" type="password" @if (! empty($cur['maxlength'])) maxlength="{{ $cur['maxlength'] }}" @endif @if (isset($cur['pattern'])) pattern="{{ $cur['pattern'] }}" @endif @if (isset($cur['value'])) value="{{ $cur['value'] }}" @endif>
|
||||
@elseif ('number' === $cur['type'])
|
||||
<input @if (isset($cur['required'])) required @endif @if (isset($cur['autofocus'])) autofocus @endif class="f-ctrl" id="id-{{ $key }}" name="{{ $key }}" type="number" min="{{ $cur['min'] }}" max="{{ $cur['max'] }}" @if (isset($cur['value'])) value="{{ $cur['value'] }}" @endif>
|
||||
@elseif ('checkbox' === $cur['type'])
|
||||
|
|
|
@ -445,6 +445,10 @@ select {
|
|||
display: inline-block;
|
||||
}
|
||||
|
||||
.f-field-block .f-label {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.f-fdiv .f-label > input {
|
||||
margin-left: 0;
|
||||
margin-right: 0.3125rem;
|
||||
|
@ -454,6 +458,10 @@ select {
|
|||
margin-left: 0.625rem;
|
||||
}
|
||||
|
||||
.f-field-block .f-label + .f-label {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.f-fdiv .f-child1,
|
||||
.f-fdiv .f-child2,
|
||||
.f-fdiv .f-child3,
|
||||
|
@ -847,17 +855,22 @@ select {
|
|||
border: 0.0625rem solid #AA7939;
|
||||
}
|
||||
|
||||
.f-admin > div > p {
|
||||
.f-welcome p,
|
||||
.f-grlist p {
|
||||
padding: 0.625rem;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
.f-admin > div > ul {
|
||||
padding: 0.625rem;
|
||||
.f-welcome ul {
|
||||
padding: 0 0.625rem 0.625rem 0.625rem;
|
||||
list-style-type: circle;
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
.f-grlist ol {
|
||||
padding: 0 0.625rem 0.625rem 0.625rem;
|
||||
}
|
||||
|
||||
.f-admin dl {
|
||||
/* margin: 0 0.625rem 0.625rem 0.625rem; */
|
||||
border-bottom: 0.0625rem dotted #AA7939;
|
||||
|
@ -891,16 +904,12 @@ select {
|
|||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.f-grlist {
|
||||
padding: 0.625rem;
|
||||
}
|
||||
|
||||
.f-grlist > li {
|
||||
.f-grlist li {
|
||||
padding: 0.625rem 0;
|
||||
border-bottom: 0.0625rem dotted #AA7939;
|
||||
}
|
||||
|
||||
.f-grlist > li:first-child {
|
||||
.f-grlist li:first-child {
|
||||
border-top: 0.0625rem dotted #AA7939;
|
||||
}
|
||||
|
||||
|
@ -1502,7 +1511,8 @@ li + li .f-btn {
|
|||
background-color: #F8F4E3;
|
||||
}
|
||||
|
||||
.f-post-form legend {
|
||||
.f-post-form legend,
|
||||
.f-form legend {
|
||||
width: 100%;
|
||||
padding: 0.625rem 0 0.3125rem 0;
|
||||
margin-bottom: 0.625rem;
|
||||
|
@ -1523,12 +1533,12 @@ li + li .f-btn {
|
|||
}
|
||||
|
||||
.f-post-form .f-btn,
|
||||
.f-delete-group-form .f-btn {
|
||||
.f-deletegroup-form .f-btn {
|
||||
width: auto;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.f-delete-group-form .f-btns {
|
||||
.f-deletegroup-form .f-btns {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue