XpressEngine Core  1.11.2
 All Classes Namespaces Files Functions Variables Pages
message.view.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) NAVER <http://www.navercorp.com> */
8 class messageView extends message
9 {
13  function init()
14  {
15  }
16 
20  function dispMessage()
21  {
22  // Get configurations (using module model object)
23  $oModuleModel = getModel('module');
24  $this->module_config = $config = $oModuleModel->getModuleConfig('message', $this->module_info->site_srl);
25 
26  if(!$config)
27  {
28  $config = new stdClass();
29  }
30 
31  if(!$config->skin)
32  {
33  $config->skin = 'xedition';
34  $template_path = sprintf('%sskins/%s', $this->module_path, $config->skin);
35  }
36  else
37  {
38  //check theme
39  $config_parse = explode('|@|', $config->skin);
40  if (count($config_parse) > 1)
41  {
42  $template_path = sprintf('./themes/%s/modules/message/', $config_parse[0]);
43  }
44  else
45  {
46  $template_path = sprintf('%sskins/%s', $this->module_path, $config->skin);
47  }
48  }
49  // Template path
51 
52  // Get the member configuration
53  $member_config = $oModuleModel->getModuleConfig('member');
54  Context::set('member_config', $member_config);
55  // Set a flag to check if the https connection is made when using SSL and create https url
56  $ssl_mode = false;
57  if($member_config->enable_ssl == 'Y')
58  {
59  if(strncasecmp('https://', Context::getRequestUri(), 8) === 0) $ssl_mode = true;
60  }
61  Context::set('ssl_mode',$ssl_mode);
62 
63  Context::set('system_message', nl2br($this->getMessage()));
64 
65  $this->setTemplateFile('system_message');
66  }
67 }
68 /* End of file message.view.php */
69 /* Location: ./modules/message/message.view.php */
setTemplateFile($filename)
$oModuleModel
Definition: ko.install.php:236
$template_path
a path of directory where template files reside
set($key, $val, $set_to_get_vars=0)
high class of message module
dispMessage()
Display messages.
init()
Initialization.
getRequestUri($ssl_mode=FOLLOW_REQUEST_SSL, $domain=null)
getModel($module_name)
Definition: func.inc.php:145
view class of the message module
Definition: message.view.php:8