Exemplo n.º 1
0
 /**
  * @brief Return member's configuration
  */
 function getMemberConfig()
 {
     static $member_config;
     if ($member_config) {
         return $member_config;
     }
     // Get member configuration stored in the DB
     $oModuleModel = getModel('module');
     $config = $oModuleModel->getModuleConfig('member');
     if (!$config->signupForm || !is_array($config->signupForm)) {
         $oMemberAdminController = getAdminController('member');
         $identifier = $config->identifier ? $config->identifier : 'email_address';
         $config->signupForm = $oMemberAdminController->createSignupForm($identifier);
     }
     //for multi language
     foreach ($config->signupForm as $key => $value) {
         $config->signupForm[$key]->title = $value->isDefaultForm ? Context::getLang($value->name) : $value->title;
         if ($config->signupForm[$key]->isPublic != 'N') {
             $config->signupForm[$key]->isPublic = 'Y';
         }
         if ($value->name == 'find_account_question') {
             $config->signupForm[$key]->isPublic = 'N';
         }
     }
     // Get terms of user
     $config->agreement = memberModel::_getAgreement();
     if (!$config->webmaster_name) {
         $config->webmaster_name = 'webmaster';
     }
     if (!$config->image_name_max_width) {
         $config->image_name_max_width = 90;
     }
     if (!$config->image_name_max_height) {
         $config->image_name_max_height = 20;
     }
     if (!$config->image_mark_max_width) {
         $config->image_mark_max_width = 20;
     }
     if (!$config->image_mark_max_height) {
         $config->image_mark_max_height = 20;
     }
     if (!$config->profile_image_max_width) {
         $config->profile_image_max_width = 90;
     }
     if (!$config->profile_image_max_height) {
         $config->profile_image_max_height = 90;
     }
     if (!$config->skin) {
         $config->skin = 'default';
     }
     if (!$config->colorset) {
         $config->colorset = 'white';
     }
     if (!$config->editor_skin || $config->editor_skin == 'default') {
         $config->editor_skin = 'ckeditor';
     }
     if (!$config->group_image_mark) {
         $config->group_image_mark = "N";
     }
     if (!$config->identifier) {
         $config->identifier = 'user_id';
     }
     if (!$config->max_error_count) {
         $config->max_error_count = 10;
     }
     if (!$config->max_error_count_time) {
         $config->max_error_count_time = 300;
     }
     if (!$config->signature_editor_skin || $config->signature_editor_skin == 'default') {
         $config->signature_editor_skin = 'ckeditor';
     }
     if (!$config->sel_editor_colorset) {
         $config->sel_editor_colorset = 'moono';
     }
     $member_config = $config;
     return $config;
 }
Exemplo n.º 2
0
 /**
  * @brief Return member's configuration
  **/
 function getMemberConfig()
 {
     static $member_config;
     if ($member_config) {
         return $member_config;
     }
     // Get member configuration stored in the DB
     $oModuleModel =& getModel('module');
     $config = $oModuleModel->getModuleConfig('member');
     //for multi language
     if (is_array($config->signupForm)) {
         foreach ($config->signupForm as $key => $value) {
             $config->signupForm[$key]->title = Context::getLang($value->title);
             if ($config->signupForm[$key]->isPublic != 'N') {
                 $config->signupForm[$key]->isPublic = 'Y';
             }
             if ($value->name == 'find_account_question') {
                 $config->signupForm[$key]->isPublic = 'N';
             }
         }
     }
     // Get terms of user
     $config->agreement = memberModel::_getAgreement();
     if (!$config->webmaster_name) {
         $config->webmaster_name = 'webmaster';
     }
     if (!$config->image_name_max_width) {
         $config->image_name_max_width = 90;
     }
     if (!$config->image_name_max_height) {
         $config->image_name_max_height = 20;
     }
     if (!$config->image_mark_max_width) {
         $config->image_mark_max_width = 20;
     }
     if (!$config->image_mark_max_height) {
         $config->image_mark_max_height = 20;
     }
     if (!$config->profile_image_max_width) {
         $config->profile_image_max_width = 80;
     }
     if (!$config->profile_image_max_height) {
         $config->profile_image_max_height = 80;
     }
     if (!$config->skin) {
         $config->skin = 'default';
     }
     if (!$config->colorset) {
         $config->colorset = 'white';
     }
     if (!$config->editor_skin || $config->editor_skin == 'default') {
         $config->editor_skin = 'xpresseditor';
     }
     if (!$config->group_image_mark) {
         $config->group_image_mark = "N";
     }
     if (!$config->identifier) {
         $config->identifier = 'user_id';
     }
     if (!$config->max_error_count) {
         $config->max_error_count = 10;
     }
     if (!$config->max_error_count_time) {
         $config->max_error_count_time = 300;
     }
     if (!$config->layout_srl) {
         $oModuleModel =& getModel('module');
         $defaultModuleInfo = $oModuleModel->getDefaultMid();
         $config->layout_srl = $defaultModuleInfo->layout_srl;
     }
     if (!$config->signature_editor_skin || $config->signature_editor_skin == 'default') {
         $config->signature_editor_skin = 'xpresseditor';
     }
     if (!$config->sel_editor_colorset) {
         $config->sel_editor_colorset = 'white';
     }
     $member_config = $config;
     return $config;
 }