mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-16 01:39:58 +09:00
commit
c9ef5273ca
54 changed files with 472 additions and 189 deletions
|
|
@ -261,7 +261,7 @@
|
|||
success: function (data) {
|
||||
var oembedData = $.extend({}, data);
|
||||
oembedData.code = embedProvider.templateData(data);
|
||||
success(oembedData, externalUrl, container);
|
||||
if(oembedData.code) success(oembedData, externalUrl, container);
|
||||
},
|
||||
error: settings.onError.call(container, externalUrl, embedProvider)
|
||||
}, settings.ajaxOptions || {});
|
||||
|
|
@ -389,8 +389,8 @@
|
|||
|
||||
$.fn.oembed.getGenericCode = function (url, oembedData) {
|
||||
var title = (oembedData.title !== null) ? oembedData.title : url,
|
||||
code = '<a href="' + url + '">' + title + '</a>';
|
||||
if(oembedData.html) code += "<div>" + oembedData.html + "</div>";
|
||||
code = '';
|
||||
if(oembedData.html) code += '<blockquote class="oembedall-blockquote"><strong>' + title + '</strong><br>' + jQuery(oembedData.html).text().substring(0,200) + '... <a href="'+url+'">more</a></blockquote>';
|
||||
return code;
|
||||
};
|
||||
|
||||
|
|
@ -849,7 +849,7 @@
|
|||
templateData: function (data) {
|
||||
if(!data.parse) return false;
|
||||
var text = data.parse['text']['*'].replace(/href="\/wiki/g, 'href="http://en.wikipedia.org/wiki');
|
||||
return '<div id="content"><h3><a class="nav-link" href="http://en.wikipedia.org/wiki/' + data.parse['displaytitle'] + '">' + data.parse['displaytitle'] + '</a></h3>' + text + '</div>';
|
||||
return '<div id="content"><blockquote class="oembedall-blockquote"><strong>' + data.parse['displaytitle'] + '</strong><br>' +jQuery(text).text().substring(0,200) + '...</blockquote></div>';
|
||||
}
|
||||
}),
|
||||
new $.fn.oembed.OEmbedProvider("imdb", "rich", ["imdb.com/title/.+"], "http://www.imdbapi.com/?i=$1&callback=?", {
|
||||
|
|
|
|||
2
addons/oembed/jquery.oembed.min.js
vendored
2
addons/oembed/jquery.oembed.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -9,7 +9,7 @@ if(!defined('__XE__'))
|
|||
* @author NAVER (developers@xpressengine.com)
|
||||
* @brief Add-on to resize images in the body
|
||||
*/
|
||||
if($called_position == 'after_module_proc' && Context::getResponseMethod() == "HTML" || !isCrawler())
|
||||
if($called_position == 'after_module_proc' && (Context::getResponseMethod() == "HTML" || !isCrawler()))
|
||||
{
|
||||
if(Mobile::isFromMobilePhone())
|
||||
{
|
||||
|
|
|
|||
7
classes/cache/CacheApc.class.php
vendored
7
classes/cache/CacheApc.class.php
vendored
|
|
@ -84,7 +84,7 @@ class CacheApc extends CacheBase
|
|||
|
||||
if($modified_time > 0 && $modified_time > $obj[0])
|
||||
{
|
||||
$this->delete($_key);
|
||||
$this->delete($key);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -110,7 +110,7 @@ class CacheApc extends CacheBase
|
|||
|
||||
if($modified_time > 0 && $modified_time > $obj[0])
|
||||
{
|
||||
$this->delete($_key);
|
||||
$this->delete($key);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -125,7 +125,8 @@ class CacheApc extends CacheBase
|
|||
*/
|
||||
function delete($key)
|
||||
{
|
||||
return apc_delete($key);
|
||||
$_key = md5(_XE_PATH_ . $key);
|
||||
return apc_delete($_key);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -164,12 +164,13 @@ class DisplayHandler extends Handler
|
|||
array(
|
||||
'Request / Response info >>> ' . $_SERVER['REQUEST_METHOD'] . ' / ' . Context::getResponseMethod(),
|
||||
array(
|
||||
array('Request URI', 'Request method', 'Response method', 'Response contents size'),
|
||||
array('Request URI', 'Request method', 'Response method', 'Response contents size', 'Memory peak usage'),
|
||||
array(
|
||||
sprintf("%s:%s%s%s%s", $_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'], $_SERVER['PHP_SELF'], $_SERVER['QUERY_STRING'] ? '?' : '', $_SERVER['QUERY_STRING']),
|
||||
$_SERVER['REQUEST_METHOD'],
|
||||
Context::getResponseMethod(),
|
||||
$this->content_size . ' byte'
|
||||
$this->content_size . ' byte',
|
||||
FileHandler::filesize(memory_get_peak_usage())
|
||||
)
|
||||
)
|
||||
),
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ class HTMLDisplayHandler
|
|||
// add .x div for adminitration pages
|
||||
if(Context::getResponseMethod() == 'HTML')
|
||||
{
|
||||
if(Context::get('module') != 'admin' && strpos(Context::get('act'), 'Admin') > 0)
|
||||
if(Context::get('module') != 'admin' && strpos(Context::get('act'), 'Admin') > 0 && Context::get('act') != 'dispPageAdminContentModify' && Context::get('act') != 'dispPageAdminMobileContentModify')
|
||||
{
|
||||
$output = '<div class="x">' . $output . '</div>';
|
||||
}
|
||||
|
|
@ -174,7 +174,7 @@ class HTMLDisplayHandler
|
|||
$output = preg_replace_callback('!<meta(.*?)(?:\/|)>!is', array($this, '_moveMetaToHeader'), $output);
|
||||
|
||||
// change a meta fine(widget often put the tag like <!--Meta:path--> to the content because of caching)
|
||||
$output = preg_replace_callback('/<!--(#)?Meta:([a-z0-9\_\/\.\@]+)-->/is', array($this, '_transMeta'), $output);
|
||||
$output = preg_replace_callback('/<!--(#)?Meta:([a-z0-9\_\-\/\.\@]+)-->/is', array($this, '_transMeta'), $output);
|
||||
|
||||
// handles a relative path generated by using the rewrite module
|
||||
if(Context::isAllowRewrite())
|
||||
|
|
|
|||
|
|
@ -263,10 +263,6 @@ class ExtraItem
|
|||
{
|
||||
$values = explode('|@|', $value);
|
||||
}
|
||||
elseif(strpos($value, ',') !== false)
|
||||
{
|
||||
$values = explode(',', $value);
|
||||
}
|
||||
else
|
||||
{
|
||||
$values = array($value);
|
||||
|
|
@ -462,6 +458,8 @@ class ExtraItem
|
|||
}
|
||||
if($this->desc)
|
||||
{
|
||||
$oModuleController = getController('module');
|
||||
$oModuleController->replaceDefinedLangCode($this->desc);
|
||||
$buff[] = '<p>' . htmlspecialchars($this->desc, ENT_COMPAT | ENT_HTML401, 'UTF-8', false) . '</p>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ class XEHttpRequest
|
|||
$chunk_size = hexdec(fgets($sock));
|
||||
if($chunk_size)
|
||||
{
|
||||
$body .= fread($sock, $chunk_size);
|
||||
$body .= fgets($sock, $chunk_size+1);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -45,6 +45,10 @@ a img {
|
|||
}
|
||||
}
|
||||
|
||||
.xe-widget-wrapper {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Popup Menu Area */
|
||||
#popup_menu_area {
|
||||
position: absolute;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ define('__ZBXE__', __XE__);
|
|||
/**
|
||||
* Display XE's full version.
|
||||
*/
|
||||
define('__XE_VERSION__', '1.7.4');
|
||||
define('__XE_VERSION__', '1.7.5-beta1');
|
||||
|
||||
/**
|
||||
* @deprecated __ZBXE_VERSION__ will be removed. Use __XE_VERSION__ instead.
|
||||
|
|
|
|||
|
|
@ -776,7 +776,7 @@ function debugPrint($debug_output = NULL, $display_option = TRUE, $file = '_debu
|
|||
}
|
||||
$type = FirePHP::INFO;
|
||||
|
||||
$label = sprintf('[%s:%d] %s() (m:%s)', $file_name, $line_num, $function, FileHandler::filesize(memory_get_usage()));
|
||||
$label = sprintf('[%s:%d] %s() (Memory usage: current=%s, peak=%s)', $file_name, $line_num, $function, FileHandler::filesize(memory_get_usage()), FileHandler::filesize(memory_get_peak_usage()));
|
||||
|
||||
// Check a FirePHP option
|
||||
if($display_option === 'TABLE')
|
||||
|
|
|
|||
|
|
@ -95,6 +95,81 @@ class adminAdminModel extends admin
|
|||
}
|
||||
}
|
||||
|
||||
function getFTPPath()
|
||||
{
|
||||
$ftp_info = Context::getRequestVars();
|
||||
|
||||
if(!$ftp_info->ftp_host)
|
||||
{
|
||||
$ftp_info->ftp_host = "127.0.0.1";
|
||||
}
|
||||
|
||||
if(!$ftp_info->ftp_port || !is_numeric($ftp_info->ftp_port))
|
||||
{
|
||||
$ftp_info->ftp_port = '22';
|
||||
}
|
||||
|
||||
$connection = ftp_connect($ftp_info->ftp_host, $ftp_info->ftp_port);
|
||||
if(!$connection)
|
||||
{
|
||||
return new Object(-1, sprintf(Context::getLang('msg_ftp_not_connected'), $ftp_host));
|
||||
}
|
||||
|
||||
$login_result = @ftp_login($connection, $ftp_info->ftp_user, $ftp_info->ftp_password);
|
||||
if(!$login_result)
|
||||
{
|
||||
ftp_close($connection);
|
||||
return new Object(-1, 'msg_ftp_invalid_auth_info');
|
||||
}
|
||||
|
||||
// create temp file
|
||||
$pin = $_SERVER['REQUEST_TIME'];
|
||||
FileHandler::writeFile('./files/cache/ftp_check', $pin);
|
||||
|
||||
// create path candidate
|
||||
$xe_path = _XE_PATH_;
|
||||
$path_info = array_reverse(explode('/', _XE_PATH_));
|
||||
array_pop($path_info); // remove last '/'
|
||||
$path_candidate = array();
|
||||
|
||||
$temp = '';
|
||||
foreach($path_info as $path)
|
||||
{
|
||||
$temp = '/' . $path . $temp;
|
||||
$path_candidate[] = $temp;
|
||||
}
|
||||
|
||||
// try
|
||||
foreach($path_candidate as $path)
|
||||
{
|
||||
// upload check file
|
||||
if(!ftp_put($connection, $path . 'ftp_check.html', FileHandler::getRealPath('./files/cache/ftp_check'), FTP_BINARY))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// get check file
|
||||
$result = FileHandler::getRemoteResource(getNotencodedFullUrl() . 'ftp_check.html');
|
||||
|
||||
// delete temp check file
|
||||
ftp_delete($connection, $path . 'ftp_check.html');
|
||||
|
||||
// found
|
||||
if($result == $pin)
|
||||
{
|
||||
$found_path = $path;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
FileHandler::removeFile('./files/cache/ftp_check', $pin);
|
||||
|
||||
if($found_path)
|
||||
{
|
||||
$this->add('found_path', $found_path);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find XE installed path on ftp
|
||||
*/
|
||||
|
|
@ -130,6 +205,15 @@ class adminAdminModel extends admin
|
|||
return $this->getSFTPPath();
|
||||
}
|
||||
|
||||
if($ftp_info->ftp_pasv == 'N')
|
||||
{
|
||||
if(function_exists('ftp_connect'))
|
||||
{
|
||||
return $this->getFTPPath();
|
||||
}
|
||||
$ftp_info->ftp_pasv = "Y";
|
||||
}
|
||||
|
||||
$oFTP = new ftp();
|
||||
if(!$oFTP->ftp_connect($ftp_info->ftp_host, $ftp_info->ftp_port))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@
|
|||
<description xml:lang="ru">Модуль для функционирования форума. Также включает в себя функции администратора такие как создание/управление форумами.</description>
|
||||
<description xml:lang="zh-TW">提供用戶相對應的討論板功能,包含建立/新增及管理等功能。</description>
|
||||
<description xml:lang="tr">Pano yapılandırmaları için kullanılan modüldür. Ayrıca oluşturma/yönetme gibi yönetici özellikleri de içerir.</description>
|
||||
<version>1.7.2-beta.3</version>
|
||||
<date>2014-01-09</date>
|
||||
<version>1.7.2</version>
|
||||
<date>2014-03-20</date>
|
||||
<category>service</category>
|
||||
|
||||
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
|
||||
|
|
|
|||
|
|
@ -340,6 +340,35 @@ class commentAdminController extends comment
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @fn procCommentAdminMoveToTrash
|
||||
* @brief move a comment to trash
|
||||
* @see commentModel::getCommentMenu
|
||||
*/
|
||||
function procCommentAdminMoveToTrash()
|
||||
{
|
||||
$oDB = DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
||||
$comment_srl = Context::get('comment_srl');
|
||||
$oCommentModel = getModel('comment');
|
||||
$oCommentController = getController('comment');
|
||||
$oComment = $oCommentModel->getComment($comment_srl, false);
|
||||
|
||||
if(!$oComment->isGranted()) return $this->stop('msg_not_permitted');
|
||||
|
||||
$message_content = "";
|
||||
$this->_moveCommentToTrash(array($comment_srl), $oCommentController, $oDB, $message_content);
|
||||
|
||||
$isTrash = true;
|
||||
$output = $oCommentController->deleteComment($comment_srl, TRUE, $isTrash);
|
||||
|
||||
$oDB->commit();
|
||||
|
||||
$returnUrl = Context::get('cur_url');
|
||||
$this->add('redirect_url', $returnUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancel the blacklist of abused comments reported by other users
|
||||
* @return void|object
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class commentAdminView extends comment
|
|||
// get a list by using comment->getCommentList.
|
||||
$oCommentModel = getModel('comment');
|
||||
$secretNameList = $oCommentModel->getSecretNameList();
|
||||
$columnList = array('comment_srl', 'document_srl', 'is_secret', 'status', 'content', 'comments.member_srl', 'comments.nick_name', 'comments.regdate', 'ipaddress', 'voted_count', 'blamed_count');
|
||||
$columnList = array('comment_srl', 'document_srl','module_srl','is_secret', 'status', 'content', 'comments.member_srl', 'comments.nick_name', 'comments.regdate', 'ipaddress', 'voted_count', 'blamed_count');
|
||||
$output = $oCommentModel->getTotalCommentList($args, $columnList);
|
||||
|
||||
// $modules = $oCommentModel->getDistinctModules();
|
||||
|
|
@ -66,6 +66,31 @@ class commentAdminView extends comment
|
|||
// Context::set('modules_list', $modules_list);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
Context::set('secret_name_list', $secretNameList);
|
||||
|
||||
$oModuleModel = getModel('module');
|
||||
$module_list = array();
|
||||
$mod_srls = array();
|
||||
foreach($output->data as $val)
|
||||
{
|
||||
$mod_srls[] = $val->module_srl;
|
||||
}
|
||||
$mod_srls = array_unique($mod_srls);
|
||||
// Module List
|
||||
$mod_srls_count = count($mod_srls);
|
||||
if($mod_srls_count)
|
||||
{
|
||||
$columnList = array('module_srl', 'mid', 'browser_title');
|
||||
$module_output = $oModuleModel->getModulesInfo($mod_srls, $columnList);
|
||||
if($module_output && is_array($module_output))
|
||||
{
|
||||
foreach($module_output as $module)
|
||||
{
|
||||
$module_list[$module->module_srl] = $module;
|
||||
}
|
||||
}
|
||||
}
|
||||
Context::set('module_list', $module_list);
|
||||
|
||||
// set the template
|
||||
$this->setTemplatePath($this->module_path . 'tpl');
|
||||
$this->setTemplateFile('comment_list');
|
||||
|
|
|
|||
|
|
@ -266,9 +266,13 @@ class commentController extends comment
|
|||
return new Object(-1, 'msg_invalid_request');
|
||||
}
|
||||
|
||||
if($obj->homepage && !preg_match('/^[a-z]+:\/\//i', $obj->homepage))
|
||||
if($obj->homepage)
|
||||
{
|
||||
$obj->homepage = 'http://' . $obj->homepage;
|
||||
$obj->homepage = removeHackTag($obj->homepage);
|
||||
if(!preg_match('/^[a-z]+:\/\//i',$obj->homepage))
|
||||
{
|
||||
$obj->homepage = 'http://'.$obj->homepage;
|
||||
}
|
||||
}
|
||||
|
||||
// input the member's information if logged-in
|
||||
|
|
@ -655,9 +659,13 @@ class commentController extends comment
|
|||
$obj->password = md5($obj->password);
|
||||
}
|
||||
|
||||
if($obj->homepage && !preg_match('/^[a-z]+:\/\//i', $obj->homepage))
|
||||
if($obj->homepage)
|
||||
{
|
||||
$obj->homepage = 'http://' . $obj->homepage;
|
||||
$obj->homepage = removeHackTag($obj->homepage);
|
||||
if(!preg_match('/^[a-z]+:\/\//i',$obj->homepage))
|
||||
{
|
||||
$obj->homepage = 'http://'.$obj->homepage;
|
||||
}
|
||||
}
|
||||
|
||||
// set modifier's information if logged-in and posting author and modifier are matched.
|
||||
|
|
@ -835,18 +843,27 @@ 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);
|
||||
}
|
||||
|
||||
if(!$isMoveToTrash)
|
||||
{
|
||||
$this->_deleteDeclaredComments($args);
|
||||
$this->_deleteVotedComments($args);
|
||||
}
|
||||
else
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->upload_target_srl = $comment_srl;
|
||||
$args->isvalid = 'N';
|
||||
$output = executeQuery('file.updateFileValid', $args);
|
||||
}
|
||||
|
||||
// commit
|
||||
|
|
|
|||
|
|
@ -76,6 +76,13 @@ class commentModel extends comment
|
|||
// call a trigger (after)
|
||||
ModuleHandler::triggerCall('comment.getCommentMenu', 'after', $menu_list);
|
||||
|
||||
if($this->grant->manager){
|
||||
$str_confirm = Context::getLang('confirm_move');
|
||||
$url = sprintf("if(!confirm('%s')) return; var params = new Array(); params['comment_srl']='%s'; params['mid']=current_mid;params['cur_url']=current_url; exec_xml('comment', 'procCommentAdminMoveToTrash', params)", $str_confirm, $comment_srl);
|
||||
$oCommentController->addCommentPopupMenu($url,'cmd_trash','','javascript');
|
||||
|
||||
}
|
||||
|
||||
// find a comment by IP matching if an administrator.
|
||||
if($logged_info->is_admin == 'Y')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
<permissions>
|
||||
<permission action="procCommentAdminAddCart" target="manager" />
|
||||
<permission action="procCommentGetList" target="manager" />
|
||||
<permission action="procCommentAdminMoveToTrash" target="manager" />
|
||||
</permissions>
|
||||
<actions>
|
||||
<action name="getCommentMenu" type="model" />
|
||||
|
|
@ -21,6 +22,7 @@
|
|||
<action name="procCommentAdminCancelDeclare" type="controller" />
|
||||
<action name="procCommentAdminAddCart" type="controller" />
|
||||
<action name="procCommentGetList" type="controller" />
|
||||
<action name="procCommentAdminMoveToTrash" type="controller" />
|
||||
</actions>
|
||||
<menus>
|
||||
<menu name="comment">
|
||||
|
|
|
|||
|
|
@ -47,7 +47,12 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
|||
<tbody>
|
||||
<tr loop="$comment_list => $no, $val">
|
||||
{@ $comment = $val->getContentText(200)}
|
||||
<td><a href="{getUrl('','document_srl',$val->document_srl)}#comment_{$val->comment_srl}" target="_blank"><!--@if(strlen($comment))-->{$comment}<!--@else--><em>{$lang->no_text_comment}</em><!--@end--></a></td>
|
||||
<td>
|
||||
<block cond="isset($module_list[$val->module_srl])">
|
||||
<a href="{getUrl('', 'mid', $module_list[$val->module_srl]->mid)}" target="_blank">{$module_list[$val->module_srl]->browser_title}</a> -
|
||||
</block>
|
||||
<a href="{getUrl('','document_srl',$val->document_srl)}#comment_{$val->comment_srl}" target="_blank"><!--@if(strlen($comment))-->{$comment}<!--@else--><em>{$lang->no_text_comment}</em><!--@end--></a>
|
||||
</td>
|
||||
<td class="nowr"><a href="#popup_menu_area" class="member_{$val->member_srl}">{$val->getNickName()}</a></td>
|
||||
<td class="nowr">{number_format($val->get('voted_count'))}/{number_format($val->get('blamed_count'))}</td>
|
||||
<td class="nowr">{(zdate($val->regdate,"Y-m-d\nH:i:s"))}</td>
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ class documentAdminView extends document
|
|||
|
||||
// get a list
|
||||
$oDocumentModel = getModel('document');
|
||||
$columnList = array('document_srl', 'title', 'member_srl', 'nick_name', 'readed_count', 'voted_count', 'blamed_count', 'regdate', 'ipaddress', 'status');
|
||||
$columnList = array('document_srl', 'module_srl', 'title', 'member_srl', 'nick_name', 'readed_count', 'voted_count', 'blamed_count', 'regdate', 'ipaddress', 'status');
|
||||
$output = $oDocumentModel->getDocumentList($args, false, true, $columnList);
|
||||
|
||||
// get Status name list
|
||||
|
|
@ -72,6 +72,30 @@ class documentAdminView extends document
|
|||
}
|
||||
Context::set('search_option', $search_option);
|
||||
|
||||
$oModuleModel = getModel('module');
|
||||
$module_list = array();
|
||||
$mod_srls = array();
|
||||
foreach($output->data as $oDocument)
|
||||
{
|
||||
$mod_srls[] = $oDocument->get('module_srl');
|
||||
}
|
||||
$mod_srls = array_unique($mod_srls);
|
||||
// Module List
|
||||
$mod_srls_count = count($mod_srls);
|
||||
if($mod_srls_count)
|
||||
{
|
||||
$columnList = array('module_srl', 'mid', 'browser_title');
|
||||
$module_output = $oModuleModel->getModulesInfo($mod_srls, $columnList);
|
||||
if($module_output && is_array($module_output))
|
||||
{
|
||||
foreach($module_output as $module)
|
||||
{
|
||||
$module_list[$module->module_srl] = $module;
|
||||
}
|
||||
}
|
||||
}
|
||||
Context::set('module_list', $module_list);
|
||||
|
||||
// Specify a template
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('document_list');
|
||||
|
|
|
|||
|
|
@ -398,7 +398,15 @@ class documentController extends document
|
|||
if(!$obj->commentStatus) $obj->commentStatus = 'DENY';
|
||||
if($obj->commentStatus == 'DENY') $this->_checkCommentStatusForOldVersion($obj);
|
||||
if($obj->allow_trackback!='Y') $obj->allow_trackback = 'N';
|
||||
if($obj->homepage && !preg_match('/^[a-z]+:\/\//i',$obj->homepage)) $obj->homepage = 'http://'.$obj->homepage;
|
||||
if($obj->homepage)
|
||||
{
|
||||
$obj->homepage = removeHackTag($obj->homepage);
|
||||
if(!preg_match('/^[a-z]+:\/\//i',$obj->homepage))
|
||||
{
|
||||
$obj->homepage = 'http://'.$obj->homepage;
|
||||
}
|
||||
}
|
||||
|
||||
if($obj->notify_message != 'Y') $obj->notify_message = 'N';
|
||||
|
||||
// can modify regdate only manager
|
||||
|
|
@ -810,9 +818,10 @@ class documentController extends document
|
|||
$document_srl = $oDocument->document_srl;
|
||||
$member_srl = $oDocument->get('member_srl');
|
||||
$logged_info = Context::get('logged_info');
|
||||
// Call a trigger when the read count is updated (after)
|
||||
$output = ModuleHandler::triggerCall('document.updateReadedCount', 'after', $oDocument);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// Call a trigger when the read count is updated (before)
|
||||
$trigger_output = ModuleHandler::triggerCall('document.updateReadedCount', 'before', $oDocument);
|
||||
if(!$trigger_output->toBool()) return $trigger_output;
|
||||
|
||||
// Pass if read count is increaded on the session information
|
||||
if($_SESSION['readed_document'][$document_srl]) return false;
|
||||
|
|
@ -829,11 +838,25 @@ class documentController extends document
|
|||
$_SESSION['readed_document'][$document_srl] = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
$oDB = DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
||||
// Update read counts
|
||||
$args = new stdClass;
|
||||
$args->document_srl = $document_srl;
|
||||
$output = executeQuery('document.updateReadedCount', $args);
|
||||
|
||||
// Call a trigger when the read count is updated (after)
|
||||
$outptrigger_outputut = ModuleHandler::triggerCall('document.updateReadedCount', 'after', $oDocument);
|
||||
if(!$trigger_output->toBool())
|
||||
{
|
||||
$oDB->rollback();
|
||||
return $trigger_output;
|
||||
}
|
||||
|
||||
$oDB->commit();
|
||||
|
||||
$oCacheHandler = CacheHandler::getInstance('object');
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -141,9 +141,8 @@ class documentItem extends Object
|
|||
$oDocumentModel = getModel('document');
|
||||
if($load_extra_vars)
|
||||
{
|
||||
$oDocumentModel->getDocumentExtraVarsFromDB($this->document_srl);
|
||||
$this->add('title', $this->get('title'));
|
||||
$this->add('content', $this->get('content'));
|
||||
$GLOBALS['XE_DOCUMENT_LIST'][$attribute->document_srl] = $this;
|
||||
$oDocumentModel->setToAllDocumentExtraVars();
|
||||
}
|
||||
$GLOBALS['XE_DOCUMENT_LIST'][$this->document_srl] = $this;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -520,6 +520,13 @@ class documentModel extends document
|
|||
$oDocumentController->addDocumentPopupMenu($url,'cmd_print','','printDocument');
|
||||
// Call a trigger (after)
|
||||
ModuleHandler::triggerCall('document.getDocumentMenu', 'after', $menu_list);
|
||||
if($this->grant->manager)
|
||||
{
|
||||
$str_confirm = Context::getLang('confirm_move');
|
||||
$url = sprintf("if(!confirm('%s')) return; var params = new Array(); params['document_srl']='%s'; params['mid']=current_mid;params['cur_url']=current_url; exec_xml('document', 'procDocumentAdminMoveToTrash', params)", $str_confirm, $document_srl);
|
||||
$oDocumentController->addDocumentPopupMenu($url,'cmd_trash','','javascript');
|
||||
}
|
||||
|
||||
// If you are managing to find posts by ip
|
||||
if($logged_info->is_admin == 'Y')
|
||||
{
|
||||
|
|
@ -528,10 +535,6 @@ class documentModel extends document
|
|||
|
||||
if($oDocument->isExists())
|
||||
{
|
||||
$str_confirm = Context::getLang('cmd_document_do') . Context::getLang('confirm_delete');
|
||||
$url = sprintf("if(!confirm('%s')) return; var params = new Array(); params['document_srl']='%s'; params['mid']=current_mid;params['cur_url']=current_url; exec_xml('document', 'procDocumentAdminMoveToTrash', params)", $str_confirm, $document_srl);
|
||||
$oDocumentController->addDocumentPopupMenu($url,'cmd_trash','','javascript');
|
||||
|
||||
// Find a post equivalent to ip address
|
||||
$url = getUrl('','module','admin','act','dispDocumentAdminList','search_target','ipaddress','search_keyword',$oDocument->getIpAddress());
|
||||
$oDocumentController->addDocumentPopupMenu($url,'cmd_search_by_ipaddress',$icon_path,'TraceByIpaddress');
|
||||
|
|
|
|||
|
|
@ -48,7 +48,11 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr loop="$document_list => $no, $oDocument">
|
||||
<td class="title"><a href="{getUrl('','document_srl',$oDocument->document_srl)}" target="_blank"><!--@if(trim($oDocument->getTitleText()))-->{htmlspecialchars($oDocument->getTitleText())}<!--@else--><em>{$lang->no_title_document}</em><!--@end--></a></td>
|
||||
<td class="title">
|
||||
<block cond="isset($module_list[$oDocument->get('module_srl')])">
|
||||
<a href="{getUrl('', 'mid', $module_list[$oDocument->get('module_srl')]->mid)}" target="_blank">{$module_list[$oDocument->get('module_srl')]->browser_title}</a> -
|
||||
</block>
|
||||
<a href="{getUrl('','document_srl',$oDocument->document_srl)}" target="_blank"><!--@if(trim($oDocument->getTitleText()))-->{htmlspecialchars($oDocument->getTitleText())}<!--@else--><em>{$lang->no_title_document}</em><!--@end--></a></td>
|
||||
<td class="nowr"><a href="#popup_menu_area" class="member_{$oDocument->get('member_srl')}">{$oDocument->getNickName()}</a></td>
|
||||
<td class="nowr">{$oDocument->get('readed_count')}</td>
|
||||
<td class="nowr">{$oDocument->get('voted_count')}/{$oDocument->get('blamed_count')}</td>
|
||||
|
|
|
|||
|
|
@ -122,6 +122,7 @@ class fileAdminController extends file
|
|||
|
||||
$download_grant = Context::get('download_grant');
|
||||
|
||||
$file_config = new stdClass;
|
||||
$file_config->allow_outlink = Context::get('allow_outlink');
|
||||
$file_config->allow_outlink_format = Context::get('allow_outlink_format');
|
||||
$file_config->allow_outlink_site = Context::get('allow_outlink_site');
|
||||
|
|
|
|||
|
|
@ -518,6 +518,8 @@ class fileController extends file
|
|||
$comment_srl = $obj->comment_srl;
|
||||
if(!$comment_srl) return new Object();
|
||||
|
||||
if($obj->isMoveToTrash) return new Object();
|
||||
|
||||
$output = $this->deleteFiles($comment_srl);
|
||||
return $output;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1009,6 +1009,7 @@ class importerAdminController extends importer
|
|||
$started = false;
|
||||
$buff = null;
|
||||
|
||||
$file_obj = new stdClass;
|
||||
while(!feof($fp))
|
||||
{
|
||||
$str = trim(fgets($fp, 1024));
|
||||
|
|
@ -1017,7 +1018,6 @@ class importerAdminController extends importer
|
|||
// If it starts with <attach>, collect attachments
|
||||
if(trim($str) == '<attach>')
|
||||
{
|
||||
$file_obj = new stdClass;
|
||||
$file_obj->file_srl = getNextSequence();
|
||||
$file_obj->upload_target_srl = $upload_target_srl;
|
||||
$file_obj->module_srl = $module_srl;
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
<include target="header.html" />
|
||||
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'moduels/integration_search/tpl/skin_info/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/integration_search/tpl/skin_info/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
|
||||
<form action="{Context::getRequestUri()}" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="module" value="integration_search" />
|
||||
<input type="hidden" name="act" value="procIntegration_searchAdminInsertSkin" />
|
||||
<input type="hidden" name="xe_validator_id" value="moduels/integration_search/tpl/skin_info/1" />
|
||||
<input type="hidden" name="xe_validator_id" value="modules/integration_search/tpl/skin_info/1" />
|
||||
<section class="section">
|
||||
<h1>{$lang->skin_default_info}</h1>
|
||||
|
||||
|
|
|
|||
|
|
@ -262,15 +262,8 @@ class layoutAdminController extends layout
|
|||
$oLayoutModel = getModel('layout');
|
||||
$cache_file = $oLayoutModel->getUserLayoutCache($args->layout_srl, Context::getLangType());
|
||||
FileHandler::removeFile($cache_file);
|
||||
//remove from cache
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$object_key = 'layout:' . $args->layout_srl;
|
||||
$cache_key = $oCacheHandler->getGroupKey('site_and_module', $object_key);
|
||||
$oCacheHandler->delete($cache_key);
|
||||
}
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -336,14 +329,7 @@ class layoutAdminController extends layout
|
|||
$args = new stdClass();
|
||||
$args->layout_srl = $layout_srl;
|
||||
$output = executeQuery("layout.deleteLayout", $args);
|
||||
//remove from cache
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$object_key = 'layout:'.$layout_srl;
|
||||
$cache_key = $oCacheHandler->getGroupKey('site_and_module', $object_key);
|
||||
$oCacheHandler->delete($cache_key);
|
||||
}
|
||||
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
return new Object(0,'success_deleted');
|
||||
|
|
|
|||
|
|
@ -86,8 +86,6 @@ class layout extends ModuleObject
|
|||
$oDB->addColumn('layouts','layout_type','char',1,'P',true);
|
||||
}
|
||||
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
|
||||
$args->layout = '.';
|
||||
$output = executeQueryArray('layout.getLayoutDotList', $args);
|
||||
if($output->data && count($output->data) > 0)
|
||||
|
|
@ -101,13 +99,6 @@ class layout extends ModuleObject
|
|||
$args->layout = implode('|@|', $layout_path);
|
||||
$args->layout_srl = $layout->layout_srl;
|
||||
$output = executeQuery('layout.updateLayout', $args);
|
||||
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$object_key = 'layout:' . $args->layout_srl;
|
||||
$cache_key = $oCacheHandler->getGroupKey('site_and_module', $object_key);
|
||||
$oCacheHandler->delete($cache_key);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -258,31 +258,15 @@ class layoutModel extends layout
|
|||
*/
|
||||
function getLayout($layout_srl)
|
||||
{
|
||||
$layout_info = false;
|
||||
// Get information from the DB
|
||||
$args = new stdClass();
|
||||
$args->layout_srl = $layout_srl;
|
||||
$output = executeQuery('layout.getLayout', $args);
|
||||
if(!$output->data) return;
|
||||
|
||||
// cache controll
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$object_key = 'layout:' . $layout_srl;
|
||||
$cache_key = $oCacheHandler->getGroupKey('site_and_module', $object_key);
|
||||
$layout_info = $oCacheHandler->get($cache_key);
|
||||
}
|
||||
// Return xml file informaton after listing up the layout and extra_vars
|
||||
$layout_info = $this->getLayoutInfo($layout, $output->data, $output->data->layout_type);
|
||||
|
||||
if($layout_info === false)
|
||||
{
|
||||
// Get information from the DB
|
||||
$args = new stdClass();
|
||||
$args->layout_srl = $layout_srl;
|
||||
$output = executeQuery('layout.getLayout', $args);
|
||||
if(!$output->data) return;
|
||||
|
||||
// Return xml file informaton after listing up the layout and extra_vars
|
||||
$layout_info = $this->getLayoutInfo($layout, $output->data, $output->data->layout_type);
|
||||
|
||||
//insert in cache
|
||||
if($oCacheHandler->isSupport()) $oCacheHandler->put($cache_key, $layout_info);
|
||||
}
|
||||
return $layout_info;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
<li>
|
||||
<label for="question">{$lang->find_account_question}</label>
|
||||
<select id="question" name="find_account_question" style="width:290px;display:block;">
|
||||
<!--@for($i=1,$c=count($lang->find_account_question_items);$i<$c;$i++)-->
|
||||
<!--@for($i=1,$c=count($lang->find_account_question_items);$i<=$c;$i++)-->
|
||||
<option value="{$i}">{$lang->find_account_question_items[$i]}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -230,7 +230,8 @@ class memberController extends member
|
|||
}
|
||||
// Check if duplicated
|
||||
$member_srl = $oMemberModel->getMemberSrlByNickName($value);
|
||||
if($member_srl && $logged_info->member_srl != $member_srl ) return new Object(0,'msg_exists_nick_name');
|
||||
$member_srl_by_decode = $oMemberModel->getMemberSrlByNickName(utf8_decode($value));
|
||||
if(($member_srl && $logged_info->member_srl != $member_srl ) || ($member_srl_by_decode && $logged_info->member_srl != $member_srl_by_decode )) return new Object(0,'msg_exists_nick_name');
|
||||
|
||||
break;
|
||||
case 'email_address' :
|
||||
|
|
@ -1957,7 +1958,8 @@ class memberController extends member
|
|||
return new Object(-1,'denied_nick_name');
|
||||
}
|
||||
$member_srl = $oMemberModel->getMemberSrlByNickName($args->nick_name);
|
||||
if($member_srl) return new Object(-1,'msg_exists_nick_name');
|
||||
$member_srl_by_decode = $oMemberModel->getMemberSrlByNickName(utf8_decode($args->nick_name));
|
||||
if($member_srl || $member_srl_by_decode) return new Object(-1,'msg_exists_nick_name');
|
||||
|
||||
$member_srl = $oMemberModel->getMemberSrlByEmailAddress($args->email_address);
|
||||
if($member_srl) return new Object(-1,'msg_exists_email_address');
|
||||
|
|
@ -2113,6 +2115,10 @@ class memberController extends member
|
|||
{
|
||||
return new Object(-1, 'denied_nick_name');
|
||||
}
|
||||
|
||||
$member_srl = $oMemberModel->getMemberSrlByNickName($args->nick_name);
|
||||
$member_srl_by_decode = $oMemberModel->getMemberSrlByNickName(utf8_decode($args->nick_name));
|
||||
if(($member_srl || $member_srl_by_decode) && $orgMemberInfo->nick_name != $args->nick_name) return new Object(-1,'msg_exists_nick_name');
|
||||
|
||||
list($args->email_id, $args->email_host) = explode('@', $args->email_address);
|
||||
// Website, blog, checks the address
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/member/skin/default/find_member_account/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form action="/" method="get" ruleset="findAccount">
|
||||
<form action="{getUrl('')}" method="get" ruleset="findAccount">
|
||||
<input type="hidden" name="mid" value="{$mid}" />
|
||||
<input type="hidden" name="act" value="procMemberFindAccount" />
|
||||
<input type="hidden" name="document_srl" value="{$document_srl}" />
|
||||
|
|
|
|||
|
|
@ -402,6 +402,9 @@ class moduleModel extends module
|
|||
}
|
||||
else $module_info = $mid_info;
|
||||
|
||||
$oModuleController = getController('module');
|
||||
if(isset($module_info->browser_title)) $oModuleController->replaceDefinedLangCode($module_info->browser_title);
|
||||
|
||||
return $this->addModuleExtraVars($module_info);
|
||||
}
|
||||
|
||||
|
|
@ -782,6 +785,7 @@ class moduleModel extends module
|
|||
if(!$module_info->category) $module_info->category = 'service';
|
||||
sscanf($xml_obj->author->attrs->date, '%d. %d. %d', $date_obj->y, $date_obj->m, $date_obj->d);
|
||||
$module_info->date = sprintf('%04d%02d%02d', $date_obj->y, $date_obj->m, $date_obj->d);
|
||||
$author_obj = new stdClass();
|
||||
$author_obj->name = $xml_obj->author->name->body;
|
||||
$author_obj->email_address = $xml_obj->author->attrs->email_address;
|
||||
$author_obj->homepage = $xml_obj->author->attrs->link;
|
||||
|
|
@ -1498,6 +1502,7 @@ class moduleModel extends module
|
|||
$info = $this->getModuleInfoXml($module_name);
|
||||
unset($obj);
|
||||
|
||||
if(!isset($info)) continue;
|
||||
$info->module = $module_name;
|
||||
$info->created_table_count = $created_table_count;
|
||||
$info->table_count = $table_count;
|
||||
|
|
|
|||
|
|
@ -6,117 +6,117 @@
|
|||
|
||||
/* 모듈 생성 후 */
|
||||
function completeInsertPage(ret_obj) {
|
||||
var error = ret_obj['error'];
|
||||
var message = ret_obj['message'];
|
||||
var error = ret_obj['error'];
|
||||
var message = ret_obj['message'];
|
||||
|
||||
var page = ret_obj['page'];
|
||||
var module_srl = ret_obj['module_srl'];
|
||||
var page = ret_obj['page'];
|
||||
var module_srl = ret_obj['module_srl'];
|
||||
|
||||
alert(message);
|
||||
alert(message);
|
||||
|
||||
var url = '';
|
||||
if(location.href.getQuery('module')=='admin') {
|
||||
url = current_url.setQuery('module_srl',module_srl).setQuery('act','dispPageAdminInfo');
|
||||
if(page) url = url.setQuery('page',page);
|
||||
} else {
|
||||
url = current_url;
|
||||
}
|
||||
var url = '';
|
||||
if(location.href.getQuery('module')=='admin') {
|
||||
url = current_url.setQuery('module_srl',module_srl).setQuery('act','dispPageAdminInfo');
|
||||
if(page) url = url.setQuery('page',page);
|
||||
} else {
|
||||
url = current_url;
|
||||
}
|
||||
|
||||
location.href = url;
|
||||
location.href = url;
|
||||
}
|
||||
|
||||
function completeArticleDocumentInserted(ret_obj){
|
||||
var error = ret_obj['error'];
|
||||
var message = ret_obj['message'];
|
||||
var error = ret_obj['error'];
|
||||
var message = ret_obj['message'];
|
||||
|
||||
var mid = ret_obj['mid'];
|
||||
var mid = ret_obj['mid'];
|
||||
var is_mobile = ret_obj['is_mobile'];
|
||||
|
||||
alert(message);
|
||||
alert(message);
|
||||
|
||||
var url = '';
|
||||
var url = '';
|
||||
|
||||
if(is_mobile == 'Y')
|
||||
url = current_url.setQuery('act', 'dispPageAdminMobileContent').setQuery('mid', mid);
|
||||
url = current_url.setQuery('act', 'dispPageAdminMobileContent').setQuery('mid', mid);
|
||||
else
|
||||
url = current_url.setQuery('act', 'dispPageIndex').setQuery('mid', mid);
|
||||
url = current_url.setQuery('act', 'dispPageIndex').setQuery('mid', mid);
|
||||
|
||||
|
||||
location.href = url;
|
||||
location.href = url;
|
||||
}
|
||||
|
||||
/* 내용 저장 후 */
|
||||
function completeInsertPageContent(ret_obj) {
|
||||
var error = ret_obj['error'];
|
||||
var message = ret_obj['message'];
|
||||
var error = ret_obj['error'];
|
||||
var message = ret_obj['message'];
|
||||
|
||||
var page = ret_obj['page'];
|
||||
var module_srl = ret_obj['module_srl'];
|
||||
var mid = ret_obj['mid'];
|
||||
var page = ret_obj['page'];
|
||||
var module_srl = ret_obj['module_srl'];
|
||||
var mid = ret_obj['mid'];
|
||||
|
||||
location.href = current_url.setQuery('mid',mid).setQuery('act','');
|
||||
location.href = current_url.setQuery('mid',mid).setQuery('act','');
|
||||
}
|
||||
|
||||
function completeInsertMobilePageContent(ret_obj) {
|
||||
var error = ret_obj['error'];
|
||||
var message = ret_obj['message'];
|
||||
var error = ret_obj['error'];
|
||||
var message = ret_obj['message'];
|
||||
|
||||
var page = ret_obj['page'];
|
||||
var module_srl = ret_obj['module_srl'];
|
||||
var mid = ret_obj['mid'];
|
||||
var page = ret_obj['page'];
|
||||
var module_srl = ret_obj['module_srl'];
|
||||
var mid = ret_obj['mid'];
|
||||
|
||||
location.href = current_url.setQuery('mid',mid).setQuery('act','dispPageAdminMobileContent');
|
||||
location.href = current_url.setQuery('mid',mid).setQuery('act','dispPageAdminMobileContent');
|
||||
}
|
||||
|
||||
/* 수정한 페이지 컨텐츠를 저장 */
|
||||
function doSubmitPageContent(fo_obj) {
|
||||
var html = getWidgetContent();
|
||||
fo_obj.content.value = html;
|
||||
return procFilter(fo_obj, insert_page_content);
|
||||
var html = getWidgetContent();
|
||||
fo_obj.content.value = html;
|
||||
return procFilter(fo_obj, insert_page_content);
|
||||
}
|
||||
|
||||
function doSubmitMPageContent(fo_obj) {
|
||||
var html = getWidgetContent();
|
||||
fo_obj.content.value = html;
|
||||
return procFilter(fo_obj, insert_mpage_content);
|
||||
var html = getWidgetContent();
|
||||
fo_obj.content.value = html;
|
||||
return procFilter(fo_obj, insert_mpage_content);
|
||||
}
|
||||
|
||||
/* 모듈 삭제 후 */
|
||||
function completeDeletePage(ret_obj) {
|
||||
var error = ret_obj['error'];
|
||||
var message = ret_obj['message'];
|
||||
var page = ret_obj['page'];
|
||||
alert(message);
|
||||
var error = ret_obj['error'];
|
||||
var message = ret_obj['message'];
|
||||
var page = ret_obj['page'];
|
||||
alert(message);
|
||||
|
||||
var url = current_url.setQuery('act','dispPageAdminContent').setQuery('module_srl','');
|
||||
if(page) url = url.setQuery('page',page);
|
||||
var url = current_url.setQuery('act','dispPageAdminContent').setQuery('module_srl','');
|
||||
if(page) url = url.setQuery('page',page);
|
||||
|
||||
location.href = url;
|
||||
location.href = url;
|
||||
}
|
||||
|
||||
/* 위젯 재컴파일 */
|
||||
function doRemoveWidgetCache(module_srl) {
|
||||
var params = new Array();
|
||||
params["module_srl"] = module_srl;
|
||||
exec_xml('page', 'procPageAdminRemoveWidgetCache', params, completeRemoveWidgetCache);
|
||||
var params = new Array();
|
||||
params["module_srl"] = module_srl;
|
||||
exec_xml('page', 'procPageAdminRemoveWidgetCache', params, completeRemoveWidgetCache);
|
||||
}
|
||||
|
||||
function completeRemoveWidgetCache(ret_obj) {
|
||||
var message = ret_obj['message'];
|
||||
location.reload();
|
||||
var message = ret_obj['message'];
|
||||
location.reload();
|
||||
}
|
||||
|
||||
/* 일괄 설정 */
|
||||
function doCartSetup(url) {
|
||||
var module_srl = new Array();
|
||||
jQuery('#fo_list input[name=cart]:checked').each(function() {
|
||||
module_srl[module_srl.length] = jQuery(this).val();
|
||||
});
|
||||
var module_srl = new Array();
|
||||
jQuery('#fo_list input[name=cart]:checked').each(function() {
|
||||
module_srl[module_srl.length] = jQuery(this).val();
|
||||
});
|
||||
|
||||
if(module_srl.length<1) return;
|
||||
if(module_srl.length<1) return;
|
||||
|
||||
url += "&module_srls="+module_srl.join(',');
|
||||
popopen(url,'modulesSetup');
|
||||
url += "&module_srls="+module_srl.join(',');
|
||||
popopen(url,'modulesSetup');
|
||||
}
|
||||
|
||||
jQuery(function($){
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ class pollModel extends poll
|
|||
$poll->poll_count = (int)$output->data->poll_count;
|
||||
$poll->stop_date = $output->data->stop_date;
|
||||
|
||||
$columnList = array('poll_index_srl', 'checkcount', 'poll_count');
|
||||
$columnList = array('poll_index_srl', 'title', 'checkcount', 'poll_count');
|
||||
$output = executeQuery('poll.getPollTitle', $args, $columnList);
|
||||
if(!$output->data) return;
|
||||
if(!is_array($output->data)) $output->data = array($output->data);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ class TrashVO
|
|||
var $title;
|
||||
var $originModule;
|
||||
var $serializedObject;
|
||||
var $unserializedObject;
|
||||
var $description;
|
||||
var $ipaddress;
|
||||
var $removerSrl;
|
||||
|
|
@ -47,6 +48,14 @@ class TrashVO
|
|||
{
|
||||
$this->serializedObject = $serializedObject;
|
||||
}
|
||||
function getUnserializedObject()
|
||||
{
|
||||
return $this->unserializedObject;
|
||||
}
|
||||
function setUnserializedObject($serializedObject)
|
||||
{
|
||||
$this->unserializedObject = unserialize($serializedObject);
|
||||
}
|
||||
function getDescription()
|
||||
{
|
||||
return htmlspecialchars($this->description, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
|
||||
|
|
|
|||
|
|
@ -41,7 +41,12 @@ var no_text_comment = '{$lang->no_text_comment}';
|
|||
<tr loop="$trash_list => $no, $oTrashVO">
|
||||
<td class="title">
|
||||
<strong cond="!trim($oTrashVO->getTitle()) && $oTrashVO->getOriginModule() == 'comment'">{$lang->no_text_comment}</strong>
|
||||
<block cond="trim($oTrashVO->getTitle())"><a href="{getUrl('act','dispTrashAdminView','trash_srl',$oTrashVO->getTrashSrl())}">{$oTrashVO->getTitle()}</a></block>
|
||||
<block cond="trim($oTrashVO->getTitle())">
|
||||
<block cond="isset($module_list[$oTrashVO->unserializedObject['module_srl']])">
|
||||
<a href="{getUrl('', 'mid', $module_list[$oTrashVO->unserializedObject['module_srl']]->mid)}" target="_blank">{$module_list[$oTrashVO->unserializedObject['module_srl']]->browser_title}</a> -
|
||||
</block>
|
||||
<a href="{getUrl('act','dispTrashAdminView','trash_srl',$oTrashVO->getTrashSrl())}">{$oTrashVO->getTitle()}</a>
|
||||
</block>
|
||||
</td>
|
||||
<td class="nowr"><!--@if($oTrashVO->getOriginModule() == 'document')-->{$lang->document}<!--@else-->{$lang->comment}<!--@end--></td>
|
||||
<td class="nowr"><a href="#popup_menu_area" class="member_{$oTrashVO->getRemoverSrl()}">{$oTrashVO->getNickName()}</a></td>
|
||||
|
|
|
|||
|
|
@ -48,6 +48,31 @@ class trashAdminView extends trash
|
|||
Context::set('page', $output->page);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
|
||||
$oModuleModel = getModel('module');
|
||||
$module_list = array();
|
||||
$mod_srls = array();
|
||||
foreach($output->data as $oTrashVO)
|
||||
{
|
||||
$mod_srls[] = $oTrashVO->unserializedObject['module_srl'];
|
||||
}
|
||||
$mod_srls = array_unique($mod_srls);
|
||||
// Module List
|
||||
$mod_srls_count = count($mod_srls);
|
||||
if($mod_srls_count)
|
||||
{
|
||||
$columnList = array('module_srl', 'mid', 'browser_title');
|
||||
$module_output = $oModuleModel->getModulesInfo($mod_srls, $columnList);
|
||||
if($module_output && is_array($module_output))
|
||||
{
|
||||
foreach($module_output as $module)
|
||||
{
|
||||
$module_list[$module->module_srl] = $module;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Context::set('module_list', $module_list);
|
||||
|
||||
// 템플릿 파일 지정
|
||||
$this->setTemplateFile('trash_list');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ class trashModel extends trash
|
|||
$oTrashVO->setTitle($stdObject->title);
|
||||
$oTrashVO->setOriginModule($stdObject->origin_module);
|
||||
$oTrashVO->setSerializedObject($stdObject->serialized_object);
|
||||
$oTrashVO->setUnserializedObject($stdObject->serialized_object);
|
||||
$oTrashVO->setDescription($stdObject->description);
|
||||
$oTrashVO->setIpaddress($stdObject->ipaddress);
|
||||
$oTrashVO->setRemoverSrl($stdObject->remover_srl);
|
||||
|
|
|
|||
|
|
@ -443,6 +443,17 @@ Sin la necesidad de utilizar los módulos de página o del diseño de XE, Usted
|
|||
<value xml:lang="tr"><![CDATA[Widget Boyutu]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Kích thước]]></value>
|
||||
</item>
|
||||
<item name="cmd_widget_css_class">
|
||||
<value xml:lang="ko"><![CDATA[위젯 CSS class]]></value>
|
||||
<value xml:lang="en"><![CDATA[위젯 CSS class]]></value>
|
||||
<value xml:lang="jp"><![CDATA[위젯 CSS class]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[위젯 CSS class]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[위젯 CSS class]]></value>
|
||||
<value xml:lang="fr"><![CDATA[위젯 CSS class]]></value>
|
||||
<value xml:lang="es"><![CDATA[위젯 CSS class]]></value>
|
||||
<value xml:lang="tr"><![CDATA[위젯 CSS class]]></value>
|
||||
<value xml:lang="vi"><![CDATA[위젯 CSS class]]></value>
|
||||
</item>
|
||||
<item name="cmd_widget_align">
|
||||
<value xml:lang="ko"><![CDATA[위젯 정렬]]></value>
|
||||
<value xml:lang="en"><![CDATA[Align Widget]]></value>
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@
|
|||
height: 14px;
|
||||
border: 0;
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
background: transparent url("../../../admin/tpl/img/glyphicons-halflings.png") no-repeat;
|
||||
}
|
||||
.widgetButtons .widgetSetup {
|
||||
|
|
|
|||
2
modules/widget/tpl/js/generate_code.min.js
vendored
2
modules/widget/tpl/js/generate_code.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -193,9 +193,9 @@ function doSyncPageContent() {
|
|||
fo_obj.widget_padding_top.value = getPadding(sel_obj,'top');
|
||||
|
||||
var obj = sel_obj.firstChild;
|
||||
while(obj && obj.className != "widgetContent") obj = obj.nextSibling;
|
||||
while(obj && !jQuery(obj).hasClass("widgetContent")) obj = obj.nextSibling;
|
||||
|
||||
if(obj && obj.className == "widgetContent") {
|
||||
if(obj && jQuery(obj).hasClass("widgetContent")) {
|
||||
if(!fo_obj.document_srl || fo_obj.document_srl.value == '0') {
|
||||
try {
|
||||
var content = Base64.decode(xInnerHtml(obj));
|
||||
|
|
@ -412,6 +412,7 @@ function doAddWidgetCode(widget_code) {
|
|||
function doCheckWidget(e) {
|
||||
var evt = new xEvent(e); if(!evt.target) return;
|
||||
var obj = evt.target;
|
||||
var $obj = jQuery(obj);
|
||||
|
||||
selectedWidget = null;
|
||||
|
||||
|
|
@ -423,7 +424,7 @@ function doCheckWidget(e) {
|
|||
|
||||
doHideWidgetSizeSetup();
|
||||
// 위젯 설정
|
||||
if(obj.className == 'widgetSetup') {
|
||||
if($obj.hasClass('widgetSetup')) {
|
||||
var p_obj = obj.parentNode.parentNode;
|
||||
var widget = p_obj.getAttribute("widget");
|
||||
if(!widget) return;
|
||||
|
|
@ -433,7 +434,7 @@ function doCheckWidget(e) {
|
|||
return;
|
||||
|
||||
// 위젯 스타일
|
||||
} else if(obj.className == 'widgetStyle') {
|
||||
} else if($obj.hasClass('widgetStyle')) {
|
||||
/*jshint -W004*/
|
||||
var p_obj = obj.parentNode.parentNode;
|
||||
var widget = p_obj.getAttribute("widget");
|
||||
|
|
@ -444,7 +445,7 @@ function doCheckWidget(e) {
|
|||
return;
|
||||
|
||||
// 위젯 복사
|
||||
} else if(obj.className == 'widgetCopy' && obj.parentNode.parentNode.className == 'widgetOutput') {
|
||||
} else if($obj.hasClass('widgetCopy') && jQuery(obj.parentNode.parentNode).hasClass('widgetOutput')) {
|
||||
/*jshint -W004*/
|
||||
var p_obj = obj.parentNode.parentNode;
|
||||
restoreWidgetButtons();
|
||||
|
|
@ -460,7 +461,7 @@ function doCheckWidget(e) {
|
|||
xInnerHtml(dummy,xInnerHtml(p_obj));
|
||||
|
||||
dummy.widget_sequence = '';
|
||||
dummy.className = "widgetOutput";
|
||||
jQuery(dummy).hasClass("widgetOutput");
|
||||
for(var i=0;i<p_obj.attributes.length;i++) {
|
||||
if(!p_obj.attributes[i].nodeName || !p_obj.attributes[i].nodeValue) continue;
|
||||
var name = p_obj.attributes[i].nodeName.toLowerCase();
|
||||
|
|
@ -479,7 +480,7 @@ function doCheckWidget(e) {
|
|||
return;
|
||||
|
||||
// 위젯 사이트/ 여백 조절
|
||||
} else if(obj.className == 'widgetSize' || obj.className == 'widgetBoxSize') {
|
||||
} else if($obj.hasClass('widgetSize') || $obj.hasClass('widgetBoxSize')) {
|
||||
var p_obj = obj.parentNode.parentNode;
|
||||
var widget = p_obj.getAttribute("widget");
|
||||
if(!widget) return;
|
||||
|
|
@ -488,7 +489,7 @@ function doCheckWidget(e) {
|
|||
return;
|
||||
|
||||
// 위젯 제거
|
||||
} else if(obj.className == 'widgetRemove' || obj.className == 'widgetBoxRemove') {
|
||||
} else if($obj.hasClass('widgetRemove') || $obj.hasClass('widgetBoxRemove')) {
|
||||
var p_obj = obj.parentNode.parentNode;
|
||||
var widget = p_obj.getAttribute("widget");
|
||||
if(confirm(confirm_delete_msg)) {
|
||||
|
|
@ -501,7 +502,7 @@ function doCheckWidget(e) {
|
|||
// 내용 클릭 무효화
|
||||
var p_obj = obj;
|
||||
while(p_obj) {
|
||||
if(p_obj.className == 'widgetOutput') {
|
||||
if(jQuery(p_obj).hasClass('widgetOutput')) {
|
||||
evt.cancelBubble = true;
|
||||
evt.returnValue = false;
|
||||
xPreventDefault(e);
|
||||
|
|
@ -520,7 +521,7 @@ function completeCopyWidgetContent(ret_obj, response_tags, params, p_obj) {
|
|||
|
||||
|
||||
dummy.widget_sequence = '';
|
||||
dummy.className = "widgetOutput";
|
||||
jQuery(dummy).hasClass("widgetOutput");
|
||||
for(var i=0;i<p_obj.attributes.length;i++) {
|
||||
if(!p_obj.attributes[i].nodeName || !p_obj.attributes[i].nodeValue) continue;
|
||||
var name = p_obj.attributes[i].nodeName.toLowerCase();
|
||||
|
|
@ -549,16 +550,18 @@ function completeDeleteWidgetContent(ret_obj, response_tags, params, p_obj) {
|
|||
function doCheckWidgetDrag(e) {
|
||||
var evt = new xEvent(e); if(!evt.target) return;
|
||||
var obj = evt.target;
|
||||
var $obj = jQuery(obj);
|
||||
|
||||
if(jQuery(obj).parents('#pageSizeLayer').size() > 0) return;
|
||||
|
||||
doHideWidgetSizeSetup();
|
||||
|
||||
if(obj.className == 'widgetSetup' || obj.className == 'widgetStyle' || obj.className == 'widgetCopy' || obj.className == 'widgetBoxCopy' || obj.className == 'widgetSize' || obj.className == 'widgetBoxSize' || obj.className == 'widgetRemove' || obj.className == 'widgetBoxRemove') return;
|
||||
if($obj.hasClass('widgetSetup') || $obj.hasClass('widgetStyle') || $obj.hasClass('widgetCopy') || $obj.hasClass('widgetBoxCopy') || $obj.hasClass('widgetSize') || $obj.hasClass('widgetBoxSize') || $obj.hasClass('widgetRemove') || $obj.hasClass('widgetBoxRemove')) return;
|
||||
|
||||
p_obj = obj;
|
||||
var $p_obj = jQuery(obj);
|
||||
while(p_obj) {
|
||||
if(p_obj.className == 'widgetOutput' || p_obj.className == 'widgetResize' || p_obj.className == 'widgetResizeLeft' || p_obj.className == 'widgetBoxResize' || p_obj.className == 'widgetBoxResizeLeft') {
|
||||
if($p_obj.hasClass('widgetOutput') || $p_obj.hasClass('widgetResize') || $p_obj.hasClass('widgetResizeLeft') || $p_obj.hasClass('widgetBoxResize') || $p_obj.hasClass('widgetBoxResizeLeft')) {
|
||||
widgetDragEnable(p_obj, widgetDragStart, widgetDrag, widgetDragEnd);
|
||||
widgetMouseDown(e);
|
||||
return;
|
||||
|
|
@ -585,12 +588,14 @@ function doShowWidgetSizeSetup(px, py, obj) {
|
|||
if (!form.length) return;
|
||||
|
||||
selectedSizeWidget = obj[0];
|
||||
var $selectedSizeWidget = jQuery(selectedSizeWidget);
|
||||
|
||||
var opts = {
|
||||
widget_align : obj.css('float'),
|
||||
|
||||
width : obj[0].style.width,
|
||||
height : obj[0].style.height,
|
||||
css_class : ($selectedSizeWidget.attr('css_class')) ? $selectedSizeWidget.attr('css_class') : '',
|
||||
width : obj[0].style.width,
|
||||
height : obj[0].style.height,
|
||||
|
||||
padding_left : _getInt(obj.attr('widget_padding_left')),
|
||||
padding_right : _getInt(obj.attr('widget_padding_right')),
|
||||
|
|
@ -740,6 +745,12 @@ function doApplyWidgetSize(fo_obj) {
|
|||
if(fo_obj.widget_align.selectedIndex == 1) setFloat(selectedSizeWidget, 'right');
|
||||
else setFloat(selectedSizeWidget, 'left');
|
||||
|
||||
var $form = jQuery(fo_obj);
|
||||
var $selectedSizeWidget = jQuery(selectedSizeWidget);
|
||||
|
||||
var css_class = $form.find('#css_class').val();
|
||||
if(css_class) $selectedSizeWidget.attr('css_class', css_class);
|
||||
|
||||
var width = _getSize(fo_obj.width.value);
|
||||
if(width) selectedSizeWidget.style.width = width;
|
||||
|
||||
|
|
@ -781,8 +792,9 @@ function doApplyWidgetSize(fo_obj) {
|
|||
selectedSizeWidget.style.backgroundPosition = fo_obj.background_x.value+' '+fo_obj.background_y.value;
|
||||
|
||||
var borderObj = selectedSizeWidget.firstChild;
|
||||
var $borderObj = jQuery(selectedSizeWidget.firstChild);
|
||||
while(borderObj) {
|
||||
if(borderObj.nodeName == "DIV" && (borderObj.className == "widgetBorder" || borderObj.className == "widgetBoxBorder")) {
|
||||
if(borderObj.nodeName == "DIV" && ($borderObj.hasClass("widgetBorder") || $borderObj.hasClass("widgetBoxBorder"))) {
|
||||
var contentObj = borderObj.firstChild;
|
||||
while(contentObj) {
|
||||
if(contentObj.nodeName == "DIV") {
|
||||
|
|
@ -974,7 +986,8 @@ function widgetDragEnable(obj, funcDragStart, funcDrag, funcDragEnd) {
|
|||
|
||||
// 드래그를 시작할때 호출되는 함수 (이동되는 형태를 보여주기 위한 작업을 함)
|
||||
function widgetDragStart(tobj, px, py) {
|
||||
if(tobj.className == 'widgetResize' || tobj.className == 'widgetResizeLeft' || tobj.className == 'widgetBoxResize' || tobj.className == 'widgetBoxResizeLeft') return;
|
||||
var $tobj = jQuery(tobj);
|
||||
if($tobj.hasClass('widgetResize') || $tobj.hasClass('widgetResizeLeft') || $tobj.hasClass('widgetBoxResize') || $tobj.hasClass('widgetBoxResizeLeft')) return;
|
||||
var obj = widgetGetTmpObject(tobj);
|
||||
|
||||
xInnerHtml(obj, xInnerHtml(tobj));
|
||||
|
|
|
|||
|
|
@ -9,6 +9,12 @@
|
|||
<col width="140" />
|
||||
<col />
|
||||
<col />
|
||||
<tr>
|
||||
<th>{$lang->cmd_widget_css_class}</th>
|
||||
<td colspan="2">
|
||||
<input type="text" name="css_class" id="css_class" value=""style="width:200px" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang->cmd_widget_align}</th>
|
||||
<td colspan="2">
|
||||
|
|
|
|||
|
|
@ -486,20 +486,20 @@ class widgetController extends widget
|
|||
$oEditorController = getController('editor');
|
||||
$body = $oEditorController->transComponent($body);
|
||||
|
||||
$widget_content_header = sprintf('<div %sstyle="overflow:hidden;%s"><div style="%s">', $args->id, $style, $inner_style);
|
||||
$widget_content_header = sprintf('<div class="xe-widget-wrapper ' . $args->css_class . '" %sstyle="%s"><div style="%s">', $args->id, $style, $inner_style);
|
||||
$widget_content_body = $body;
|
||||
$widget_content_footer = '</div></div>';
|
||||
|
||||
break;
|
||||
// If the widget box; it could
|
||||
case 'widgetBox' :
|
||||
$widget_content_header = sprintf('<div %sstyle="overflow:hidden;%s;"><div style="%s"><div>', $args->id, $style, $inner_style);
|
||||
$widget_content_header = sprintf('<div class="xe-widget-wrapper ' . $args->css_class . '" %sstyle="%s;"><div style="%s"><div>', $args->id, $style, $inner_style);
|
||||
$widget_content_body = $widgetbox_content;
|
||||
|
||||
break;
|
||||
// If the General wijetil
|
||||
default :
|
||||
$widget_content_header = sprintf('<div %sstyle="overflow:hidden;%s">',$args->id,$style);
|
||||
$widget_content_header = sprintf('<div class="xe-widget-wrapper ' . $args->css_class . '" %sstyle="%s">',$args->id,$style);
|
||||
$widget_content_body = sprintf('<div style="*zoom:1;%s">%s</div>', $inner_style,$widget_content);
|
||||
$widget_content_footer = '</div>';
|
||||
break;
|
||||
|
|
@ -537,7 +537,7 @@ class widgetController extends widget
|
|||
$oWidgetController = getController('widget');
|
||||
|
||||
$widget_content_header = sprintf(
|
||||
'<div class="widgetOutput" widgetstyle="%s" style="%s" widget_padding_left="%s" widget_padding_right="%s" widget_padding_top="%s" widget_padding_bottom="%s" widget="widgetContent" document_srl="%d" %s>'.
|
||||
'<div class="widgetOutput ' . $args->css_class . '" widgetstyle="%s" style="%s" widget_padding_left="%s" widget_padding_right="%s" widget_padding_top="%s" widget_padding_bottom="%s" widget="widgetContent" document_srl="%d" %s>'.
|
||||
'<div class="widgetResize"></div>'.
|
||||
'<div class="widgetResizeLeft"></div>'.
|
||||
'<div class="widgetBorder">'.
|
||||
|
|
@ -571,7 +571,7 @@ class widgetController extends widget
|
|||
}
|
||||
|
||||
$widget_content_header = sprintf(
|
||||
'<div class="widgetOutput" widgetstyle="%s" widget="widgetBox" style="%s;" widget_padding_top="%s" widget_padding_right="%s" widget_padding_bottom="%s" widget_padding_left="%s" %s >'.
|
||||
'<div class="widgetOutput ' . $args->css_class . '" widgetstyle="%s" widget="widgetBox" style="%s;" widget_padding_top="%s" widget_padding_right="%s" widget_padding_bottom="%s" widget_padding_left="%s" %s >'.
|
||||
'<div class="widgetBoxResize"></div>'.
|
||||
'<div class="widgetBoxResizeLeft"></div>'.
|
||||
'<div class="widgetBoxBorder"><div class="nullWidget" style="%s">',$args->widgetstyle,$style, $widget_padding_top, $widget_padding_right, $widget_padding_bottom, $widget_padding_left,implode(' ',$attribute),$inner_style);
|
||||
|
|
@ -595,7 +595,7 @@ class widgetController extends widget
|
|||
}
|
||||
}
|
||||
|
||||
$widget_content_header = sprintf('<div class="widgetOutput" widgetstyle="%s" style="%s" widget_padding_top="%s" widget_padding_right="%s" widget_padding_bottom="%s" widget_padding_left="%s" widget="%s" %s >'.
|
||||
$widget_content_header = sprintf('<div class="widgetOutput ' . $args->css_class . '" widgetstyle="%s" style="%s" widget_padding_top="%s" widget_padding_right="%s" widget_padding_bottom="%s" widget_padding_left="%s" widget="%s" %s >'.
|
||||
'<div class="widgetResize"></div>'.
|
||||
'<div class="widgetResizeLeft"></div>'.
|
||||
'<div class="widgetBorder">',$args->widgetstyle,$style,
|
||||
|
|
@ -710,6 +710,7 @@ class widgetController extends widget
|
|||
}
|
||||
|
||||
$widget = $vars->selected_widget;
|
||||
$vars->css_class = $request_vars->css_class;
|
||||
$vars->widgetstyle = $request_vars->widgetstyle;
|
||||
|
||||
$vars->skin = trim($request_vars->skin);
|
||||
|
|
|
|||
|
|
@ -376,6 +376,10 @@
|
|||
<name xml:lang="zh-CN">内容摘要字数</name>
|
||||
<name xml:lang="zh-TW">內容字數</name>
|
||||
<name xml:lang="tr">İçerik Uzunluğu</name>
|
||||
</var>
|
||||
<var id="nickname_cut_size" type="text">
|
||||
<name xml:lang="ko">닉네임 글자수</name>
|
||||
<name xml:lang="en">Length of Nickname</name>
|
||||
</var>
|
||||
<var id="new_window" type="select">
|
||||
<name xml:lang="ko">링크</name>
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ class content extends WidgetHandler
|
|||
if(!$args->subject_cut_size) $args->subject_cut_size = 0;
|
||||
// Cut the length of contents
|
||||
if(!$args->content_cut_size) $args->content_cut_size = 100;
|
||||
// Cut the length of nickname
|
||||
if(!$args->nickname_cut_size) $args->nickname_cut_size = 0;
|
||||
// Display time of the latest post
|
||||
if(!$args->duration_new) $args->duration_new = 12;
|
||||
// How to create thumbnails
|
||||
|
|
@ -715,6 +717,7 @@ class content extends WidgetHandler
|
|||
$widget_info->page_count = $args->page_count;
|
||||
$widget_info->subject_cut_size = $args->subject_cut_size;
|
||||
$widget_info->content_cut_size = $args->content_cut_size;
|
||||
$widget_info->nickname_cut_size = $args->nickname_cut_size;
|
||||
$widget_info->new_window = $args->new_window;
|
||||
|
||||
$widget_info->duration_new = $args->duration_new * 60*60;
|
||||
|
|
@ -887,9 +890,12 @@ class contentItem extends Object
|
|||
{
|
||||
return $this->get('category');
|
||||
}
|
||||
function getNickName()
|
||||
function getNickName($cut_size = 0, $tail='...')
|
||||
{
|
||||
return $this->get('nick_name');
|
||||
if($cut_size) $nick_name = cut_str($this->get('nick_name'), $cut_size, $tail);
|
||||
else $nick_name = $this->get('nick_name');
|
||||
|
||||
return $nick_name;
|
||||
}
|
||||
function getAuthorSite()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<load target="./js/content_widget.js" cond="$widget_info->page_count || count($widget_info->tab)" />
|
||||
<load target="./css/widget.css" cond="$colorset == 'black' || $colorset == 'white'" />
|
||||
<load target="./css/widget.css" cond="$colorset != 'layout'" />
|
||||
|
||||
<div class="widgetContainer<!--@if($colorset=="black")--> black<!--@end-->">
|
||||
<div class="widgetContainer<!--@if($colorset=='black')--> black<!--@end-->">
|
||||
<!--@if($widget_info->tab_type == "tab_left")-->
|
||||
<!--#include("./_tab_left.html")-->
|
||||
<!--@elseif($widget_info->tab_type == "tab_top")-->
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
<!--@end-->
|
||||
|
||||
<!--@else if($v=='nickname')-->
|
||||
<a href="#" onclick="return false;" class="author member_{$item->getMemberSrl()}">{$item->getNickName()}</a>
|
||||
<a href="#" onclick="return false;" class="author member_{$item->getMemberSrl()}">{$item->getNickName($widget_info->nickname_cut_size)}</a>
|
||||
<!--@else if($v=='regdate')-->
|
||||
<span class="date">{$item->getRegdate("Y-m-d")}</span> <span class="hour">{$item->getRegdate("H:i")}</span>
|
||||
<!--@end-->
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
<span class="icon">{$item->printExtraImages()}</span>
|
||||
<!--@end-->
|
||||
<!--@else if($v=='nickname')-->
|
||||
<a href="#" onclick="return false;" class="author member_{$item->getMemberSrl()}">{$item->getNickName()}</a>
|
||||
<a href="#" onclick="return false;" class="author member_{$item->getMemberSrl()}">{$item->getNickName($widget_info->nickname_cut_size)}</a>
|
||||
<!--@else if($v=='regdate')-->
|
||||
<span class="date">{$item->getRegdate("Y-m-d")}</span> <span class="hour">{$item->getRegdate("H:i")}</span>
|
||||
<!--@end-->
|
||||
|
|
@ -100,7 +100,7 @@
|
|||
<!--@end-->
|
||||
</td>
|
||||
<!--@else if($v=='nickname')-->
|
||||
<td><a href="#" onclick="return false;" class="author member_{$item->getMemberSrl()}">{$item->getNickName()}</a></td>
|
||||
<td><a href="#" onclick="return false;" class="author member_{$item->getMemberSrl()}">{$item->getNickName($widget_info->nickname_cut_size)}</a></td>
|
||||
<!--@else if($v=='regdate')-->
|
||||
<td class="time"><span class="date">{$item->getRegdate("Y-m-d")}</span> <span class="hour">{$item->getRegdate("H:i")}</span></td>
|
||||
<!--@end-->
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
|
||||
<!--@else if($widget_info->option_view_arr[$j]=='nickname')-->
|
||||
<p class="authorArea" style="margin-left:{$widget_info->thumbnail_width+20}px;">
|
||||
<a href="#" onclick="return false;" class="author member_{$item->getMemberSrl()}" target="_blank"|cond="$widget_info->new_window">{$item->getNickName()}</a>
|
||||
<a href="#" onclick="return false;" class="author member_{$item->getMemberSrl()}" target="_blank"|cond="$widget_info->new_window">{$item->getNickName($widget_info->nickname_cut_size)}</a>
|
||||
<!--@if($widget_info->option_view_arr[$j+1]=='regdate')-->
|
||||
<span class="date">{$item->getRegdate("Y-m-d")}</span> <span class="hour">{$item->getRegdate("H:i")}</span>
|
||||
<!--@end-->
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
<!--@end-->
|
||||
|
||||
<!--@else if($v=='nickname')-->
|
||||
<a <!--@if($item->getMemberSrl())-->href="#" onclick="return false;" class="author member_{$item->getMemberSrl()}"<!--@elseif($item->getAuthorSite())-->href="{$item->getAuthorSite()}" onclick="window.open(this.href); return false;" class="author member"<!--@else-->href="#" onclick="return false;" class="author member"<!--@end--> >{$item->getNickName()}</a>
|
||||
<a <!--@if($item->getMemberSrl())-->href="#" onclick="return false;" class="author member_{$item->getMemberSrl()}"<!--@elseif($item->getAuthorSite())-->href="{$item->getAuthorSite()}" onclick="window.open(this.href); return false;" class="author member"<!--@else-->href="#" onclick="return false;" class="author member"<!--@end--> >{$item->getNickName($widget_info->nickname_cut_size)}</a>
|
||||
|
||||
<!--@else if($v=='regdate')-->
|
||||
<span class="date">{$item->getRegdate("Y-m-d")}</span> <span class="hour">{$item->getRegdate("H:i")}</span>
|
||||
|
|
@ -81,7 +81,7 @@
|
|||
<!--@end-->
|
||||
</td>
|
||||
<!--@else if($v=='nickname')-->
|
||||
<td><a <!--@if($item->getMemberSrl())-->href="#" onclick="return false;" class="author member_{$item->getMemberSrl()}"<!--@elseif($item->getAuthorSite())-->href="{$item->getAuthorSite()}" onclick="window.open(this.href); return false;" class="author member"<!--@else-->href="#" onclick="return false;" class="author member"<!--@end--> >{$item->getNickName()}</a></td>
|
||||
<td><a <!--@if($item->getMemberSrl())-->href="#" onclick="return false;" class="author member_{$item->getMemberSrl()}"<!--@elseif($item->getAuthorSite())-->href="{$item->getAuthorSite()}" onclick="window.open(this.href); return false;" class="author member"<!--@else-->href="#" onclick="return false;" class="author member"<!--@end--> >{$item->getNickName($widget_info->nickname_cut_size)}</a></td>
|
||||
<!--@else if($v=='regdate')-->
|
||||
<td class="time"><span class="date">{$item->getRegdate("Y-m-d")}</span> <span class="hour">{$item->getRegdate("H:i")}</span></td>
|
||||
<!--@end-->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue