Merge branch 'develop' into pr/advanced-mailer

This commit is contained in:
Kijin Sung 2016-05-15 20:22:55 +09:00
commit 1f39a51c66
48 changed files with 466 additions and 603 deletions

View file

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon version="0.2">
<title xml:lang="ko">커뮤니케이션</title>
<title xml:lang="jp">コミュニケーション</title>
<title xml:lang="zh-CN">会员交流</title>
<title xml:lang="en">Communication</title>
<title xml:lang="vi">Truyền thông</title>
<title xml:lang="ge">Communication</title>
<title xml:lang="es">Communication</title>
<title xml:lang="ru">Общение</title>
<title xml:lang="zh-TW">交流</title>
<description xml:lang="ko">
이 애드온은 빈 애드온입니다. 모든 기능은 커뮤니케이션 모듈로 이전되었습니다.
</description>
<version>1.7</version>
<date>2013-11-27</date>
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
<name xml:lang="ko">NAVER</name>
<name xml:lang="jp">NAVER</name>
<name xml:lang="zh-CN">NAVER</name>
<name xml:lang="en">NAVER</name>
<name xml:lang="vi">NAVER</name>
<name xml:lang="ge">NAVER</name>
<name xml:lang="es">NAVER</name>
<name xml:lang="ru">NAVER</name>
<name xml:lang="zh-TW">NAVER</name>
</author>
<extra_vars>
</extra_vars>
</addon>

View file

@ -1,6 +0,0 @@
<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
/* 이 애드온의 기능은 communication 모듈로 이전되었습니다. */
/* End of file member_communication.addon.php */
/* Location: ./addons/member_communication/member_communication.addon.php */

View file

