Merge branch 'release-1.7.4'

This commit is contained in:
khongchi 2014-02-04 17:34:22 +09:00
commit 6c51344501
1083 changed files with 48605 additions and 46567 deletions

8
.gitattributes vendored Normal file
View file

@ -0,0 +1,8 @@
.gitattributes export-ignore
.gitignore export-ignore
/tools/ export-ignore
/tests/ export-ignore
/phpDoc/ export-ignore
Gruntfile.js export-ignore
package.json export-ignore
.travis.yml export-ignore

6
.gitignore vendored Normal file
View file

@ -0,0 +1,6 @@
config.user.inc.php
/files/
/build/
/node_modules/
.DS_Srore
Thumbs.db

11
.travis.yml Normal file
View file

@ -0,0 +1,11 @@
language: php
php:
- 5.2
- 5.3
- 5.4
- 5.5
before_script:
- npm install -g grunt-cli
- npm install
script:
- grunt lint

1
COPYRIGHT Normal file
View file

@ -0,0 +1 @@
Copyright (C) NAVER <http://www.navercorp.com>

381
Gruntfile.js Normal file
View file

@ -0,0 +1,381 @@
module.exports = function(grunt) {
"use strict";
var banner = '/*! Copyright (C) NAVER <http://www.navercorp.com> */\n';
var banner_xe_js = banner + '/**!\n * @file common.js + js_app.js + xml_handler.js + xml_js_filter.js\n * @brief XE Common JavaScript\n **/\n';
grunt.file.defaultEncoding = 'utf8';
grunt.initConfig({
clean: {
minify: [
'common/js/xe.js',
'common/js/xe.min.js',
'common/css/xe.min.css',
'common/css/mobile.min.css'
]
},
concat: {
'common-js': {
options: {
stripBanners: true,
banner: banner_xe_js
},
src: [
'common/js/common.js',
'common/js/js_app.js',
'common/js/xml_handler.js',
'common/js/xml_js_filter.js'
],
dest: 'common/js/xe.js'
},
'xpresseditor': {
options: {
stripBanners: true,
banner: banner_xe_js
},
src: [
'modules/editor/skins/xpresseditor/js/Xpress_Editor.js',
'modules/editor/skins/xpresseditor/js/xe_interface.js',
],
dest: 'modules/editor/skins/xpresseditor/js/xpresseditor.js'
}
},
uglify: {
'common-js': {
options: {
banner: banner_xe_js
},
files: {
'common/js/xe.min.js': ['common/js/xe.js']
}
},
'modules': {
files: {
'common/js/x.min.js' : ['common/js/x.js'],
// addon
'addons/captcha/captcha.min.js' : ['addons/captcha/captcha.js'],
'addons/captcha_member/captcha.min.js' : ['addons/captcha_member/captcha.js'],
'addons/resize_image/js/resize_image.min.js' : ['addons/resize_image/js/resize_image.js'],
// module/editor
'modules/editor/skins/xpresseditor/js/xpresseditor.min.js': ['modules/editor/skins/xpresseditor/js/xpresseditor.js'],
'modules/editor/skins/xpresseditor/js/xe_textarea.min.js': ['modules/editor/skins/xpresseditor/js/xe_textarea.js'],
'modules/editor/tpl/js/editor_common.min.js': ['modules/editor/tpl/js/editor_common.js'],
'modules/editor/tpl/js/swfupload.min.js': ['modules/editor/tpl/js/swfupload.js'],
'modules/editor/tpl/js/uploader.min.js': ['modules/editor/tpl/js/uploader.js'],
'modules/editor/tpl/js/editor.min.js': ['modules/editor/tpl/js/editor.js'],
'modules/editor/tpl/js/editor_module_config.min.js': ['modules/editor/tpl/js/editor_module_config.js'],
// module/admin
'modules/admin/tpl/js/admin.min.js': ['modules/admin/tpl/js/admin.js'],
'modules/admin/tpl/js/config.min.js': ['modules/admin/tpl/js/config.js'],
'modules/admin/tpl/js/menu_setup.min.js': ['modules/admin/tpl/js/menu_setup.js'],
//module/board
'modules/board/tpl/js/board.min.js': ['modules/board/tpl/js/board.js'],
'modules/board/tpl/js/board_admin.min.js': ['modules/board/tpl/js/board_admin.js'],
'modules/board/skins/default/board.default.min.js': ['modules/board/skins/default/board.default.js'],
'modules/board/m.skins/default/js/mboard.min.js': ['modules/board/m.skins/default/js/mboard.js'],
'modules/board/m.skins/simpleGray/js/mboard.min.js': ['modules/board/m.skins/simpleGray/js/mboard.js'],
// editor-component-image-gallery
'modules/editor/components/image_gallery/tpl/gallery.min.js' : ['modules/editor/components/image_gallery/tpl/gallery.js'],
'modules/editor/components/image_gallery/tpl/list_gallery.min.js' : ['modules/editor/components/image_gallery/tpl/list_gallery.js'],
'modules/editor/components/image_gallery/tpl/popup.min.js' : ['modules/editor/components/image_gallery/tpl/popup.js'],
'modules/editor/components/image_gallery/tpl/slide_gallery.min.js' : ['modules/editor/components/image_gallery/tpl/slide_gallery.js'],
// module/importer
'modules/importer/tpl/js/importer_admin.min.js': ['modules/importer/tpl/js/importer_admin.js'],
// modules/widget
'modules/widget/tpl/js/generate_code.min.js': ['modules/widget/tpl/js/generate_code.js'],
'modules/widget/tpl/js/widget.min.js': ['modules/widget/tpl/js/widget.js'],
'modules/widget/tpl/js/widget_admin.min.js': ['modules/widget/tpl/js/widget_admin.js'],
// modules/poll
'modules/poll/tpl/js/poll_admin.min.js': ['modules/poll/tpl/js/poll_admin.js'],
'modules/poll/tpl/js/poll.min.js': ['modules/poll/tpl/js/poll.js'],
'addons/oembed/jquery.oembed.min.js': ['addons/oembed/jquery.oembed.js'],
'addons/oembed/oembed.min.js': ['addons/oembed/oembed.js'],
}
},
},
cssmin: {
'common-css': {
files: {
'common/css/xe.min.css': ['common/css/xe.css'],
'common/css/mobile.min.css': ['common/css/mobile.css']
}
},
'module-admin-css': {
files: {
'modules/admin/tpl/css/admin.min.css': ['modules/admin/tpl/css/admin.css']
}
},
'editor-component-image-gallery': {
files: {
'modules/editor/components/image_gallery/tpl/popup.min.css': ['modules/editor/components/image_gallery/tpl/popup.css'],
'modules/editor/components/image_gallery/tpl/slide_gallery.min.css': ['modules/editor/components/image_gallery/tpl/slide_gallery.css'],
}
},
'moudle-widget-tpl': {
files: {
'modules/widget/tpl/css/widget.min.css': ['modules/widget/tpl/css/widget.css'],
}
},
'moudle-poll': {
files: {
'modules/poll/tpl/css/poll.min.css': ['modules/poll/tpl/css/poll.css'],
'modules/poll/skins/default/css/poll.min.css': ['modules/poll/skins/default/css/poll.css'],
'modules/poll/skins/simple/css/poll.min.css': ['modules/poll/skins/simple/css/poll.css'],
}
},
'moudle-editor': {
files: {
'modules/editor/skins/xpresseditor/css/default.min.css': ['modules/editor/skins/xpresseditor/css/default.css'],
}
},
'addon-oembed': {
files: {
'addons/oembed/jquery.oembed.min.css': ['addons/oembed/jquery.oembed.css'],
}
},
'module-board': {
files: {
'modules/board/skins/default/board.default.min.css': ['modules/board/skins/default/board.default.css'],
'modules/board/m.skins/default/css/mboard.min.css': ['modules/board/m.skins/default/css/mboard.css'],
'modules/board/m.skins/simpleGray/css/mboard.min.css': ['modules/board/m.skins/simpleGray/css/mboard.css']
}
}
},
jshint: {
files: [
'Gruntfile.js',
'common/js/*.js', '!common/js/html5.js', '!common/js/jquery.js', '!common/js/x.js', '!common/js/xe.js',
'modules/admin/tpl/js/*.js',
'modules/board/tpl/js/*.js',
'modules/editor/tpl/js/*.js',
'modules/menu/tpl/js/*.js',
'modules/widget/tpl/js/*.js',
],
options : {
globalstrict: false,
undef : false,
eqeqeq: false,
browser : true,
globals: {
"jQuery" : true,
"console" : true,
"window" : true
},
ignores : [
'**/jquery*.js',
'**/swfupload.js',
'**/*.min.js',
'**/*-packed.js',
'**/*.compressed.js'
]
}
},
csslint: {
'common-css': {
options: {
import : 2,
'adjoining-classes' : false,
'box-model' : false,
'duplicate-background-images' : false,
'ids' : false,
'important' : false,
'overqualified-elements' : false,
'qualified-headings' : false,
'star-property-hack' : false,
'underscore-property-hack' : false,
},
src: [
'common/css/*.css',
'!common/css/bootstrap.css',
'!common/css/bootstrap-responsive.css',
'!**/*.min.css',
]
}
},
phplint: {
default : {
options: {
phpCmd: "php",
},
src: [
"**/*.php",
"!files/**",
"!tests/**",
"!tools/**",
"!node_modules/**",
"!libs/**"
],
},
}
});
function createPackageChecksum(target_file) {
/* https://gist.github.com/onelaview/6475037 */
var fs = require('fs');
var crypto = require('crypto');
var md5 = crypto.createHash('md5');
var file = grunt.template.process(target_file);
var buffer = fs.readFileSync(file);
md5.update(buffer);
var md5Hash = md5.digest('hex');
grunt.verbose.writeln('file md5: ' + md5Hash);
var md5FileName = file + '.md5';
grunt.file.write(md5FileName, md5Hash);
grunt.verbose.writeln('File "' + md5FileName + '" created.').writeln('...');
}
grunt.registerTask('build', '', function(A, B) {
var _only_export = false;
var tasks = ['krzip', 'syndication'];
if(!A) {
grunt.fail.warn('Undefined build target.');
} else if(A && !B) {
_only_export = true;
}
if(!_only_export) {
tasks.push('changed');
target = A + '...' + B;
version = B;
} else {
target = A;
version = A;
}
var done = this.async();
var build_dir = 'build';
var archive_full = build_dir + '/xe.' + version + '.tar.gz';
var archive_changed = build_dir + '/xe.' + version + '.changed.tar.gz';
var diff, target, version;
var taskDone = function() {
tasks.pop();
grunt.verbose.writeln('remain tasks : '+tasks.length);
if(tasks.length === 0) {
grunt.util.spawn({
cmd: "tar",
args: ['cfz', 'xe.'+version+'.tar.gz', 'xe/'],
opts: {
cwd: 'build'
}
}, function (error, result, code) {
grunt.log.ok('Archived(full) : ' + build_dir + '/xe.'+version+'.tar.gz');
createPackageChecksum(build_dir + '/xe.'+version+'.tar.gz');
grunt.util.spawn({
cmd: "zip",
args: ['-r', 'xe.'+version+'.zip', 'xe/'],
opts: {
cwd: 'build'
}
}, function (error, result, code) {
grunt.log.ok('Archived(full) : ' + build_dir + '/xe.'+version+'.zip');
createPackageChecksum(build_dir + '/xe.'+version+'.zip');
grunt.file.delete('build/xe');
grunt.file.delete('build/temp.full.tar');
grunt.log.ok('Done!');
});
});
}
};
if(grunt.file.isDir(build_dir)) {
grunt.file.delete(build_dir);
}
grunt.file.mkdir(build_dir);
grunt.file.mkdir(build_dir + '/xe');
grunt.log.subhead('Archiving...');
grunt.log.writeln('Target : ' + target);
grunt.util.spawn({
cmd: "git",
args: ['archive', '--output=build/temp.full.tar', version, '.']
}, function (error, result, code){
if(!_only_export) {
// changed
grunt.util.spawn({
cmd: "git",
args: ['diff', '--name-only', target]
}, function (error, result, code) {
diff = result.stdout;
if(diff) {
diff = diff.split(grunt.util.linefeed);
}
// changed
if(diff.length) {
var args_tar = ['archive', '--prefix=xe/', '-o', 'build/xe.'+version+'.changed.tar.gz', version];
var args_zip = ['archive', '--prefix=xe/', '-o', 'build/xe.'+version+'.changed.zip', version];
args_tar = args_tar.concat(diff);
args_zip = args_zip.concat(diff);
grunt.util.spawn({
cmd: "git",
args: args_tar
}, function (error, result, code) {
grunt.log.ok('Archived(changed) : ' + build_dir + '/xe.'+version+'.changed.tar.gz');
createPackageChecksum(build_dir + '/xe.'+version+'.changed.tar.gz');
grunt.util.spawn({
cmd: "git",
args: args_zip
}, function (error, result, code) {
grunt.log.ok('Archived(changed) : ' + build_dir + '/xe.'+version+'.changed.zip');
createPackageChecksum(build_dir + '/xe.'+version+'.changed.zip');
taskDone();
});
});
} else {
taskDone();
}
});
}
// full
grunt.util.spawn({
cmd: "tar",
args: ['xf', 'build/temp.full.tar', '-C', 'build/xe']
}, function (error, result, code) {
// krzip
grunt.util.spawn({
cmd: "git",
args: ['clone', '-b', 'master', 'git@github.com:xpressengine/xe-module-krzip.git', 'build/xe/modules/krzip']
}, function (error, result, code) {
grunt.file.delete('build/xe/modules/krzip/.git');
taskDone();
});
// syndication
grunt.util.spawn({
cmd: "git",
args: ['clone', '-b', 'master', 'git@github.com:xpressengine/xe-module-syndication.git', 'build/xe/modules/syndication']
}, function (error, result, code) {
grunt.file.delete('build/xe/modules/syndication/.git');
taskDone();
});
});
});
});
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-csslint');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-phplint');
grunt.registerTask('default', ['jshint', 'csslint']);
grunt.registerTask('lint', ['jshint', 'csslint', 'phplint']);
grunt.registerTask('minify', ['jshint', 'csslint', 'clean', 'concat', 'uglify', 'cssmin']);
};

81
LICENSE
View file

@ -1,5 +1,28 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) NAVER <http://www.navercorp.com>
XE is an opensource and being developed in the opensource project.
For more information, please see the link below.
- Official website: http://www.xpressengine.com
- Official Repository: http://github.com/xpressengine/
"XpressEngine (XE)" is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-------
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
@ -10,7 +33,7 @@
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
@ -112,7 +135,7 @@ modification follow. Pay close attention to the difference between a
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
@ -432,7 +455,7 @@ decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
@ -455,50 +478,4 @@ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
END OF TERMS AND CONDITIONS

21
README.md Normal file
View file

@ -0,0 +1,21 @@
# XpressEngine
## Authors
adrian.vasile.constantin, aerofleet, @akasima, @andreimarin, araste, @bnu, bradly1, buffkj, c2joy, @canto, cbrghost, @ccata17, @ChanMyeong, chinaskyking, chschy, clench, @devjin, @dionisrom, @dorami, @dragan-dan, ducduydaovn, duvent, @Eundong, @florinutz, @flourscent, @flyskyko, @ForPeople, FruitsHake, guny, @haneul, hankm2004, haojilin, heemin, ikko, johnsonshu, juanlee0, k10206, kagami, @khongchi, @lansi951, @largeden, liahona, lickawtl, mayoojin, mglclub, @misol, mmx900, mooo, mosmartin, @nagoon97, @ngleader, nicetwo, ovclas, risapapa, rokmcssu, royallin, rubyeye, ryin005, sanghunjun, @sejin7940, @SMaker, sspa3141, @stellar12, supershop, @taggon, @ucorina, unryong, venister, wdlee91, welcomeju, @YJSoft, ysnglee2000, zero
## License
Copyright (C) NAVER <http://www.navercorp.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

View file

@ -1,18 +1,16 @@
<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
if(!defined('__XE__'))
exit();
/**
* @file adminlogging.addon.php
* @author NHN (developers@xpressengine.com)
* @brief Automatic link add-on
* @author NAVER (developers@xpressengine.com)
* @brief admin log
*/
$logged_info = Context::get('logged_info');
$act = Context::get('act');
$kind = strpos(strtolower($act), 'admin') !== false ? 'admin' : '';
if($called_position == 'before_module_proc' && $kind == 'admin' && $logged_info->is_admin == 'Y')
if($logged_info && $logged_info->is_admin == 'Y' && stripos(Context::get('act'), 'admin') !== false && $called_position == 'before_module_proc')
{
$oAdminloggingController = getController('adminlogging');
$oAdminloggingController->insertLog($this->module, $this->act);

View file

@ -13,18 +13,18 @@
<description xml:lang="zh-TW">
管理選單訪問紀錄及登入日誌。
</description>
<version>0.1</version>
<date>2011-09-28</date>
<version>1.7</version>
<date>2013-11-27</date>
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
<name xml:lang="ko">NHN</name>
<name xml:lang="jp">NHN</name>
<name xml:lang="en">NHN</name>
<name xml:lang="vi">NHN</name>
<name xml:lang="zh-CN">NHN</name>
<name xml:lang="es">NHN</name>
<name xml:lang="ru">NHN</name>
<name xml:lang="ge">NHN</name>
<name xml:lang="zh-TW">NHN</name>
<name xml:lang="ko">NAVER</name>
<name xml:lang="jp">NAVER</name>
<name xml:lang="en">NAVER</name>
<name xml:lang="vi">NAVER</name>
<name xml:lang="zh-CN">NAVER</name>
<name xml:lang="es">NAVER</name>
<name xml:lang="ru">NAVER</name>
<name xml:lang="ge">NAVER</name>
<name xml:lang="zh-TW">NAVER</name>
</author>
</addon>

View file

@ -1,14 +1,15 @@
<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
if(!defined('__XE__'))
exit();
/**
* @file autolink.addon.php
* @author NHN (developers@xpressengine.com)
* @author NAVER (developers@xpressengine.com)
* @brief Automatic link add-on
*/
if($called_position == 'after_module_proc' && Context::getResponseMethod() != "XMLRPC")
if($called_position == 'after_module_proc' && Context::getResponseMethod() == "HTML")
{
if(Mobile::isFromMobilePhone())
{

View file

@ -1,7 +1,7 @@
/**
* @file autolink.js
* @brief javascript code for autolink addon
* @author NHN (developers@xpressengine.com)
* @author NAVER (developers@xpressengine.com)
*/
(function($){
var protocol_re = '(https?|ftp|news|telnet|irc|mms)://';

View file

@ -36,18 +36,18 @@
<description xml:lang="zh-TW">
是種可將文章及回覆內容中的 URL 網址字串自動轉換成連結的附加元件。
</description>
<version>0.1</version>
<date>2008-04-22</date>
<version>1.7</version>
<date>2013-11-27</date>
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
<name xml:lang="ko">NHN</name>
<name xml:lang="jp">NHN</name>
<name xml:lang="en">NHN</name>
<name xml:lang="vi">NHN</name>
<name xml:lang="zh-CN">NHN</name>
<name xml:lang="es">NHN</name>
<name xml:lang="ru">NHN</name>
<name xml:lang="ge">NHN</name>
<name xml:lang="zh-TW">NHN</name>
<name xml:lang="ko">NAVER</name>
<name xml:lang="jp">NAVER</name>
<name xml:lang="en">NAVER</name>
<name xml:lang="vi">NAVER</name>
<name xml:lang="zh-CN">NAVER</name>
<name xml:lang="es">NAVER</name>
<name xml:lang="ru">NAVER</name>
<name xml:lang="ge">NAVER</name>
<name xml:lang="zh-TW">NAVER</name>
</author>
</addon>

View file

@ -1,11 +1,12 @@
<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
if(!defined('__XE__'))
exit();
/**
* @file blogapicounter.addon.php
* @author NHN (developers@xpressengine.com)
* @author NAVER (developers@xpressengine.com)
* @brief Add blogAPI
*
* It enables to write a post by using an external tool such as ms live writer, firefox performancing, zoundry and so on.
@ -27,7 +28,7 @@ if($_REQUEST['act'] != 'api')
}
// Read func file
require_once('./addons/blogapi/blogapi.func.php');
require_once(_XE_PATH_ . 'addons/blogapi/blogapi.func.php');
// xmlprc parsing
// Parse the requested xmlrpc
@ -82,8 +83,8 @@ if($called_position == 'before_module_proc')
$category_list = $oDocumentModel->getCategoryList($this->module_srl);
// Specifies a temporary file storage
$tmp_uploaded_path = sprintf('./files/cache/blogapi/%s/%s/', $this->mid, $user_id);
$uploaded_target_path = sprintf('/files/cache/blogapi/%s/%s/', $this->mid, $user_id);
$tmp_uploaded_path = sprintf(_XE_PATH_ . 'files/cache/blogapi/%s/%s/', $this->mid, $user_id);
$uploaded_target_path = sprintf(_XE_PATH_ . 'files/cache/blogapi/%s/%s/', $this->mid, $user_id);
switch($method_name)
{
@ -159,10 +160,7 @@ if($called_position == 'before_module_proc')
$tmp_arr = explode('/', $filename);
$filename = array_pop($tmp_arr);
if(!is_dir($tmp_uploaded_path))
{
FileHandler::makeDir($tmp_uploaded_path);
}
FileHandler::makeDir($tmp_uploaded_path);
$target_filename = sprintf('%s%s', $tmp_uploaded_path, $filename);
FileHandler::writeFile($target_filename, $filedata);
@ -193,7 +191,7 @@ if($called_position == 'before_module_proc')
$category = "";
if($oDocument->get('category_srl'))
{
$oDocumentModel = &getModel('document');
$oDocumentModel = getModel('document');
$category_list = $oDocumentModel->getCategoryList($oDocument->get('module_srl'));
if($category_list[$oDocument->get('category_srl')])
{
@ -283,7 +281,7 @@ if($called_position == 'before_module_proc')
$file_count = count($file_list);
if($file_count)
{
$oFileController = &getController('file');
$oFileController = getController('file');
for($i = 0; $i < $file_count; $i++)
{
$file_info['tmp_name'] = sprintf('%s%s', $tmp_uploaded_path, $file_list[$i]);
@ -397,7 +395,7 @@ if($called_position == 'before_module_proc')
$file_count = count($file_list);
if($file_count)
{
$oFileController = &getController('file');
$oFileController = getController('file');
for($i = 0; $i < $file_count; $i++)
{
$file_info['tmp_name'] = sprintf('%s%s', $tmp_uploaded_path, $file_list[$i]);
@ -416,7 +414,7 @@ if($called_position == 'before_module_proc')
}
}
$oDocumentController = &getController('document');
$oDocumentController = getController('document');
$output = $oDocumentController->updateDocument($oDocument, $obj, TRUE);
if(!$output->toBool())
@ -489,10 +487,10 @@ if($called_position == 'before_module_proc')
$post = new stdClass();
$post->categories = array();
$post->dateCreated = date("Ymd", $oDocument->getRegdateTime()) . 'T' . date("H:i:s", $oDocument->getRegdateTime());
$post->description = htmlspecialchars($oEditorController->transComponent($oDocument->getContent(false, false, true, false)));
$post->description = htmlspecialchars($oEditorController->transComponent($oDocument->getContent(false, false, true, false)), ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
$post->link = $post->permaLink = getFullUrl('', 'document_srl', $oDocument->document_srl);
$post->postid = $oDocument->document_srl;
$post->title = htmlspecialchars($oDocument->get('title'));
$post->title = htmlspecialchars($oDocument->get('title'), ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
$post->publish = 1;
$post->userid = $oDocument->get('user_id');
$post->mt_allow_pings = 0;

View file

@ -1,11 +1,12 @@
<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
if(!defined('__XE__'))
exit();
/**
* @file ./addons/blogapi/blogapi.func.php
* @author NHN (developers@xpressengine.com)
* @author NAVER (developers@xpressengine.com)
* @brief Function collections for the implementation of blogapi
* */
// Error messages
@ -13,7 +14,7 @@ function getXmlRpcFailure($error, $message)
{
return
sprintf(
"<methodResponse>\n<fault><value><struct>\n<member>\n<name>faultCode</name>\n<value><int>%d</int></value>\n</member>\n<member>\n<name>faultString</name>\n<value><string>%s</string></value>\n</member>\n</struct></value></fault>\n</methodResponse>\n", $error, htmlspecialchars($message)
"<methodResponse>\n<fault><value><struct>\n<member>\n<name>faultCode</name>\n<value><int>%d</int></value>\n</member>\n<member>\n<name>faultString</name>\n<value><string>%s</string></value>\n</member>\n</struct></value></fault>\n</methodResponse>\n", $error, htmlspecialchars($message, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)
);
}
@ -53,7 +54,7 @@ function _getEncodedVal($val, $is_sub_set = false)
$buff = "<value><struct>";
foreach($values as $k => $v)
{
$buff .= sprintf("<member>\n<name>%s</name>\n%s</member>\n", htmlspecialchars($k), _getEncodedVal($v, true));
$buff .= sprintf("<member>\n<name>%s</name>\n%s</member>\n", htmlspecialchars($k, ENT_COMPAT | ENT_HTML401, 'UTF-8', false), _getEncodedVal($v, true));
}
$buff .= "</struct></value>\n";
}

View file

@ -63,18 +63,18 @@
API網址是 http://安裝位置/模組名稱/api。
將狀態設置成"啟用"時,才可使用 RSD 和 API
</description>
<version>1.0</version>
<date>2012-02-22</date>
<version>1.7</version>
<date>2013-11-27</date>
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
<name xml:lang="ko">NHN</name>
<name xml:lang="vi">NHN</name>
<name xml:lang="jp">NHN</name>
<name xml:lang="zh-CN">NHN</name>
<name xml:lang="en">NHN</name>
<name xml:lang="ge">NHN</name>
<name xml:lang="es">NHN</name>
<name xml:lang="ru">NHN</name>
<name xml:lang="zh-TW">NHN</name>
<name xml:lang="ko">NAVER</name>
<name xml:lang="vi">NAVER</name>
<name xml:lang="jp">NAVER</name>
<name xml:lang="zh-CN">NAVER</name>
<name xml:lang="en">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>
</addon>

View file

@ -1,9 +1,11 @@
<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
if(!defined("__XE__")) exit();
/**
* @file captcha.addon.php
* @author NHN (developers@xpressengine.com)
* @author NAVER (developers@xpressengine.com)
* @brief Captcha for a particular action
* English alphabets and voice verification added
* */
@ -17,6 +19,7 @@ if(!class_exists('AddonCaptcha'))
{
var $addon_info;
var $target_acts = NULL;
function setInfo(&$addon_info)
{
@ -53,19 +56,7 @@ if(!class_exists('AddonCaptcha'))
$type = Context::get('captchaType');
$target_acts = array('procBoardInsertDocument', 'procBoardInsertComment', 'procIssuetrackerInsertIssue', 'procIssuetrackerInsertHistory', 'procTextyleInsertComment');
if($this->addon_info->apply_find_account == 'apply')
{
$target_acts[] = 'procMemberFindAccount';
}
if($this->addon_info->apply_resend_auth_mail == 'apply')
{
$target_acts[] = 'procMemberResendAuthMail';
}
if($this->addon_info->apply_signup == 'apply')
{
$target_acts[] = 'procMemberInsert';
}
$this->target_acts = array('procBoardInsertDocument', 'procBoardInsertComment', 'procIssuetrackerInsertIssue', 'procIssuetrackerInsertHistory', 'procTextyleInsertComment');
if(Context::getRequestMethod() != 'XMLRPC' && Context::getRequestMethod() !== 'JSON')
{
@ -73,7 +64,7 @@ if(!class_exists('AddonCaptcha'))
{
if(!$this->compareCaptcha())
{
Context::loadLang('./addons/captcha/lang');
Context::loadLang(_XE_PATH_ . 'addons/captcha/lang');
$_SESSION['XE_VALIDATOR_ERROR'] = -1;
$_SESSION['XE_VALIDATOR_MESSAGE'] = Context::getLang('captcha_denied');
$_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] = 'error';
@ -83,15 +74,18 @@ if(!class_exists('AddonCaptcha'))
}
else
{
Context::addHtmlHeader('<script> var captchaTargetAct = new Array("' . implode('","', $target_acts) . '"); </script>');
Context::addHtmlHeader('<script>
if(!captchaTargetAct) {var captchaTargetAct = [];}
captchaTargetAct.push("' . implode('","', $this->target_acts) . '");
</script>');
Context::loadFile(array('./addons/captcha/captcha.min.js', 'body', '', null), true);
}
}
// compare session when calling actions such as writing a post or a comment on the board/issue tracker module
if(!$_SESSION['captcha_authed'] && in_array(Context::get('act'), $target_acts))
if(!$_SESSION['captcha_authed'] && in_array(Context::get('act'), $this->target_acts))
{
Context::loadLang('./addons/captcha/lang');
Context::loadLang(_XE_PATH_ . 'addons/captcha/lang');
$ModuleHandler->error = "captcha_denied";
}
@ -216,7 +210,7 @@ if(!class_exists('AddonCaptcha'))
}
// Combine images of each character
for($i = 1; $i < count($im); $i++)
for($i = 1, $c = count($im); $i<$c; $i++)
{
imagecopy($im[0], $im[$i], (($w + 2) * ($i - 1)), 0, 0, 0, $w, $h);
imagedestroy($im[$i]);
@ -307,6 +301,8 @@ if(!class_exists('AddonCaptcha'))
function compareCaptcha()
{
if(!in_array(Context::get('act'), $this->target_acts)) return true;
if($_SESSION['captcha_authed'])
{
return true;

View file

@ -1,12 +1,10 @@
/* procFilter 함수를 가로채서 captcha 이미지 및 폼을 출력 */
var oldExecXml = null;
var calledArgs = null;
(function($){
$(function() {
var captchaXE = null;
$(function() {
var captchaXE = null;
function xeCaptcha() {
function xeCaptcha() {
$('form').each(function(i)
{
var isSubmitHook = false;
@ -21,7 +19,6 @@ var calledArgs = null;
break;
}
}
}
if (isSubmitHook)
@ -49,17 +46,17 @@ var calledArgs = null;
$(self).append('<input type="hidden" name="secret_text" value="'+ $('#secret_text').val() +'" />');
$(self).submit();
});
var params = new Array();
params['captcha_action'] = 'setCaptchaSession';
params['mid'] = current_mid;
oldExecXml('', '', params, captchaXE.show,new Array('error','message','about_captcha','captcha_reload','captcha_play','cmd_input','cmd_cancel'));
var params = new Array();
params['captcha_action'] = 'setCaptchaSession';
params['mid'] = current_mid;
window.oldExecXml('', '', params, captchaXE.show,new Array('error','message','about_captcha','captcha_reload','captcha_play','cmd_input','cmd_cancel'));
});
}
});
var body = $(document.body);
var captchaIma;
if (!captchaXE) {
var body = $(document.body);
var captchaIma;
if (!captchaXE) {
var fc_isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var fc_isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var fc_isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
@ -68,14 +65,14 @@ var calledArgs = null;
if(fc_isIE && fc_isWin && !fc_isOpera){
_object_ ='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="0" height="0" id="captcha_audio" align="middle">';
_object_ += '<param name="allowScriptAccess" value="always" />';
_object_ += '<param name="quality" value="high" />';
_object_ += '<param name="quality" value="high" />';
_object_ += '<param name="movie" value="'+_swfURL_+'" />';
_object_ += '<param name="wmode" value="window" />';
_object_ += '<param name="wmode" value="window" />';
_object_ += '<param name="allowFullScreen" value="false">';
_object_ += '<param name="bgcolor" value="#fffff" />';
_object_ += '<param name="bgcolor" value="#fffff" />';
_object_ += '</object>';
}else{
_object_ = '<embed src="'+_swfURL_+'" quality="high" wmode="window" allowFullScreen="false" bgcolor="#ffffff" width="0" height="0" name="captcha_audio" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
_object_ = '<embed src="'+_swfURL_+'" quality="high" wmode="window" allowFullScreen="false" bgcolor="#ffffff" width="0" height="0" name="captcha_audio" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
}
captchaXE = $('<div id="captcha_layer" style="position:fixed; top:0; left:0; width:100%; height:100%;display:none;z-index:10">').appendTo(document.body);
@ -98,9 +95,9 @@ var calledArgs = null;
'</form>'+_object_ +
'</div>').appendTo(captchaXE);
$div.find('button.cancel')
$div.find('button.cancel')
.click(function(){ $('#captcha_layer').hide(); });
$div.find('button.play')
.click(function(){
var swf = window['captcha_audio'] || document['captcha_audio'];
@ -114,15 +111,15 @@ var calledArgs = null;
var params = new Array();
params['captcha_action'] = 'setCaptchaSession';
params['mid'] = current_mid;
oldExecXml('','',params, function() {
window.oldExecXml('','',params, function() {
$("#captcha_image").attr("src", current_url.setQuery('captcha_action','captchaImage').setQuery('rnd', (new Date).getTime()));
});
});
captchaXE.exec = function(module, act, params, callback_func, response_tags, callback_func_arg, fo_obj) {
var doCheck = false;
captchaXE.exec = function(module, act, params, callback_func, response_tags, callback_func_arg, fo_obj) {
var doCheck = false;
$.each(captchaTargetAct || {}, function(key,val){ if (val == act){ doCheck = true; return false; } });
$.each(captchaTargetAct || {}, function(key,val){ if (val == act){ doCheck = true; return false; } });
if (doCheck) { /* captcha 를 사용하는 경우 */
@ -133,49 +130,51 @@ var calledArgs = null;
$(this).find('input[type=text]').val('').focus();
return false;
}
captchaXE.compare(); return false;
captchaXE.compare(); return false;
});
calledArgs = {'module':module,'act':act,'params':params,'callback_func':callback_func,'response_tags':response_tags,'callback_func_arg':callback_func_arg,'fo_obj':fo_obj};
var params = new Array();
params['captcha_action'] = 'setCaptchaSession';
params['mid'] = current_mid;
oldExecXml(module, act, params, captchaXE.show,new Array('error','message','about_captcha','captcha_reload','captcha_play','cmd_input','cmd_cancel'));
calledArgs = {'module':module,'act':act,'params':params,'callback_func':callback_func,'response_tags':response_tags,'callback_func_arg':callback_func_arg,'fo_obj':fo_obj};
var params = new Array();
params['captcha_action'] = 'setCaptchaSession';
params['mid'] = current_mid;
window.oldExecXml(module, act, params, captchaXE.show,new Array('error','message','about_captcha','captcha_reload','captcha_play','cmd_input','cmd_cancel'));
} else {
oldExecXml(module, act, params, callback_func, response_tags, callback_func_arg, fo_obj);
window.oldExecXml(module, act, params, callback_func, response_tags, callback_func_arg, fo_obj);
}
return true;
};
return true;
};
captchaXE.show = function(ret_obj) {
captchaXE.show = function(ret_obj) {
$('#captcha_layer').show();
$("#captchaAbout").html(ret_obj['about_captcha']);
$("#captcha_layer .reload").attr('title',ret_obj['captcha_reload']);
$("#captcha_layer .play").attr('title',ret_obj['captcha_play']);
$("#captcha_layer .play").attr('title',ret_obj['captcha_play']);
$("#captcha_layer button[type=submit]").html(ret_obj['cmd_input']);
$("#captcha_layer button.cancel").html(ret_obj['cmd_cancel']);
$("#captcha_image").attr("src", current_url.setQuery('captcha_action','captchaImage').setQuery('rnd', (new Date).getTime()));
$div.find('input[type=text]').val('').focus();
$('html, body').css('height','100%');
};
};
captchaXE.compare = function(e) {
var params = new Array();
params['captcha_action'] = 'captchaCompare';
params['mid'] = current_mid;
params['secret_text'] = $('#secret_text').val();
oldExecXml(calledArgs.module,calledArgs.act,params, function() {
$("#captcha_layer").hide();
oldExecXml(calledArgs.module, calledArgs.act, calledArgs.params, calledArgs.callback_func, calledArgs.response_tags, calledArgs.callback_func_arg, calledArgs.fo_obj);
} );
};
}
return captchaXE;
}
captchaXE.compare = function(e) {
var params = new Array();
params['captcha_action'] = 'captchaCompare';
params['mid'] = current_mid;
params['secret_text'] = $('#secret_text').val();
window.oldExecXml(calledArgs.module,calledArgs.act,params, function() {
$("#captcha_layer").hide();
window.oldExecXml(calledArgs.module, calledArgs.act, calledArgs.params, calledArgs.callback_func, calledArgs.response_tags, calledArgs.callback_func_arg, calledArgs.fo_obj);
} );
};
}
return captchaXE;
}
$(window).ready(function(){
oldExecXml = exec_xml;
exec_xml = xeCaptcha().exec;
});
});
$(window).ready(function(){
if(!window.oldExecXml) {
window.oldExecXml = window.exec_xml;
window.exec_xml = xeCaptcha().exec;
}
});
});
})(jQuery);

File diff suppressed because one or more lines are too long

View file

@ -1,221 +1,118 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon version="0.2">
<title xml:lang="ko">Captcha 애드온</title>
<title xml:lang="en">CAPTCHA</title>
<title xml:lang="vi">Captcha Addon</title>
<title xml:lang="zh-CN">验证码插件</title>
<title xml:lang="jp">Captchaアドオン</title>
<title xml:lang="ru">Аддон Captcha</title>
<title xml:lang="zh-TW">圖形驗證</title>
<description xml:lang="ko">
프로그램 글 등록기를 막기 위해 게시판/ issueTracker에서 글/ 댓글을 입력하려 할 때 알파벳을 입력해야 글/댓글이 입력되는 애드온 입니다.
로그인하지 않은 경우에만 해당됩니다.
</description>
<description xml:lang="en">
This addon helps to prevent spam messages to be posted by requesting non-logged-in users to type characters displayed in the image before submitting comments or posts.
</description>
<description xml:lang="vi">
Addon này tạo ra một hình ảnh xác nhận khi đăng kí, gửi bài, hay viết bình luận nếu thành viên không đăng nhập.
Addon này chỉ hoạt động khi được kích hoạt.
</description>
<description xml:lang="zh-CN">
为了解决互联网垃圾而开发的验证码机制。
<title xml:lang="ko">Captcha 애드온</title>
<title xml:lang="en">CAPTCHA</title>
<title xml:lang="vi">Captcha Addon</title>
<title xml:lang="zh-CN">验证码插件</title>
<title xml:lang="jp">Captchaアドオン</title>
<title xml:lang="ru">Аддон Captcha</title>
<title xml:lang="zh-TW">圖形驗證</title>
<description xml:lang="ko">
프로그램 글 등록기를 막기 위해 게시판/ issueTracker에서 글/ 댓글을 입력하려 할 때 알파벳을 입력해야 글/댓글이 입력되는 애드온 입니다.
</description>
<description xml:lang="en">
This addon helps to prevent spam messages to be posted by requesting non-logged-in users to type characters displayed in the image before submitting comments or posts.
</description>
<description xml:lang="vi">
Addon này tạo ra một hình ảnh xác nhận khi đăng kí, gửi bài, hay viết bình luận nếu thành viên không đăng nhập.
Addon này chỉ hoạt động khi được kích hoạt.
</description>
<description xml:lang="zh-CN">
为了解决互联网垃圾而开发的验证码机制。
非登录用户发布话题或评论时将会弹出验证图片选择框,选择正确的图片才可以正常发布(适用于版面/issueTracker)。
</description>
<description xml:lang="jp">
ボット(bot)がプログラムによるスパム行為を防ぐために、掲示板issueTrackerで書き込み・コメントを登録する際、ランダムな文字や数字の列を画面に表示し、表示されたものと一致した情報を入力した時、登録が出来るようにするアドオンです。
ログインしてない時だけ、動作します。
</description>
<description xml:lang="ru">
To block spam written by programs, let users to choose a suitable image to text when writing a posting or comment.
This addon applies only to not-logged-in users.
</description>
<description xml:lang="zh-TW">
可防止機器人程式的垃圾留言,非用戶要發表主題或回覆時,必須要輸入正確圖片中所顯示的文字才能發表。
</description>
<version>1.0</version>
<date>2010-08-19</date>
</description>
<description xml:lang="jp">
ボット(bot)がプログラムによるスパム行為を防ぐために、掲示板issueTrackerで書き込み・コメントを登録する際、ランダムな文字や数字の列を画面に表示し、表示されたものと一致した情報を入力した時、登録が出来るようにするアドオンです。
ログインしてない時だけ、動作します。
</description>
<description xml:lang="ru">
To block spam written by programs, let users to choose a suitable image to text when writing a posting or comment.
This addon applies only to not-logged-in users.
</description>
<description xml:lang="zh-TW">
可防止機器人程式的垃圾留言,非用戶要發表主題或回覆時,必須要輸入正確圖片中所顯示的文字才能發表。
</description>
<version>1.7</version>
<date>2013-11-27</date>
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
<name xml:lang="ko">NHN</name>
<name xml:lang="zh-CN">NHN</name>
<name xml:lang="jp">NHN</name>
<name xml:lang="zh-TW">NHN</name>
<name xml:lang="en">NHN</name>
<name xml:lang="ru">NHN</name>
<name xml:lang="vi">NHN</name>
</author>
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
<name xml:lang="ko">NAVER</name>
<name xml:lang="zh-CN">NAVER</name>
<name xml:lang="jp">NAVER</name>
<name xml:lang="zh-TW">NAVER</name>
<name xml:lang="en">NAVER</name>
<name xml:lang="ru">NAVER</name>
<name xml:lang="vi">NAVER</name>
</author>
<extra_vars>
<var name="target" type="select">
<title xml:lang="ko">Captcha 표시 대상</title>
<title xml:lang="zh-CN">应用对象</title>
<title xml:lang="jp">Captchaを表示する対象</title>
<title xml:lang="zh-TW">選擇目標</title>
<title xml:lang="en">Captcha Target</title>
<title xml:lang="ru">Captcha Target</title>
<title xml:lang="vi">Mục tiêu Captcha hiển thị</title>
<description xml:lang="ko">글/댓글 등록시 captcha가 동작할 대상을 정할 수 있습니다. 관리자는 무조건 제외됩니다</description>
<description xml:lang="zh-CN">可以指定验证码应用对象(管理员除外)。</description>
<description xml:lang="jp">管理者を除き、書き込み・コメントを入力する際にcaptchaイメージを見せる対象を設定します。</description>
<description xml:lang="zh-TW">除了管理員,可以選擇圖形驗證應用的對象。</description>
<description xml:lang="en">You can specify if CAPTCHA should be displayed when posting an article or comment. It will not apply to administrators.</description>
<description xml:lang="ru">You may specify targets CAPTCHA work. It's not applied when administrator writes.</description>
<description xml:lang="vi">Khi gửi bài, bình luận, Capcha sẽ hiển thị để xác nhận hành động của người sử dụng. Chức năng này không hoạt động với người quản lý.</description>
<options value="">
<title xml:lang="ko">로그인하지 않은 사용자</title>
<extra_vars>
<var name="target" type="select">
<title xml:lang="ko">Captcha 표시 대상</title>
<title xml:lang="zh-CN">应用对象</title>
<title xml:lang="jp">Captchaを表示する対象</title>
<title xml:lang="zh-TW">選擇目標</title>
<title xml:lang="en">Captcha Target</title>
<title xml:lang="ru">Captcha Target</title>
<title xml:lang="vi">Mục tiêu Captcha hiển thị</title>
<description xml:lang="ko">글/댓글 등록시 captcha가 동작할 대상을 정할 수 있습니다. 관리자는 무조건 제외됩니다</description>
<description xml:lang="zh-CN">可以指定验证码应用对象(管理员除外)。</description>
<description xml:lang="jp">管理者を除き、書き込み・コメントを入力する際にcaptchaイメージを見せる対象を設定します。</description>
<description xml:lang="zh-TW">除了管理員,可以選擇圖形驗證應用的對象。</description>
<description xml:lang="en">You can specify if CAPTCHA should be displayed when posting an article or comment. It will not apply to administrators.</description>
<description xml:lang="ru">You may specify targets CAPTCHA work. It's not applied when administrator writes.</description>
<description xml:lang="vi">Khi gửi bài, bình luận, Capcha sẽ hiển thị để xác nhận hành động của người sử dụng. Chức năng này không hoạt động với người quản lý.</description>
<options value="">
<title xml:lang="ko">로그인하지 않은 사용자</title>
<title xml:lang="zh-CN">非登录用户</title>
<title xml:lang="jp">ログインしてないユーザー</title>
<title xml:lang="zh-TW">非用戶</title>
<title xml:lang="en">Not logged-in users</title>
<title xml:lang="en">Not logged-in users</title>
<title xml:lang="ru">Not logged-in users</title>
<title xml:lang="vi">Người dùng chưa đăng nhập</title>
</options>
<options value="all">
<title xml:lang="ko">모든 사용자</title>
<title xml:lang="vi">Người dùng chưa đăng nhập</title>
</options>
<options value="all">
<title xml:lang="ko">모든 사용자</title>
<title xml:lang="zh-CN">所有用户</title>
<title xml:lang="jp">すべてのユーザー</title>
<title xml:lang="zh-TW">所有用戶</title>
<title xml:lang="en">All users</title>
<title xml:lang="zh-TW">所有用戶</title>
<title xml:lang="en">All users</title>
<title xml:lang="ru">All users</title>
<title xml:lang="vi">Tất cả mọi người</title>
</options>
</var>
<var name="act_type" type="select">
<title xml:lang="ko">동작 방식</title>
<title xml:lang="zh-CN">验证方式</title>
<title xml:lang="jp">動作方式</title>
<title xml:lang="zh-TW">驗證模式</title>
<title xml:lang="en">How it works</title>
<title xml:lang="ru">How it works</title>
<title xml:lang="vi">Sử dụng</title>
<description xml:lang="ko">"1번만 동작"을 선택하면 1번만 동작후 상태를 저장해서 다음부터 물어보지 않고 그렇지 않으면 매번 물어보게 됩니다</description>
<description xml:lang="zh-CN">"一次"就是每个IP只出现一次验证。</description>
<description xml:lang="jp">「1回だけ表示」を選択すると、最初だけ動作した後、その情報を記憶して次回からはCaptchaを見せないようにします。また、もう一つのオプションは毎回Captchaを表示します。</description>
<description xml:lang="zh-TW">選擇"單次",下次不會再顯示;選擇"每次"則會一直顯示。</description>
<description xml:lang="en">If you choose "Once", CAPTCHA works only once for the user by storing status. Otherwise, this addon would show an image every time the user writes.</description>
<description xml:lang="ru">If you choose "Once", CAPTCHA works only once for the user by storing status. Otherwise, this addon would show an image every time the user writes.</description>
<description xml:lang="vi">Nếu chọn "Chỉ một lần" thì sau lần hiển thị đó Capcha sẽ không hiển thị với người sử dụng đó nữa.</description>
<options value="onetime">
<title xml:lang="ko">1번만 동작</title>
<title xml:lang="zh-CN">一次</title>
<title xml:lang="jp">1回だけ表示</title>
<title xml:lang="zh-TW">單次</title>
<title xml:lang="vi">Chỉ một lần</title>
<title xml:lang="en">once</title>
<title xml:lang="vi">Tất cả mọi người</title>
</options>
</var>
<var name="act_type" type="select">
<title xml:lang="ko">동작 방식</title>
<title xml:lang="zh-CN">验证方式</title>
<title xml:lang="jp">動作方式</title>
<title xml:lang="zh-TW">驗證模式</title>
<title xml:lang="en">How it works</title>
<title xml:lang="ru">How it works</title>
<title xml:lang="vi">Sử dụng</title>
<description xml:lang="ko">"1번만 동작"을 선택하면 1번만 동작후 상태를 저장해서 다음부터 물어보지 않고 그렇지 않으면 매번 물어보게 됩니다</description>
<description xml:lang="zh-CN">"一次"就是每个IP只出现一次验证。</description>
<description xml:lang="jp">「1回だけ表示」を選択すると、最初だけ動作した後、その情報を記憶して次回からはCaptchaを見せないようにします。また、もう一つのオプションは毎回Captchaを表示します。</description>
<description xml:lang="zh-TW">選擇"單次",下次不會再顯示;選擇"每次"則會一直顯示。</description>
<description xml:lang="en">If you choose "Once", CAPTCHA works only once for the user by storing status. Otherwise, this addon would show an image every time the user writes.</description>
<description xml:lang="ru">If you choose "Once", CAPTCHA works only once for the user by storing status. Otherwise, this addon would show an image every time the user writes.</description>
<description xml:lang="vi">Nếu chọn "Chỉ một lần" thì sau lần hiển thị đó Capcha sẽ không hiển thị với người sử dụng đó nữa.</description>
<options value="onetime">
<title xml:lang="ko">1번만 동작</title>
<title xml:lang="zh-CN">一次</title>
<title xml:lang="jp">1回だけ表示</title>
<title xml:lang="zh-TW">單次</title>
<title xml:lang="vi">Chỉ một lần</title>
<title xml:lang="en">once</title>
<title xml:lang="ru">1 раз</title>
</options>
<options value="everytime">
<title xml:lang="ko">매번 동작</title>
<title xml:lang="zh-CN">每次</title>
<title xml:lang="jp">毎回表示</title>
<title xml:lang="zh-TW">每次</title>
<title xml:lang="en">every time</title>
</options>
<options value="everytime">
<title xml:lang="ko">매번 동작</title>
<title xml:lang="zh-CN">每次</title>
<title xml:lang="jp">毎回表示</title>
<title xml:lang="zh-TW">每次</title>
<title xml:lang="en">every time</title>
<title xml:lang="ru">каждый раз</title>
<title xml:lang="vi">Luôn sử dụng</title>
</options>
</var>
<var name="apply_find_account" type="select">
<title xml:lang="ko">비밀번호 찾기 적용</title>
<title xml:lang="zh-CN">应用到查找密码功能</title>
<title xml:lang="jp">비밀번호 찾기 적용</title>
<title xml:lang="zh-TW">忘記密碼</title>
<title xml:lang="en">applying to an action finding account</title>
<title xml:lang="ru">applying to an action finding account</title>
<title xml:lang="vi">Khi lấy lại mật khẩu</title>
<description xml:lang="ko">적용으로 하면 비밀번호 찾기 기능에도 적용되어 악의적인 봇(또는 프로그램)에 의한 메일 발송을 막을 수 있습니다.</description>
<description xml:lang="zh-CN">启用此项功能可以有效地拦截以查找密码名义发送的垃圾邮件。</description>
<description xml:lang="jp">적용으로 하면 비밀번호찾기 기능에도 적용되어 악의적인 봇(또는 프로그램)에 의한 메일 발송을 막을 수 있습니다.</description>
<description xml:lang="zh-TW">開啟功能後在忘記密碼時會顯示驗證碼。</description>
<description xml:lang="en">If you set this option as apply, CAPTCHA will work for finding account action, too.</description>
<description xml:lang="ru">If you set this option as apply, CAPTCHA will work for finding account action, too.</description>
<description xml:lang="vi">Nếu áp dụng, khi thành viên cần lấy lại mật khẩu khi lỡ quên, Capcha sẽ hiện thị để xác nhận việc này.</description>
<options value="">
<title xml:lang="ko">적용하지 않음</title>
<title xml:lang="zh-CN">不启用</title>
<title xml:lang="jp">적용하지 않음</title>
<title xml:lang="zh-TW">關閉</title>
<title xml:lang="en">Not apply</title>
<title xml:lang="ru">Not apply</title>
<title xml:lang="vi">Không áp dụng</title>
</options>
<options value="apply">
<title xml:lang="ko">적용</title>
<title xml:lang="zh-CN">启用</title>
<title xml:lang="jp">적용</title>
<title xml:lang="zh-TW">開啟</title>
<title xml:lang="en">Apply</title>
<title xml:lang="ru">Apply</title>
<title xml:lang="vi">Áp dụng</title>
</options>
</var>
<var name="apply_resend_auth_mail" type="select">
<title xml:lang="ko">인증 메일 재발송 적용</title>
<title xml:lang="zh-CN">应用到认证邮件重新发送功能</title>
<title xml:lang="jp">인증 메일 재발송 적용</title>
<title xml:lang="zh-TW">重寄認證信</title>
<title xml:lang="en">apply to an action resending authmail</title>
<title xml:lang="ru">apply to an action resending authmail</title>
<title xml:lang="vi">Khi lấy lại mã kích hoạt</title>
<description xml:lang="ko">적용으로 하면 인증 메일 재발송 기능에도 적용되어 악의적인 봇(또는 프로그램)에 의한 메일 발송을 막을 수 있습니다.</description>
<description xml:lang="zh-CN">启用此项功能可以有效地拦截以重新发送认证邮件名义发送的垃圾邮件。</description>
<description xml:lang="jp">적용으로 하면 인증 메일 재발송 기능에도 적용되어 악의적인 봇(또는 프로그램)에 의한 메일 발송을 막을 수 있습니다.</description>
<description xml:lang="zh-TW">開啟功能後在重寄認證信時會顯示驗證碼。</description>
<description xml:lang="en">If you set this option as apply, CAPTCHA will work for resending authmail action, too.</description>
<description xml:lang="ru">If you set this option as apply, CAPTCHA will work for resending authmail action, too.</description>
<description xml:lang="vi">Nếu áp dụng, khi thành viên cần lấy lại mã kích hoạt thành viên, Capcha sẽ hiện thị để xác nhận việc này.</description>
<options value="">
<title xml:lang="ko">적용하지 않음</title>
<title xml:lang="zh-CN">不启用</title>
<title xml:lang="jp">적용하지 않음</title>
<title xml:lang="zh-TW">關閉</title>
<title xml:lang="en">Not apply</title>
<title xml:lang="ru">Not apply</title>
<title xml:lang="vi">Không áp dụng</title>
</options>
<options value="apply">
<title xml:lang="ko">적용</title>
<title xml:lang="zh-CN">启用</title>
<title xml:lang="jp">적용</title>
<title xml:lang="zh-TW">開啟</title>
<title xml:lang="en">Apply</title>
<title xml:lang="ru">Apply</title>
<title xml:lang="vi">Áp dụng</title>
</options>
</var>
<var name="apply_signup" type="select">
<title xml:lang="ko">회원 가입 적용</title>
<title xml:lang="zh-CN">应用到用户注册表单</title>
<title xml:lang="jp">인증 메일 재발송 적용</title>
<title xml:lang="zh-TW">會員註冊</title>
<title xml:lang="en">Apply to member signup</title>
<title xml:lang="ru">Apply to member signup</title>
<title xml:lang="vi">Apply to member signup</title>
<description xml:lang="ko">적용으로 하면 회원가입 기능에도 적용되어 악의적인 봇(또는 프로그램)의 회원가입을 막을 수 있습니다.</description>
<description xml:lang="zh-CN">启用此项功能可以有效地拦截自动注册软件的施虐。</description>
<description xml:lang="jp">적용으로 하면 회원가입 기능에도 적용되어 악의적인 봇(또는 프로그램)의 회원가입을 막을 수 있습니다.</description>
<description xml:lang="zh-TW">開啟功能後在註冊時會顯示驗證碼。</description>
<description xml:lang="en">If you set this option as apply, CAPTCHA will work for signup action, too.</description>
<description xml:lang="ru">If you set this option as apply, CAPTCHA will work for signup action, too.</description>
<description xml:lang="vi">If you set this option as apply, CAPTCHA will work for signup action, too.</description>
<options value="">
<title xml:lang="ko">적용하지 않음</title>
<title xml:lang="zh-CN">不启用</title>
<title xml:lang="jp">적용하지 않음</title>
<title xml:lang="zh-TW">關閉</title>
<title xml:lang="en">Not apply</title>
<title xml:lang="ru">Not apply</title>
<title xml:lang="vi">Không áp dụng</title>
</options>
<options value="apply">
<title xml:lang="ko">적용</title>
<title xml:lang="zh-CN">启用</title>
<title xml:lang="jp">적용</title>
<title xml:lang="zh-TW">開啟</title>
<title xml:lang="en">Apply</title>
<title xml:lang="ru">Apply</title>
<title xml:lang="vi">Áp dụng</title>
</options>
</var>
</extra_vars>
<title xml:lang="vi">Luôn sử dụng</title>
</options>
</var>
</extra_vars>
</addon>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,180 @@
/* procFilter 함수를 가로채서 captcha 이미지 및 폼을 출력 */
var calledArgs = null;
(function($){
$(function() {
var captchaXE = null;
function xeCaptcha() {
$('form').each(function(i)
{
var isSubmitHook = false;
if (!$(this).attr('onsubmit') || $(this).attr('onsubmit').indexOf('procFilter') < 0)
{
var act = $(this).find('input[name=act]').val()
for(var i = 0; i<captchaTargetAct.length; i++)
{
if(captchaTargetAct[i] == act)
{
isSubmitHook = true;
break;
}
}
}
if (isSubmitHook)
{
$(this).append('<input type="hidden" name="captchaType" value="inline" />');
if(!$(this).find('input[name=error_return_url]'))
$(this).append('<input type="hidden" name="error_return_url" value="'+current_url+'" />');
$(this).submit(function(event){
if ($(this).find('input[name=secret_text]').val())
{
return true;
}
event.preventDefault();
var self = this;
$('#captcha_layer form')
.submit(function(e){
e.preventDefault();
if(!$('#secret_text').val()){
$(this).find('input[type=text]').val('').focus();
return false;
}
$(self).append('<input type="hidden" name="secret_text" value="'+ $('#secret_text').val() +'" />');
$(self).submit();
});
var params = new Array();
params['captcha_action'] = 'setCaptchaSession';
params['mid'] = current_mid;
window.oldExecXml('', '', params, captchaXE.show,new Array('error','message','about_captcha','captcha_reload','captcha_play','cmd_input','cmd_cancel'));
});
}
});
var body = $(document.body);
var captchaIma;
if (!captchaXE) {
var fc_isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var fc_isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var fc_isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
var _swfURL_ = request_uri + 'addons/captcha/swf/play.swf';
if(fc_isIE && fc_isWin && !fc_isOpera){
_object_ ='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="0" height="0" id="captcha_audio" align="middle">';
_object_ += '<param name="allowScriptAccess" value="always" />';
_object_ += '<param name="quality" value="high" />';
_object_ += '<param name="movie" value="'+_swfURL_+'" />';
_object_ += '<param name="wmode" value="window" />';
_object_ += '<param name="allowFullScreen" value="false">';
_object_ += '<param name="bgcolor" value="#fffff" />';
_object_ += '</object>';
}else{
_object_ = '<embed src="'+_swfURL_+'" quality="high" wmode="window" allowFullScreen="false" bgcolor="#ffffff" width="0" height="0" name="captcha_audio" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
}
captchaXE = $('<div id="captcha_layer" style="position:fixed; top:0; left:0; width:100%; height:100%;display:none;z-index:10">').appendTo(document.body);
var top_left = 'margin:-105px 0 0 -105px; top:50%; left:50%;';
if(screen.width<480) { top_left = ''; }
var $div = $('<div style="z-index:1000;position:absolute; width:310px;' + top_left + ' background:#fff; border:3px solid #ccc;">'+
'<form method="post" action="">'+
'<div style="position:relative; margin:25px 20px 15px 20px">'+
'<img src="about:blank" id="captcha_image" alt="CAPTCHA" width="240" height="50" style="display:block; width:240px; height:50px; border:1px solid #b0b0b0" />'+
'<button type="button" class="reload" title="" style="position:absolute; top:0; left:245px; width:25px; height:25px; padding:0; overflow:visible; border:1px solid #575757; background:#747474 url('+request_uri + 'addons/captcha/img/icon.gif) no-repeat center 5px;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px; cursor:pointer;box-shadow:0 0 3px #444 inset;-moz-box-shadow:0 0 3px #444 inset;-webkit-box-shadow:0 0 3px #444 inset;"></button>'+
'<button type="button" class="play" title="" style="position:absolute; top:27px; left:245px; width:25px; height:25px; padding:0; overflow:visible; border:1px solid #575757; background:#747474 url('+request_uri + 'addons/captcha/img/icon.gif) no-repeat center -20px;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px; cursor:pointer;box-shadow:0 0 3px #444 inset;-moz-box-shadow:0 0 3px #444 inset;-webkit-box-shadow:0 0 3px #444 inset;"></button>'+
'</div>'+
'<label id="captchaAbout" for="captcha" style="display:block; border-top:1px dashed #c5c5c5; padding:15px 0; margin:0 20px; font-size:12px; color:#5f5f5f;"></label>'+
'<input name="" type="text" id="secret_text" style="ime-mode:inactive;margin:0 20px; width:232px; border:1px solid #bdbdbd; padding:3px 4px; font-size:18px; font-weight:bold;" />'+
'<div style="margin:20px; border-top:1px dashed #c5c5c5; padding:15px 0 0 0; text-align:center">'+
'<button type="submit" style="height:31px; line-height:31px; padding:0 15px; margin:0 2px; font-size:12px; font-weight:bold; color:#fff; overflow:visible; border:1px solid #5c8a16; background:#6faa13;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px; cursor:pointer;box-shadow:0 0 3px #666 inset;-moz-box-shadow:0 0 3px #666 inset;-webkit-box-shadow:0 0 3px #666 inset;"></button>'+
'<button type="button" class="cancel" style="height:31px; line-height:31px; padding:0 15px; margin:0 2px; font-size:12px; font-weight:bold; color:#fff; overflow:visible; border:1px solid #575757; background:#747474;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px; cursor:pointer;box-shadow:0 0 3px #444 inset;-moz-box-shadow:0 0 3px #444 inset;-webkit-box-shadow:0 0 3px #444 inset;"></button>'+
'</div>'+
'</form>'+_object_ +
'</div>').appendTo(captchaXE);
$div.find('button.cancel')
.click(function(){ $('#captcha_layer').hide(); });
$div.find('button.play')
.click(function(){
var swf = window['captcha_audio'] || document['captcha_audio'];
var audio = current_url.setQuery('captcha_action','captchaAudio').setQuery('rnd', (new Date).getTime());
$div.find('input[type=text]').focus();
swf.setSoundTarget(audio,'1');
});
$div.find('button.reload')
.click(function(){
var params = new Array();
params['captcha_action'] = 'setCaptchaSession';
params['mid'] = current_mid;
window.oldExecXml('','',params, function() {
$("#captcha_image").attr("src", current_url.setQuery('captcha_action','captchaImage').setQuery('rnd', (new Date).getTime()));
});
});
captchaXE.exec = function(module, act, params, callback_func, response_tags, callback_func_arg, fo_obj) {
var doCheck = false;
$.each(captchaTargetAct || {}, function(key,val){ if (val == act){ doCheck = true; return false; } });
if (doCheck) { /* captcha 를 사용하는 경우 */
$('#captcha_layer form')
.submit(function(e){
e.preventDefault();
if(!$('#secret_text').val()){
$(this).find('input[type=text]').val('').focus();
return false;
}
captchaXE.compare(); return false;
});
calledArgs = {'module':module,'act':act,'params':params,'callback_func':callback_func,'response_tags':response_tags,'callback_func_arg':callback_func_arg,'fo_obj':fo_obj};
var params = new Array();
params['captcha_action'] = 'setCaptchaSession';
params['mid'] = current_mid;
window.oldExecXml(module, act, params, captchaXE.show,new Array('error','message','about_captcha','captcha_reload','captcha_play','cmd_input','cmd_cancel'));
} else {
window.oldExecXml(module, act, params, callback_func, response_tags, callback_func_arg, fo_obj);
}
return true;
};
captchaXE.show = function(ret_obj) {
$('#captcha_layer').show();
$("#captchaAbout").html(ret_obj['about_captcha']);
$("#captcha_layer .reload").attr('title',ret_obj['captcha_reload']);
$("#captcha_layer .play").attr('title',ret_obj['captcha_play']);
$("#captcha_layer button[type=submit]").html(ret_obj['cmd_input']);
$("#captcha_layer button.cancel").html(ret_obj['cmd_cancel']);
$("#captcha_image").attr("src", current_url.setQuery('captcha_action','captchaImage').setQuery('rnd', (new Date).getTime()));
$div.find('input[type=text]').val('').focus();
$('html, body').css('height','100%');
};
captchaXE.compare = function(e) {
var params = new Array();
params['captcha_action'] = 'captchaCompare';
params['mid'] = current_mid;
params['secret_text'] = $('#secret_text').val();
window.oldExecXml(calledArgs.module,calledArgs.act,params, function() {
$("#captcha_layer").hide();
window.oldExecXml(calledArgs.module, calledArgs.act, calledArgs.params, calledArgs.callback_func, calledArgs.response_tags, calledArgs.callback_func_arg, calledArgs.fo_obj);
} );
};
}
return captchaXE;
}
$(window).ready(function(){
if(!window.oldExecXml) {
window.oldExecXml = window.exec_xml;
window.exec_xml = xeCaptcha().exec;
}
});
});
})(jQuery);

1
addons/captcha_member/captcha.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,412 @@
<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
if(!defined("__XE__")) exit();
/**
* @file captcha.addon.php
* @author NAVER (developers@xpressengine.com)
* @brief Captcha for a particular action
* English alphabets and voice verification added
* */
if(!class_exists('AddonMemberCaptcha'))
{
// On the mobile mode, XE Core does not load jquery and xe.js as normal.
Context::loadFile(array('./common/js/jquery.min.js', 'head', NULL, -100000), true);
Context::loadFile(array('./common/js/xe.min.js', 'head', NULL, -100000), true);
class AddonMemberCaptcha
{
var $addon_info;
var $target_acts = NULL;
function setInfo(&$addon_info)
{
$this->addon_info = $addon_info;
}
function before_module_proc()
{
// if($_SESSION['member_captcha_authed'])
// {
unset($_SESSION['member_captcha_authed']);
// }
}
function before_module_init(&$ModuleHandler)
{
$logged_info = Context::get('logged_info');
if($logged_info->is_admin == 'Y' || $logged_info->is_site_admin)
{
return false;
}
// if($this->addon_info->target != 'all' && Context::get('is_logged'))
// {
// return false;
// }
if($_SESSION['XE_VALIDATOR_ERROR'] == -1)
{
$_SESSION['member_captcha_authed'] = false;
}
if($_SESSION['member_captcha_authed'])
{
return false;
}
$type = Context::get('captchaType');
$this->target_acts = array();
if($this->addon_info->apply_find_account == 'apply')
{
$this->target_acts[] = 'procMemberFindAccount';
}
if($this->addon_info->apply_resend_auth_mail == 'apply')
{
$this->target_acts[] = 'procMemberResendAuthMail';
}
if($this->addon_info->apply_signup == 'apply')
{
$this->target_acts[] = 'procMemberInsert';
}
if(Context::getRequestMethod() != 'XMLRPC' && Context::getRequestMethod() !== 'JSON')
{
if($type == 'inline')
{
if(!$this->compareCaptcha())
{
Context::loadLang(_XE_PATH_ . 'addons/captcha_member/lang');
$_SESSION['XE_VALIDATOR_ERROR'] = -1;
$_SESSION['XE_VALIDATOR_MESSAGE'] = Context::getLang('captcha_denied');
$_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] = 'error';
$_SESSION['XE_VALIDATOR_RETURN_URL'] = Context::get('error_return_url');
$ModuleHandler->_setInputValueToSession();
}
}
else
{
Context::addHtmlHeader('<script>
if(!captchaTargetAct) {var captchaTargetAct = [];}
captchaTargetAct.push("' . implode('","', $this->target_acts) . '");
</script>');
Context::loadFile(array('./addons/captcha_member/captcha.min.js', 'body', '', null), true);
}
}
// compare session when calling actions such as writing a post or a comment on the board/issue tracker module
if(!$_SESSION['member_captcha_authed'] && in_array(Context::get('act'), $this->target_acts))
{
Context::loadLang(_XE_PATH_ . 'addons/captcha_member/lang');
$ModuleHandler->error = "captcha_denied";
}
return true;
}
function createKeyword()
{
$type = Context::get('captchaType');
if($type == 'inline' && $_SESSION['captcha_keyword'])
{
return;
}
$arr = range('A', 'Y');
shuffle($arr);
$arr = array_slice($arr, 0, 6);
$_SESSION['captcha_keyword'] = join('', $arr);
}
function before_module_init_setCaptchaSession()
{
if($_SESSION['member_captcha_authed'])
{
return false;
}
// Load language files
Context::loadLang(_XE_PATH_ . 'addons/captcha_member/lang');
// Generate keywords
$this->createKeyword();
$target = Context::getLang('target_captcha');
header("Content-Type: text/xml; charset=UTF-8");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
printf("<response>\r\n <error>0</error>\r\n <message>success</message>\r\n <about_captcha><![CDATA[%s]]></about_captcha>\r\n <captcha_reload><![CDATA[%s]]></captcha_reload>\r\n <captcha_play><![CDATA[%s]]></captcha_play>\r\n <cmd_input><![CDATA[%s]]></cmd_input>\r\n <cmd_cancel><![CDATA[%s]]></cmd_cancel>\r\n </response>"
, Context::getLang('about_captcha')
, Context::getLang('captcha_reload')
, Context::getLang('captcha_play')
, Context::getLang('cmd_input')
, Context::getLang('cmd_cancel')
);
Context::close();
exit();
}
function before_module_init_captchaImage()
{
if($_SESSION['member_captcha_authed'])
{
return false;
}
if(Context::get('renew'))
{
$this->createKeyword();
}
$keyword = $_SESSION['captcha_keyword'];
$im = $this->createCaptchaImage($keyword);
header("Cache-Control: ");
header("Pragma: ");
header("Content-Type: image/png");
imagepng($im);
imagedestroy($im);
Context::close();
exit();
}
function createCaptchaImage($string)
{
$arr = array();
for($i = 0, $c = strlen($string); $i < $c; $i++)
{
$arr[] = $string{$i};
}
// Font site
$w = 18;
$h = 25;
// Character length
$c = count($arr);
// Character image
$im = array();
// Create an image by total size
$im[] = imagecreate(($w + 2) * count($arr), $h);
$deg = range(-30, 30);
shuffle($deg);
// Create an image for each letter
foreach($arr as $i => $str)
{
$im[$i + 1] = @imagecreate($w, $h);
$background_color = imagecolorallocate($im[$i + 1], 255, 255, 255);
$text_color = imagecolorallocate($im[$i + 1], 0, 0, 0);
// Control font size
$ran = range(1, 20);
shuffle($ran);
if(function_exists('imagerotate'))
{
imagestring($im[$i + 1], (array_pop($ran) % 3) + 3, 2, (array_pop($ran) % 8), $str, $text_color);
$im[$i + 1] = imagerotate($im[$i + 1], array_pop($deg), 0);
$background_color = imagecolorallocate($im[$i + 1], 255, 255, 255);
imagecolortransparent($im[$i + 1], $background_color);
}
else
{
imagestring($im[$i + 1], (array_pop($ran) % 3) + 3, 2, (array_pop($ran) % 4), $str, $text_color);
}
}
// Combine images of each character
for($i = 1; $i < count($im); $i++)
{
imagecopy($im[0], $im[$i], (($w + 2) * ($i - 1)), 0, 0, 0, $w, $h);
imagedestroy($im[$i]);
}
// Larger image
$big_count = 2;
$big = imagecreatetruecolor(($w + 2) * $big_count * $c, $h * $big_count);
imagecopyresized($big, $im[0], 0, 0, 0, 0, ($w + 2) * $big_count * $c, $h * $big_count, ($w + 2) * $c, $h);
imagedestroy($im[0]);
if(function_exists('imageantialias'))
{
imageantialias($big, true);
}
// Background line
$line_color = imagecolorallocate($big, 0, 0, 0);
$w = ($w + 2) * $big_count * $c;
$h = $h * $big_count;
$d = array_pop($deg);
for($i = -abs($d); $i < $h + abs($d); $i = $i + 7)
{
imageline($big, 0, $i + $d, $w, $i, $line_color);
}
$x = range(0, ($w - 10));
shuffle($x);
for($i = 0; $i < 200; $i++)
{
imagesetpixel($big, $x[$i] % $w, $x[$i + 1] % $h, $line_color);
}
return $big;
}
function before_module_init_captchaAudio()
{
if($_SESSION['member_captcha_authed'])
{
return false;
}
$keyword = strtoupper($_SESSION['captcha_keyword']);
$data = $this->createCaptchaAudio($keyword);
header('Content-type: audio/mpeg');
header("Content-Disposition: attachment; filename=\"captcha_audio.mp3\"");
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Expires: Sun, 1 Jan 2000 12:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . 'GMT');
header('Content-Length: ' . strlen($data));
echo $data;
Context::close();
exit();
}
function createCaptchaAudio($string)
{
$data = '';
$_audio = './addons/captcha_member/audio/F_%s.mp3';
for($i = 0, $c = strlen($string); $i < $c; $i++)
{
$_data = FileHandler::readFile(sprintf($_audio, $string{$i}));
$start = rand(5, 68); // Random start in 4-byte header and 64 byte data
$datalen = strlen($_data) - $start - 256; // Last unchanged 256 bytes
for($j = $start; $j < $datalen; $j+=64)
{
$ch = ord($_data{$j});
if($ch < 9 || $ch > 119)
{
continue;
}
$_data{$j} = chr($ch + rand(-8, 8));
}
$data .= $_data;
}
return $data;
}
function compareCaptcha()
{
if(!in_array(Context::get('act'), $this->target_acts)) return true;
if($_SESSION['member_captcha_authed'])
{
return true;
}
if(strtoupper($_SESSION['captcha_keyword']) == strtoupper(Context::get('secret_text')))
{
$_SESSION['member_captcha_authed'] = true;
return true;
}
unset($_SESSION['member_captcha_authed']);
return false;
}
function before_module_init_captchaCompare()
{
if(!$this->compareCaptcha())
{
return false;
}
header("Content-Type: text/xml; charset=UTF-8");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
print("<response>\r\n<error>0</error>\r\n<message>success</message>\r\n</response>");
Context::close();
exit();
}
function inlineDisplay()
{
unset($_SESSION['member_captcha_authed']);
$this->createKeyword();
$swfURL = getUrl() . 'addons/captcha_member/swf/play.swf';
Context::unloadFile('./addons/captcha_member/captcha.min.js');
Context::loadFile(array('./addons/captcha_member/inline_captcha.js', 'body'));
global $lang;
$tags = <<<EOD
<img src="%s" id="captcha_image" alt="CAPTCHA" width="240" height="50" style="width:240px; height:50px; border:1px solid #b0b0b0" />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="0" height="0" id="captcha_audio" align="middle">
<param name="allowScriptAccess" value="always" />
<param name="quality" value="high" />
<param name="movie" value="%s" />
<param name="wmode" value="window" />
<param name="allowFullScreen" value="false">
<param name="bgcolor" value="#fffff" />
<embed src="%s" quality="high" wmode="window" allowFullScreen="false" bgcolor="#ffffff" width="0" height="0" name="captcha_audio" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
<button type="button" class="captchaReload text">%s</button>
<button type="button" class="captchaPlay text">%s</button><br />
<input type="hidden" name="captchaType" value="inline" />
<input name="secret_text" type="text" id="secret_text" />
EOD;
$tags = sprintf($tags, getUrl('captcha_action', 'captchaImage', 'rand', mt_rand(10000, 99999))
, $swfURL
, $swfURL
, $lang->reload
, $lang->play);
return $tags;
}
}
$GLOBALS['__AddonMemberCaptcha__'] = new AddonMemberCaptcha;
$GLOBALS['__AddonMemberCaptcha__']->setInfo($addon_info);
Context::set('oMemberCaptcha', $GLOBALS['__AddonMemberCaptcha__']);
}
$oAddonMemberCaptcha = &$GLOBALS['__AddonMemberCaptcha__'];
if(method_exists($oAddonMemberCaptcha, $called_position))
{
if(!call_user_func_array(array(&$oAddonMemberCaptcha, $called_position), array(&$this)))
{
return false;
}
}
$addon_act = Context::get('captcha_action');
if($addon_act && method_exists($oAddonMemberCaptcha, $called_position . '_' . $addon_act))
{
if(!call_user_func_array(array(&$oAddonMemberCaptcha, $called_position . '_' . $addon_act), array(&$this)))
{
return false;
}
}
/* End of file captcha_member.addon.php */
/* Location: ./addons/captcha_member/captcha_member.addon.php */

View file

@ -0,0 +1,155 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon version="0.2">
<title xml:lang="ko">Captcha Member 애드온</title>
<title xml:lang="en">CAPTCHA Member</title>
<title xml:lang="vi">Captcha Member Addon</title>
<title xml:lang="zh-CN">验证码插件</title>
<title xml:lang="jp">Captchaアドオン</title>
<title xml:lang="ru">Аддон Captcha</title>
<title xml:lang="zh-TW">圖形驗證</title>
<description xml:lang="ko">
회원 가입 및 비밀번호 찾기, 인증메일 재발송을 요청할 때 알파벳을 입력하도록 하여 프로그램 등록기를 막는 애드온 입니다.
적용/비적용 대상 모듈을 지정하지 않아야 정상적으로 동작합니다.
</description>
<description xml:lang="en">
회원 가입 및 비밀번호 찾기, 인증메일 재발송을 요청할 때 알파벳을 입력하도록 하여 프로그램 등록기를 막는 애드온 입니다.
적용/비적용 대상 모듈을 지정하지 않아야 정상적으로 동작합니다.
</description>
<description xml:lang="vi">
회원 가입 및 비밀번호 찾기, 인증메일 재발송을 요청할 때 알파벳을 입력하도록 하여 프로그램 등록기를 막는 애드온 입니다.
적용/비적용 대상 모듈을 지정하지 않아야 정상적으로 동작합니다.
</description>
<description xml:lang="zh-CN">
회원 가입 및 비밀번호 찾기, 인증메일 재발송을 요청할 때 알파벳을 입력하도록 하여 프로그램 등록기를 막는 애드온 입니다.
적용/비적용 대상 모듈을 지정하지 않아야 정상적으로 동작합니다.
</description>
<description xml:lang="jp">
회원 가입 및 비밀번호 찾기, 인증메일 재발송을 요청할 때 알파벳을 입력하도록 하여 프로그램 등록기를 막는 애드온 입니다.
적용/비적용 대상 모듈을 지정하지 않아야 정상적으로 동작합니다.
</description>
<description xml:lang="ru">
회원 가입 및 비밀번호 찾기, 인증메일 재발송을 요청할 때 알파벳을 입력하도록 하여 프로그램 등록기를 막는 애드온 입니다.
적용/비적용 대상 모듈을 지정하지 않아야 정상적으로 동작합니다.
</description>
<description xml:lang="zh-TW">
회원 가입 및 비밀번호 찾기, 인증메일 재발송을 요청할 때 알파벳을 입력하도록 하여 프로그램 등록기를 막는 애드온 입니다.
적용/비적용 대상 모듈을 지정하지 않아야 정상적으로 동작합니다.
</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="zh-CN">NAVER</name>
<name xml:lang="jp">NAVER</name>
<name xml:lang="zh-TW">NAVER</name>
<name xml:lang="en">NAVER</name>
<name xml:lang="ru">NAVER</name>
<name xml:lang="vi">NAVER</name>
</author>
<extra_vars>
<var name="apply_signup" type="select">
<title xml:lang="ko">회원 가입 적용</title>
<title xml:lang="zh-CN">应用到用户注册表单</title>
<title xml:lang="jp">인증 메일 재발송 적용</title>
<title xml:lang="zh-TW">會員註冊</title>
<title xml:lang="en">Apply to member signup</title>
<title xml:lang="ru">Apply to member signup</title>
<title xml:lang="vi">Apply to member signup</title>
<description xml:lang="ko">적용으로 하면 회원가입 기능에도 적용되어 악의적인 봇(또는 프로그램)의 회원가입을 막을 수 있습니다.</description>
<description xml:lang="zh-CN">启用此项功能可以有效地拦截自动注册软件的施虐。</description>
<description xml:lang="jp">적용으로 하면 회원가입 기능에도 적용되어 악의적인 봇(또는 프로그램)의 회원가입을 막을 수 있습니다.</description>
<description xml:lang="zh-TW">開啟功能後在註冊時會顯示驗證碼。</description>
<description xml:lang="en">If you set this option as apply, CAPTCHA will work for signup action, too.</description>
<description xml:lang="ru">If you set this option as apply, CAPTCHA will work for signup action, too.</description>
<description xml:lang="vi">If you set this option as apply, CAPTCHA will work for signup action, too.</description>
<options value="">
<title xml:lang="ko">적용하지 않음</title>
<title xml:lang="zh-CN">不启用</title>
<title xml:lang="jp">적용하지 않음</title>
<title xml:lang="zh-TW">關閉</title>
<title xml:lang="en">Not apply</title>
<title xml:lang="ru">Not apply</title>
<title xml:lang="vi">Không áp dụng</title>
</options>
<options value="apply">
<title xml:lang="ko">적용</title>
<title xml:lang="zh-CN">启用</title>
<title xml:lang="jp">적용</title>
<title xml:lang="zh-TW">開啟</title>
<title xml:lang="en">Apply</title>
<title xml:lang="ru">Apply</title>
<title xml:lang="vi">Áp dụng</title>
</options>
</var>
<var name="apply_find_account" type="select">
<title xml:lang="ko">비밀번호 찾기 적용</title>
<title xml:lang="zh-CN">应用到查找密码功能</title>
<title xml:lang="jp">비밀번호 찾기 적용</title>
<title xml:lang="zh-TW">忘記密碼</title>
<title xml:lang="en">applying to an action finding account</title>
<title xml:lang="ru">applying to an action finding account</title>
<title xml:lang="vi">Khi lấy lại mật khẩu</title>
<description xml:lang="ko">적용으로 하면 비밀번호 찾기 기능에도 적용되어 악의적인 봇(또는 프로그램)에 의한 메일 발송을 막을 수 있습니다.</description>
<description xml:lang="zh-CN">启用此项功能可以有效地拦截以查找密码名义发送的垃圾邮件。</description>
<description xml:lang="jp">적용으로 하면 비밀번호찾기 기능에도 적용되어 악의적인 봇(또는 프로그램)에 의한 메일 발송을 막을 수 있습니다.</description>
<description xml:lang="zh-TW">開啟功能後在忘記密碼時會顯示驗證碼。</description>
<description xml:lang="en">If you set this option as apply, CAPTCHA will work for finding account action, too.</description>
<description xml:lang="ru">If you set this option as apply, CAPTCHA will work for finding account action, too.</description>
<description xml:lang="vi">Nếu áp dụng, khi thành viên cần lấy lại mật khẩu khi lỡ quên, Capcha sẽ hiện thị để xác nhận việc này.</description>
<options value="">
<title xml:lang="ko">적용하지 않음</title>
<title xml:lang="zh-CN">不启用</title>
<title xml:lang="jp">적용하지 않음</title>
<title xml:lang="zh-TW">關閉</title>
<title xml:lang="en">Not apply</title>
<title xml:lang="ru">Not apply</title>
<title xml:lang="vi">Không áp dụng</title>
</options>
<options value="apply">
<title xml:lang="ko">적용</title>
<title xml:lang="zh-CN">启用</title>
<title xml:lang="jp">적용</title>
<title xml:lang="zh-TW">開啟</title>
<title xml:lang="en">Apply</title>
<title xml:lang="ru">Apply</title>
<title xml:lang="vi">Áp dụng</title>
</options>
</var>
<var name="apply_resend_auth_mail" type="select">
<title xml:lang="ko">인증 메일 재발송 적용</title>
<title xml:lang="zh-CN">应用到认证邮件重新发送功能</title>
<title xml:lang="jp">인증 메일 재발송 적용</title>
<title xml:lang="zh-TW">重寄認證信</title>
<title xml:lang="en">apply to an action resending authmail</title>
<title xml:lang="ru">apply to an action resending authmail</title>
<title xml:lang="vi">Khi lấy lại mã kích hoạt</title>
<description xml:lang="ko">적용으로 하면 인증 메일 재발송 기능에도 적용되어 악의적인 봇(또는 프로그램)에 의한 메일 발송을 막을 수 있습니다.</description>
<description xml:lang="zh-CN">启用此项功能可以有效地拦截以重新发送认证邮件名义发送的垃圾邮件。</description>
<description xml:lang="jp">적용으로 하면 인증 메일 재발송 기능에도 적용되어 악의적인 봇(또는 프로그램)에 의한 메일 발송을 막을 수 있습니다.</description>
<description xml:lang="zh-TW">開啟功能後在重寄認證信時會顯示驗證碼。</description>
<description xml:lang="en">If you set this option as apply, CAPTCHA will work for resending authmail action, too.</description>
<description xml:lang="ru">If you set this option as apply, CAPTCHA will work for resending authmail action, too.</description>
<description xml:lang="vi">Nếu áp dụng, khi thành viên cần lấy lại mã kích hoạt thành viên, Capcha sẽ hiện thị để xác nhận việc này.</description>
<options value="">
<title xml:lang="ko">적용하지 않음</title>
<title xml:lang="zh-CN">不启用</title>
<title xml:lang="jp">적용하지 않음</title>
<title xml:lang="zh-TW">關閉</title>
<title xml:lang="en">Not apply</title>
<title xml:lang="ru">Not apply</title>
<title xml:lang="vi">Không áp dụng</title>
</options>
<options value="apply">
<title xml:lang="ko">적용</title>
<title xml:lang="zh-CN">启用</title>
<title xml:lang="jp">적용</title>
<title xml:lang="zh-TW">開啟</title>
<title xml:lang="en">Apply</title>
<title xml:lang="ru">Apply</title>
<title xml:lang="vi">Áp dụng</title>
</options>
</var>
</extra_vars>
</addon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 B

View file

@ -0,0 +1,17 @@
jQuery(function($){
$('button.captchaPlay')
.click(function(){
var swf = document['captcha_audio'] || window['captcha_audio'];
var audio = current_url.setQuery('captcha_action','captchaAudio').setQuery('rand', (new Date).getTime());
if(swf.length > 1) swf = swf[0];
$('input[type=text]#secret_text').focus();
swf.setSoundTarget(audio,'1');
});
$('button.captchaReload')
.click(function(){
$("#captcha_image").attr("src", current_url.setQuery('captcha_action','captchaImage').setQuery('rand', (new Date).getTime()).setQuery('renew',1));
});
});

View file

