27 function rss($document_list = null, $rss_title = null, $add_description = null)
36 $site_srl = $site_module_info->site_srl;
41 $module_srls = array();
42 $rss_config = array();
50 if($config->open_rss && $config->open_rss !=
'N')
59 if($total_config->use_total_feed !=
'N')
61 $rss_config =
$oModuleModel->getModulePartConfigs(
'rss', $site_srl);
66 if($config && $config->open_rss !=
'N' && $config->open_total_feed !=
'T_N')
76 if(!count($module_srls) && !$add_description)
return $this->
dispError();
83 $args->module_srl = implode(
',',$module_srls);
86 $args->search_target =
'is_secret';
87 $args->search_keyword =
'N';
89 $args->list_count = 15;
90 if($total_config->feed_document_count)
$args->list_count = $total_config->feed_document_count;
92 if($start_date || $start_date != 0)
$args->start_date = $start_date;
93 if($end_date || $end_date != 0)
$args->end_date = $end_date;
94 if($start_date == 0) unset($start_date);
95 if($end_date == 0) unset($end_date);
97 $args->sort_index =
'list_order';
98 $args->order_type =
'asc';
100 $document_list =
$output->data;
107 $info->title = str_replace(
'\'',
''',$info->title);
108 if($config->feed_description)
110 $info->description = str_replace(
'\'',
''', htmlspecialchars($config->feed_description, ENT_COMPAT | ENT_HTML401,
'UTF-8',
false));
114 $info->description = str_replace(
'\'',
''', htmlspecialchars($this->module_info->description, ENT_COMPAT | ENT_HTML401,
'UTF-8',
false));
117 $info->feed_copyright = str_replace(
'\'',
''', htmlspecialchars($feed_config->feed_copyright, ENT_COMPAT | ENT_HTML401,
'UTF-8',
false));
118 if(!$info->feed_copyright)
120 $info->feed_copyright = str_replace(
'\'',
''', htmlspecialchars($total_config->feed_copyright, ENT_COMPAT | ENT_HTML401,
'UTF-8',
false));
128 if($rss_title) $info->title = $rss_title;
129 else if($total_config->feed_title) $info->title = $total_config->feed_title;
133 $info->title = $site_module_info->browser_title;
137 $info->title = str_replace(
'\'',
''', htmlspecialchars($info->title, ENT_COMPAT | ENT_HTML401,
'UTF-8',
false));
138 $info->description = str_replace(
'\'',
''', htmlspecialchars($total_config->feed_description, ENT_COMPAT | ENT_HTML401,
'UTF-8',
false));
140 $info->feed_copyright = str_replace(
'\'',
''', htmlspecialchars($total_config->feed_copyright, ENT_COMPAT | ENT_HTML401,
'UTF-8',
false));
142 if($add_description) $info->description .=
"\r\n".$add_description;
144 if($total_config->image) $info->image =
Context::getRequestUri().str_replace(
'\'',
''', htmlspecialchars($total_config->image, ENT_COMPAT | ENT_HTML401,
'UTF-8',
false));
148 $info->date = date(
'Y-m-d\TH:i:sP');
149 if(
$mid) { $info->id =
getUrl(
'',
'mid',
$mid,
'act',
'atom',
'page',
Context::get(
'page'),
'start_date',
Context::get(
'start_date'),
'end_date',
Context::get(
'end_date')); }
150 else { $info->id =
getUrl(
'',
'module',
'rss',
'act',
'atom',
'page',
Context::get(
'page'),
'start_date',
Context::get(
'start_date'),
'end_date',
Context::get(
'end_date')); }
153 $info->date = date(
'Y-m-d\TH:i:sP');
156 $info->date = date(
"D, d M Y H:i:s").
' '.
$GLOBALS[
'_time_zone'];
160 if($_SERVER[
'HTTPS']==
'on') $proctcl =
'https://';
161 else $proctcl =
'http://';
163 $temp_link = explode(
'/', $info->link);
164 if($temp_link[0]==
'' && $info->link)
166 $info->link = $proctcl.$_SERVER[
'HTTP_HOST'].$info->link;
169 $temp_id = explode(
'/', $info->id);
170 if($temp_id[0]==
'' && $info->id)
172 $info->id = $proctcl.$_SERVER[
'HTTP_HOST'].$info->id;
184 $path = $this->module_path.
'tpl/';
205 $content = $oTemplate->compile($path, $file);
246 if(!$current_module_srl && !$current_module_srls)
249 $current_module_info =
Context::get(
'current_module_info');
250 $current_module_srl = $current_module_info->module_srl;
251 if(!$current_module_srl)
return new BaseObject();
255 $rss_config = $oRssModel->getRssModuleConfig($current_module_srl);
259 $tpl = $oTemplate->compile($this->module_path.
'tpl',
'rss_module_config');
setTemplateFile($filename)
getController($module_name)
if(file_exists(_XE_PATH_. 'config/config.user.inc.php')) if(!defined('__DEBUG__')) if(!defined('__DEBUG_OUTPUT__')) if(!defined('__DEBUG_PROTECT__')) if(!defined('__DEBUG_PROTECT_IP__')) if(!defined('__DEBUG_DB_OUTPUT__')) if(!defined('__LOG_SLOW_QUERY__')) if(!defined('__LOG_SLOW_TRIGGER__')) if(!defined('__LOG_SLOW_ADDON__')) if(!defined('__LOG_SLOW_WIDGET__')) if(!defined('__DEBUG_QUERY__')) if(!defined('__OB_GZHANDLER_ENABLE__')) if(!defined('__ENABLE_PHPUNIT_TEST__')) if(!defined('__PROXY_SERVER__')) if(!defined('__ERROR_LOG__')) if(!defined('__DISABLE_DEFAULT_CSS__')) if(!defined('__AUTO_OPCACHE_INVALIDATE__')) if((__DEBUG_OUTPUT__==2)&&version_compare(PHP_VERSION, '6.0.0')===-1) if(version_compare(PHP_VERSION, '5.3.0') >=0) $GLOBALS['__xe_autoload_file_map']
set($key, $val, $set_to_get_vars=0)
$module_srl
integer value to represent a run-time instance of Module (XE Module)
$mid
string to represent run-time instance of Module (XE Module)
getRequestUri($ssl_mode=FOLLOW_REQUEST_SSL, $domain=null)
setResponseMethod($method= 'HTML')