@ -112,7 +112,7 @@ function getScreen() {
body.append(xScreen).append(controls);
imgframe.live('load', function(){
imgframe.bind('load', function(){
var clientWidth = $(window).width();
var clientHeight = $(window).height();
imgframe.css({
@ -256,7 +256,7 @@ $(window).load(function(){
});
/* live 이벤트로 적용 (image_gallery 컴포넌트와의 호환 위함) */
$('img[rel=xe_gallery]', this).live('mouseover', function() {
$(this).on('mouseover', 'img[rel=xe_gallery]', function() {
var $img = $(this);
if(!$img.parent('a').length && !$img.attr('onclick')) {
$img.css('cursor', 'pointer').click(slideshow);

View file

@ -97,6 +97,12 @@ class Context
* @var array
*/
public $opengraph_metadata = array();
/**
* Canonical URL
* @var string
*/
public $canonical_url = '';
/**
* path of Xpress Engine
@ -587,7 +593,7 @@ class Context
$db_info->sitelock_whitelist = count($config['lock']['allow']) ? $config['lock']['allow'] : array('127.0.0.1');
$db_info->embed_white_iframe = $config['mediafilter']['iframe'] ?: $config['embedfilter']['iframe'];
$db_info->embed_white_object = $config['mediafilter']['object'] ?: $config['embedfilter']['object'];
$db_info->use_mobile_view = $config['use_mobile_view'] ? 'Y' : 'N';
$db_info->use_mobile_view = (isset($config['mobile']['enabled']) ? $config['mobile']['enabled'] : $config['use_mobile_view']) ? 'Y' : 'N';
$db_info->use_prepared_statements = $config['use_prepared_statements'] ? 'Y' : 'N';
$db_info->use_rewrite = $config['use_rewrite'] ? 'Y' : 'N';
$db_info->use_sso = $config['use_sso'] ? 'Y' : 'N';
@ -2804,7 +2810,7 @@ class Context
*/
public static function setCanonicalURL($url)
{
self::addHtmlHeader(sprintf('<link rel="canonical" href="%s" />', escape($url)));
self::$_instance->canonical_url = escape($url);
}
}
/* End of file Context.class.php */

View file

@ -414,32 +414,35 @@ class HTMLDisplayHandler
Context::addOpenGraphData('og:site_name', Context::getSiteTitle());
if ($page_type === 'article' && config('seo.og_extract_description'))
{
Context::addOpenGraphData('og:description', trim(utf8_normalize_spaces($oDocument->getContentText(200))));
$description = trim(utf8_normalize_spaces($oDocument->getContentText(200)));
}
else
{
Context::addOpenGraphData('og:description', Context::getMetaTag('description'));
$description = Context::getMetaTag('description');
}
Context::addOpenGraphData('og:description', $description);
Context::addMetaTag('description', $description);
// Add metadata about this page.
Context::addOpenGraphData('og:type', $page_type);
if ($page_type === 'article')
{
$document_canonical_url = getFullUrl('', 'mid', $current_module_info->mid, 'document_srl', $document_srl);
Context::addOpenGraphData('og:url', $document_canonical_url);
$canonical_url = getFullUrl('', 'mid', $current_module_info->mid, 'document_srl', $document_srl);
}
elseif (($page = Context::get('page')) > 1)
{
Context::addOpenGraphData('og:url', getFullUrl('', 'mid', $current_module_info->mid, 'page', $page));
$canonical_url = getFullUrl('', 'mid', $current_module_info->mid, 'page', $page);
}
elseif ($current_module_info->module_srl == $site_module_info->module_srl)
{
Context::addOpenGraphData('og:url', Rhymix\Framework\URL::getCurrentDomainURL(\RX_BASEURL));
$canonical_url = getFullUrl('');
}
else
{
Context::addOpenGraphData('og:url', getFullUrl('', 'mid', $current_module_info->mid));
$canonical_url = getFullUrl('', 'mid', $current_module_info->mid);
}
Context::addOpenGraphData('og:url', $canonical_url);
Context::setCanonicalURL($canonical_url);
// Add metadata about the locale.
$lang_type = Context::getLangType();

View file

@ -12,113 +12,74 @@ class Mobile
* Whether mobile or not mobile mode
* @var bool
*/
public $ismobile = NULL;
protected static $_ismobile = null;
/**
* Get instance of Mobile class(for singleton)
*
* Get instance of Mobile class
*
* @return Mobile
*/
public function getInstance()
{
static $theInstance;
if(!isset($theInstance))
{
$theInstance = new Mobile();
}
return $theInstance;
return new self();
}
/**
* Get current mobile mode
*
* @return bool If mobile mode returns true or false
*
* @return bool
*/
public static function isFromMobilePhone()
{
return self::getInstance()->_isFromMobilePhone();
// Return cached result.
if (self::$_ismobile !== null)
{
return self::$_ismobile;
}
// Not mobile if disabled explicitly.
if (!self::isMobileEnabled() || Context::get('full_browse') || $_COOKIE["FullBrowse"])
{
return self::$_ismobile = false;
}
// Try to detect from URL arguments and cookies, and finally fall back to user-agent detection.
$m = Context::get('m');
$cookie = (isset($_COOKIE['mobile']) && $_SESSION['user_agent'] === md5($_SERVER['HTTP_USER_AGENT'])) ? $_COOKIE['mobile'] : null;
if ($m === '1' || $cookie === 'true')
{
self::$_ismobile = TRUE;
}
elseif ($m === '0' || $cookie === 'false')
{
self::$_ismobile = FALSE;
}
else
{
self::$_ismobile = Rhymix\Framework\UA::isMobile() && (config('mobile.tablets') || !Rhymix\Framework\UA::isTablet());
}
// Set cookie to prevent recalculation.
if (!$cookie)
{
$_SESSION['user_agent'] = md5($_SERVER['HTTP_USER_AGENT']);
$_COOKIE['mobile'] = self::$_ismobile ? 'true' : 'false';
setcookie('mobile', $_COOKIE['mobile'], 0, RX_BASEURL);
}
return self::$_ismobile;
}
/**
* Get current mobile mode
*
* @return bool
*/
public function _isFromMobilePhone()
public static function _isFromMobilePhone()
{
if($this->ismobile !== NULL)
{
return $this->ismobile;
}
if(!config('use_mobile_view') || Context::get('full_browse') || $_COOKIE["FullBrowse"])
{
return $this->ismobile = false;
}
$this->ismobile = FALSE;
$m = Context::get('m');
if(strlen($m) == 1)
{
if($m == "1")
{
$this->ismobile = TRUE;
}
elseif($m == "0")
{
$this->ismobile = FALSE;
}
}
elseif(isset($_COOKIE['mobile']))
{
if($_COOKIE['user-agent'] == md5($_SERVER['HTTP_USER_AGENT']))
{
if($_COOKIE['mobile'] == 'true')
{
$this->ismobile = TRUE;
}
else
{
$this->ismobile = FALSE;
}
}
else
{
setcookie("mobile", FALSE, 0, RX_BASEURL);
setcookie("user-agent", FALSE, 0, RX_BASEURL);
$this->ismobile = Rhymix\Framework\UA::isMobile() && !Rhymix\Framework\UA::isTablet();
}
}
else
{
$this->ismobile = Rhymix\Framework\UA::isMobile() && !Rhymix\Framework\UA::isTablet();
}
if($this->ismobile !== NULL)
{
if($this->ismobile == TRUE)
{
if($_COOKIE['mobile'] != 'true')
{
$_COOKIE['mobile'] = 'true';
setcookie("mobile", 'true', 0, RX_BASEURL);
}
}
elseif(isset($_COOKIE['mobile']) && $_COOKIE['mobile'] != 'false')
{
$_COOKIE['mobile'] = 'false';
setcookie("mobile", 'false', 0, RX_BASEURL);
}
if(isset($_COOKIE['mobile']) && $_COOKIE['user-agent'] != md5($_SERVER['HTTP_USER_AGENT']))
{
setcookie("user-agent", md5($_SERVER['HTTP_USER_AGENT']), 0, RX_BASEURL);
}
}
return $this->ismobile;
return self::isFromMobilePhone();
}
/**
* Detect mobile device by user agent
*
@ -138,7 +99,7 @@ class Mobile
{
return Rhymix\Framework\UA::isTablet();
}
/**
* Set mobile mode
*
@ -147,11 +108,21 @@ class Mobile
*/
public static function setMobile($ismobile)
{
self::getInstance()->ismobile = (bool)$ismobile;
self::$_ismobile = (bool)$ismobile;
}
/**
* Check if mobile view is enabled
*
* @raturn bool
*/
public static function isMobileEnabled()
{
return config('use_mobile_view');
$mobile_enabled = config('mobile.enabled');
if ($mobile_enabled === null)
{
$mobile_enabled = config('use_mobile_view') ? true : false;
}
return $mobile_enabled;
}
}

View file

@ -1261,19 +1261,19 @@ class ModuleHandler extends Handler
$type = $item->type;
$called_method = $item->called_method;
// do not call if module is blacklisted
if (Context::isBlacklistedPlugin($module))
{
continue;
}
// todo why don't we call a normal class object ?
$oModule = getModule($module, $type);
if(!$oModule || !method_exists($oModule, $called_method))
{
continue;
}
// do not call if module is blacklisted
if (Context::isBlacklistedPlugin($oModule->module))
{
continue;
}
$before_each_trigger_time = microtime(true);
$output = $oModule->{$called_method}($obj);
$after_each_trigger_time = microtime(true);

View file

@ -112,7 +112,10 @@ return array(
'iframe' => array(),
'object' => array(),
),
'use_mobile_view' => true,
'mobile' => array(
'enabled' => true,
'tablets' => false,
),
'use_prepared_statements' => true,
'use_rewrite' => true,
'use_sso' => false,

View file

@ -29,12 +29,13 @@ class Redis implements \Rhymix\Framework\Drivers\CacheInterface
{
try
{
$this->_conn = new \Redis;
$this->_conn = null;
foreach ($config as $url)
{
$info = parse_url($url);
if (isset($info['host']) && isset($info['port']))
{
$this->_conn = new \Redis;
$this->_conn->connect($info['host'], $info['port'], 0.15);
if(isset($info['user']) || isset($info['pass']))
{
@ -47,7 +48,6 @@ class Redis implements \Rhymix\Framework\Drivers\CacheInterface
break;
}
}
$this->_conn = null;
}
catch (\RedisException $e)
{

View file

@ -242,7 +242,7 @@ class ConfigParser
}
// Convert miscellaneous configuration.
$config['use_mobile_view'] = $db_info->use_mobile_view === 'N' ? false : true;
$config['mobile']['enabled'] = $db_info->use_mobile_view === 'N' ? false : true;
$config['use_prepared_statements'] = $db_info->use_prepared_statements === 'Y' ? true : false;
$config['use_rewrite'] = $db_info->use_rewrite === 'Y' ? true : false;
$config['use_sso'] = $db_info->use_sso === 'Y' ? true : false;

View file

@ -155,7 +155,7 @@
jQuery(function($) {
/* select - option의 disabled=disabled 속성을 IE에서도 체크하기 위한 함수 */
if($.browser.msie) {
if(navigator.userAgent.match(/MSIE/)) {
$('select').each(function(i, sels) {
var disabled_exists = false;
var first_enable = [];

View file

@ -34,7 +34,8 @@
<link rel="alternate" type="application/atom+xml" title="Atom" href="{$atom_url}" cond="$rss_url" />
<link rel="alternate" type="application/atom+xml" title="Site Atom" href="{$general_atom_url}" cond="$general_rss_url" />
<!-- ICONS -->
<!-- ICONS AND OTHER LINKS -->
<link cond="$canonical_url" rel="canonical" href="{$canonical_url}" />
<link cond="$favicon_url" rel="shortcut icon" href="{$favicon_url}" />
<link cond="$mobicon_url" rel="apple-touch-icon" href="{$mobicon_url}" />

View file

@ -49,11 +49,7 @@
</td>
<td><span style="color:#aaa"|cond="$addon->isBlacklisted">{$addon->path}</span></td>
<td>
<!--@if($addon->isBlacklisted)-->
<span style="color:#aaa">{$lang->cmd_setup}</span>
<!--@else-->
<a href="{getUrl('act', 'dispAddonAdminSetup', 'selected_addon', $addon->addon_name)}">{$lang->cmd_setup}</a>
<!--@end-->
<a href="{getUrl('act', 'dispAddonAdminSetup', 'selected_addon', $addon->addon_name)}">{$lang->cmd_setup}</a>
</td>
<td><input type="checkbox" name="pc_on[]" title="PC" value="{htmlspecialchars($addon->addon_name, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}" checked="checked"|cond="$addon->activated && !$addon->isBlacklisted" disabled="disabled"|cond="$addon->isBlacklisted" /></td>
<td><input type="checkbox" name="mobile_on[]" title="Mobile" value="{htmlspecialchars($addon->addon_name, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}" checked="checked"|cond="$addon->mactivated && !$addon->isBlacklisted" disabled="disabled"|cond="$addon->isBlacklisted" /></td>

View file

@ -32,7 +32,7 @@
</tbody>
</table>
<div cond="Context::isBlacklistedPlugin($addon_info->addon_name)" class="message error">
<p><em class="x_label x_label-important">{$lang->msg_warning}</em> {$lang->msg_blacklisted_module}</p>
<p><em class="x_label x_label-important">{$lang->msg_warning}</em> {$lang->msg_blacklisted_module}<br />{$lang->get('admin.msg_blacklisted_reason.'.$addon_info->addon_name)}</p>
</div>
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/addon/tpl/setup_addon/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>

View file

@ -536,12 +536,17 @@ class adminAdminController extends admin
Rhymix\Framework\Config::set('locale.default_timezone', $vars->default_timezone);
// Mobile view
Rhymix\Framework\Config::set('use_mobile_view', $vars->use_mobile_view === 'Y');
Rhymix\Framework\Config::set('mobile.enabled', $vars->use_mobile_view === 'Y');
Rhymix\Framework\Config::set('mobile.tablets', $vars->tablets_as_mobile === 'Y');
if (Rhymix\Framework\Config::get('use_mobile_view') !== null)
{
Rhymix\Framework\Config::set('use_mobile_view', $vars->use_mobile_view === 'Y');
}
// Favicon and mobicon
$this->_saveFavicon('favicon.ico', $vars->is_delete_favicon);
$this->_saveFavicon('mobicon.png', $vars->is_delete_mobicon);
$this->_saveDefaultImage($vars->is_delete_site_default_image);
$this->_saveDefaultImage($vars->is_delete_default_image);
// Save
Rhymix\Framework\Config::save();
@ -670,6 +675,10 @@ class adminAdminController extends admin
if ($vars->object_cache_type === 'memcached' || $vars->object_cache_type === 'redis')
{
$cache_servers = array($vars->object_cache_type . '://' . $vars->object_cache_host . ':' . intval($vars->object_cache_port));
if ($vars->object_cache_type === 'redis')
{
$cache_servers[0] .= '/' . intval($vars->object_cache_dbnum);
}
}
else
{

View file

@ -430,7 +430,8 @@ class adminAdminView extends admin
Context::set('selected_timezone', Rhymix\Framework\Config::get('locale.default_timezone'));
// Mobile view
Context::set('use_mobile_view', config('use_mobile_view') ? 'Y' : 'N');
Context::set('use_mobile_view', (config('mobile.enabled') !== null ? config('mobile.enabled') : config('use_mobile_view')) ? true : false);
Context::set('tablets_as_mobile', config('mobile.tablets') ? true : false);
// Favicon and mobicon and site default image
$oAdminModel = getAdminModel('admin');
@ -514,11 +515,14 @@ class adminAdminView extends admin
{
Context::set('object_cache_host', parse_url(array_first($cache_servers), PHP_URL_HOST) ?: null);
Context::set('object_cache_port', parse_url(array_first($cache_servers), PHP_URL_PORT) ?: null);
$cache_dbnum = preg_replace('/[^\d]/', '', parse_url(array_first($cache_servers), PHP_URL_PATH));
Context::set('object_cache_dbnum', $cache_dbnum === '' ? 1 : intval($cache_dbnum));
}
else
{
Context::set('object_cache_host', null);
Context::set('object_cache_port', null);
Context::set('object_cache_dbnum', 1);
}
// Thumbnail settings
@ -527,7 +531,6 @@ class adminAdminView extends admin
Context::set('thumbnail_type', $config->thumbnail_type ?: 'crop');
// Other settings
Context::set('use_mobile_view', Rhymix\Framework\Config::get('use_mobile_view'));
Context::set('use_rewrite', Rhymix\Framework\Config::get('use_rewrite'));
Context::set('use_sso', Rhymix\Framework\Config::get('use_sso'));
Context::set('delay_session', Rhymix\Framework\Config::get('session.delay'));

View file

@ -17,7 +17,7 @@ $lang->admin_info = 'Administrator Info';
$lang->admin_index = 'Index Admin Page';
$lang->control_panel = 'Dashboard';
$lang->site_title = 'Site Title';
$lang->site_title = 'Site Subtitle';
$lang->site_subtitle = 'Site Subtitle';
$lang->start_module = 'Homepage';
$lang->select_site = 'Site';
$lang->select_module_type = 'Module Type';
@ -65,6 +65,13 @@ $lang->msg_blacklisted_module = 'This module has been disabled because it confli
$lang->msg_blacklisted_addon = 'This addon has been disabled because it conflicts with a feature that Rhymix supports by default, or is known to have other compatibility problems.';
$lang->msg_blacklisted_widget = 'This widget has been disabled because it conflicts with a feature that Rhymix supports by default, or is known to have other compatibility problems.';
$lang->msg_blacklisted_layout = 'This layout has been disabled because it conflicts with a feature that Rhymix supports by default, or is known to have other compatibility problems.';
$lang->msg_blacklisted_reason['autolang'] = 'Similar functionality can be configured in the <a href="./index.php?module=admin&act=dispAdminConfigGeneral">System Settings</a> page.';
$lang->msg_blacklisted_reason['errorlogger'] = 'Similar functionality can be configured in the <a href="./index.php?module=admin&act=dispAdminConfigDebug">Debug Settings</a> page.';
$lang->msg_blacklisted_reason['fix_mysql_utf8'] = 'The functionality that this addon used to provide is included by default in Rhymix.';
$lang->msg_blacklisted_reason['member_communication'] = 'The functionality that this addon used to provide has been moved to the member and ncenterlite modules.';
$lang->msg_blacklisted_reason['seo'] = 'Similar functionality can be configured in the <a href="./index.php?module=admin&act=dispAdminConfigSEO">SEO Settings</a> page.';
$lang->msg_blacklisted_reason['smartphone'] = 'This module was disabled in XE long before Rhymix even existed.';
$lang->msg_blacklisted_reason['zipperupper'] = 'Similar functionality can be configured in the <a href="./index.php?module=admin&act=dispAdminConfigAdvanced">Advanced Settings</a> page.';
$lang->msg_warning = 'Warning';
$lang->welcome_to_xe = 'Welcome to the Rhymix admin page.';
$lang->about_lang_env = 'If you want to make the language setting same for first-time visitors, change the language setting to what you want and click [Save] button below.';
@ -106,6 +113,7 @@ $lang->use_object_cache = 'Use Cache';
$lang->cache_default_ttl = 'Cache default TTL';
$lang->cache_host = 'Host';
$lang->cache_port = 'Port';
$lang->cache_dbnum = 'DB Number';
$lang->msg_cache_handler_not_supported = 'Your server does not support the selected cache method, or Rhymix is unable to use the cache with the given settings.';
$lang->msg_invalid_default_url = 'The default URL is invalid.';
$lang->msg_default_url_ssl_inconsistent = 'In order to use SSL always, the default URL must also begin with https://';
@ -168,8 +176,9 @@ $lang->status = 'Status';
$lang->action = 'Execute';
$lang->use_rewrite = 'Use Rewrite Mode';
$lang->timezone = 'Time Zone';
$lang->use_mobile_view = 'Enable Mobile Page';
$lang->use_mobile_view = 'Enable Mobile View';
$lang->about_use_mobile_view = 'Show mobile page when visitors access with mobile devices.';
$lang->tablets_as_mobile = 'Treat Tablets as Mobile';
$lang->thumbnail_type = 'Select thumbnail type.';
$lang->input_footer_script = 'Footer script';
$lang->detail_input_footer_script = 'The script is inserted into the bottom of body. It does not work at admin page.';

View file

@ -96,6 +96,7 @@ $lang->about_delay_session = 'Varnishなどのプロキシキャッシュサー
$lang->use_object_cache = 'キャッシュ使用';
$lang->cache_host = 'ホスト';
$lang->cache_port = 'ポート';
$lang->cache_dbnum = 'DB番号';
$lang->msg_cache_handler_not_supported = '選択したキャッシュ方式をサーバーでサポートされていないか、与えられた情報でキャッシュにアクセスすることができません。';
$lang->msg_invalid_default_url = '基本URLが正しくありません。';
$lang->msg_default_url_ssl_inconsistent = 'SSLを常に使用する場合、基本URLもhttps//で始まる必要があります。';

View file

@ -65,6 +65,13 @@ $lang->msg_blacklisted_module = '이 모듈은 Rhymix에서 기본 제공하는
$lang->msg_blacklisted_addon = '이 애드온은 Rhymix에서 기본 제공하는 기능과 충돌하거나 그 밖의 호환성 문제가 있으므로 사용이 중단되었습니다.';
$lang->msg_blacklisted_widget = '이 위젯은 Rhymix에서 기본 제공하는 기능과 충돌하거나 그 밖의 호환성 문제가 있으므로 사용이 중단되었습니다.';
$lang->msg_blacklisted_layout = '이 레이아웃은 Rhymix에서 기본 제공하는 기능과 충돌하거나 그 밖의 호환성 문제가 있으므로 사용이 중단되었습니다.';
$lang->msg_blacklisted_reason['autolang'] = '이 애드온에서 제공하던 기능은 <a href="./index.php?module=admin&act=dispAdminConfigGeneral">시스템 설정</a> 페이지에서 관리할 수 있습니다.';
$lang->msg_blacklisted_reason['errorlogger'] = '이 모듈에서 제공하던 기능은 <a href="./index.php?module=admin&act=dispAdminConfigDebug">디버그 설정</a> 페이지에서 관리할 수 있습니다.';
$lang->msg_blacklisted_reason['fix_mysql_utf8'] = '이 애드온에서 제공하던 기능은 Rhymix에 포함되어 있습니다.';
$lang->msg_blacklisted_reason['member_communication'] = '이 애드온에서 제공하던 기능은 알림센터 모듈에서 관리할 수 있습니다.';
$lang->msg_blacklisted_reason['seo'] = '이 모듈에서 제공하던 기능은 <a href="./index.php?module=admin&act=dispAdminConfigSEO">SEO 설정</a> 페이지에서 관리할 수 있습니다.';
$lang->msg_blacklisted_reason['smartphone'] = '이 모듈은 XE에서도 사용되지 않고 있었습니다.';
$lang->msg_blacklisted_reason['zipperupper'] = '이 애드온에서 제공하던 기능은 <a href="./index.php?module=admin&act=dispAdminConfigAdvanced">고급 설정</a> 페이지에서 관리할 수 있습니다.';
$lang->msg_warning = '경고';
$lang->welcome_to_xe = 'Rhymix 관리자';
$lang->about_lang_env = '처음 방문하는 사용자들의 언어 설정을 동일하게 하려면, 원하는 언어로 변경 후 아래 [저장] 버튼을 클릭하면 됩니다.';
@ -106,6 +113,7 @@ $lang->use_object_cache = '캐시 사용';
$lang->cache_default_ttl = '캐시 기본 TTL';
$lang->cache_host = '호스트';
$lang->cache_port = '포트';
$lang->cache_dbnum = 'DB번호';
$lang->msg_cache_handler_not_supported = '선택하신 캐시 방식을 서버에서 지원하지 않거나, 주어진 정보로 캐시에 접속할 수 없습니다.';
$lang->msg_invalid_default_url = '기본 URL이 올바르지 않습니다.';
$lang->msg_default_url_ssl_inconsistent = 'SSL을 항상 사용하실 경우 기본 URL도 https://로 시작해야 합니다.';
@ -173,6 +181,7 @@ $lang->use_rewrite = '짧은 주소 사용';
$lang->timezone = '표준 시간대';
$lang->use_mobile_view = '모바일 뷰 사용';
$lang->about_use_mobile_view = '모바일 기기로 접속시 모바일 페이지를 보여줍니다.';
$lang->tablets_as_mobile = '태블릿도 모바일 취급';
$lang->thumbnail_type = '썸네일 생성 방식';
$lang->input_footer_script = '하단(footer) 스크립트';
$lang->detail_input_footer_script = '최하단에 코드를 삽입합니다. 관리자 페이지에서는 수행되지 않습니다.';

View file

@ -80,6 +80,7 @@
<div id="object_cache_additional_config" class="x_inline" style="display:none;margin-left:16px">
<label for="object_cache_host" class="x_inline">{$lang->cache_host}: <input type="text" name="object_cache_host" id="object_cache_host" value="{$object_cache_host}" /></label>
<label for="object_cache_port" class="x_inline">{$lang->cache_port}: <input type="number" name="object_cache_port" id="object_cache_port" size="5" style="min-width:70px" value="{$object_cache_port}" /></label>
<label for="object_cache_dbnum" class="x_inline">{$lang->cache_dbnum}: <input type="number" name="object_cache_dbnum" id="object_cache_dbnum" size="3" style="min-width:70px" value="{$object_cache_dbnum}" /></label>
</div>
</div>
</div>

View file

@ -78,11 +78,24 @@
<label class="x_control-label">{$lang->use_mobile_view}</label>
<div class="x_controls">
<label for="use_mobile_view_y" class="x_inline">
<input type="radio" name="use_mobile_view" id="use_mobile_view_y" value="Y" checked="checked"|cond="$use_mobile_view == 'Y'" />
<input type="radio" name="use_mobile_view" id="use_mobile_view_y" value="Y" checked="checked"|cond="$use_mobile_view" />
{$lang->cmd_yes}
</label>
<label for="use_mobile_view_n" class="x_inline">
<input type="radio" name="use_mobile_view" id="use_mobile_view_n" value="N" checked="checked"|cond="$use_mobile_view != 'Y'" />
<input type="radio" name="use_mobile_view" id="use_mobile_view_n" value="N" checked="checked"|cond="!$use_mobile_view" />
{$lang->cmd_no}
</label>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->tablets_as_mobile}</label>
<div class="x_controls">
<label for="tablets_as_mobile_y" class="x_inline">
<input type="radio" name="tablets_as_mobile" id="tablets_as_mobile_y" value="Y" checked="checked"|cond="$tablets_as_mobile" />
{$lang->cmd_yes}
</label>
<label for="tablets_as_mobile_n" class="x_inline">
<input type="radio" name="tablets_as_mobile" id="tablets_as_mobile_n" value="N" checked="checked"|cond="!$tablets_as_mobile" />
{$lang->cmd_no}
</label>
</div>
@ -131,7 +144,7 @@
<p id="default_imagePreview">
<img src="{$site_default_image_url}" alt="Default Image" style="width:200px;height:auto" />
</p>
<label><input type="checkbox" name="is_delete_site_default_image" value="1" /> {$lang->cmd_delete}</label>
<label><input type="checkbox" name="is_delete_default_image" value="1" /> {$lang->cmd_delete}</label>
<form action="./" enctype="multipart/form-data" method="post" target="hiddenIframe" class="imageUpload" style="margin:0">
<input type="hidden" name="module" value="admin">
<input type="hidden" name="act" value="procAdminFaviconUpload">
@ -153,10 +166,17 @@
<iframe name="hiddenIframe" src="about:blank" hidden></iframe>
<script>
jQuery(function() {
if (jQuery("#default_imagePreview img").attr("src") == "") {
jQuery("#default_imagePreview").hide();
jQuery("input[name='is_delete_default_image']").parent().hide();
}
});
function afterUploadConfigImage(name, tmpFileName) {
jQuery('#' + name + 'Preview img').attr('src', tmpFileName);
jQuery('#' + name + 'Preview img').attr('src', tmpFileName).parent().show();
jQuery('#' + name).val('');
jQuery("input[name='is_delete_'" + name + "']").prop('checked', false);
jQuery("input[name='is_delete_" + name + "']").prop('checked', false).parent().show();
}
function alertUploadMessage(msg) {

View file

@ -81,9 +81,8 @@
jQuery(function($)
{
// check browser version
if($.browser.msie == true ) {
var arrBrowserVersion = $.browser.version.split('.');
if(parseInt(arrBrowserVersion[0], 10) <= 8) {
if (var msie = navigator.userAgent.match(/MSIE (\d)/)) {
if (parseInt(msie[1], 10) <== 8) {
$('#checkBrowserMessage').show();
}
}

View file

@ -12,11 +12,17 @@ jQuery(function($){
if (!$("#object_cache_port").val()) {
$("#object_cache_port").val($(this).val().match(/memcache/) ? '11211' : '6379');
}
if ($(this).val().match(/memcache/) && $("#object_cache_port").val() == '6379') {
$("#object_cache_port").val('11211');
if ($(this).val().match(/memcache/)) {
if ($("#object_cache_port").val() == '6379') {
$("#object_cache_port").val('11211');
}
$("#object_cache_dbnum").parents("label").hide();
}
if ($(this).val().match(/redis/) && $("#object_cache_port").val() == '11211') {
$("#object_cache_port").val('6379');
if ($(this).val().match(/redis/)) {
if ($("#object_cache_port").val() == '11211') {
$("#object_cache_port").val('6379');
}
$("#object_cache_dbnum").parents("label").show();
}
} else {
$("#object_cache_additional_config").hide();

View file

@ -1,7 +1,10 @@
<include target="./_header.html" />
<div class="content" id="content">
<div cond="Context::isBlacklistedPlugin(strtolower(preg_replace('/^disp([A-Z][a-z0-9_]+)[A-Z].+$/', '$1', $act)))" class="message error" style="margin-top:15px">
<p><em class="x_label x_label-important">{$lang->msg_warning}</em> {$lang->msg_blacklisted_module}</p>
<div cond="Context::isBlacklistedPlugin($blacklisted_plugin_name = strtolower(preg_replace('/^disp([A-Z][a-z0-9_]+)[A-Z].+$/', '$1', $act)))" class="message error" style="margin-top:15px">
<p>
<em class="x_label x_label-important">{$lang->msg_warning}</em> {$lang->msg_blacklisted_module}<br />
{$lang->get('admin.msg_blacklisted_reason.'.$blacklisted_plugin_name)}
</p>
</div>
{$content}
</div>

View file

@ -200,8 +200,8 @@ class boardAdminView extends board {
// get the addtional setup trigger
// the additional setup triggers can be used in many modules
$output = ModuleHandler::triggerCall('module.dispAdditionSetup', 'before', $content);
$output = ModuleHandler::triggerCall('module.dispAdditionSetup', 'after', $content);
ModuleHandler::triggerCall('module.dispAdditionSetup', 'before', $content);
ModuleHandler::triggerCall('module.dispAdditionSetup', 'after', $content);
Context::set('setup_content', $content);
// setup the template file

View file

@ -179,12 +179,9 @@ class commentController extends comment
$obj->before_point = ($point < 0) ? $oComment->get('blamed_count') : $oComment->get('voted_count');
$obj->after_point = ($point < 0) ? $args->blamed_count : $args->voted_count;
$obj->cancel = 1;
$trigger_output = ModuleHandler::triggerCall('comment.updateVotedCountCancel', 'after', $obj);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
ModuleHandler::triggerCall('comment.updateVotedCountCancel', 'after', $obj);
$oDB->commit();
return $output;
}
@ -578,15 +575,7 @@ class commentController extends comment
}
// call a trigger(after)
if($output->toBool())
{
$trigger_output = ModuleHandler::triggerCall('comment.insertComment', 'after', $obj);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
}
ModuleHandler::triggerCall('comment.insertComment', 'after', $obj);
// commit
$oDB->commit();
@ -905,15 +894,7 @@ class commentController extends comment
}
// call a trigger (after)
if($output->toBool())
{
$trigger_output = ModuleHandler::triggerCall('comment.updateComment', 'after', $obj);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
}
ModuleHandler::triggerCall('comment.updateComment', 'after', $obj);
// commit
$oDB->commit();
@ -1054,17 +1035,9 @@ class commentController extends comment
}
// call a trigger (after)
if($output->toBool())
{
$comment->isMoveToTrash = $isMoveToTrash;
$trigger_output = ModuleHandler::triggerCall('comment.deleteComment', 'after', $comment);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
unset($comment->isMoveToTrash);
}
$comment->isMoveToTrash = $isMoveToTrash;
ModuleHandler::triggerCall('comment.deleteComment', 'after', $comment);
unset($comment->isMoveToTrash);
if(!$isMoveToTrash)
{
@ -1144,11 +1117,7 @@ class commentController extends comment
}
// call a trigger (after)
$output = ModuleHandler::triggerCall('comment.deleteComment', 'after', $comment);
if(!$output->toBool())
{
continue;
}
ModuleHandler::triggerCall('comment.deleteComment', 'after', $comment);
}
}
@ -1299,13 +1268,8 @@ class commentController extends comment
$obj->point = $point;
$obj->before_point = ($point < 0) ? $oComment->get('blamed_count') : $oComment->get('voted_count');
$obj->after_point = ($point < 0) ? $args->blamed_count : $args->voted_count;
$trigger_output = ModuleHandler::triggerCall('comment.updateVotedCount', 'after', $obj);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
ModuleHandler::triggerCall('comment.updateVotedCount', 'after', $obj);
$oDB->commit();
// Return the result
@ -1437,12 +1401,7 @@ class commentController extends comment
// Call a trigger (after)
$trigger_obj->declared_count = $declared_count + 1;
$trigger_output = ModuleHandler::triggerCall('comment.declaredComment', 'after', $trigger_obj);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
ModuleHandler::triggerCall('comment.declaredComment', 'after', $trigger_obj);
// commit
$oDB->commit();

View file

@ -219,10 +219,10 @@ class communicationController extends communication
$trigger_obj->title = $title;
$trigger_obj->content = $content;
$trigger_obj->sender_log = $sender_log;
$triggerOutput = ModuleHandler::triggerCall('communication.sendMessage', 'before', $trigger_obj);
if(!$triggerOutput->toBool())
$trigger_output = ModuleHandler::triggerCall('communication.sendMessage', 'before', $trigger_obj);
if(!$trigger_output->toBool())
{
return $triggerOutput;
return $trigger_output;
}
$oDB = DB::getInstance();
@ -248,12 +248,7 @@ class communicationController extends communication
}
// Call a trigger (after)
$trigger_output = ModuleHandler::triggerCall('communication.sendMessage', 'after', $trigger_obj);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
ModuleHandler::triggerCall('communication.sendMessage', 'after', $trigger_obj);
$oDB->commit();

View file

@ -35,7 +35,7 @@ class counterModel extends counter
$group_key = 'counterIpLogged_' . $args->regdate;
$iplogged = Rhymix\Framework\Cache::get($group_key . ':' . $cache_key);
if($iplogged === false)
if(!$iplogged)
{
$output = executeQuery('counter.getCounterLog', $args);
if($output->data->count) $iplogged = TRUE;

View file

@ -209,13 +209,9 @@ class documentAdminController extends document
$oDB->rollback();
return $output;
}
// Call a trigger (before)
$output = ModuleHandler::triggerCall('document.moveDocumentModule', 'after', $triggerObj);
if(!$output->toBool())
{
$oDB->rollback();
return $output;
}
// Call a trigger (after)
ModuleHandler::triggerCall('document.moveDocumentModule', 'after', $triggerObj);
$oDB->commit();
@ -433,12 +429,7 @@ class documentAdminController extends document
// Call a trigger (before)
$triggerObj->copied_srls = $copied_srls;
$output = ModuleHandler::triggerCall('document.copyDocumentModule', 'after', $triggerObj);
if(!$output->toBool())
{
$oDB->rollback();
return $output;
}
ModuleHandler::triggerCall('document.copyDocumentModule', 'after', $triggerObj);
$oDB->commit();
@ -899,15 +890,7 @@ class documentAdminController extends document
}
// call a trigger (after)
if($output->toBool())
{
$trigger_output = ModuleHandler::triggerCall('document.restoreTrash', 'after', $originObject);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
}
ModuleHandler::triggerCall('document.restoreTrash', 'after', $originObject);
// commit
$oDB->commit();

View file

@ -176,13 +176,8 @@ class documentController extends document
$obj->after_point = ($point < 0) ? $args->blamed_count : $args->voted_count;
$obj->cancel = 1;
$trigger_output = ModuleHandler::triggerCall('document.updateVotedCountCancel', 'after', $obj);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
ModuleHandler::triggerCall('document.updateVotedCountCancel', 'after', $obj);
$oDB->commit();
return $output;
}
@ -467,29 +462,23 @@ class documentController extends document
$this->insertDocumentExtraVar($obj->module_srl, $obj->document_srl, $idx, $value, $extra_item->eid);
}
}
// Update the category if the category_srl exists.
if($obj->category_srl) $this->updateCategoryCount($obj->module_srl, $obj->category_srl);
// Call a trigger (after)
if($output->toBool())
if($obj->update_log_setting === 'Y')
{
if($obj->update_log_setting === 'Y')
{
$obj->extra_vars = serialize($extra_vars);
$update_output = $this->insertDocumentUpdateLog($obj);
$obj->extra_vars = serialize($extra_vars);
$update_output = $this->insertDocumentUpdateLog($obj);
if(!$update_output->toBool())
{
$oDB->rollback();
return $update_output;
}
}
$trigger_output = ModuleHandler::triggerCall('document.insertDocument', 'after', $obj);
if(!$trigger_output->toBool())
if(!$update_output->toBool())
{
$oDB->rollback();
return $trigger_output;
return $update_output;
}
}
ModuleHandler::triggerCall('document.insertDocument', 'after', $obj);
// commit
$oDB->commit();
@ -738,36 +727,30 @@ class documentController extends document
if($extra_content->title) $this->insertDocumentExtraVar($obj->module_srl, $obj->document_srl, -1, $extra_content->title, 'title_'.Context::getLangType());
if($extra_content->content) $this->insertDocumentExtraVar($obj->module_srl, $obj->document_srl, -2, $extra_content->content, 'content_'.Context::getLangType());
}
// Update the category if the category_srl exists.
if($source_obj->get('category_srl') != $obj->category_srl || $source_obj->get('module_srl') == $logged_info->member_srl)
{
if($source_obj->get('category_srl') != $obj->category_srl) $this->updateCategoryCount($obj->module_srl, $source_obj->get('category_srl'));
if($obj->category_srl) $this->updateCategoryCount($obj->module_srl, $obj->category_srl);
}
// Call a trigger (after)
if($output->toBool())
if($obj->update_log_setting === 'Y')
{
if($obj->update_log_setting === 'Y')
$obj->extra_vars = serialize($extra_vars);
if($this->grant->manager)
{
$obj->extra_vars = serialize($extra_vars);
if($this->grant->manager)
{
$obj->is_admin = 'Y';
}
$update_output = $this->insertDocumentUpdateLog($obj, $source_obj);
if(!$update_output->toBool())
{
$oDB->rollback();
return $update_output;
}
$obj->is_admin = 'Y';
}
$trigger_output = ModuleHandler::triggerCall('document.updateDocument', 'after', $obj);
if(!$trigger_output->toBool())
$update_output = $this->insertDocumentUpdateLog($obj, $source_obj);
if(!$update_output->toBool())
{
$oDB->rollback();
return $trigger_output;
return $update_output;
}
}
ModuleHandler::triggerCall('document.updateDocument', 'after', $obj);
// commit
$oDB->commit();
@ -888,18 +871,10 @@ class documentController extends document
// Delete extra variable
$this->deleteDocumentExtraVars($oDocument->get('module_srl'), $oDocument->document_srl);
//this
// Call a trigger (after)
if($output->toBool())
{
$trigger_obj = $oDocument->getObjectVars();
$trigger_output = ModuleHandler::triggerCall('document.deleteDocument', 'after', $trigger_obj);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
}
$trigger_obj = $oDocument->getObjectVars();
ModuleHandler::triggerCall('document.deleteDocument', 'after', $trigger_obj);
// declared document, log delete
$this->_deleteDeclaredDocuments($args);
$this->_deleteDocumentReadedLog($args);
@ -1053,16 +1028,9 @@ class documentController extends document
$args->isvalid = 'N';
executeQuery('file.updateFileValid', $args);
}
// Call a trigger (after)
if($output->toBool())
{
$trigger_output = ModuleHandler::triggerCall('document.moveDocumentToTrash', 'after', $obj);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
}
ModuleHandler::triggerCall('document.moveDocumentToTrash', 'after', $obj);
// commit
$oDB->commit();
@ -1135,12 +1103,7 @@ class documentController extends document
executeQuery('document.updateReadedCount', $args);
// Call a trigger when the read count is updated (after)
$trigger_output = ModuleHandler::triggerCall('document.updateReadedCount', 'after', $oDocument);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
ModuleHandler::triggerCall('document.updateReadedCount', 'after', $oDocument);
$oDB->commit();
@ -1396,12 +1359,8 @@ class documentController extends document
$obj->point = $point;
$obj->before_point = ($point < 0) ? $oDocument->get('blamed_count') : $oDocument->get('voted_count');
$obj->after_point = ($point < 0) ? $args->blamed_count : $args->voted_count;
$trigger_output = ModuleHandler::triggerCall('document.updateVotedCount', 'after', $obj);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
ModuleHandler::triggerCall('document.updateVotedCount', 'after', $obj);
$oDB->commit();
@ -1539,12 +1498,7 @@ class documentController extends document
// Call a trigger (after)
$trigger_obj->declared_count = $declared_count + 1;
$trigger_output = ModuleHandler::triggerCall('document.declaredDocument', 'after', $trigger_obj);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
ModuleHandler::triggerCall('document.declaredDocument', 'after', $trigger_obj);
// commit
$oDB->commit();

View file

@ -282,7 +282,7 @@ class fileController extends file
executeQuery('file.updateFileDownloadCount', $args);
// Call a trigger (after)
$output = ModuleHandler::triggerCall('file.downloadFile', 'after', $file_obj);
ModuleHandler::triggerCall('file.downloadFile', 'after', $file_obj);
// Redirect to procFileOutput using file key
if(!isset($_SESSION['__XE_FILE_KEY__']) || !is_string($_SESSION['__XE_FILE_KEY__']) || strlen($_SESSION['__XE_FILE_KEY__']) != 32)
@ -805,9 +805,9 @@ class fileController extends file
$output = executeQuery('file.insertFile', $args);
if(!$output->toBool()) return $output;
// Call a trigger (after)
$trigger_output = ModuleHandler::triggerCall('file.insertFile', 'after', $args);
if(!$trigger_output->toBool()) return $trigger_output;
ModuleHandler::triggerCall('file.insertFile', 'after', $args);
$_SESSION['__XE_UPLOADING_FILES_INFO__'][$args->file_srl] = true;
@ -895,8 +895,7 @@ class fileController extends file
if(!$output->toBool()) return $output;
// Call a trigger (after)
$trigger_output = ModuleHandler::triggerCall('file.deleteFile', 'after', $trigger_obj);
if(!$trigger_output->toBool()) return $trigger_output;
ModuleHandler::triggerCall('file.deleteFile', 'after', $trigger_obj);
// If successfully deleted, remove the file
FileHandler::removeFile($uploaded_filename);

View file

@ -99,11 +99,12 @@ class memberController extends member
$logged_info = Context::get('logged_info');
$trigger_output = ModuleHandler::triggerCall('member.doLogout', 'before', $logged_info);
if(!$trigger_output->toBool()) return $trigger_output;
// Destroy session information
$this->destroySessionInfo();
// Call a trigger after log-out (after)
$trigger_output = ModuleHandler::triggerCall('member.doLogout', 'after', $logged_info);
if(!$trigger_output->toBool()) return $trigger_output;
ModuleHandler::triggerCall('member.doLogout', 'after', $logged_info);
$output = new Object();
@ -426,9 +427,9 @@ class memberController extends member
return $this->setRedirectUrl(getUrl('', 'act', 'dispMemberLoginForm'), new Object(-12, $msg));
}
else $this->setMessage('success_registed');
// Call a trigger (after)
$trigger_output = ModuleHandler::triggerCall('member.procMemberInsert', 'after', $config);
if(!$trigger_output->toBool()) return $trigger_output;
ModuleHandler::triggerCall('member.procMemberInsert', 'after', $config);
if($config->redirect_url)
{
@ -616,12 +617,10 @@ class memberController extends member
// Get user_id information
$this->memberInfo = $oMemberModel->getMemberInfoByMemberSrl($args->member_srl);
// Call a trigger after successfully log-in (after)
$trigger_output = ModuleHandler::triggerCall('member.procMemberModifyInfo', 'after', $this->memberInfo);
if(!$trigger_output->toBool()) return $trigger_output;
// Call a trigger after successfully modified (after)
ModuleHandler::triggerCall('member.procMemberModifyInfo', 'after', $this->memberInfo);
$this->setSessionInfo();
// Return result
$this->add('member_srl', $args->member_srl);
$this->setMessage('success_updated');
@ -1543,7 +1542,7 @@ class memberController extends member
// Add
$output = executeQuery('member.addMemberToGroup',$args);
$output2 = ModuleHandler::triggerCall('member.addMemberToGroup', 'after', $args);
ModuleHandler::triggerCall('member.addMemberToGroup', 'after', $args);
$this->_clearMemberCache($member_srl, $site_srl);
@ -1822,9 +1821,10 @@ class memberController extends member
}
}
}
// Call a trigger after successfully log-in (after)
$trigger_output = ModuleHandler::triggerCall('member.doLogin', 'after', $this->memberInfo);
if(!$trigger_output->toBool()) return $trigger_output;
ModuleHandler::triggerCall('member.doLogin', 'after', $this->memberInfo);
// When user checked to use auto-login
if($keep_signed)
{
@ -2181,16 +2181,8 @@ class memberController extends member
}
$this->_sendAuthMail($auth_args, $args);
}
// Call a trigger (after)
if($output->toBool())
{
$trigger_output = ModuleHandler::triggerCall('member.insertMember', 'after', $args);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
}
ModuleHandler::triggerCall('member.insertMember', 'after', $args);
$oDB->commit(true);
@ -2447,15 +2439,9 @@ class memberController extends member
$this->_updatePointByGroup($orgMemberInfo->member_srl, $group_srl_list);
}
}
// Call a trigger (after)
if($output->toBool()) {
$trigger_output = ModuleHandler::triggerCall('member.updateMember', 'after', $args);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
}
ModuleHandler::triggerCall('member.updateMember', 'after', $args);
$oDB->commit();
@ -2564,15 +2550,7 @@ class memberController extends member
return $output;
}
// Call a trigger (after)
if($output->toBool())
{
$trigger_output = ModuleHandler::triggerCall('member.deleteMember', 'after', $trigger_obj);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
}
ModuleHandler::triggerCall('member.deleteMember', 'after', $trigger_obj);
$oDB->commit();
// Name, image, image, mark, sign, delete

View file

@ -413,8 +413,7 @@ class menuAdminModel extends menu
}
// after trigger
$output = ModuleHandler::triggerCall('menu.getModuleListInSitemap', 'after', $moduleList);
if(!$output->toBool()) return $output;
ModuleHandler::triggerCall('menu.getModuleListInSitemap', 'after', $moduleList);
$localModuleList = array_unique($moduleList);

View file

@ -227,7 +227,7 @@ class moduleAdminController extends module
$triggerObj->moduleSrlList[] = $module_srl;
}
$output = ModuleHandler::triggerCall('module.procModuleAdminCopyModule', 'after', $triggerObj);
ModuleHandler::triggerCall('module.procModuleAdminCopyModule', 'after', $triggerObj);
$oDB->commit();

View file

@ -115,8 +115,8 @@ class moduleAdminModel extends module
$content = '';
// Call a trigger for additional settings
// Considering uses in the other modules, trigger name cen be publicly used
$output = ModuleHandler::triggerCall('module.dispAdditionSetup', 'before', $content);
$output = ModuleHandler::triggerCall('module.dispAdditionSetup', 'after', $content);
ModuleHandler::triggerCall('module.dispAdditionSetup', 'before', $content);
ModuleHandler::triggerCall('module.dispAdditionSetup', 'after', $content);
Context::set('setup_content', $content);
if(count($tabChoice) == 0)

View file

@ -206,8 +206,8 @@ class moduleAdminView extends module
$content = '';
// Call a trigger for additional settings
// Considering uses in the other modules, trigger name cen be publicly used
$output = ModuleHandler::triggerCall('module.dispAdditionSetup', 'before', $content);
$output = ModuleHandler::triggerCall('module.dispAdditionSetup', 'after', $content);
ModuleHandler::triggerCall('module.dispAdditionSetup', 'before', $content);
ModuleHandler::triggerCall('module.dispAdditionSetup', 'after', $content);
Context::set('setup_content', $content);
// Set the layout to be pop-up
$this->setLayoutPath('./common/tpl');

View file

@ -726,15 +726,7 @@ class moduleController extends module
// Remove the module manager
$this->deleteAdminId($module_srl);
// Call a trigger (after)
if($output->toBool())
{
$trigger_output = ModuleHandler::triggerCall('module.deleteModule', 'after', $trigger_obj);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
}
ModuleHandler::triggerCall('module.deleteModule', 'after', $trigger_obj);
// commit
$oDB->commit();

View file

@ -1508,7 +1508,6 @@ class moduleModel extends module
// Get information of the module
$info = NULL;
$info = $this->getModuleInfoXml($module_name);
if(!$info) continue;
$info->module = $module_name;
@ -1517,21 +1516,30 @@ class moduleModel extends module
$info->table_count = $table_count;
$info->path = $path;
$info->admin_index_act = $info->admin_index_act;
// Check if DB is installed
if($table_count > $created_table_count) $info->need_install = true;
else $info->need_install = false;
// Check if it is upgraded to module.class.php on each module
$oDummy = null;
$oDummy = getModule($module_name, 'class');
if($oDummy && method_exists($oDummy, "checkUpdate"))
if(!Context::isBlacklistedPlugin($module_name))
{
$info->need_update = $oDummy->checkUpdate();
// Check if DB is installed
if($table_count > $created_table_count)
{
$info->need_install = true;
}
else
{
$info->need_install = false;
}
// Check if it is upgraded to module.class.php on each module
$oDummy = null;
$oDummy = getModule($module_name, 'class');
if($oDummy && method_exists($oDummy, "checkUpdate"))
{
$info->need_update = $oDummy->checkUpdate();
}
else
{
continue;
}
}
else
{
continue;
}
$list[] = $info;
}
return $list;

View file

@ -28,6 +28,10 @@
<strong cond="!$val->admin_index_act">{$val->title}</strong>
</p>
<p>{$val->description}</p>
<p cond="Context::isBlacklistedPlugin($val->module)" class="message error" style="margin-top:6px;padding:6px 10px">
{$lang->msg_blacklisted_module}<br />
{$lang->get('admin.msg_blacklisted_reason.'.$val->module)}
</p>
<p cond="$val->need_install" class="x_alert x_alert-info">{$lang->msg_avail_install} <button class="text" type="button" onclick="doInstallModule('{$val->module}')">{$lang->msg_do_you_like_install}</button></p>
<p cond="$val->need_update" class="x_alert x_alert-info">{$lang->msg_avail_update} <button class="text" type="button" onclick="doUpdateModule('{$val->module}')">{$lang->msg_do_you_like_update}</button></p>
<p cond="$val->need_autoinstall_update == 'Y'" class="x_alert x_alert-info">{$lang->msg_avail_easy_update} <a href="{$val->update_url}&amp;return_url={urlencode(getRequestUriByServerEnviroment())}">{$lang->msg_do_you_like_update}</a></p>
@ -59,4 +63,4 @@ jQuery(function($){
$('.dsTg>tbody>tr[data-type1]').prependTo('tbody');
$('.dsTg>tbody>tr[data-type2]').prependTo('tbody');
});
</script>
</script>

View file

@ -6,10 +6,10 @@ $lang->ncenterlite_document = 'document';
$lang->ncenterlite_comment = 'comment';
$lang->ncenterlite_type_message = 'message';
$lang->ncenterlite_sender = 'Sender';
$lang->ncenterlite_addressee = 'Addressee';
$lang->ncenterlite_addressee = 'Recipient';
$lang->ncenterlite_noti_contents = 'Contents';
$lang->ncenterlite_read = 'Have read';
$lang->ncenterlite_read_y = 'Have read';
$lang->ncenterlite_read_y = 'Read';
$lang->ncenterlite_read_n = 'Not read';
$lang->ncenterlite_no_target = 'no target';
$lang->ncenterlite_my_list = 'My notification list';
@ -26,26 +26,27 @@ $lang->ncenterlite_message_noti_about = 'Get notice of a message after someone s
$lang->ncenterlite_activate = 'Activate';
$lang->ncenterlite_inactivate = 'Inactivate';
$lang->ncenterlite_userconfig_about_warning = 'Watch out! You are controlling other user\'s settings via this page.';
$lang->ncenterlite_article = '<strong>%1$s</strong> wrote an article as "%2$s".';
$lang->ncenterlite_board = '<strong>%1$s</strong> wrote "%3$s" on %2$s.';
$lang->ncenterlite_commented = '<strong>%1$s</strong> commented as "%3$s" on your %2$s.';
$lang->ncenterlite_commented_board = '<strong>%1$s</strong> commented as "%3$s" on the board %2$s.';
$lang->ncenterlite_mentioned = '<strong>%s</strong> mentioned you on <strong>"%s"board</strong> to <strong>"%s"</strong> .';
$lang->ncenterlite_message_string = 'You have <strong>%d</strong> new <strong>message(s)</strong>.';
$lang->ncenterlite_message_mention = '<strong>%1$s</strong> sent a message as <strong>"%2$s"</strong>.';
$lang->ncenterlite_test_noti = '<strong>%s</strong>! Skin test notification has been done.';
$lang->ncenterlite_vote = '<strong>%1$s</strong> marked the article "%2$s" with a recommendation.';
$lang->ncenterlite_admin_content_message = '<strong>%1$s</strong> wrote "%3$s" on %2$s.';
$lang->ncenterlite_article = '<strong>%1$s</strong> wrote "%2$s".';
$lang->ncenterlite_board = '<strong>%1$s</strong> wrote "%3$s" on <strong>%2$s</strong>.';
$lang->ncenterlite_commented = '<strong>%1$s</strong> commented "%3$s" on your %2$s.';
$lang->ncenterlite_commented_board = '<strong>%1$s</strong> commented "%3$s" on <strong>%2$s</strong>.';
$lang->ncenterlite_mentioned = '<strong>%1$s</strong> mentioned you in a %4$s, "%3$s", on <strong>"%2$s"</strong>.';
$lang->ncenterlite_message_string = 'You have <strong>%d</strong> unread message.';
$lang->ncenterlite_message_string_plural = 'You have <strong>%d</strong> unread messages.';
$lang->ncenterlite_message_mention = '<strong>%1$s</strong> sent you a message, "%2$s".';
$lang->ncenterlite_test_noti = 'Hello, <strong>%s</strong>! This is a test notification.';
$lang->ncenterlite_vote = '<strong>%1$s</strong> upvoted your %3$s, "%2$s".';
$lang->ncenterlite_admin_content_message = '<strong>%1$s</strong> wrote "%3$s" on <strong>%2$s</strong>.';
$lang->ncenterlite_ago = 'ago';
$lang->ncenterlite_date['0'] = 'Year';
$lang->ncenterlite_date['1'] = 'Month';
$lang->ncenterlite_date['2'] = 'Day';
$lang->ncenterlite_date['3'] = 'Hour';
$lang->ncenterlite_date['4'] = 'Minute';
$lang->ncenterlite_date['5'] = 'Second';
$lang->ncenterlite_date['0'] = 'year';
$lang->ncenterlite_date['1'] = 'month';
$lang->ncenterlite_date['2'] = 'day';
$lang->ncenterlite_date['3'] = 'hour';
$lang->ncenterlite_date['4'] = 'minute';
$lang->ncenterlite_date['5'] = 'second';
$lang->ncenterlite_sir = ' ';
$lang->ncenterlite_message = 'You have <strong class="num">%s</strong> notification.';
$lang->ncenterlite_messages = 'you have <strong class="num">%s</strong> notifications.';
$lang->ncenterlite_message = 'You have <strong class="num">%s</strong> new notification.';
$lang->ncenterlite_messages = 'You have <strong class="num">%s</strong> new notifications.';
$lang->ncenterlite_thisistest = '[*] This is a test notice.';
$lang->ncenterlite_delete_all = 'delete all';
$lang->ncenterlite_more = 'More';
@ -89,3 +90,6 @@ $lang->ncenterlite_commnet_event_noti_all = 'Notice every comments to the author
$lang->ncenterlite_commnet_event_noti_some = 'Notice only direct replies to the author';
$lang->ncenterlite_message_event = 'Notify message';
$lang->ncenterlite_message_event_about = 'Do not notify message (Use XE Core message notification system).';
$lang->ncenterlite_all_delete = 'Delete all';
$lang->ncenterlite_month_before_delete = 'Delete older than 1 month';
$lang->dont_check_notify_delete = 'Unread notifications will be deleted, too.';

View file

@ -1,13 +1,14 @@
<?php
$lang->ncenterlite = '알림센터 Lite';
$lang->ncenterlite_install_version = '설치된 버전';
$lang->ncenterlite_advenced_config = '고급설정';
$lang->ncenterlite_advenced_config = '고급 설정';
$lang->ncenterlite_document = '글';
$lang->ncenterlite_comment = '댓글';
$lang->ncenterlite_mention = '멘션';
$lang->ncenterlite_cmd_vote = '추천';
$lang->ncenterlite_comment_comment = '대댓글';
$lang->ncenterlite_type_message = '쪽지';
$lang->ncenterlite_type_test = '테스트';
$lang->ncenterlite_sender = '보낸 사람';
$lang->ncenterlite_addressee = '받는 사람';
$lang->ncenterlite_noti_contents = '내용';
@ -36,15 +37,16 @@ $lang->ncenterlite_activate = '사용';
$lang->ncenterlite_inactivate = '사용 안함';
$lang->ncenterlite_userconfig_about_warning = '주의! 당신은 관리자 권한으로 다른 사용자의 설정창에 접속하였습니다.';
$lang->ncenterlite_article = '<strong>%1$s</strong>님이 <strong>"%2$s"</strong>라고 글을 남겼습니다.';
$lang->ncenterlite_board = '<strong>%1$s</strong>님이 게시판 <strong>"%2$s"</strong>에 <strong>"%3$s"</strong>라고 글을 남겼습니다.';
$lang->ncenterlite_board = '<strong>%1$s</strong>님이 <strong>"%2$s"</strong> 게시판에 <strong>"%3$s"</strong>라고 글을 남겼습니다.';
$lang->ncenterlite_commented = '<strong>%1$s</strong>님이 회원님의 %2$s에 <strong>"%3$s"</strong>라고 댓글을 남겼습니다.';
$lang->ncenterlite_commented_board = '<strong>%1$s</strong>님이 <strong>"%2$s"</strong>게시판에 <strong>"%3$s"</strong>라고 댓글을 남겼습니다.';
$lang->ncenterlite_mentioned = '<strong>%s</strong>님이 <strong>"%s"</strong>게시판에서 <strong>"%s" </strong>게시글을 작성하며 회원님을 언급하였습니다.';
$lang->ncenterlite_mentioned = '<strong>%s</strong>님이 <strong>"%s"</strong> 게시판의 <strong>"%s"</strong> %s에서 회원님을 언급하였습니다.';
$lang->ncenterlite_message_string = '<strong>%d</strong>개의 읽지 않은 <strong>메시지</strong>가 있습니다.';
$lang->ncenterlite_message_mention = '<strong>%s</strong>님께서 <strong>"%s"</strong>라고 메시지를 보내셨습니다.';
$lang->ncenterlite_test_noti = '<strong>%s</strong>님! 스킨 테스트 알림을 완료했습니다.';
$lang->ncenterlite_vote = '<strong>%s</strong>님이 <strong>"%s"</strong> 글을 추천하였습니다.';
$lang->ncenterlite_admin_content_message = '<strong>%1$s</strong>님이 <strong>"%2$s"</strong>게시판에 <strong>"%3$s"</strong>라고 글을 남겼습니다.';
$lang->ncenterlite_message_string_plural = '<strong>%d</strong>개의 읽지 않은 <strong>메시지</strong>가 있습니다.';
$lang->ncenterlite_message_mention = '<strong>%s</strong>님이 <strong>"%s"</strong>라고 메시지를 보내셨습니다.';
$lang->ncenterlite_test_noti = '<strong>%s</strong>님! 테스트 알림입니다.';
$lang->ncenterlite_vote = '<strong>%s</strong>님이 회원님의 <strong>"%s"</strong> %s을 추천하였습니다.';
$lang->ncenterlite_admin_content_message = '<strong>%1$s</strong>님이 <strong>"%2$s"</strong> 게시판에 <strong>"%3$s"</strong>라고 글을 남겼습니다.';
$lang->ncenterlite_ago = '전';
$lang->ncenterlite_date['0'] = '년';
$lang->ncenterlite_date['1'] = '개월';
@ -107,12 +109,6 @@ $lang->ncenterlite_no_notify = '알림 내역이 없습니다.';
$lang->ncenterlite_all_delete = '전체 삭제';
$lang->ncenterlite_month_before_delete = '한 달 이전의 알림 삭제';
$lang->dont_check_notify_delete = '회원이 확인하지 않은 알림도 삭제됩니다.';
$lang->send_member = '보낸 사람';
$lang->resiver_member = '받는 사람';
$lang->notify_content = '알림 내용';
$lang->notify_read_check = '알림 읽음 여부';
$lang->notify_readed = '읽음';
$lang->notify_dont_readed = '읽지않음';
$lang->anonymous_nick_name_setting = '익명 닉네임 대체';
$lang->about_anonymous_nick_name = '익명 게시판에서 발생한 알림에 표시할 이름을 지정합니다.';
$lang->mention_suffixes = '멘션 접미사';
@ -121,4 +117,6 @@ $lang->mention_suffix_always_cut = '접미사가 포함된 이름 처리';
$lang->mention_suffix_always_cut_y = '접미사를 제외한 이름의 회원 우선';
$lang->mention_suffix_always_cut_n = '접미사를 포함한 이름의 회원 우선';
$lang->about_mention_suffix_always_cut = '\'알림센터님\'이라는 회원과 \'알림센터\'라는 회원이 모두 있을 경우 @알림센터님을 멘션하면 누구에게 알릴지 선택합니다.';
$lang->mention_limit = '멘션 갯수 제한';
$lang->about_mention_limit = '서버 과부하와 스팸을 방지하기 위해 한 글에서 지나치게 많은 회원들을 호출하지 못하도록 합니다.';
$lang->ncenterlite_msg_setting_error = '설정에 오류가 있습니다. 다시 설정해 주세요.';

View file

@ -14,6 +14,7 @@ class ncenterliteAdminController extends ncenterlite
'mention_names',
'mention_suffixes',
'mention_suffix_always_cut',
'mention_limit',
'hide_module_srls',
'admin_notify_module_srls',
'skin',

View file

@ -18,75 +18,7 @@ class ncenterliteAdminModel extends ncenterlite
foreach($list as $k => $v)
{
$target_member = $v->target_nick_name;
switch($v->type)
{
case 'D':
$type = $lang->ncenterlite_document; //$type = '글';
break;
case 'C':
$type = $lang->ncenterlite_comment; //$type = '댓글';
break;
// 메시지. 쪽지
case 'E':
$type = $lang->ncenterlite_type_message; //$type = '쪽지';
break;
}
switch($v->target_type)
{
case 'C':
$str = sprintf($lang->ncenterlite_commented, $target_member, $type, $v->target_summary);
//$str = sprintf('<strong>%s</strong>님이 회원님의 %s에 <strong>"%s" 댓글</strong>을 남겼습니다.', $target_member, $type, $v->target_summary);
break;
case 'A':
$str = sprintf($lang->ncenterlite_commented_board, $target_member, $v->target_browser, $v->target_summary);
//$str = sprintf('<strong>%1$s</strong>님이 게시판 <strong>"%2$s"</strong>에 <strong>"%3$s"</strong>라고 댓글을 남겼습니다.', $target_member, $type, $v->target_summary);
break;
case 'M':
$str = sprintf($lang->ncenterlite_mentioned, $target_member, $v->target_summary, $type);
//$str = sprintf('<strong>%s</strong>님이 <strong>"%s" %s</strong>에서 회원님을 언급하였습니다.', $target_member, $v->target_summary, $type);
break;
// 메시지. 쪽지
case 'E':
if(version_compare(__XE_VERSION__, '1.7.4', '>='))
{
$str = sprintf($lang->ncenterlite_message_mention, $target_member, $v->target_summary);
//<strong>%s</strong>님께서 <strong>"%s"</strong>라고 메세지를 보내셨습니다.
}
else
{
$str = sprintf($lang->ncenterlite_message_string, $v->target_summary);
}
break;
case 'T':
$str = sprintf($lang->ncenterlite_test_noti, $target_member);
break;
case 'P':
$str = sprintf($lang->ncenterlite_board, $target_member, $v->target_browser, $v->target_summary);
//<strong>%1$s</strong>님이 게시판 <strong>"%2$s"</strong>에 <strong>"%3$s"</strong>라고 글을 남겼습니다.
break;
case 'S':
if($v->target_browser)
{
$str = sprintf($lang->ncenterlite_board, $target_member, $v->target_browser, $v->target_summary);
}
else
{
$str = sprintf($lang->ncenterlite_article, $target_member, $v->target_summary);
}
break;
case 'V':
$str = sprintf($lang->ncenterlite_vote, $target_member, $v->target_summary);
break;
}
if($v->type=='U')
{
$str = $oNcenterliteModel->getNotifyTypeString($v->notify_type,unserialize($v->target_body));
}
$v->text = $str;
$v->text = $oNcenterliteModel->getNotificationText($v);
$v->ago = $oNcenterliteModel->getAgo($v->regdate);
$v->url = getUrl('','act','procNcenterliteRedirect', 'notify', $v->notify, 'url', $v->target_url);
if($v->target_member_srl)
@ -102,4 +34,4 @@ class ncenterliteAdminModel extends ncenterlite
return $output;
}
}
}

View file

@ -735,6 +735,7 @@ class ncenterliteController extends ncenterlite
Context::set('ncenterlite_list', $_output->data);
Context::set('ncenterlite_page_navigation', $_output->page_navigation);
Context::set('_ncenterlite_num', $_output->page_navigation->total_count);
if(Mobile::isFromMobilePhone())
{
@ -1080,6 +1081,16 @@ class ncenterliteController extends ncenterlite
// Find members.
foreach ($mentions as $mention)
{
if (isset($members[$mention]))
{
continue;
}
if (count($members) >= $config->mention_limit)
{
break;
}
if ($config->mention_suffix_always_cut != 'Y')
{
if ($config->mention_names === 'id')

View file

@ -28,6 +28,10 @@ class ncenterliteModel extends ncenterlite
$config->mention_suffixes = array('님', '様', 'さん', 'ちゃん');
}
unset($config->mention_format);
if(!isset($config->mention_limit))
{
$config->mention_limit = 20;
}
if(!$config->hide_module_srls) $config->hide_module_srls = array();
if(!is_array($config->hide_module_srls)) $config->hide_module_srls = explode('|@|', $config->hide_module_srls);
if(!$config->document_read) $config->document_read = 'Y';
@ -120,8 +124,6 @@ class ncenterliteModel extends ncenterlite
function getMyNotifyList($member_srl=null, $page=1, $readed='N')
{
global $lang;
$act = Context::get('act');
if($act=='dispNcenterliteNotifyList')
{
@ -137,71 +139,7 @@ class ncenterliteModel extends ncenterlite
foreach($list as $k => $v)
{
$target_member = $v->target_nick_name;
switch($v->type)
{
case 'D':
$type = $lang->ncenterlite_document; //$type = '글';
break;
case 'C':
$type = $lang->ncenterlite_comment; //$type = '댓글';
break;
// 메시지. 쪽지
case 'E':
$type = $lang->ncenterlite_type_message; //$type = '쪽지';
break;
}
switch($v->target_type)
{
case 'C':
$str = sprintf($lang->ncenterlite_commented, $target_member, $type, $v->target_summary);
//$str = sprintf('<strong>%s</strong>님이 회원님의 %s에 <strong>"%s" 댓글</strong>을 남겼습니다.', $target_member, $type, $v->target_summary);
break;
case 'A':
$str = sprintf($lang->ncenterlite_commented_board, $target_member, $v->target_browser, $v->target_summary);
//$str = sprintf('<strong>%1$s</strong>님이 게시판 <strong>"%2$s"</strong>에 <strong>"%3$s"</strong>라고 댓글을 남겼습니다.', $target_member, $type, $v->target_summary);
break;
case 'M':
$str = sprintf($lang->ncenterlite_mentioned, $target_member, $v->target_browser, $v->target_summary);
//$str = sprintf('<strong>%s</strong>님이 <strong>"%s" %s</strong>에서 회원님을 언급하였습니다.', $target_member, $v->target_summary, $type);
break;
// 메시지. 쪽지
case 'E':
$str = sprintf($lang->ncenterlite_message_mention,$target_member, $v->target_summary);
break;
case 'T':
$str = sprintf($lang->ncenterlite_test_noti, $target_member);
break;
case 'P':
$str = sprintf($lang->ncenterlite_board, $target_member, $v->target_browser, $v->target_summary);
break;
case 'S':
if($v->target_browser)
{
$str = sprintf($lang->ncenterlite_board, $target_member, $v->target_browser, $v->target_summary);
}
else
{
$str = sprintf($lang->ncenterlite_article, $target_member, $v->target_summary);
}
break;
case 'V':
$str = sprintf($lang->ncenterlite_vote, $target_member, $v->target_summary);
break;
case 'B':
$str = sprintf($lang->ncenterlite_admin_content_message, $target_member, $v->target_browser, $v->target_summary);
break;
}
if($v->type=='U')
{
$str = $this->getNotifyTypeString($v->notify_type,unserialize($v->target_body));
}
$v->text = $str;
$v->text = $this->getNotificationText($v);
$v->ago = $this->getAgo($v->regdate);
$v->url = getUrl('','act','procNcenterliteRedirect', 'notify', $v->notify, 'url', $v->target_url);
if($v->target_member_srl)
@ -356,7 +294,109 @@ class ncenterliteModel extends ncenterlite
if(count($colorset_list)) $colorsets = implode("\n", $colorset_list);
$this->add('colorset_list', $colorsets);
}
/**
* Return the notification text.
*
* @param object $notification
* @return string
*/
public function getNotificationText($notification)
{
global $lang;
// Get the type of notification.
switch ($notification->type)
{
// Document.
case 'D':
$type = $lang->ncenterlite_document;
break;
// Comment.
case 'C':
$type = $lang->ncenterlite_comment;
break;
// Message.
case 'E':
$type = $lang->ncenterlite_type_message;
break;
// Test.
case 'T':
$type = $lang->ncenterlite_type_test;
break;
// Other.
case 'U':
default:
return $this->getNotifyTypeString($notification->notify_type, unserialize($notification->target_body)) ?: $lang->ncenterlite;
}
// Get the notification text.
switch ($notification->target_type)
{
// Comment on your document.
case 'C':
$str = sprintf($lang->ncenterlite_commented, $notification->target_nick_name, $type, $notification->target_summary);
break;
// Comment on a board.
case 'A':
$str = sprintf($lang->ncenterlite_commented_board, $notification->target_nick_name, $notification->target_browser, $notification->target_summary);
break;
// Mentioned.
case 'M':
$str = sprintf($lang->ncenterlite_mentioned, $notification->target_nick_name, $notification->target_browser, $notification->target_summary, $type);
break;
// Message arrived.
case 'E':
$str = sprintf($lang->ncenterlite_message_mention, $notification->target_nick_name, $notification->target_summary);
break;
// Test notification.
case 'T':
$str = sprintf($lang->ncenterlite_test_noti, $notification->target_nick_name);
break;
// New document on a board.
case 'P':
$str = sprintf($lang->ncenterlite_board, $notification->target_nick_name, $notification->target_browser, $notification->target_summary);
break;
// New document.
case 'S':
if($notification->target_browser)
{
$str = sprintf($lang->ncenterlite_board, $notification->target_nick_name, $notification->target_browser, $notification->target_summary);
}
else
{
$str = sprintf($lang->ncenterlite_article, $notification->target_nick_name, $notification->target_summary);
}
break;
// Voted.
case 'V':
$str = sprintf($lang->ncenterlite_vote, $notification->target_nick_name, $notification->target_summary, $type);
break;
// Admin notification.
case 'B':
$str = sprintf($lang->ncenterlite_admin_content_message, $notification->target_nick_name, $notification->target_browser, $notification->target_summary);
break;
// Other.
default:
$str = $lang->ncenterlite;
}
return $str;
}
/**
* @brief 주어진 시간이 얼마 인지 반환
* @param string YmdHis
@ -367,9 +407,8 @@ class ncenterliteModel extends ncenterlite
global $lang;
$lang_type = Context::getLangType();
$display = $lang->ncenterlite_date; // array('Year', 'Month', 'Day', 'Hour', 'Minute', 'Second')
$ago = $lang->ncenterlite_ago; // 'Ago'
$display = $lang->ncenterlite_date;
$ago = $lang->ncenterlite_ago;
$date = getdate(strtotime(zdate($datetime, 'Y-m-d H:i:s')));

View file

@ -39,6 +39,15 @@
<p class="x_help-block">{$lang->about_mention_suffix_always_cut}</p>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->mention_limit}</label>
<div class="x_controls">
<label class="x_inline">
<input type="number" name="mention_limit" value="{intval($config->mention_limit)}" />
</label>
<p class="x_help-block">{$lang->about_mention_limit}</p>
</div>
</div>
</section>
<div class="x_clearfix btnArea">
<div class="x_pull-right">

View file

@ -2,7 +2,7 @@
<include target="header.html" />
<section class="section">
<h1>알림 목록</h1>
<h1>{$lang->ncenterlite_notice_list}</h1>
<p class="x_well x_well-small" cond="!$ncenterlite_list">{$lang->ncenterlite_no_notify}</p>
@ -22,10 +22,10 @@
<table class="x_table x_table-striped x_table-hover" style="margin-top:20px;">
<thead>
<tr>
<th scope="col" class="nowr" style="width:100px;">{$lang->send_member}</th>
<th scope="col" style="width:100px;">{$lang->resiver_member}</th>
<th scope="col" style="width:500px;">{$lang->notify_content}</th>
<th scope="col" style="width:50px;">{$lang->notify_read_check}</th>
<th scope="col" class="nowr" style="width:100px;">{$lang->ncenterlite_sender}</th>
<th scope="col" style="width:100px;">{$lang->ncenterlite_addressee}</th>
<th scope="col" style="width:500px;">{$lang->ncenterlite_noti_contents}</th>
<th scope="col" style="width:50px;">{$lang->ncenterlite_read}</th>
<th scope="col" style="width:100px;">{$lang->date}</th>
</tr>
</thead>
@ -40,8 +40,8 @@
<td cond="$member_info->member_srl">{$member_info->nick_name}</td> <td cond="!$member_info->member_srl">타겟없음</td>
<td><a href="{$val->target_url}">{$val->text}</a></td>
<td>
<span cond="$val->readed == 'Y'" style="color:#8582E6">{$lang->notify_readed}</span>
<span cond="$val->readed != 'Y'" style="color:#FF2828">{$lang->notify_dont_readed}</span>
<span cond="$val->readed == 'Y'" style="color:#8582E6">{$lang->ncenterlite_read_y}</span>
<span cond="$val->readed != 'Y'" style="color:#FF2828">{$lang->ncenterlite_read_n}</span>
</td>
<td>
{zdate($val->regdate,"Y-m-d")}
@ -67,4 +67,4 @@
</ul>
</div>
</block>
</section>
</section>

View file

@ -672,12 +672,7 @@ class pointController extends point
$trigger_obj->new_group_list = $new_group_list;
$trigger_obj->del_group_list = $del_group_list;
$trigger_obj->new_level = $level;
$trigger_output = ModuleHandler::triggerCall('point.setPoint', 'after', $trigger_obj);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
ModuleHandler::triggerCall('point.setPoint', 'after', $trigger_obj);
$oDB->commit();