From f47ef50887d69e65e1d95da34af1a1b6f9a03efc Mon Sep 17 00:00:00 2001 From: YuCheng Hu Date: Wed, 16 Jun 2010 20:53:28 +0000 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=B0=20trunk?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit +YUCHENG HU+ git-svn-id: https://svn.code.sf.net/p/hawebs/svn@343 a2543c7e-f6e9-4f8a-8bff-1ffc34733512 --- .../trunk/makeinstall/readme_install.txt | 58 ++++++++++++ oss/joomla/trunk/plugins/content/geshi.php | 88 +++++++++++++++++++ oss/joomla/trunk/plugins/content/geshi.xml | 15 ++++ .../editors/tinymce/templates/index.html | 4 + .../editors/tinymce/templates/layout1.html | 15 ++++ .../editors/tinymce/templates/snippet1.html | 1 + .../tinymce/templates/template_list.js | 20 +++++ .../trunk/templates/system/css/error_rtl.css | 17 ++++ .../trunk/templates/system/css/template.css | 76 ++++++++++++++++ .../templates/system/css/template_rtl.css | 78 ++++++++++++++++ 10 files changed, 372 insertions(+) create mode 100644 oss/joomla/trunk/makeinstall/readme_install.txt create mode 100644 oss/joomla/trunk/plugins/content/geshi.php create mode 100644 oss/joomla/trunk/plugins/content/geshi.xml create mode 100644 oss/joomla/trunk/plugins/editors/tinymce/templates/index.html create mode 100644 oss/joomla/trunk/plugins/editors/tinymce/templates/layout1.html create mode 100644 oss/joomla/trunk/plugins/editors/tinymce/templates/snippet1.html create mode 100644 oss/joomla/trunk/plugins/editors/tinymce/templates/template_list.js create mode 100644 oss/joomla/trunk/templates/system/css/error_rtl.css create mode 100644 oss/joomla/trunk/templates/system/css/template.css create mode 100644 oss/joomla/trunk/templates/system/css/template_rtl.css diff --git a/oss/joomla/trunk/makeinstall/readme_install.txt b/oss/joomla/trunk/makeinstall/readme_install.txt new file mode 100644 index 00000000..a9899a35 --- /dev/null +++ b/oss/joomla/trunk/makeinstall/readme_install.txt @@ -0,0 +1,58 @@ +#################################################### +Joomla 中文版支持包 +2010年06月10日 +#################################################### + +本语言包的安装方法,请参考下面的链接: +http://forums.hawebs.net/computer/viewthread.php?tid=779&extra=page%3D1 + +欢迎使用由 [OSS计算技术] 开源社区贡献的相关软件产品和资料。 + +请在遵守开源软件协议的基础下使用本计算机软件产品。 + +需要说明的是,本语言包是在很多以前版本的基础上逐步扩充合并的。 + +非常感谢相关版本的最初翻译的提供者。 + +为了更好的普及 Joomla 的使用,降低广大用户的使用难度。 + +我们在原中文安装包的基础上制作了这个汉化包。 + +为了你系统的安全,我们不对其他核心的文件和库进行打包。这样可以避免影响到你系统的使用。 + +因为在默认安装程序中,如果你愿意的话会插入英文的 DEMO 数据。 + +那么很多朋友在使用的时候就有点找不到北了。因为很多数据是写入数据库的。 + +我们同时也对 SQL 进行了中文化的处理了。 + +声明: +本软件产品遵守下面 2 个许可协议 + [A] GNU GENERAL PUBLIC LICENSE GNU/LGPL + [B] Apache License, Version 2.0 + +虽然经过在本软件发布之前,我们进行了相关的测试,但是我们不能保证已经清除了所有的 BUG。 + +由于您在使用本软件产品后带来的任何损失,本软件包的提供人以及公司,将不负有任何责任。 + +------------ +I. 快速参考 +------------ + +1. HAWEBS 官方网站 - http://www.hawebs.net/ + +2. OSS计算技术社区 - http://forums.hawebs.net/computer/ + +------------------------------------------------ +II. 关于 HA WEBSYSTEMS 和 OSS计算机技术开源社区 +------------------------------------------------ + +1. HA WEBSYSTEMS 位于美国,新罕布什州。目前致力于促进开源系统在中文环境下的使用。 + +2. [OSS计算技术] 开源社区是 HA WEBSYSTEMS 运营的开放讨论交流平台。 + +------------ +III. 贡献人 +------------ + +1. YUCHENG HU diff --git a/oss/joomla/trunk/plugins/content/geshi.php b/oss/joomla/trunk/plugins/content/geshi.php new file mode 100644 index 00000000..37ab8b4f --- /dev/null +++ b/oss/joomla/trunk/plugins/content/geshi.php @@ -0,0 +1,88 @@ +registerEvent( 'onPrepareContent', 'plgContentGeshi' ); + +/** +* Code Highlighting Plugin +* +* Replaces
...
tags with highlighted text +*/ +function plgContentGeshi( &$row, &$params, $page=0 ) +{ + // simple performance check to determine whether bot should process further + if ( JString::strpos( $row->text, 'pre>' ) === false ) { + return true; + } + + // Get Plugin info + $plugin =& JPluginHelper::getPlugin('content', 'geshi'); + + // define the regular expression for the bot + $regex = "#
(.*?)
#s"; + + $GLOBALS['_MAMBOT_GESHI_PARAMS'] =& $params; + + // perform the replacement + $row->text = preg_replace_callback( $regex, 'plgContentGeshi_replacer', $row->text ); + + return true; +} +/** +* Replaces the matched tags an image +* @param array An array of matches (see preg_match_all) +* @return string +*/ +function plgContentGeshi_replacer( &$matches ) +{ + $params =& $GLOBALS['_MAMBOT_GESHI_PARAMS']; + + jimport('geshi.geshi'); + jimport('domit.xml_saxy_shared'); + + $args = SAXY_Parser_Base::parseAttributes( $matches[1] ); + $text = $matches[2]; + + $lang = JArrayHelper::getValue( $args, 'lang', 'php' ); + $lines = JArrayHelper::getValue( $args, 'lines', 'false' ); + + + $html_entities_match = array( "|\
|", "#<#", "#>#", "|'|", '#"#', '# #' ); + $html_entities_replace = array( "\n", '<', '>', "'", '"', ' ' ); + + $text = preg_replace( $html_entities_match, $html_entities_replace, $text ); + + $text = str_replace('<', '<', $text); + $text = str_replace('>', '>', $text); + +/* + // Replace 2 spaces with "  " so non-tabbed code indents without making huge long lines. + $text = str_replace(" ", "  ", $text); + // now Replace 2 spaces with "  " to catch odd #s of spaces. + $text = str_replace(" ", "  ", $text); +*/ + // Replace tabs with "   " so tabbed code indents sorta right without making huge long lines. + //$text = str_replace("\t", "   ", $text); + $text = str_replace( "\t", ' ', $text ); + + $geshi = new GeSHi( $text, $lang ); + if ($lines == 'true') { + $geshi->enable_line_numbers( GESHI_NORMAL_LINE_NUMBERS ); + } + $text = $geshi->parse_code(); + + return $text; +} \ No newline at end of file diff --git a/oss/joomla/trunk/plugins/content/geshi.xml b/oss/joomla/trunk/plugins/content/geshi.xml new file mode 100644 index 00000000..27c1e1a2 --- /dev/null +++ b/oss/joomla/trunk/plugins/content/geshi.xml @@ -0,0 +1,15 @@ + + + Content - Code Highlighter (GeSHi) + Joomla! Project + November 2005 + Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved. + http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL + qbnz.com/highlighter + 1.5 + DESCGESHI + + geshi.php + + + diff --git a/oss/joomla/trunk/plugins/editors/tinymce/templates/index.html b/oss/joomla/trunk/plugins/editors/tinymce/templates/index.html new file mode 100644 index 00000000..0e44bd0e --- /dev/null +++ b/oss/joomla/trunk/plugins/editors/tinymce/templates/index.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/oss/joomla/trunk/plugins/editors/tinymce/templates/layout1.html b/oss/joomla/trunk/plugins/editors/tinymce/templates/layout1.html new file mode 100644 index 00000000..89a7c144 --- /dev/null +++ b/oss/joomla/trunk/plugins/editors/tinymce/templates/layout1.html @@ -0,0 +1,15 @@ +

[Enter a title here]

+ + + + + + + + + + + + + +
Column 1Column 2
Username: [Enter a user name here]Staffid: [Enter a staff id here]
diff --git a/oss/joomla/trunk/plugins/editors/tinymce/templates/snippet1.html b/oss/joomla/trunk/plugins/editors/tinymce/templates/snippet1.html new file mode 100644 index 00000000..9d7e1e5c --- /dev/null +++ b/oss/joomla/trunk/plugins/editors/tinymce/templates/snippet1.html @@ -0,0 +1 @@ +Some text in bold \ No newline at end of file diff --git a/oss/joomla/trunk/plugins/editors/tinymce/templates/template_list.js b/oss/joomla/trunk/plugins/editors/tinymce/templates/template_list.js new file mode 100644 index 00000000..722b3193 --- /dev/null +++ b/oss/joomla/trunk/plugins/editors/tinymce/templates/template_list.js @@ -0,0 +1,20 @@ +/** + * Tinymce template_list.js sample file + * @version tinymce 3.2.6 + * @package Joomla + * @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved. + * @license GNU/GPL, see LICENSE.php + * Joomla! is free software. This version may have been modified pursuant + * to the GNU General Public License, and as distributed it includes or + * is derivative of works licensed under the GNU General Public License or + * other free or open source software licenses. + * See COPYRIGHT.php for copyright notices and details. + */ + +var tinyMCETemplateList = [ + // Name, URL, Description + + ["Simple snippet", "plugins/editors/tinymce/templates/snippet1.html", "Simple HTML snippet."], + ["Layout", "plugins/editors/tinymce/templates/layout1.html", "HTMLLayout."] + +]; diff --git a/oss/joomla/trunk/templates/system/css/error_rtl.css b/oss/joomla/trunk/templates/system/css/error_rtl.css new file mode 100644 index 00000000..ae4142eb --- /dev/null +++ b/oss/joomla/trunk/templates/system/css/error_rtl.css @@ -0,0 +1,17 @@ +/** + * CSS Document for error page + * @version $Id: error_rtl.css 10387 2009-10-28 10:59:16Z infograf $ + * @package Joomla + * @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved. + * @license GNU/GPL, see LICENSE.php + * Joomla! is free software and parts of it may contain or be derived from the + * GNU General Public License or other free or open source software licenses. + * See COPYRIGHT.php for copyright notices and details. + */ + + +body { direction:rtl;} + +#errorboxbody { text-align: right;} + +#techinfo { text-align: right;} diff --git a/oss/joomla/trunk/templates/system/css/template.css b/oss/joomla/trunk/templates/system/css/template.css new file mode 100644 index 00000000..1ce2a238 --- /dev/null +++ b/oss/joomla/trunk/templates/system/css/template.css @@ -0,0 +1,76 @@ +/** + * CSS Document for the system template.css + * @version $Id: template.css + * @package Joomla + * @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved. + * @license GNU/GPL, see LICENSE.php + * Joomla! is free software and parts of it may contain or be derived from the + * GNU General Public License or other free or open source software licenses. + * See COPYRIGHT.php for copyright notices and details. + */ + +/* Based on work by Eric Meyer, and Blueprint CSS which is licensed under the GNU/GPL */ + + + +/* CSS Reset */ +html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;} +body {line-height:1.5;} +table {border-collapse:separate;border-spacing:0;} +caption, th, td {text-align:left;font-weight:normal;} +table, td, th {vertical-align:middle;} +blockquote:before, blockquote:after, q:before, q:after {content:"";} +blockquote, q {quotes:"" "";} +a img {border:none;} + +/* Typography */ +body {font-size:75%;color:#222;background:#fff;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;} +h1, h2, h3, h4, h5, h6 {font-weight:normal;color:#111;} +h1 {font-size:3em;line-height:1;margin-bottom:0.5em;} +h2 {font-size:2em;margin-bottom:0.75em;} +h3 {font-size:1.5em;line-height:1;margin-bottom:1em;} +h4 {font-size:1.2em;line-height:1.25;margin-bottom:1.25em;} +h5 {font-size:1em;font-weight:bold;margin-bottom:1.5em;} +h6 {font-size:1em;font-weight:bold;} +h1 img, h2 img, h3 img, h4 img, h5 img, h6 img {margin:0;} +p {margin:0 0 1.5em;} +p img.left {float:left;margin:1.5em 1.5em 1.5em 0;padding:0;} +p img.right {float:right;margin:1.5em 0 1.5em 1.5em;} +a:focus, a:hover {color:#000;} +a {color:#009;text-decoration:underline;} +blockquote {margin:1.5em;color:#666;font-style:italic;} +strong {font-weight:bold;} +em, dfn {font-style:italic;} +dfn {font-weight:bold;} +sup, sub {line-height:0;} +abbr, acronym {border-bottom:1px dotted #666;} +address {margin:0 0 1.5em;font-style:italic;} +del {color:#666;} +pre {margin:1.5em 0;white-space:pre;} +pre, code, tt {font:1em 'andale mono', 'lucida console', monospace;line-height:1.5;} +li ul, li ol {margin:0 1.5em;} +ul, ol {margin:0 1.5em 1.5em 1.5em;} +ul {list-style-type:disc;} +ol {list-style-type:decimal;} +dl {margin:0 0 1.5em 0;} +dl dt {font-weight:bold;} +dd {margin-left:1.5em;} +table {margin-bottom:1.4em;width:100%;} +th {font-weight:bold;} +thead th {background:#c3d9ff;} +th, td, caption {padding:4px 10px 4px 5px;} +tr.even td {background:#e5ecf9;} +tfoot {font-style:italic;} +caption {background:#eee;} +.small {font-size:.8em;margin-bottom:1.875em;line-height:1.875em;} +.large {font-size:1.2em;line-height:2.5em;margin-bottom:1.25em;} +.hide {display:none;} +.quiet {color:#666;} +.loud {color:#000;} +.highlight {background:#ff0;} +.added {background:#060;color:#fff;} +.removed {background:#900;color:#fff;} +.first {margin-left:0;padding-left:0;} +.last {margin-right:0;padding-right:0;} +.top {margin-top:0;padding-top:0;} +.bottom {margin-bottom:0;padding-bottom:0;} \ No newline at end of file diff --git a/oss/joomla/trunk/templates/system/css/template_rtl.css b/oss/joomla/trunk/templates/system/css/template_rtl.css new file mode 100644 index 00000000..c3708565 --- /dev/null +++ b/oss/joomla/trunk/templates/system/css/template_rtl.css @@ -0,0 +1,78 @@ +/** + * CSS Document for the system template_rtl.css + * @version $Id: template_rtl.css + * @package Joomla + * @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved. + * @license GNU/GPL, see LICENSE.php + * Joomla! is free software and parts of it may contain or be derived from the + * GNU General Public License or other free or open source software licenses. + * See COPYRIGHT.php for copyright notices and details. + */ + +/* Based on work by Eric Meyer, and Blueprint CSS which is licenced under the GNU/GPL*/ + +/* RTL */ +html {direction: rtl;} +body{direction: rtl;} + +/* CSS Reset */ +html, body, div, span, object, table, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;} +body {line-height:1.5;} +table {border-collapse:separate;border-spacing:0;} +caption, th, td {font-weight:normal;} +table, td, th {vertical-align:middle;} +blockquote:before, blockquote:after, q:before, q:after {content:"";} +blockquote, q {quotes:"" "";} +a img {border:none;} + +/* Typography */ +body {font-size:75%;color:#222;background:#fff;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;} +h1, h2, h3, h4, h5, h6 {font-weight:normal;color:#111;} +h1 {font-size:3em;line-height:1;margin-bottom:0.5em;} +h2 {font-size:2em;margin-bottom:0.75em;} +h3 {font-size:1.5em;line-height:1;margin-bottom:1em;} +h4 {font-size:1.2em;line-height:1.25;margin-bottom:1.25em;} +h5 {font-size:1em;font-weight:bold;margin-bottom:1.5em;} +h6 {font-size:1em;font-weight:bold;} +h1 img, h2 img, h3 img, h4 img, h5 img, h6 img {margin:0;} +p {margin:0 0 1.5em;} +p img.left {float:left;margin:1.5em 1.5em 1.5em 0;padding:0;} +p img.right {float:right;margin:1.5em 0 1.5em 1.5em;} +a:focus, a:hover {color:#000;} +a {color:#009;text-decoration:underline;} +blockquote {margin:1.5em;color:#666;font-style:italic;} +strong {font-weight:bold;} +em, dfn {font-style:italic;} +dfn {font-weight:bold;} +sup, sub {line-height:0;} +abbr, acronym {border-bottom:1px dotted #666;} +address {margin:0 0 1.5em;font-style:italic;} +del {color:#666;} +pre {margin:1.5em 0;white-space:pre;} +pre, code, tt {font:1em 'andale mono', 'lucida console', monospace;line-height:1.5;} +li ul, li ol {margin:0 1.5em;} +ul, ol {margin:0 1.5em 1.5em 1.5em;} +ul {list-style-type:disc;} +ol {list-style-type:decimal;} +dl {margin:0 0 1.5em 0;} +dl dt {font-weight:bold;} +dd {margin-left:1.5em;} +table {margin-bottom:1.4em;width:100%;} +th {font-weight:bold;} +thead th {background:#c3d9ff;} +th, td, caption {padding:4px 10px 4px 5px;} +tr.even td {background:#e5ecf9;} +tfoot {font-style:italic;} +caption {background:#eee;} +.small {font-size:.8em;margin-bottom:1.875em;line-height:1.875em;} +.large {font-size:1.2em;line-height:2.5em;margin-bottom:1.25em;} +.hide {display:none;} +.quiet {color:#666;} +.loud {color:#000;} +.highlight {background:#ff0;} +.added {background:#060;color:#fff;} +.removed {background:#900;color:#fff;} +.first {margin-left:0;padding-left:0;} +.last {margin-right:0;padding-right:0;} +.top {margin-top:0;padding-top:0;} +.bottom {margin-bottom:0;padding-bottom:0;} \ No newline at end of file