@ -0,0 +1,31 @@
<?xml version='1.0' encoding='UTF-8'?>
<lang>
<item name="about_captcha">
<value xml:lang="ko"><![CDATA[위 영어 알파벳을 순서대로 입력해 주세요. 대소문자는 구분하지 않습니다.]]></value>
<value xml:lang="en"><![CDATA[Please type the characters you see in the picture above. They are not case-sensitive.]]></value>
<value xml:lang="jp"><![CDATA[アルファベット順に入力してください。大文字、小文字は区別しません。]]></value>
<value xml:lang="zh-CN"><![CDATA[请依次输入图片中的文字,不区分大小写]]></value>
<value xml:lang="zh-TW"><![CDATA[請依序輸入圖片中的文字,不分大小寫。]]></value>
</item>
<item name="captcha_reload">
<value xml:lang="ko"><![CDATA[이미지 새로고침]]></value>
<value xml:lang="en"><![CDATA[Refresh the image]]></value>
<value xml:lang="jp"><![CDATA[リフレッシュ]]></value>
<value xml:lang="zh-CN"><![CDATA[刷新]]></value>
<value xml:lang="zh-TW"><![CDATA[更換]]></value>
</item>
<item name="captcha_play">
<value xml:lang="ko"><![CDATA[음성으로 듣기]]></value>
<value xml:lang="en"><![CDATA[Listen and type the letters you hear.]]></value>
<value xml:lang="jp"><![CDATA[音声]]></value>
<value xml:lang="zh-CN"><![CDATA[播放]]></value>
<value xml:lang="zh-TW"><![CDATA[播放]]></value>
</item>
<item name="captcha_denied">
<value xml:lang="ko"><![CDATA[잘못 입력했습니다]]></value>
<value xml:lang="en"><![CDATA[The characters you entered didn't match the word verification.]]></value>
<value xml:lang="jp"><![CDATA[正しく入力してください。]]></value>
<value xml:lang="zh-CN"><![CDATA[验证码错误]]></value>
<value xml:lang="zh-TW"><![CDATA[輸入錯誤]]></value>
</item>
</lang>

Binary file not shown.

View file

@ -45,18 +45,18 @@
使用XE的網站訪問統計模組記錄網站訪問資料。
將狀態設置成"使用"時,才會紀錄網站訪問資料。
</description>
<version>0.1</version>
<date>2007-02-28</date>
<version>1.7</version>
<date>2013-11-27</date>
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
<name xml:lang="ko">NHN</name>
<name xml:lang="vi">NHN</name>
<name xml:lang="jp">NHN</name>
<name xml:lang="zh-CN">NHN</name>
<name xml:lang="en">NHN</name>
<name xml:lang="ge">NHN</name>
<name xml:lang="es">NHN</name>
<name xml:lang="ru">NHN</name>
<name xml:lang="zh-TW">NHN</name>
<name xml:lang="ko">NAVER</name>
<name xml:lang="vi">NAVER</name>
<name xml:lang="jp">NAVER</name>
<name xml:lang="zh-CN">NAVER</name>
<name xml:lang="en">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>
</addon>

View file

@ -1,15 +1,16 @@
<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
if(!defined('__XE__'))
exit();
/**
* @file counter.addon.php
* @author NHN (developers@xpressengine.com)
* @author NAVER (developers@xpressengine.com)
* @brief Counter add-on
*/
// Execute if called_position is before_display_content
if(Context::isInstalled() && $called_position == 'before_module_init' && Context::get('module') != 'admin' && Context::getResponseMethod() == 'HTML')
if($called_position == 'before_module_init' && Context::get('module') != 'admin' && Context::getResponseMethod() == 'HTML' && Context::isInstalled())
{
$oCounterController = getController('counter');
$oCounterController->counterExecute();

View file

@ -41,19 +41,19 @@
<description xml:lang="zh-TW">
讓會員擁有短訊和新增好友功能。
</description>
<version>0.1</version>
<date>2008-05-28</date>
<version>1.7</version>
<date>2013-11-27</date>
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
<name xml:lang="ko">NHN</name>
<name xml:lang="jp">NHN</name>
<name xml:lang="zh-CN">NHN</name>
<name xml:lang="en">NHN</name>
<name xml:lang="vi">NHN</name>
<name xml:lang="ge">NHN</name>
<name xml:lang="es">NHN</name>
<name xml:lang="ru">NHN</name>
<name xml:lang="zh-TW">NHN</name>
<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>
<var name="use_alarm" type="select">

View file

@ -1,11 +1,12 @@
<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
if(!defined('__XE__'))
exit();
/**
* @file member_communication.addon.php
* @author NHN (developers@xpressengine.com)
* @author NAVER (developers@xpressengine.com)
* @brief Promote user communication
*
* - Pop-up the message if new message comes in
@ -14,7 +15,7 @@ if(!defined('__XE__'))
*/
// Stop if non-logged-in user is
$logged_info = Context::get('logged_info');
if(!$logged_info)
if(!$logged_info|| isCrawler())
{
return;
}
@ -22,42 +23,38 @@ if(!$logged_info)
/**
* Message/Friend munus are added on the pop-up window and member profile. Check if a new message is received
* */
if($called_position == 'before_module_init' && $this->module != 'member')
if($this->module != 'member' && $called_position == 'before_module_init')
{
// Load a language file from the communication module
Context::loadLang('./modules/communication/lang');
Context::loadLang(_XE_PATH_ . 'modules/communication/lang');
// Add menus on the member login information
$oMemberController = getController('member');
$oMemberController->addMemberMenu('dispCommunicationFriend', 'cmd_view_friend');
$oMemberController->addMemberMenu('dispCommunicationMessages', 'cmd_view_message_box');
// Pop-up to display messages if a flag on new message is set
$flag_path = './files/member_extra_info/new_message_flags/' . getNumberingPath($logged_info->member_srl);
$flag_file = $flag_path . $logged_info->member_srl;
if(file_exists($flag_file) && $addon_info->use_alarm != 'N')
$flag_file = _XE_PATH_ . 'files/member_extra_info/new_message_flags/' . getNumberingPath($logged_info->member_srl) . $logged_info->member_srl;
if($addon_info->use_alarm != 'N' && file_exists($flag_file))
{
$new_message_count = trim(FileHandler::readFile($flag_file));
// Pop-up to display messages if a flag on new message is set
$new_message_count = (int) trim(FileHandler::readFile($flag_file));
FileHandler::removeFile($flag_file);
Context::loadLang('./addons/member_communication/lang');
Context::loadLang(_XE_PATH_ . 'addons/member_communication/lang');
Context::loadFile(array('./addons/member_communication/tpl/member_communication.js'), true);
$text = preg_replace('@\r?\n@', '\\n', addslashes(Context::getLang('alert_new_message_arrived')));
$link = Context::getRequestUri() . '?module=communication&act=dispCommunicationNewMessage';
$script = "<script type=\"text/javascript\">jQuery(function(){ xeNotifyMessage('{$text}','{$new_message_count}'); });</script>";
Context::addHtmlFooter($script);
Context::addHtmlFooter("<script type=\"text/javascript\">jQuery(function(){ xeNotifyMessage('{$text}','{$new_message_count}'); });</script>");
}
}
elseif($called_position == 'before_module_proc' && $this->act == 'getMemberMenu')
elseif($this->act == 'getMemberMenu' && $called_position == 'before_module_proc')
{
$oMemberController = getController('member');
$member_srl = Context::get('target_srl');
$mid = Context::get('cur_mid');
// Creates communication model object
$oCommunicationModel = getModel('communication');
// Add a feature to display own message box.
if($logged_info->member_srl == $member_srl)
{
$mid = Context::get('cur_mid');
$oMemberController = getController('member');
// Add your own viewing Note Template
$oMemberController->addMemberPopupMenu(getUrl('', 'mid', $mid, 'act', 'dispCommunicationMessages'), 'cmd_view_message_box', '', 'self');
// Display a list of friends
@ -74,8 +71,7 @@ elseif($called_position == 'before_module_proc' && $this->act == 'getMemberMenu'
return;
}
// Get logged-in user information
$logged_info = Context::get('logged_info');
$oMemberController = getController('member');
// Add a menu for sending message
if($logged_info->is_admin == 'Y' || $target_member_info->allow_message == 'Y' || ($target_member_info->allow_message == 'F' && $oCommunicationModel->isFriend($member_srl)))
$oMemberController->addMemberPopupMenu(getUrl('', 'module', 'communication', 'act', 'dispCommunicationSendMessage', 'receiver_srl', $member_srl), 'cmd_send_message', '', 'popup');

View file

@ -12,7 +12,11 @@ window.xeNotifyMessage = function(text, count){
.prependTo(document.body);
}
text = text.replace('%d', count);
h = $bar.html('<p><a href="'+current_url.setQuery('act','dispCommunicationMessages')+'">'+text+'</a></p>').height();
var cur_module = current_url.getQuery('module');
if( cur_module == "admin" )
h = $bar.html('<p><a href="'+current_url.setQuery('module','').setQuery('act','dispCommunicationMessages')+'" target="_blank">'+text+'</a></p>').height();
else
h = $bar.html('<p><a href="'+current_url.setQuery('module','').setQuery('act','dispCommunicationMessages')+'">'+text+'</a></p>').height();
$bar.show().animate({top:0});
// hide after 10 seconds
setTimeout(function(){

View file

@ -36,18 +36,18 @@
<description xml:lang="zh-TW">
可將用戶資料中的暱稱圖片、用戶圖示、簽名檔等資料顯示到頁面當中。
</description>
<version>0.2</version>
<date>2007-02-28</date>
<version>1.7</version>
<date>2013-11-27</date>
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
<name xml:lang="ko">NHN</name>
<name xml:lang="vi">NHN</name>
<name xml:lang="jp">NHN</name>
<name xml:lang="zh-CN">NHN</name>
<name xml:lang="en">NHN</name>
<name xml:lang="ge">NHN</name>
<name xml:lang="es">NHN</name>
<name xml:lang="ru">NHN</name>
<name xml:lang="zh-TW">NHN</name>
<name xml:lang="ko">NAVER</name>
<name xml:lang="vi">NAVER</name>
<name xml:lang="jp">NAVER</name>
<name xml:lang="zh-CN">NAVER</name>
<name xml:lang="en">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>
</addon>

View file

@ -1,11 +1,14 @@
<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
if(!defined('__XE__'))
{
exit();
}
/**
* @file image_name.addon.php
* @author NHN (developers@xpressengine.com)
* @author NAVER (developers@xpressengine.com)
* @brief Display user image name/image mark
*
* Find member_srl in the part with <div class="member_MemberSerialNumber"> .... </div>
@ -14,7 +17,7 @@ if(!defined('__XE__'))
/**
* Just before displaying, change image name/ image mark
*/
if($called_position != "before_display_content" || Context::get('act') == 'dispPageAdminContentModify')
if($called_position != "before_display_content" || Context::get('act') == 'dispPageAdminContentModify' || Context::getResponseMethod() != 'HTML' || isCrawler())
{
return;
}

View file

@ -1,4 +1,5 @@
<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
/**
* @brief If member_srl exists in the div or span, replace to image name or nick image for each member_srl
@ -20,23 +21,26 @@ function memberTransImageName($matches)
$oMemberModel = getModel('member');
$nick_name = $matches[5];
$_tmp = &$GLOBALS['_transImageNameList'][$member_srl];
// If pre-defined data in the global variablesm return it
if(!$GLOBALS['_transImageNameList'][$member_srl]->cached)
if(!$_tmp->cached)
{
$GLOBALS['_transImageNameList'][$member_srl]->cached = true;
$_tmp->cached = true;
$image_name_file = sprintf('files/member_extra_info/image_name/%s%d.gif', getNumberingPath($member_srl), $member_srl);
$image_mark_file = sprintf('files/member_extra_info/image_mark/%s%d.gif', getNumberingPath($member_srl), $member_srl);
if(file_exists($image_name_file))
if(file_exists(_XE_PATH_ . $image_name_file))
{
$GLOBALS['_transImageNameList'][$member_srl]->image_name_file = $image_name_file;
$_tmp->image_name_file = $image_name_file;
}
else
{
$image_name_file = '';
}
if(file_exists($image_mark_file))
if(file_exists(_XE_PATH_ . $image_mark_file))
{
$GLOBALS['_transImageNameList'][$member_srl]->image_mark_file = $image_mark_file;
$_tmp->image_mark_file = $image_mark_file;
}
else
{
@ -45,14 +49,15 @@ function memberTransImageName($matches)
$site_module_info = Context::get('site_module_info');
$group_image = $oMemberModel->getGroupImageMark($member_srl, $site_module_info->site_srl);
$GLOBALS['_transImageNameList'][$member_srl]->group_image = $group_image;
$_tmp->group_image = $group_image;
}
else
{
$group_image = $GLOBALS['_transImageNameList'][$member_srl]->group_image;
$image_name_file = $GLOBALS['_transImageNameList'][$member_srl]->image_name_file;
$image_mark_file = $GLOBALS['_transImageNameList'][$member_srl]->image_mark_file;
$group_image = $_tmp->group_image;
$image_name_file = $_tmp->image_name_file;
$image_mark_file = $_tmp->image_mark_file;
}
// If image name and mark doesn't exist, set the original information
if(!$image_name_file && !$image_mark_file && !$group_image)
{
@ -77,9 +82,7 @@ function memberTransImageName($matches)
$nick_name = sprintf('<img src="%s" style="border:0;max-height:16px;vertical-align:middle;margin-right:3px" alt="%s" title="%s" />%s', $group_image->src, $group_image->title, $group_image->description, $nick_name);
}
$orig_text = preg_replace('/' . preg_quote($matches[5], '/') . '<\/' . $matches[6] . '>$/', '', $matches[0]);
return $orig_text . $nick_name . '</' . $matches[6] . '>';
return preg_replace('/' . preg_quote($matches[5], '/') . '<\/' . $matches[6] . '>$/', '', $matches[0]) . $nick_name . '</' . $matches[6] . '>';
}
/* End of file member_extra_info.lib.php */

View file

@ -1,7 +1,7 @@
<?php
/**
* HDML Library ver 0.1
* @author NHN (developers@xpressengine.com)
* @author NAVER (developers@xpressengine.com)
*/
class wap extends mobileXE {

View file

@ -2,7 +2,7 @@
include './mobile.class.php';
/**
* mhtml Library ver 0.1
* @author NHN (developers@xpressengine.com) / lang_select : misol
* @author NAVER (developers@xpressengine.com) / lang_select : misol
*/
class wap extends mobileXE
{
@ -21,13 +21,13 @@ class wap extends mobileXE
{
print("<html><head>\n");
if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
printf("<title>%s%s</title></head><body>\n", htmlspecialchars($this->title),htmlspecialchars($titlePageStr));
printf("<title>%s%s</title></head><body>\n", htmlspecialchars($this->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false),htmlspecialchars($titlePageStr, ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
}
// Output title
function printTitle()
{
if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
printf('&lt;%s%s&gt;<br>%s', htmlspecialchars($this->title),htmlspecialchars($titlePageStr),"\n");
printf('&lt;%s%s&gt;<br>%s', htmlspecialchars($this->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false),htmlspecialchars($titlePageStr, ENT_COMPAT | ENT_HTML401, 'UTF-8', false),"\n");
}
/**

View file

@ -1,7 +1,7 @@
<?php
/**
* Mobile XE Library Class ver 0.1
* @author NHN (developers@xpressengine.com) / lang_select : misol
* @author NAVER (developers@xpressengine.com) / lang_select : misol
* @brief XE library for WAP tag output
*/
class mobileXE
@ -189,13 +189,13 @@ class mobileXE
$userAgent = $_SERVER['HTTP_USER_AGENT'];
$wap_sid = $_SERVER['HTTP_X_UP_SUBNO'];
if(preg_match("/SKT11/i", $userAgent) || preg_match("/skt/i", $browserAccept))
if(stripos($userAgent, "SKT11") !== FALSE || stripos($browserAccept, "skt") !== FALSE)
{
Context::set('mobile_skt',1);
return "wml";
}
elseif(preg_match("/hdml/i", $browserAccept)) return "hdml";
elseif(preg_match("/CellPhone/i", $userAgent)) return "mhtml";
elseif(stripos($browserAccept, "hdml") !== FALSE) return "hdml";
elseif(stripos($userAgent, "cellphone") !== FALSE) return "mhtml";
return null;
}
@ -282,7 +282,7 @@ class mobileXE
*/
function setTitle($title)
{
$oModuleController = &getController('module');
$oModuleController = getController('module');
$this->title = $title;
$oModuleController->replaceDefinedLangCode($this->title);
}
@ -301,7 +301,7 @@ class mobileXE
*/
function setContent($content)
{
$oModuleController = &getController('module');
$oModuleController = getController('module');
$allow_tag_array = array('<a>','<br>','<p>','<b>','<i>','<u>','<em>','<small>','<strong>','<big>','<table>','<tr>','<td>');
// Links/wrap, remove all tags except gangjoman
$content = strip_tags($content, implode($allow_tag_array));
@ -523,7 +523,7 @@ class mobileXE
$this->setUpperUrl(getUrl('cmid',$upper_srl), Context::getLang('cmd_go_upper'));
if(preg_match('/^([a-zA-Z0-9\_\-]+)$/', $cur_item['url']))
{
$obj = null;
$obj = array();
$obj['href'] = getUrl('','mid',$cur_item['url']);
$obj['link'] = $obj['text'] = '['.$cur_item['text'].']';
$childs[] = $obj;
@ -541,7 +541,7 @@ class mobileXE
foreach($list as $key => $val)
{
if(!$val['text']) continue;
$obj = null;
$obj = array();
if(!count($val['list']))
{
$obj['href'] = getUrl('','mid',$val['url']);
@ -574,7 +574,7 @@ class mobileXE
}
$lang_supported = Context::get('lang_supported');
$lang_type = Context::getLangType();
$obj = null;
$obj = array();
$obj['link'] = $obj['text'] = Context::getLang('president_lang').' : '.$lang_supported[$lang_type];
$obj['href'] = getUrl('sel_lang',$lang_type);
$childs[] = $obj;
@ -583,7 +583,7 @@ class mobileXE
{
foreach($lang_supported as $key => $val)
{
$obj = null;
$obj = array();
$obj['link'] = $obj['text'] = $val;
$obj['href'] = getUrl('sel_lang',$key);
$childs[] = $obj;

View file

@ -1,7 +1,7 @@
<?php
/**
* WML Library ver 0.1
* @author NHN (developers@xpressengine.com) / lang_select : misol
* @author NAVER (developers@xpressengine.com) / lang_select : misol
*/
class wap extends mobileXE
{
@ -23,7 +23,7 @@ class wap extends mobileXE
if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
print("<?xml version=\"1.0\" encoding=\"".$this->charset."\"?><!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n");
// Card Title
printf("<wml>\n<card title=\"%s%s\">\n<p>\n",htmlspecialchars($this->title),htmlspecialchars($titlePageStr));
printf("<wml>\n<card title=\"%s%s\">\n<p>\n",htmlspecialchars($this->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false),htmlspecialchars($titlePageStr, ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
}
/**
@ -32,7 +32,7 @@ class wap extends mobileXE
function printTitle()
{
if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
printf('&lt;%s%s&gt;<br/>%s', htmlspecialchars($this->title),htmlspecialchars($titlePageStr),"\n");
printf('&lt;%s%s&gt;<br/>%s', htmlspecialchars($this->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false),htmlspecialchars($titlePageStr, ENT_COMPAT | ENT_HTML401, 'UTF-8', false),"\n");
}
/**
@ -46,7 +46,7 @@ class wap extends mobileXE
foreach($this->getChilds() as $key => $val)
{
if(!$val['link']) continue;
printf('<do type="%s" label="%s"><go href="%s" /></do>%s', $this->getNo(), htmlspecialchars($val['text']), $val['href'], "\n");
printf('<do type="%s" label="%s"><go href="%s" /></do>%s', $this->getNo(), htmlspecialchars($val['text'], ENT_COMPAT | ENT_HTML401, 'UTF-8', false), $val['href'], "\n");
if($val['extra']) printf("%s\n",$val['extra']);
}
}

View file

@ -35,17 +35,17 @@
透過行動工具上網時會將網頁轉換為WAP標籤顯示。
只限於 wml, hdml, mhtml格式。
</description>
<version>0.1.1</version>
<date>2009-05-23</date>
<version>1.7</version>
<date>2013-11-27</date>
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
<name xml:lang="ko">NHN</name>
<name xml:lang="jp">NHN</name>
<name xml:lang="zh-CN">NHN</name>
<name xml:lang="en">NHN</name>
<name xml:lang="vi">NHN</name>
<name xml:lang="ru">NHN</name>
<name xml:lang="zh-TW">NHN</name>
<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="ru">NAVER</name>
<name xml:lang="zh-TW">NAVER</name>
</author>
<history version="0.1.1" date="2009-05-23">

View file

@ -1,11 +1,12 @@
<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
if(!defined('__XE__'))
exit();
/**
* @file mobile.addon.php
* @author NHN (developers@xpressengine.com)
* @author NAVER (developers@xpressengine.com)
* @brief Mobile XE add-on
*
* If a mobile connection is made (see the header information), display contents with WAP tags

View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon version="0.2">
<title xml:lang="ko">자동 embed 삽입 애드온(oEmbed)</title>
<title xml:lang="jp">자동 embed 삽입 애드온(oEmbed)</title>
<title xml:lang="en">자동 embed 삽입 애드온(oEmbed)</title>
<title xml:lang="vi">자동 embed 삽입 애드온(oEmbed)</title>
<title xml:lang="zh-CN">자동 embed 삽입 애드온(oEmbed)</title>
<title xml:lang="es">자동 embed 삽입 애드온(oEmbed)</title>
<title xml:lang="ru">자동 embed 삽입 애드온(oEmbed)</title>
<title xml:lang="ge">자동 embed 삽입 애드온(oEmbed)</title>
<title xml:lang="zh-TW">자동 embed 삽입 애드온(oEmbed)</title>
<version>1.0</version>
<date>2014-01-15</date>
<author email_address="developers@xpressengine.com" link="http://www.xpressengine.com/">
<name xml:lang="ko">NAVER</name>
<name xml:lang="jp">NAVER</name>
<name xml:lang="en">NAVER</name>
<name xml:lang="vi">NAVER</name>
<name xml:lang="zh-CN">NAVER</name>
<name xml:lang="es">NAVER</name>
<name xml:lang="ru">NAVER</name>
<name xml:lang="ge">NAVER</name>
<name xml:lang="zh-TW">NAVER</name>
</author>
</addon>

423
addons/oembed/jquery.oembed.css Executable file
View file

@ -0,0 +1,423 @@
div.oembedall-githubrepos {
border: 1px solid #DDD;
border-radius: 4px 4px 4px 4px;
list-style-type: none;
margin: 0 0 10px;
padding: 8px 10px 0;
font: 13.34px/1.4 helvetica,arial,freesans,clean,sans-serif;
/*background: url("http://github.com/images/icons/public.png") no-repeat scroll 6px 9px transparent;*/
width : 452px;
background-color:#fff;
}
div.oembedall-githubrepos .oembedall-body {
background: -moz-linear-gradient(center top , #FAFAFA, #EFEFEF) repeat scroll 0 0 transparent;
background: -webkit-gradient(linear,left top,left bottom,from(#FAFAFA),to(#EFEFEF));;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
border-top: 1px solid #EEE;
margin-left: -10px;
margin-top: 8px;
padding: 5px 10px;
width: 100%;
}
div.oembedall-githubrepos h3 {
font-size: 14px;
margin: 0;
padding-left: 18px;
white-space: nowrap;
}
div.oembedall-githubrepos p.oembedall-description {
color: #444;
font-size: 12px;
margin: 0 0 3px;
}
div.oembedall-githubrepos p.oembedall-updated-at {
color: #888;
font-size: 11px;
margin: 0;
}
div.oembedall-githubrepos ul.oembedall-repo-stats {
/*background: url("http://github.com/images/modules/pagehead/actions_fade.png") no-repeat scroll 0 0 transparent;*/
border: medium none;
float: right;
font-size: 11px;
font-weight: bold;
padding-left: 15px;
position: relative;
z-index: 5;
margin:0;
}
div.oembedall-githubrepos ul.oembedall-repo-stats li {
border: medium none;
color: #666;
display: inline-block;
list-style-type: none;
margin: 0 !important;
}
div.oembedall-githubrepos ul.oembedall-repo-stats li a {
background-color: transparent;
background-position: 5px -2px;
border: medium none;
color: #666 !important;
background-position: 5px -2px;
background-repeat: no-repeat;
border-left: 1px solid #DDD;
display: inline-block;
height: 21px;
line-height: 21px;
padding: 0 5px 0 23px;
}
div.oembedall-githubrepos ul.oembedall-repo-stats li:first-child a {
border-left: medium none;
margin-right: -3px;
}
div.oembedall-githubrepos ul.oembedall-repo-stats li a:hover {
background: none no-repeat scroll 5px -27px #4183C4;
color: #FFFFFF !important;
text-decoration: none;
}
div.oembedall-githubrepos ul.oembedall-repo-stats li:first-child a:hover {
border-bottom-left-radius: 3px;
border-top-left-radius: 3px;
}
ul.oembedall-repo-stats li:last-child a:hover {
border-bottom-right-radius: 3px;
border-top-right-radius: 3px;
}
div.oembedall-githubrepos ul.oembedall-repo-stats li.oembedall-watchers a {
/*background-image: url("http://github.com/images/modules/pagehead/repostat_watchers.png");*/
}
div.oembedall-githubrepos ul.oembedall-repo-stats li.oembedall-forks a {
/*background-image: url("http://github.com/images/modules/pagehead/repostat_forks.png");*/
}
span.oembedall-closehide{
background-color: #EEE;
border-radius: 2px;
cursor: pointer;
margin-right: 3px;
padding: 0 3px;
}
div.oembedall-container {
margin-top : 5px;
text-align: left;
}
.oembedall-ljuser {
font-weight: bold;
}
.oembedall-ljuser img {
vertical-align: bottom;
border: 0;
padding-right: 1px;
}
.oembedall-stoqembed {
border-bottom: 1px dotted #999999;
float: left;
overflow: hidden;
padding: 11px 0;
width: 730px;
line-height: 1;
background: none repeat scroll 0 0 #FFFFFF;
color: #000000;
font-family: Arial,Liberation Sans,DejaVu Sans,sans-serif;
font-size: 80%;
text-align: left;
margin: 0;
padding: 0;
}
.oembedall-stoqembed a {
color: #0077CC;
text-decoration: none;
margin: 0;
padding: 0;
}
.oembedall-stoqembed a:hover {
text-decoration: underline;
}
.oembedall-stoqembed a:visited {
color: #4A6B82;
}
.oembedall-stoqembed h3 {
font-family: Trebuchet MS,Liberation Sans,DejaVu Sans,sans-serif;
font-size: 130%;
font-weight: bold;
margin: 0;
padding: 0;
}
.oembedall-stoqembed .oembedall-reputation-score {
color: #444444;
font-size: 120%;
font-weight: bold;
margin-right: 2px;
}
.oembedall-stoqembed .oembedall-user-info {
height: 35px;
width: 185px;
}
.oembedall-stoqembed .oembedall-user-info .oembedall-user-gravatar32 {
float: left;
height: 32px;
width: 32px;
}
.oembedall-stoqembed .oembedall-user-info .oembedall-user-details {
float: left;
margin-left: 5px;
overflow: hidden;
white-space: nowrap;
width: 145px;
}
.oembedall-stoqembed .oembedall-question-hyperlink {
font-weight: bold;
}
.oembedall-stoqembed .oembedall-stats {
background: none repeat scroll 0 0 #EEEEEE;
margin: 0 0 0 7px;
padding: 4px 7px 6px;
width: 58px;
}
.oembedall-stoqembed .oembedall-statscontainer {
float: left;
margin-right: 8px;
width: 86px;
}
.oembedall-stoqembed .oembedall-votes {
color: #555555;
padding: 0 0 7px;
text-align: center;
}
.oembedall-stoqembed .oembedall-vote-count-post {
display: block;
font-size: 240%;
color: #808185;
display: block;
font-weight: bold;
}
.oembedall-stoqembed .oembedall-views {
color: #999999;
padding-top: 4px;
text-align: center;
}
.oembedall-stoqembed .oembedall-status {
margin-top: -3px;
padding: 4px 0;
text-align: center;
background: none repeat scroll 0 0 #75845C;
color: #FFFFFF;
}
.oembedall-stoqembed .oembedall-status strong {
color: #FFFFFF;
display: block;
font-size: 140%;
}
.oembedall-stoqembed .oembedall-summary {
float: left;
width: 635px;
}
.oembedall-stoqembed .oembedall-excerpt {
line-height: 1.2;
margin: 0;
padding: 0 0 5px;
}
.oembedall-stoqembed .oembedall-tags {
float: left;
line-height: 18px;
}
.oembedall-stoqembed .oembedall-tags a:hover {
text-decoration: none;
}
.oembedall-stoqembed .oembedall-post-tag {
background-color: #E0EAF1;
border-bottom: 1px solid #3E6D8E;
border-right: 1px solid #7F9FB6;
color: #3E6D8E;
font-size: 90%;
line-height: 2.4;
margin: 2px 2px 2px 0;
padding: 3px 4px;
text-decoration: none;
white-space: nowrap;
}
.oembedall-stoqembed .oembedall-post-tag:hover {
background-color: #3E6D8E;
border-bottom: 1px solid #37607D;
border-right: 1px solid #37607D;
color: #E0EAF1;
}
.oembedall-stoqembed .oembedall-fr {
float: right;
}
.oembedall-stoqembed .oembedall-statsarrow {
background-image: url("http://cdn.sstatic.net/stackoverflow/img/sprites.png?v=3");
background-repeat: no-repeat;
overflow: hidden;
background-position: 0 -435px;
float: right;
height: 13px;
margin-top: 12px;
width: 7px;
}
.oembedall-facebook1 {
border: #1A3C6C solid 1px;
padding:0px;
font: 13.34px/1.4 verdana;
width : 500px;
}
.oembedall-facebook2 {
background-color: #627add;
}
.oembedall-facebook2 a {
color: #e8e8e8;
text-decoration:none;
}
.oembedall-facebookBody {
background-color: #fff;
vertical-align: top;
padding: 5px;
}
.oembedall-facebookBody .contents {
display: inline-block;
width: 100%;
}
.oembedall-facebookBody div img {
float: left;
margin-right: 5px;
}
div.oembedall-lanyard{
-webkit-box-shadow: none;
-webkit-transition-delay: 0s;
-webkit-transition-duration: 0.4000000059604645s;
-webkit-transition-property: width;
-webkit-transition-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
background-attachment: scroll;
background-clip: border-box;
background-color: transparent;
background-image: none;
background-origin: padding-box;
border-bottom-width: 0px;
border-left-width: 0px;
border-right-width: 0px;
border-top-width: 0px;
box-shadow: none;
color: #112644;
display: block;
float: left;
font-family: 'Trebuchet MS', Trebuchet, sans-serif;
font-size: 16px;
height: 253px;
line-height: 19px;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 0px;
margin-top: 0px;
max-width: none;
min-height: 0px;
outline-color: #112644;
outline-style: none;
outline-width: 0px;
overflow-x: visible;
overflow-y: visible;
padding-bottom: 0px;
padding-left: 0px;
padding-right: 0px;
padding-top: 0px;
position: relative;
text-align: left;
vertical-align: baseline;
width: 804px;
}
div.oembedall-lanyard .tagline{
font-size: 1.5em;
}
div.oembedall-lanyard .wrapper{
overflow: hidden;
clear: both;
}
div.oembedall-lanyard .split{
float: left;
display: inline;
}
div.oembedall-lanyard .prominent-place .flag:link, div.oembedall-lanyard .prominent-place .flag:visited,div.oembedall-lanyard .prominent-place .flag:hover
,div.oembedall-lanyard .prominent-place .flag:focus,div.oembedall-lanyard .prominent-place .flag:active {
float: left;
display: block;
width: 48px;
height: 48px;
position: relative;
top: -5px;
margin-right: 10px;
}
div.oembedall-lanyard .place-context {
font-size: 0.889em;
}
div.oembedall-lanyard .prominent-place .sub-place {
display: block;
}
div.oembedall-lanyard .prominent-place{
font-size: 1.125em;
line-height: 1.1em;
font-weight: normal;
}
div.oembedall-lanyard .main-date{
color: #8CB4E0;
font-weight: bold;
line-height: 1.1;
}
div.oembedall-lanyard .first{
margin-left: 0;
width: 48.57%;
margin: 0 0 0 2.857%;
}

1198
addons/oembed/jquery.oembed.js Executable file

File diff suppressed because it is too large Load diff

1
addons/oembed/jquery.oembed.min.css vendored Normal file

File diff suppressed because one or more lines are too long

2
addons/oembed/jquery.oembed.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,16 @@
<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
if(!defined('__XE__'))
{
exit();
}
if($called_position == 'after_module_proc' && Context::getResponseMethod() == 'HTML')
{
Context::loadFile('./addons/oembed/jquery.oembed.css');
Context::loadFile(array('./addons/oembed/jquery.oembed.js', 'body', '', null), true);
Context::loadFile(array('./addons/oembed/oembed.js', 'body', '', null), true);
}
/* End of file */

132
addons/oembed/oembed.js Normal file
View file

@ -0,0 +1,132 @@
/**
* @file oembed.js
* @brief javascript code for oembed addon
* @author NAVER (developers@xpressengine.com)
*/
(function($){
var protocol_re = '(https?|ftp|news|telnet|irc|mms)://';
var domain_re = '(?:[\\w\\-]+\\.)+(?:[a-z]+)';
var max_255_re = '(?:1[0-9]{2}|2[0-4][0-9]|25[0-5]|[1-9]?[0-9])';
var ip_re = '(?:'+max_255_re+'\\.){3}'+max_255_re;
var port_re = '(?::([0-9]+))?';
var user_re = '(?:/~[\\w-]+)?';
var path_re = '((?:/[\\w!"$-/:-@]+)*)';
var hash_re = '(?:#([\\w!-@]+))?';
var url_regex = new RegExp('('+protocol_re+'('+domain_re+'|'+ip_re+'|localhost'+')'+port_re+user_re+path_re+hash_re+')', 'ig');
var OEmbed = xe.createPlugin("OEmbed", {
targets : [],
init : function() {
this.targets = [];
this.enableAutoLink = false;
this.castedOembedA = false;
this.embedSetting = [];
// this.embedSetting.embedMethod = 'replace';
},
API_ONREADY : function() {
var thisPlugin = this;
// extract target text nodes
this.extractTargets($('.xe_content'));
if(this.oApp.getPlugin('autolink').length)
{
this.enableAutoLink = true;
}
thisPlugin.cast('OEMBEDA');
if(!this.enableAutoLink)
{
$(this.targets).each(function(){
thisPlugin.cast('OEMBED', [this]);
});
}
},
API_BEFORE_AUTOLINK : function(oSender, params) {
var thisPlugin = this;
thisPlugin.cast('OEMBEDA');
},
API_AFTER_AUTOLINK : function(oSender, params) {
this.oembed(params[0]);
},
API_OEMBED : function(oSender, params) {
if(this.enableAutoLink) return;
var thisPlugin = this;
var textNode = params[0];
if(!$(textNode).parent().length || $(textNode).parent().get(0).nodeName.toLowerCase() == 'a')
{
this.oembed($(textNode));
return;
}
var content = textNode.nodeValue;
var dummy = $('<span>');
content = content.replace(/</g, '&lt;').replace(/>/g, '&gt;');
content = content.replace(url_regex, '<a href="$1" target="_blank">$1</a>');
$(textNode).before(dummy);
$(textNode).replaceWith(content);
params[0] = dummy.next('a');
dummy.remove();
this.oembed(params[0]);
},
API_OEMBEDA : function(oSender, params) {
if(this.castedOembedA) return;
var thisPlugin = this;
this.castedOembedA = true;
$('.read_body a').not('_oembed').each(function(){
thisPlugin.oembed($(this));
});
},
oembed : function(target) {
var thisPlugin = this;
if(!this.embedSetting.maxWidth)
{
this.embedSetting.maxWidth = $('.xe_content').width();
}
if(!target) return;
if(target && target.nodeType == 3) target = $(target);
target.oembed(null, thisPlugin.embedSetting).addClass('_oembed');
},
extractTargets : function(obj) {
var thisPlugin = this;
var wrap = $('.xe_content', obj);
if(wrap.length) {
this.extractTargets(wrap);
return;
}
$(obj)
.contents()
.each(function(){
var node_name = this.nodeName.toLowerCase();
if($.inArray(node_name, ['a', 'pre', 'xml', 'textarea', 'input', 'select', 'option', 'code', 'script', 'style', 'iframe', 'button', 'img', 'embed', 'object', 'ins']) != -1) return;
// FIX ME : When this meanless code wasn't executed, url_regex do not run correctly. why?
url_regex.exec('');
if(this.nodeType == 3) { // text node
var content = this.nodeValue;
if(content.length < 5) return;
if(!/(http|https|ftp|news|telnet|irc|mms):\/\//i.test(content)) return;
thisPlugin.targets.push(this);
} else {
thisPlugin.extractTargets(this);
}
});
}
});
xe.registerPlugin(new OEmbed());
})(jQuery);

1
addons/oembed/oembed.min.js vendored Normal file
View file

@ -0,0 +1 @@
!function(a){var b="(https?|ftp|news|telnet|irc|mms)://",c="(?:[\\w\\-]+\\.)+(?:[a-z]+)",d="(?:1[0-9]{2}|2[0-4][0-9]|25[0-5]|[1-9]?[0-9])",e="(?:"+d+"\\.){3}"+d,f="(?::([0-9]+))?",g="(?:/~[\\w-]+)?",h='((?:/[\\w!"$-/:-@]+)*)',i="(?:#([\\w!-@]+))?",j=new RegExp("("+b+"("+c+"|"+e+"|localhost)"+f+g+h+i+")","ig"),k=xe.createPlugin("OEmbed",{targets:[],init:function(){this.targets=[],this.enableAutoLink=!1,this.castedOembedA=!1,this.embedSetting=[]},API_ONREADY:function(){var b=this;this.extractTargets(a(".xe_content")),this.oApp.getPlugin("autolink").length&&(this.enableAutoLink=!0),b.cast("OEMBEDA"),this.enableAutoLink||a(this.targets).each(function(){b.cast("OEMBED",[this])})},API_BEFORE_AUTOLINK:function(){var a=this;a.cast("OEMBEDA")},API_AFTER_AUTOLINK:function(a,b){this.oembed(b[0])},API_OEMBED:function(b,c){if(!this.enableAutoLink){var d=c[0];if(!a(d).parent().length||"a"==a(d).parent().get(0).nodeName.toLowerCase())return void this.oembed(a(d));var e=d.nodeValue,f=a("<span>");e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(j,'<a href="$1" target="_blank">$1</a>'),a(d).before(f),a(d).replaceWith(e),c[0]=f.next("a"),f.remove(),this.oembed(c[0])}},API_OEMBEDA:function(){if(!this.castedOembedA){var b=this;this.castedOembedA=!0,a(".read_body a").not("_oembed").each(function(){b.oembed(a(this))})}},oembed:function(b){var c=this;this.embedSetting.maxWidth||(this.embedSetting.maxWidth=a(".xe_content").width()),b&&(b&&3==b.nodeType&&(b=a(b)),b.oembed(null,c.embedSetting).addClass("_oembed"))},extractTargets:function(b){var c=this,d=a(".xe_content",b);return d.length?void this.extractTargets(d):void a(b).contents().each(function(){var b=this.nodeName.toLowerCase();if(-1==a.inArray(b,["a","pre","xml","textarea","input","select","option","code","script","style","iframe","button","img","embed","object","ins"]))if(j.exec(""),3==this.nodeType){var d=this.nodeValue;if(d.length<5)return;if(!/(http|https|ftp|news|telnet|irc|mms):\/\//i.test(d))return;c.targets.push(this)}else c.extractTargets(this)})}});xe.registerPlugin(new k)}(jQuery);

View file

@ -45,19 +45,19 @@
可將原本的域名當做OpenID來使用。
必須在設置中輸入openid provider相關資料後再使用。
</description>
<version>0.1</version>
<date>2007-02-28</date>
<version>1.7</version>
<date>2013-11-27</date>
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
<name xml:lang="ko">NHN</name>
<name xml:lang="zh-CN">NHN</name>
<name xml:lang="en">NHN</name>
<name xml:lang="vi">NHN</name>
<name xml:lang="ge">NHN</name>
<name xml:lang="es">NHN</name>
<name xml:lang="jp">NHN</name>
<name xml:lang="ru">NHN</name>
<name xml:lang="zh-TW">NHN</name>
<name xml:lang="ko">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="jp">NAVER</name>
<name xml:lang="ru">NAVER</name>
<name xml:lang="zh-TW">NAVER</name>
</author>
<extra_vars>

View file

@ -1,11 +1,12 @@
<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
if(!defined('__XE__'))
exit();
/**
* @file openid_delegation_id.addon.php
* @author NHN (developers@xpressengine.com)
* @author NAVER (developers@xpressengine.com)
* @brief OpenID Delegation ID Add-on
*
* This enables to use openID as user's homepage or blog url.

View file

@ -45,18 +45,18 @@
使用點數系統時,可以在用戶名前顯示等級圖案。
等級圖案可以在模組 &gt; 點數系統中進行選擇。
</description>
<version>0.1</version>
<date>2007-07-26</date>
<version>1.7</version>
<date>2013-11-27</date>
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
<name xml:lang="ko">NHN</name>
<name xml:lang="zh-CN">NHN</name>
<name xml:lang="jp">NHN</name>
<name xml:lang="en">NHN</name>
<name xml:lang="vi">NHN</name>
<name xml:lang="ge">NHN</name>
<name xml:lang="es">NHN</name>
<name xml:lang="ru">NHN</name>
<name xml:lang="zh-TW">NHN</name>
<name xml:lang="ko">NAVER</name>
<name xml:lang="zh-CN">NAVER</name>
<name xml:lang="jp">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>
</addon>

View file

@ -1,22 +1,23 @@
<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
if(!defined('__XE__'))
exit();
/**
* @file point.addon.php
* @author NHN (developers@xpressengine.com)
* @author NAVER (developers@xpressengine.com)
* @brief Icon-on-point level
*
* Display point level icon before user name when point system is enabled.
* */
// return unless before_display_content
if($called_position != "before_display_content" || Context::get('act') == 'dispPageAdminContentModify')
if($called_position != "before_display_content" || Context::get('act') == 'dispPageAdminContentModify' || Context::getResponseMethod() != 'HTML' || isCrawler())
{
return;
}
require_once('./addons/point_level_icon/point_level_icon.lib.php');
require_once(_XE_PATH_ . 'addons/point_level_icon/point_level_icon.lib.php');
$temp_output = preg_replace_callback('!<(div|span|a)([^\>]*)member_([0-9\-]+)([^\>]*)>(.*?)\<\/(div|span|a)\>!is', 'pointLevelIconTrans', $output);
if($temp_output)

View file

@ -1,4 +1,5 @@
<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
/**
* @brief Function to change point icon.
@ -53,6 +54,7 @@ function pointLevelIconTrans($matches)
$level_icon = sprintf('%smodules/point/icons/%s/%d.gif', Context::getRequestUri(), $config->level_icon, $level);
// Get per to go to the next level if not a top level
$per = NULL;
if($level < $config->max_level)
{
$next_point = $config->level_step[$level + 1];
@ -67,7 +69,7 @@ function pointLevelIconTrans($matches)
$title = sprintf('%s:%s%s%s, %s:%s/%s', Context::getLang('point'), $point, $config->point_name, $per ? ' (' . $per . ')' : '', Context::getLang('level'), $level, $config->max_level);
$alt = sprintf('[%s:%s]', Context::getLang('level'), $level);
$GLOBALS['_pointLevelIcon'][$member_srl] = sprintf('<img src="%s" alt="%s" title="%s" style="vertical-align:middle; margin-right:3px;" />', $level_icon, $alt, $title);
$GLOBALS['_pointLevelIcon'][$member_srl] = sprintf('<img src="%s" alt="%s" title="%s" class="xe_point_level_icon" style="vertical-align:middle;margin-right:3px;" />', $level_icon, $alt, $title);
}
$text = $GLOBALS['_pointLevelIcon'][$member_srl];

View file

@ -36,18 +36,18 @@
<description xml:lang="zh-TW">
自動調整文章内的圖片大小,點擊圖片後會顯示原始大小。
</description>
<version>0.1</version>
<date>2008-04-22</date>
<version>1.7</version>
<date>2013-11-27</date>
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
<name xml:lang="ko">NHN</name>
<name xml:lang="vi">NHN</name>
<name xml:lang="jp">NHN</name>
<name xml:lang="zh-CN">NHN</name>
<name xml:lang="es">NHN</name>
<name xml:lang="ge">NHN</name>
<name xml:lang="ru">NHN</name>
<name xml:lang="en">NHN</name>
<name xml:lang="zh-TW">NHN</name>
<name xml:lang="ko">NAVER</name>
<name xml:lang="vi">NAVER</name>
<name xml:lang="jp">NAVER</name>
<name xml:lang="zh-CN">NAVER</name>
<name xml:lang="es">NAVER</name>
<name xml:lang="ge">NAVER</name>
<name xml:lang="ru">NAVER</name>
<name xml:lang="en">NAVER</name>
<name xml:lang="zh-TW">NAVER</name>
</author>
</addon>

View file

@ -1 +1 @@
.xe_content img{max-width:100%;height:auto}
.xe_content img{max-width:100%;height:auto !important}

View file

@ -1 +1 @@
(function(c){var d=null;function a(){var g=c(document.body);var h,f,e,j,i;if(!d){d=c("<div>").attr("id","xe_gallery_screen").css({position:"fixed",display:"none",backgroundColor:"black",zIndex:500,opacity:0.7});h=c("<div>").attr("id","xe_gallery_controls").css({position:"fixed",display:"none",overflow:"hidden",zIndex:510});j=c('<button type="button" id="xe_gallery_prevbtn" />').css({left:"10px",backgroundPosition:"0 -64px"}).click(function(){d.xePrev()}).appendTo(h);e=c('<button type="button" id="xe_gallery_closebtn" />').css({top:"10px",backgroundPosition:"0 0"}).click(function(){d.xeHide()}).appendTo(h);i=c('<button type="button" id="xe_gallery_nextbtn" />').attr("id","xe_gallery_nextbtn").css({right:"10px",backgroundPosition:"0 -128px"}).click(function(){d.xeNext()}).appendTo(h);h.find(">button").css({position:"absolute",width:"64px",height:"64px",zIndex:530,cursor:"pointer",border:0,margin:0,padding:0,backgroundColor:"transparent",backgroundImage:"url("+request_uri+"addons/resize_image/btn.png)",backgroundRepeat:"no-repeat",opacity:".5",filter:"alpha(opacity=50)"}).mouseover(function(){c(this).css({opacity:"1",filter:"alpha(opacity=100)"})}).mouseout(function(){c(this).css({opacity:".5",filter:"alpha(opacity=50)"})}).focus(function(){c(this).trigger("mouseover")}).blur(function(){c(this).trigger("mouseout")});f=c("<img>").attr("id","xe_gallery_holder").css({border:"5px solid white",zindex:520,maxWidth:"none",borderRadius:"5px",boxShadow:"0 0 10px #000"}).appendTo(h).draggable();g.append(d).append(h);d.xeShow=function(){var l=c(window).width();var k=c(window).height();c("#xe_gallery_controls,#xe_gallery_screen").show().css({top:0,right:0,bottom:0,left:0});c("#xe_gallery_prevbtn,#xe_gallery_nextbtn").css("top",Math.round(k/2-32)+"px");this.xeMove(0)};d.xeHide=function(k){d.hide();h.hide()};d.xePrev=function(){this.xeMove(-1)};d.xeNext=function(){this.xeMove(1)};d.xeMove=function(n){var m=c(window).width();var k=c(window).height();this.index+=n;j.css("visibility",(this.index>0)?"visible":"hidden");i.css("visibility",(this.index<this.list.size()-1)?"visible":"hidden");var l=this.list.eq(this.index).attr("rawsrc");if(!l){l=this.list.eq(this.index).attr("src")}f.attr("src",l).css({left:m/2-f.width()/2+"px",top:k/2-f.height()/2+"px"});e.css({left:m/2-32+"px",top:"10px"}).focus()};c(document).keydown(function(k){if(k.which==27){d.xeHide();return false}else{return true}})}else{h=c("#xe_gallery_controls");f=c("#xe_gallery_holder");e=c("#xe_gallery_closebtn");j=c("#xe_gallery_prevbtn");i=c("#xe_gallery_nextbtn")}return d}function b(h){var f=c(this).closest(".xe_content");var e=f.find("img[rel=xe_gallery]");var g=c.inArray(c(this).get(0),e.get());var i=a();i.list=e;i.index=g;i.xeShow()}c(window).load(function(){var g=/(?:(modules|addons|classes|common|layouts|libs|widgets|widgetstyles)\/)/i;var f=/(?:common\/tpl\/images\/blank\.gif$)/i;var h=c('<div style="height:1px;overflow:hidden;opacity:0;display:block;clear:both"></div>');function e(k,m){if(!m){m=0}if(m>=10){return}var l=this;var j={width:l.width(),height:l.height()};if(!j.width||!j.height){setTimeout(function(){e.call(l,k,++m)},200);return}if(j.width<=k){return}var i=k/j.width;l.removeAttr("width").removeAttr("height").css({width:k,height:parseInt(j.height*i,10)})}c(".xe_content").each(function(){var i=h.appendTo(this).width();h.remove();if(!i){return}c("img",this).each(function(){var j=c(this);var k=j.attr("src");if(g.test(k)&&!f.test(k)){return}j.attr("rel","xe_gallery");e.call(j,i)});c("img[rel=xe_gallery]",this).live("mouseover",function(){var j=c(this);if(!j.parent("a").length&&!j.attr("onclick")){j.css("cursor","pointer").click(b)}})})})})(jQuery);
!function(a){function b(){var b,c,e,f,g,h=a(document.body);return d?(b=a("#xe_gallery_controls"),c=a("#xe_gallery_holder"),e=a("#xe_gallery_closebtn"),f=a("#xe_gallery_prevbtn"),g=a("#xe_gallery_nextbtn")):(d=a("<div>").attr("id","xe_gallery_screen").css({position:"fixed",display:"none",backgroundColor:"black",zIndex:500,opacity:.7}),b=a("<div>").attr("id","xe_gallery_controls").css({position:"fixed",display:"none",overflow:"hidden",zIndex:510}),f=a('<button type="button" id="xe_gallery_prevbtn" />').css({left:"10px",backgroundPosition:"0 -64px"}).click(function(){d.xePrev()}).appendTo(b),e=a('<button type="button" id="xe_gallery_closebtn" />').css({top:"10px",backgroundPosition:"0 0"}).click(function(){d.xeHide()}).appendTo(b),g=a('<button type="button" id="xe_gallery_nextbtn" />').attr("id","xe_gallery_nextbtn").css({right:"10px",backgroundPosition:"0 -128px"}).click(function(){d.xeNext()}).appendTo(b),b.find(">button").css({position:"absolute",width:"64px",height:"64px",zIndex:530,cursor:"pointer",border:0,margin:0,padding:0,backgroundColor:"transparent",backgroundImage:"url("+request_uri+"addons/resize_image/btn.png)",backgroundRepeat:"no-repeat",opacity:".5",filter:"alpha(opacity=50)"}).mouseover(function(){a(this).css({opacity:"1",filter:"alpha(opacity=100)"})}).mouseout(function(){a(this).css({opacity:".5",filter:"alpha(opacity=50)"})}).focus(function(){a(this).trigger("mouseover")}).blur(function(){a(this).trigger("mouseout")}),c=a("<img>").attr("id","xe_gallery_holder").css({border:"5px solid white",zindex:520,maxWidth:"none",borderRadius:"5px",boxShadow:"0 0 10px #000"}).appendTo(b).draggable(),h.append(d).append(b),d.xeShow=function(){var b=(a(window).width(),a(window).height());a("#xe_gallery_controls,#xe_gallery_screen").show().css({top:0,right:0,bottom:0,left:0}),a("#xe_gallery_prevbtn,#xe_gallery_nextbtn").css("top",Math.round(b/2-32)+"px"),this.xeMove(0)},d.xeHide=function(){d.hide(),b.hide()},d.xePrev=function(){this.xeMove(-1)},d.xeNext=function(){this.xeMove(1)},d.xeMove=function(b){var d=a(window).width(),h=a(window).height();this.index+=b,f.css("visibility",this.index>0?"visible":"hidden"),g.css("visibility",this.index<this.list.size()-1?"visible":"hidden");var i=this.list.eq(this.index).attr("rawsrc");i||(i=this.list.eq(this.index).attr("src")),c.attr("src",i).css({left:d/2-c.width()/2+"px",top:h/2-c.height()/2+"px"}),e.css({left:d/2-32+"px",top:"10px"}).focus()},a(document).keydown(function(a){return 27==a.which?(d.xeHide(),!1):!0})),d}function c(){var c=a(this).closest(".xe_content"),d=c.find("img[rel=xe_gallery]"),e=a.inArray(a(this).get(0),d.get()),f=b();f.list=d,f.index=e,f.xeShow()}var d=null;a(window).load(function(){function b(a,c){if(c||(c=0),!(c>=10)){var d=this,e={width:d.width(),height:d.height()};if(!e.width||!e.height)return void setTimeout(function(){b.call(d,a,++c)},200);if(!(e.width<=a)){var f=a/e.width;d.removeAttr("width").removeAttr("height").css({width:a,height:parseInt(e.height*f,10)})}}}var d=/(?:(modules|addons|classes|common|layouts|libs|widgets|widgetstyles)\/)/i,e=/(?:common\/tpl\/images\/blank\.gif$)/i,f=a('<div style="height:1px;overflow:hidden;opacity:0;display:block;clear:both"></div>');a(".xe_content").each(function(){var g=f.appendTo(this).width();f.remove(),g&&(a("img",this).each(function(){var c=a(this),f=c.attr("src");(!d.test(f)||e.test(f))&&(c.attr("rel","xe_gallery"),b.call(c,g))}),a("img[rel=xe_gallery]",this).live("mouseover",function(){var b=a(this);b.parent("a").length||b.attr("onclick")||b.css("cursor","pointer").click(c)}))})})}(jQuery);

View file

@ -1,14 +1,15 @@
<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
if(!defined('__XE__'))
exit();
/**
* @file resize_image.addon.php
* @author NHN (developers@xpressengine.com)
* @author NAVER (developers@xpressengine.com)
* @brief Add-on to resize images in the body
*/
if($called_position == 'after_module_proc' && Context::getResponseMethod() == "HTML")
if($called_position == 'after_module_proc' && Context::getResponseMethod() == "HTML" || !isCrawler())
{
if(Mobile::isFromMobilePhone())
{

View file

@ -2,6 +2,7 @@
<html lang="ko">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
<title>XE Admin Help</title>
<link rel="stylesheet" href="../common/css/bootstrap.min.css">
@ -252,11 +253,11 @@ body,table,input,textarea,select,button{font-family:나눔고딕,NanumGothic,NG,
<section class="h3">
<h1 id="UMAN_core_install_file_download">XE core 설치 파일 다운로드</h1>
<p>XE를 사용하여 사이트를 생성하려면 XE core를 설치해야 합니다. XE core는 XE의 설치와 운영을 담당하는 핵심 프로그램입니다. XE core에는 사이트 관리에 사용되는 기능이 없습니다. 하지만 XE core가 있어야 사용자가 추가 기능(모듈, 레이아웃, 스킨 등)을 설치하고 실행할 수 있습니다.</p>
<p>최신 XE core 설치 파일은 <a href="http://code.google.com/p/xe-core/downloads/list" target="_blank">http://code.google.com/p/xe-core/downloads/list</a>에서 무료로 다운로드할 수 있습니다.</p>
<p>최신 XE core 설치 파일은 <a href="http://www.xpressengine.com/index.php?mid=download&package_srl=18325662&type=all" target="_blank">http://www.xpressengine.com/index.php?mid=download&package_srl=18325662&type=all</a>에서 무료로 다운로드할 수 있습니다.</p>
<blockquote> <strong>참고</strong>
<p>Windows 환경에서 WPI를 사용해 XE를 설치할 때는 XE core 설치 파일을 다운로드할 필요가 없습니다.</p>
</blockquote>
<p>XE core 설치 파일은 zip과 tgz, 두 가지 형식으로 제공됩니다. 내 컴퓨터에서 압축을 해제한 후 서버에 업로드하려면 zip 파일을, 압축 파일을 서버에 업로드한 후 압축을 해제하려면 tgz 파일을 다운로드합니다. 각 형식의 파일 업로드 방식은 &quot;XE core 설치 파일 형식별 업로드 방법&quot;을 참조하십시오.</p>
<p>다운로드 받은 XE core 설치 파일의 압축을 해제한 후 서버에 업로드하려면 zip 파일을, 압축 파일을 서버에 업로드한 후 압축을 해제하려면 tgz 파일을 다운로드합니다. 각 형식의 파일 업로드 방식은 &quot;XE core 설치 파일 형식별 업로드 방법&quot;을 참조하십시오.</p>
</section>
</section>
<section class="h2">
@ -418,6 +419,8 @@ body,table,input,textarea,select,button{font-family:나눔고딕,NanumGothic,NG,
<li id="UMAN_config_general_sso">SSO 사용: 사용자가 한 번만 로그인하면 기본 사이트와 가상 사이트에 동시에 로그인이 됩니다. 가상 사이트를 사용할 때만 필요합니다.</li>
<li id="UMAN_config_general_db_session">인증 세션 DB 사용: 인증 시 사용되는 PHP 세션을 DB로 사용하는 기능입니다. 웹서버의 사용률이 낮은 사이트에서는 비활성화시 사이트 응답 속도가 향상될 수 있습니다. 단, 현재 접속자를 구할 수 없어 관련된 기능을 사용할 수 없게 됩니다.</li>
<li id="UMAN_config_general_qmail">Qmail 호환: Qmail등 CRLF를 줄 구분자로 인식하지 못하는 MTA에서 메일이 발송되도록 합니다.</li>
<li id="UMAN_config_general_sitelock">사이트 잠금: 지정한 IP 외 접근을 차단할 수 있습니다.</li>
<li id="UMAN_config_general_sitelock_whitelist">접근 허용 IP: 이곳에 관리자의 IP가 반드시 포함되어야 합니다. 만약 접근이 차단된 경우 './files/config/db.config.php' 파일에서 `'use_sitelock' => 'Y'`를 `'use_sitelock' => 'N'`으로 변경하여 차단을 해제할 수 있습니다.</li>
</ul>
</dd>
<dt id="UMAN_config_ftp">FTP 설정</dt>
@ -438,6 +441,23 @@ body,table,input,textarea,select,button{font-family:나눔고딕,NanumGothic,NG,
<dd>파일박스를 관리할 수 있습니다. 파일박스는 관리자가 재사용할 수 있는 이미지 파일을 관리하는 기능입니다. 회원 그룹 아이콘을 등록하면 이미지 파일은 파일박스에 업로드됩니다.</dd>
</dl>
</section>
<section class="h3">
<h1 id="UMAN_config_embed_filter">embed Filter</h1>
<p>&lt;iframe&gt; 또는 &lt;object&gt;, &lt;embed&gt; 태그에 허용 할 URL을 지정할 수 있습니다.<br>주로 domain을 포함한 URL을 지정하여 허용 URL을 지정할 수 있습니다.</p>
<p>domain을 포함하지 않은 짧거나 단순한 단어('video', 'swf' 등)만을 지정할 경우 손쉽게 악의적인 접근을 시도할 수 있으니 주의해야 합니다.</p>
<dl>
<dt id="UMAN_config_embed_filter_iframe">iFrame</dt>
<dd>
<p>&lt;iframe&gt; 태그에 허용 할 URL을 지정할 수 있습니다.</p>
<p>예시 : 'http://www.youtube.com/v/...'와 같은 URL을 &lt;iframe&gt;에 허용 하려면 'http://www.youtube.com/v/'처럼 입력하면 됩니다.</p>
</dd>
<dt id="UMAN_config_embed_filter_object">object / embed</dt>
<dd>
<p>&lt;object&gt;, &lt;embed&gt; 태그에 허용 할 URL을 지정할 수 있습니다.</p>
<p>주로 domain을 포함한 URL을 지정하여 허용 URL을 지정할 수 있습니다.<br>예시 : 'http://www.youtube.com/v/...'와 같은 URL을 &lt;object&gt;, &lt;embed&gt;에 허용 하려면 'http://www.youtube.com/v/'처럼 입력하면 됩니다.</p>
</dd>
</dl>
</section>
<section class="h3">
<h1 id="UMAN_advanced">고급</h1>
<dl>
@ -958,10 +978,10 @@ body,table,input,textarea,select,button{font-family:나눔고딕,NanumGothic,NG,
</section>
<section class="h2">
<h1 id="UMAN_faq_import">데이터 들여오기</h1>
<p>제로보드4, zb5beta 또는 다른 프로그램의 데이터를 XE 데이터로 이전할 수 있습니다. 데이터의 추출은 공식사이트의 <a href="http://www.xpressengine.com/index.php?mid=download&category_srl=18324038&parent_srl=18322917" target="_blank">자료실</a>에서 다운로드 받으시거나 svn을 통해 <a href="http://xe-migration.googlecode.com/svn/" target="_blank">xe-migration project</a>를 export 받으시면 됩니다.</p>
<p>제로보드4, zb5beta 또는 다른 프로그램의 데이터를 XE 데이터로 이전할 수 있습니다. 데이터의 추출은 공식사이트의 <a href="http://www.xpressengine.com/index.php?mid=download&category_srl=18324038" target="_blank">자료실</a>에서 다운로드 받으시거나 Git을 통해 <a href="https://github.com/xpressengine/migration-tool" target="_blank">migration tool 저장소</a>를 clone 하시면 됩니다.</p>
<p>XE의 '게시물 정보'를 다른 XE사이트 게시물로 이전하는 작업을 예로 들어 설명해 드리도록 하겠습니다.</p>
<ol>
<li>공식사이트의 자료실에서 <a href="http://www.xpressengine.com/index.php?mid=download&category_srl=18324038&parent_srl=18322917&package_srl=18324314" target="_blank">&quot;XpressEngine 데이터 추출 Ver 0.3&quot;</a>을 다운로드 받거나 <a href="http://xe-migration.googlecode.com/svn/" target="_blank">xe-migration project</a>에서 소스를 export 받습니다.</li>
<li>공식사이트의 자료실에서 <a href="http://www.xpressengine.com/index.php?mid=download&package_srl=18324314" target="_blank">&quot;XpressEngine 데이터 추출 Ver 0.3&quot;</a>을 다운로드 받거나 <a href="https://github.com/xpressengine/migration-tool" target="_blank">migration tool 저장소</a>에서 소스를 clone 하시면 됩니다.</li>
<li>다운로드 받은 소스를 URL로 접근 가능한 곳에 압축을 풉니다. 이 예제에서는 XE의 URL이 http://example.com/xe/라면 http://example.com/migration/ 아래로 하겠습니다.</li>
<li>브라우져로 http://example.com/migration/index.php으로 접근하면 아래와 같은 모습을 볼 수 있습니다.
<figure>

View file

@ -1,4 +1,6 @@
<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
header('Location: ../index.php?module=admin');
/* End of file index.php */

View file

@ -1,18 +1,14 @@
<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
/**
* Cache class for APC
*
* @author NHN (developer@xpressengine.com)
* @author NAVER (developer@xpressengine.com)
* */
class CacheApc extends CacheBase
{
/**
* Default valid time
* @var int
*/
var $valid_time = 36000;
public static $isSupport = false;
/**
* Get instance of CacheApc
@ -36,7 +32,6 @@ class CacheApc extends CacheBase
*/
function CacheApc()
{
}
/**
@ -46,7 +41,7 @@ class CacheApc extends CacheBase
*/
function isSupport()
{
return function_exists('apc_add');
return self::$isSupport;
}
/**
@ -66,7 +61,7 @@ class CacheApc extends CacheBase
$valid_time = $this->valid_time;
}
return apc_store(md5(_XE_PATH_ . $key), array(time(), $buff), $valid_time);
return apc_store(md5(_XE_PATH_ . $key), array($_SERVER['REQUEST_TIME'], $buff), $valid_time);
}
/**
@ -154,6 +149,10 @@ class CacheApc extends CacheBase
return apc_clear_cache('user');
}
}
CacheApc::$isSupport = function_exists('apc_add');
/* End of file CacheApc.class.php */
/* Location: ./classes/cache/CacheApc.class.php */

View file

@ -1,21 +1,15 @@
<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
/**
* Cache class for file
*
* Filedisk Cache Handler
*
* @author Arnia Software (xe_dev@arnia.ro)
* @author NAVER (developers@xpressengine.com)
*/
class CacheFile extends CacheBase
{
/**
* Default valid time
* @var int
*/
var $valid_time = 36000;
/**
* Path that value to stored
* @var string
@ -44,10 +38,7 @@ class CacheFile extends CacheBase
function CacheFile()
{
$this->cache_dir = _XE_PATH_ . $this->cache_dir;
if(!is_dir($this->cache_dir))
{
FileHandler::makeDir($this->cache_dir);
}
FileHandler::makeDir($this->cache_dir);
}
/**
@ -58,7 +49,7 @@ class CacheFile extends CacheBase
*/
function getCacheFileName($key)
{
return $this->cache_dir . str_replace(':', '_', $key);
return $this->cache_dir . str_replace(':', DIRECTORY_SEPARATOR, $key) . '.php';
}
/**
@ -82,8 +73,11 @@ class CacheFile extends CacheBase
function put($key, $obj, $valid_time = 0)
{
$cache_file = $this->getCacheFileName($key);
$text = serialize($obj);
FileHandler::writeFile($cache_file, $text);
$content = array();
$content[] = '<?php';
$content[] = 'if(!defined(\'__XE__\')) { exit(); }';
$content[] = 'return \'' . addslashes(serialize($obj)) . '\';';
FileHandler::writeFile($cache_file, implode(PHP_EOL, $content));
}
/**
@ -96,8 +90,15 @@ class CacheFile extends CacheBase
function isValid($key, $modified_time = 0)
{
$cache_file = $this->getCacheFileName($key);
if(file_exists($cache_file))
{
if($modified_time > 0 && filemtime($cache_file) < $modified_timed)
{
FileHandler::removeFile($cache_file);
return false;
}
return true;
}
@ -113,14 +114,20 @@ class CacheFile extends CacheBase
*/
function get($key, $modified_time = 0)
{
$cache_file = $this->getCacheFileName($key);
$content = FileHandler::readFile($cache_file);
if(!$content)
if(!$cache_file = FileHandler::exists($this->getCacheFileName($key)))
{
return false;
}
if($modified_time > 0 && filemtime($cache_file) < $modified_timed)
{
FileHandler::removeFile($cache_file);
return false;
}
return unserialize($content);
$content = include($cache_file);
return unserialize(stripslashes($content));
}
/**

View file

@ -1,13 +1,13 @@
<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
/**
* CacheHandler
*
* @author NHN (developer@xpressengine.com)
* @author NAVER (developer@xpressengine.com)
*/
class CacheHandler extends Handler
{
/**
* instance of cache handler
* @var CacheBase
@ -125,9 +125,23 @@ class CacheHandler extends Handler
{
return true;
}
return false;
}
/**
* Get cache name by key
*
* @param string $key The key that will be associated with the item.
* @return string Returns cache name
*/
function getCacheKey($key)
{
$key = str_replace('/', ':', $key);
return __XE_VERSION__ . ':' . $key;
}
/**
* Get cached data
*
@ -142,6 +156,9 @@ class CacheHandler extends Handler
{
return false;
}
$key = $this->getCacheKey($key);
return $this->handler->get($key, $modified_time);
}
@ -157,10 +174,13 @@ class CacheHandler extends Handler
*/
function put($key, $obj, $valid_time = 0)
{
if(!$this->handler)
if(!$this->handler && !$key)
{
return false;
}
$key = $this->getCacheKey($key);
return $this->handler->put($key, $obj, $valid_time);
}
@ -176,6 +196,9 @@ class CacheHandler extends Handler
{
return false;
}
$key = $this->getCacheKey($key);
return $this->handler->delete($key);
}
@ -193,6 +216,9 @@ class CacheHandler extends Handler
{
return false;
}
$key = $this->getCacheKey($key);
return $this->handler->isValid($key, $modified_time);
}
@ -207,6 +233,7 @@ class CacheHandler extends Handler
{
return false;
}
return $this->handler->truncate();
}
@ -234,7 +261,7 @@ class CacheHandler extends Handler
$this->handler->put('key_group_versions', $this->keyGroupVersions, 0);
}
return $this->keyGroupVersions[$keyGroupName] . ':' . $keyGroupName . ':' . $key;
return 'cache_group_' . $this->keyGroupVersions[$keyGroupName] . ':' . $keyGroupName . ':' . $key;
}
/**
@ -254,10 +281,15 @@ class CacheHandler extends Handler
/**
* Base class of Cache
*
* @author NHN (developer@xpressengine.com)
* @author NAVER (developer@xpressengine.com)
*/
class CacheBase
{
/**
* Default valid time
* @var int
*/
var $valid_time = 36000;
/**
* Get cached data

View file

@ -1,19 +1,13 @@
<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
/**
* Cache class for memcache
*
* @author NHN (developer@xpressengine.com)
* @author NAVER (developer@xpressengine.com)
*/
class CacheMemcache extends CacheBase
{
/**
* Default valid time
* @var int
*/
var $valid_time = 36000;
/**
* instance of Memcahe
* @var Memcahe
@ -62,10 +56,11 @@ class CacheMemcache extends CacheBase
*/
function isSupport()
{
if($GLOBALS['XE_MEMCACHE_SUPPORT'])
if(isset($GLOBALS['XE_MEMCACHE_SUPPORT']))
{
return true;
}
if($this->Memcache->set('xe', 'xe', MEMCACHE_COMPRESSED, 1))
{
$GLOBALS['XE_MEMCACHE_SUPPORT'] = true;
@ -74,6 +69,7 @@ class CacheMemcache extends CacheBase
{
$GLOBALS['XE_MEMCACHE_SUPPORT'] = false;
}
return $GLOBALS['XE_MEMCACHE_SUPPORT'];
}
@ -112,7 +108,7 @@ class CacheMemcache extends CacheBase
$valid_time = $this->valid_time;
}
return $this->Memcache->set($this->getKey($key), array(time(), $buff), MEMCACHE_COMPRESSED, $valid_time);
return $this->Memcache->set($this->getKey($key), array($_SERVER['REQUEST_TIME'], $buff), MEMCACHE_COMPRESSED, $valid_time);
}
/**

View file

@ -1,4 +1,5 @@
<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
/**
* Cache class for Wincache
@ -9,12 +10,7 @@
*/
class CacheWincache extends CacheBase
{
/**
* Default valid time
* @var int
*/
var $valid_time = 36000;
public static $isSupport = false;
/**
* Get instance of CacheWincache
@ -38,7 +34,6 @@ class CacheWincache extends CacheBase
*/
function CacheWincache()
{
}
/**
@ -48,7 +43,7 @@ class CacheWincache extends CacheBase
*/
function isSupport()
{
return function_exists('wincache_ucache_set');
return self::$isSupport;
}
/**
@ -68,7 +63,7 @@ class CacheWincache extends CacheBase
{
$valid_time = $this->valid_time;
}
return wincache_ucache_set(md5(_XE_PATH_ . $key), array(time(), $buff), $valid_time);
return wincache_ucache_set(md5(_XE_PATH_ . $key), array($_SERVER['REQUEST_TIME'], $buff), $valid_time);
}
/**
@ -156,7 +151,8 @@ class CacheWincache extends CacheBase
{
return wincache_ucache_clear();
}
}
CacheWincache::$isSupport = function_exists('wincache_ucache_set');
/* End of file CacheWincache.class.php */
/* Location: ./classes/cache/CacheWincache.class.php */

Some files were not shown because too many files have changed in this diff Show more