1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-06-16 23:00:51 +03:00
This commit is contained in:
Mzhelskiy Maxim 2014-06-06 16:02:50 +07:00
parent f35b67a399
commit ffe0fe944f
5 changed files with 12 additions and 6 deletions

View file

@ -34,8 +34,8 @@ class ModuleTopic_EntityTopic extends Entity {
*/
public function Init() {
parent::Init();
$this->aValidateRules[]=array('topic_title','string','max'=>200,'min'=>2,'allowEmpty'=>false,'label'=>$this->Lang_Get('topic_create_title'));
$this->aValidateRules[]=array('topic_text_source','string','max'=>Config::Get('module.topic.max_length'),'min'=>2,'allowEmpty'=>false,'condition'=>'isNeedValidateText','label'=>$this->Lang_Get('topic_create_text'));
$this->aValidateRules[]=array('topic_title','string','max'=>Config::Get('module.topic.title_max_length'),'min'=>Config::Get('module.topic.title_min_length'),'allowEmpty'=>Config::Get('module.topic.title_allow_empty'),'label'=>$this->Lang_Get('topic_create_title'));
$this->aValidateRules[]=array('topic_text_source','string','max'=>Config::Get('module.topic.max_length'),'min'=>Config::Get('module.topic.min_length'),'allowEmpty'=>Config::Get('module.topic.allow_empty'),'condition'=>'isNeedValidateText','label'=>$this->Lang_Get('topic_create_text'));
$this->aValidateRules[]=array('topic_tags','tags','count'=>15,'condition'=>'isNeedValidateTags','label'=>$this->Lang_Get('topic_create_tags'),'allowEmpty'=>Config::Get('module.topic.allow_empty_tags'));
$this->aValidateRules[]=array('blog_id','blog_id');

View file

@ -122,8 +122,11 @@ $config['module']['blog']['category_allow_empty'] = true; // Разрешить
$config['module']['topic']['new_time'] = 60*60*24*1; // Время в секундах в течении которого топик считается новым
$config['module']['topic']['per_page'] = 10; // Число топиков на одну страницу
$config['module']['topic']['max_length'] = 15000; // Максимальное количество символов в одном топике
$config['module']['topic']['link_max_length'] = 500; // Максимальное количество символов в одном топике-ссылке
$config['module']['topic']['question_max_length'] = 500;// Максимальное количество символов в одном топике-опросе
$config['module']['topic']['min_length'] = 2; // Минимальное количество символов в одном топике
$config['module']['topic']['allow_empty'] = false; // Разрешать или нет не заполнять текст топика
$config['module']['topic']['title_max_length'] = 200; // Максимальное количество символов в заголовке топика
$config['module']['topic']['title_min_length'] = 2; // Минимальное количество символов в заголовке топика
$config['module']['topic']['title_allow_empty'] = false; // Разрешать или нет не заполнять заголовок топика
$config['module']['topic']['allow_empty_tags'] = false; // Разрешать или нет не заполнять теги
$config['module']['topic']['default_period_top'] = 1; // Дефолтный период (количество дней) для отображения ТОП топиков. Значения: 1,7,30,'all'
$config['module']['topic']['default_period_discussed'] = 1; // Дефолтный период (количество дней) для отображения обсуждаемых топиков. Значения: 1,7,30,'all'

View file

@ -28,6 +28,8 @@
sId = $_uid
sAttributes = $smarty.local.sAttributes
aRules = $smarty.local.aRules
sEntityField = $smarty.local.sEntityField
sEntity = $smarty.local.sEntity
sInputClasses = "$_sBindClass {$smarty.local.sInputClasses}"
sInputAttributes = "{$smarty.local.sAttributes} data-editor-type=\"{$_sType}\" data-editor-set=\"{$_sSet}\""
sNote = $smarty.local.sNote

View file

@ -74,7 +74,8 @@
sName = 'topic[topic_text_source]'
sValue = (($oTopicEdit) ? $oTopicEdit->getTextSource() : '')|escape
sLabel = $aLang.topic_create_text
aRules = [ 'required' => true, 'rangelength' => "[2,{Config::Get('module.topic.max_length')}]" ]
sEntityField = 'topic_text_source'
sEntity = 'ModuleTopic_EntityTopic'
sMediaTargetType = 'topic'
sMediaTargetId = ($oTopicEdit) ? $oTopicEdit->getId() : ''}
{/if}

@ -1 +1 @@
Subproject commit 581c30449342d9d921d4e4c0a23498bd0e2322a8
Subproject commit f384969a69a3e8fd907e6d5f7b0f33fd4897d43a