mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
merge sandbox to trunk for 1.4.4
git-svn-id: http://xe-core.googlecode.com/svn/trunk@7723 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
200d63636c
commit
b8299c8a65
683 changed files with 70982 additions and 69716 deletions
|
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
if(!defined("__ZBXE__")) exit();
|
||||
|
||||
/**
|
||||
* @file autolink.addon.php
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief 자동 링크 애드온
|
||||
**/
|
||||
if($called_position == 'after_module_proc' && Context::getResponseMethod()!="XMLRPC") {
|
||||
Context::addJsFile('./addons/autolink/autolink.js');
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if(!defined("__ZBXE__")) exit();
|
||||
|
||||
/**
|
||||
* @file autolink.addon.php
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 자동 링크 애드온
|
||||
**/
|
||||
if($called_position == 'after_module_proc' && Context::getResponseMethod()!="XMLRPC") {
|
||||
Context::addJsFile('./addons/autolink/autolink.js');
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,80 +1,80 @@
|
|||
/**
|
||||
* @file autolink.js
|
||||
* @brief javascript code for autolink addon
|
||||
* @author taggon (gonom9@gmail.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 AutoLink = xe.createPlugin("autolink", {
|
||||
targets : [],
|
||||
init : function() {
|
||||
this.targets = [];
|
||||
},
|
||||
API_ONREADY : function() {
|
||||
var thisPlugin = this;
|
||||
|
||||
// extract target text nodes
|
||||
this.extractTargets($('.xe_content'));
|
||||
|
||||
$(this.targets).each(function(){
|
||||
thisPlugin.cast('AUTOLINK', [this]);
|
||||
});
|
||||
},
|
||||
API_AUTOLINK : function(oSender, params) {
|
||||
var textNode = params[0];
|
||||
if(!$(textNode).parent().length || $(textNode).parent().get(0).nodeName.toLowerCase() == 'a') return;
|
||||
var content = textNode.nodeValue;
|
||||
var dummy = $('<span>');
|
||||
|
||||
content = content.replace(/</g, '<').replace(/>/g, '>');
|
||||
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();
|
||||
},
|
||||
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 AutoLink());
|
||||
/**
|
||||
* @file autolink.js
|
||||
* @brief javascript code for autolink addon
|
||||
* @author NHN (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 AutoLink = xe.createPlugin("autolink", {
|
||||
targets : [],
|
||||
init : function() {
|
||||
this.targets = [];
|
||||
},
|
||||
API_ONREADY : function() {
|
||||
var thisPlugin = this;
|
||||
|
||||
// extract target text nodes
|
||||
this.extractTargets($('.xe_content'));
|
||||
|
||||
$(this.targets).each(function(){
|
||||
thisPlugin.cast('AUTOLINK', [this]);
|
||||
});
|
||||
},
|
||||
API_AUTOLINK : function(oSender, params) {
|
||||
var textNode = params[0];
|
||||
if(!$(textNode).parent().length || $(textNode).parent().get(0).nodeName.toLowerCase() == 'a') return;
|
||||
var content = textNode.nodeValue;
|
||||
var dummy = $('<span>');
|
||||
|
||||
content = content.replace(/</g, '<').replace(/>/g, '>');
|
||||
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();
|
||||
},
|
||||
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 AutoLink());
|
||||
})(jQuery);
|
||||
|
|
@ -1,53 +1,53 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<addon version="0.2">
|
||||
<title xml:lang="ko">자동 링크 애드온</title>
|
||||
<title xml:lang="jp">自動リンクアドオン</title>
|
||||
<title xml:lang="en">Auto Link</title>
|
||||
<title xml:lang="vi">Auto Link</title>
|
||||
<title xml:lang="zh-CN">自动链接插件</title>
|
||||
<title xml:lang="es">auto vínculo addon</title>
|
||||
<title xml:lang="ru">авто ссылка аддон</title>
|
||||
<title xml:lang="ge">Auto-Link Addon</title>
|
||||
<title xml:lang="zh-TW">自動連結</title>
|
||||
<description xml:lang="ko">
|
||||
글과 댓글의 내용 중 URL 문자열에 링크를 걸어주는 애드온입니다.
|
||||
</description>
|
||||
<description xml:lang="jp">
|
||||
書き込み本文とコメントに登録された内容の中、httpで始まる一般文字列に自動にリンクを貼り付け、そのリンクにマウスオーバすると、別ウィンドウ、または同一ウィンドウに開くメニュが現れるアドオンです。
|
||||
</description>
|
||||
<description xml:lang="en">
|
||||
This addon makes a link to a string that starts with http.
|
||||
</description>
|
||||
<description xml:lang="vi">
|
||||
Addon này sẽ tự động tạo ra một đường Link khi gặp chuỗi kí tự 'http' có trong bài viết.
|
||||
</description>
|
||||
<description xml:lang="zh-CN">
|
||||
主题及评论中以http开始的字符串,自动转换为链接。并且鼠标移到链接上方时,将出现可选(新窗/本页面)提示框。
|
||||
</description>
|
||||
<description xml:lang="es">
|
||||
Los comentarios que comienzan con http naeyongjung tema común de la cadena para vincular automáticamente a colgar el puntero del ratón sobre cada uno de los vínculos y saechang Ciudad y aparecen en el menú de add-on de decoración.
|
||||
</description>
|
||||
<description xml:lang="ru">
|
||||
Комментарии, которые начинаются с http naeyongjung темой общей строки автоматически ссылку повесить мышь над каждой ссылке и saechang Сити и появляться на меню добавить-на украшения.
|
||||
</description>
|
||||
<description xml:lang="ge">
|
||||
Kommentare beginnen mit http naeyongjung Thema der gemeinsamen String automatisch Link zu hängen Sie mit der Maus über die einzelnen Links und saechang Stadt und auf dem Menü des Add-On Dekoration.
|
||||
</description>
|
||||
<description xml:lang="zh-TW">
|
||||
是種可將主題和評論內容中的URL網址字串自動轉換成連結的附加元件。
|
||||
</description>
|
||||
<version>0.1</version>
|
||||
<date>2008-04-22</date>
|
||||
|
||||
<author email_address="zero@zeroboard.com" link="http://blog.nzeo.com">
|
||||
<name xml:lang="ko">zero</name>
|
||||
<name xml:lang="jp">zero</name>
|
||||
<name xml:lang="en">zero</name>
|
||||
<name xml:lang="vi">zero</name>
|
||||
<name xml:lang="zh-CN">zero</name>
|
||||
<name xml:lang="es">zero</name>
|
||||
<name xml:lang="ru">zero</name>
|
||||
<name xml:lang="ge">zero</name>
|
||||
<name xml:lang="zh-TW">zero</name>
|
||||
</author>
|
||||
</addon>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<addon version="0.2">
|
||||
<title xml:lang="ko">자동 링크 애드온</title>
|
||||
<title xml:lang="jp">自動リンクアドオン</title>
|
||||
<title xml:lang="en">Auto Link</title>
|
||||
<title xml:lang="vi">Auto Link</title>
|
||||
<title xml:lang="zh-CN">自动链接插件</title>
|
||||
<title xml:lang="es">auto vínculo addon</title>
|
||||
<title xml:lang="ru">авто ссылка аддон</title>
|
||||
<title xml:lang="ge">Auto-Link Addon</title>
|
||||
<title xml:lang="zh-TW">自動連結</title>
|
||||
<description xml:lang="ko">
|
||||
글과 댓글의 내용 중 URL 문자열에 링크를 걸어주는 애드온입니다.
|
||||
</description>
|
||||
<description xml:lang="jp">
|
||||
書き込み本文とコメントに登録された内容の中、httpで始まる一般文字列に自動にリンクを貼り付け、そのリンクにマウスオーバすると、別ウィンドウ、または同一ウィンドウに開くメニュが現れるアドオンです。
|
||||
</description>
|
||||
<description xml:lang="en">
|
||||
This addon makes a link to a string that starts with http.
|
||||
</description>
|
||||
<description xml:lang="vi">
|
||||
Addon này sẽ tự động tạo ra một đường Link khi gặp chuỗi kí tự 'http' có trong bài viết.
|
||||
</description>
|
||||
<description xml:lang="zh-CN">
|
||||
主题及评论中以http开始的字符串,自动转换为链接。并且鼠标移到链接上方时,将出现可选(新窗/本页面)提示框。
|
||||
</description>
|
||||
<description xml:lang="es">
|
||||
Los comentarios que comienzan con http naeyongjung tema común de la cadena para vincular automáticamente a colgar el puntero del ratón sobre cada uno de los vínculos y saechang Ciudad y aparecen en el menú de add-on de decoración.
|
||||
</description>
|
||||
<description xml:lang="ru">
|
||||
Комментарии, которые начинаются с http naeyongjung темой общей строки автоматически ссылку повесить мышь над каждой ссылке и saechang Сити и появляться на меню добавить-на украшения.
|
||||
</description>
|
||||
<description xml:lang="ge">
|
||||
Kommentare beginnen mit http naeyongjung Thema der gemeinsamen String automatisch Link zu hängen Sie mit der Maus über die einzelnen Links und saechang Stadt und auf dem Menü des Add-On Dekoration.
|
||||
</description>
|
||||
<description xml:lang="zh-TW">
|
||||
是種可將主題和評論內容中的URL網址字串自動轉換成連結的附加元件。
|
||||
</description>
|
||||
<version>0.1</version>
|
||||
<date>2008-04-22</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>
|
||||
</author>
|
||||
</addon>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue