You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by sn...@apache.org on 2006/10/08 21:54:16 UTC
svn commit: r454197 [2/29] - in /incubator/roller/trunk/web:
WEB-INF/classes/ roller-ui/authoring/editors/
roller-ui/authoring/editors/xinha/ roller-ui/authoring/editors/xinha/conf/
roller-ui/authoring/editors/xinha/contrib/ roller-ui/authoring/editors...
Modified: incubator/roller/trunk/web/WEB-INF/classes/rollerRuntimeConfigDefs.xml
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/WEB-INF/classes/rollerRuntimeConfigDefs.xml?view=diff&rev=454197&r1=454196&r2=454197
==============================================================================
--- incubator/roller/trunk/web/WEB-INF/classes/rollerRuntimeConfigDefs.xml (original)
+++ incubator/roller/trunk/web/WEB-INF/classes/rollerRuntimeConfigDefs.xml Sun Oct 8 12:53:13 2006
@@ -99,7 +99,7 @@
</property-def>
<property-def name="users.editor.pages" key="configForm.editorPages">
<type>text</type>
- <default-value>editor-text.jsp,editor-rte.jsp</default-value>
+ <default-value>editor-text.jsp,editor-rte.jsp,editor-xinha.jsp</default-value>
<rows>3</rows>
<cols>40</cols>
</property-def>
Modified: incubator/roller/trunk/web/roller-ui/authoring/editors/editor-text.jsp
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/editor-text.jsp?view=diff&rev=454197&r1=454196&r2=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/editor-text.jsp (original)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/editor-text.jsp Sun Oct 8 12:53:13 2006
@@ -15,56 +15,64 @@
copyright in this work, please see the NOTICE file in the top level
directory of this distribution.
-->
-<%-- This page is designed to be included in edit-weblog.jsp --%>
-<%@ include file="/taglibs.jsp" %>
-
-<script type="text/javascript">
-<!--
-function postWeblogEntry(publish) {
- if (publish)
- document.weblogEntryFormEx.publishEntry.value = "true";
- document.weblogEntryFormEx.submit();
-}
-function changeSize(e, num) {
- e.rows = e.rows + num;
- var expires = new Date();
- expires.setTime(expires.getTime() + 24 * 90 * 60 * 60 * 1000); // sets it for approx 90 days.
- setCookie("editorSize",e.rows,expires);
-}
-// -->
-</script>
-
-<%-- ===================================================================== --%>
-<p class="toplabel"><fmt:message key="weblogEdit.summary" /></p>
-
-<html:textarea property="summary" cols="75" rows="5" style="width: 100%" tabindex="2"/>
-<script type="text/javascript">
- <!--
- if (getCookie("editorSize") != null) {
- document.weblogEntryFormEx.text.rows = getCookie("editorSize");
- }
- -->
-</script>
-<table style="width:100%"><tr><td align="right">
- <!-- Add buttons to make this textarea taller or shorter -->
- <input type="button" name="taller" value=" ↓ " onclick="changeSize(document.weblogEntryFormEx.summary, 5)" />
- <input type="button" name="shorter" value=" ↑ " onclick="changeSize(document.weblogEntryFormEx.summary, -5)" />
-</td></tr></table>
-
-<%-- ===================================================================== --%>
-<p class="toplabel"><fmt:message key="weblogEdit.content" /></p>
-
-<html:textarea property="text" cols="75" rows="25" style="width: 100%" tabindex="3"/>
-<script type="text/javascript">
- <!--
- if (getCookie("editorSize") != null) {
- document.weblogEntryFormEx.text.rows = getCookie("editorSize");
- }
- -->
-</script>
-<table style="width:100%"><tr><td align="right">
- <!-- Add buttons to make this textarea taller or shorter -->
- <input type="button" name="taller" value=" ↓ " onclick="changeSize(document.weblogEntryFormEx.text, 5)" />
- <input type="button" name="shorter" value=" ↑ " onclick="changeSize(document.weblogEntryFormEx.text, -5)" />
-</td></tr></table>
-
+<%-- This page is designed to be included in edit-weblog.jsp --%>
+<%@ include file="/taglibs.jsp" %>
+
+<script type="text/javascript">
+<!--
+function postWeblogEntry(publish) {
+ if (publish)
+ document.weblogEntryFormEx.publishEntry.value = "true";
+ document.weblogEntryFormEx.submit();
+}
+function changeSize(e, num) {
+ a = e.rows + num;
+ if (a > 0) e.rows = a;
+ var expires = new Date();
+ expires.setTime(expires.getTime() + 24 * 90 * 60 * 60 * 1000); // sets it for approx 90 days.
+ setCookie("editorSize",e.rows,expires);
+}
+function changeSize1(e, num) {
+ a = e.rows + num;
+ if (a > 0) e.rows = a;
+ var expires = new Date();
+ expires.setTime(expires.getTime() + 24 * 90 * 60 * 60 * 1000); // sets it for approx 90 days.
+ setCookie("editorSize1",e.rows,expires);
+}
+// -->
+</script>
+
+<%-- ===================================================================== --%>
+<p class="toplabel"><fmt:message key="weblogEdit.summary" /></p>
+
+<html:textarea property="summary" cols="75" rows="5" style="width: 100%" tabindex="2"/>
+<script type="text/javascript">
+ <!--
+ if (getCookie("editorSize") != null) {
+ document.weblogEntryFormEx.summary.rows = getCookie("editorSize");
+ }
+ -->
+</script>
+<table style="width:100%"><tr><td align="right">
+ <!-- Add buttons to make this textarea taller or shorter -->
+ <input type="button" name="taller" value=" ↓ " onclick="changeSize(document.weblogEntryFormEx.summary, 5)" />
+ <input type="button" name="shorter" value=" ↑ " onclick="changeSize(document.weblogEntryFormEx.summary, -5)" />
+</td></tr></table>
+
+<%-- ===================================================================== --%>
+<p class="toplabel"><fmt:message key="weblogEdit.content" /></p>
+
+<html:textarea property="text" cols="75" rows="25" style="width: 100%" tabindex="3"/>
+<script type="text/javascript">
+ <!--
+ if (getCookie("editorSize1") != null) {
+ document.weblogEntryFormEx.text.rows = getCookie("editorSize1");
+ }
+ -->
+</script>
+<table style="width:100%"><tr><td align="right">
+ <!-- Add buttons to make this textarea taller or shorter -->
+ <input type="button" name="taller" value=" ↓ " onclick="changeSize1(document.weblogEntryFormEx.text, 5)" />
+ <input type="button" name="shorter" value=" ↑ " onclick="changeSize1(document.weblogEntryFormEx.text, -5)" />
+</td></tr></table>
+
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/editor-xinha.jsp
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/editor-xinha.jsp?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/editor-xinha.jsp (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/editor-xinha.jsp Sun Oct 8 12:53:13 2006
@@ -0,0 +1,51 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. The ASF licenses this file to You
+ under the Apache License, Version 2.0 (the "License"); you may not
+ use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License. For additional information regarding
+ copyright in this work, please see the NOTICE file in the top level
+ directory of this distribution.
+-->
+<%-- This page is designed to be included in edit-weblog.jsp --%>
+<%@ include file="/taglibs.jsp" %>
+
+<script type="text/javascript">
+<!--
+function postWeblogEntry() {
+ document.weblogEntryFormEx.summary.value = xinha_editors.textarea1.getHTML();
+ document.weblogEntryFormEx.text.value = xinha_editors.textarea2.getHTML();
+ document.weblogEntryFormEx.submit();
+}
+
+// (preferably absolute) URL (including trailing slash) where Xinha is installed
+_editor_url = '<c:url value="/roller-ui/authoring/editors/xinha/" />'
+
+// And the language we need to use in the editor.
+_editor_lang = "en";
+-->
+</script>
+<script type="text/javascript" src='<c:url value="/roller-ui/authoring/editors/xinha/htmlarea.js" />'></script>
+<script type="text/javascript" src='<c:url value="/roller-ui/authoring/editors/xinha/my_config.js" />'></script>
+<noscript><p><b>Javascript must be enabled to use this form.</b></p></noscript>
+
+
+<b><fmt:message key="weblogEdit.summary" /></b><br />
+<html:textarea styleId="textarea1" property="summary" rows="5" cols="50" style="width: 100%"></html:textarea>
+
+<b><fmt:message key="weblogEdit.content" /></b><br />
+<html:textarea styleId="textarea2" property="text" rows="10" cols="50" style="width: 100%"></html:textarea>
+
+
+
+
+
+
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/conf/authz
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/conf/authz?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/conf/authz (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/conf/authz Sun Oct 8 12:53:13 2006
@@ -0,0 +1,21 @@
+### This file is an example authorization file for svnserve.
+### Its format is identical to that of mod_authz_svn authorization
+### files.
+### As shown below each section defines authorizations for the path and
+### (optional) repository specified by the section name.
+### The authorizations follow. An authorization line can refer to a
+### single user, to a group of users defined in a special [groups]
+### section, or to anyone using the '*' wildcard. Each definition can
+### grant read ('r') access, read-write ('rw') access, or no access
+### ('').
+
+[groups]
+# harry_and_sally = harry,sally
+
+# [/foo/bar]
+# harry = rw
+# * =
+
+# [repository:/baz/fuz]
+# @harry_and_sally = rw
+# * = r
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/conf/passwd
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/conf/passwd?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/conf/passwd (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/conf/passwd Sun Oct 8 12:53:13 2006
@@ -0,0 +1,8 @@
+### This file is an example password file for svnserve.
+### Its format is similar to that of svnserve.conf. As shown in the
+### example below it contains one section labelled [users].
+### The name and password for each user follow, one account per line.
+
+[users]
+# harry = harryssecret
+# sally = sallyssecret
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/conf/svnserve.conf
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/conf/svnserve.conf?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/conf/svnserve.conf (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/conf/svnserve.conf Sun Oct 8 12:53:13 2006
@@ -0,0 +1,30 @@
+### This file controls the configuration of the svnserve daemon, if you
+### use it to allow access to this repository. (If you only allow
+### access through http: and/or file: URLs, then this file is
+### irrelevant.)
+
+### Visit http://subversion.tigris.org/ for more information.
+
+[general]
+### These options control access to the repository for unauthenticated
+### and authenticated users. Valid values are "write", "read",
+### and "none". The sample settings below are the defaults.
+# anon-access = read
+# auth-access = write
+### The password-db option controls the location of the password
+### database file. Unless you specify a path starting with a /,
+### the file's location is relative to the conf directory.
+### Uncomment the line below to use the default password file.
+# password-db = passwd
+### The authz-db option controls the location of the authorization
+### rules for path-based access control. Unless you specify a path
+### starting with a /, the file's location is relative to the conf
+### directory. If you don't specify an authz-db, no path-based access
+### control is done.
+### Uncomment the line below to use the default authorization file.
+# authz-db = authz
+### This option specifies the authentication realm of the repository.
+### If two repositories have the same authentication realm, they should
+### have the same password database, and vice versa. The default realm
+### is repository's uuid.
+# realm = My First Repository
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/contrib/lc_parse_strings.php
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/contrib/lc_parse_strings.php?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/contrib/lc_parse_strings.php (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/contrib/lc_parse_strings.php Sun Oct 8 12:53:13 2006
@@ -0,0 +1,264 @@
+<?php
+//die("this script is disabled for security");
+
+/**
+ * LC-Parse-Strings-Script
+ *
+ * This script parses all xinhas source-files and creates base lang-files
+ * in the lang-folders (one for base and one every plugin)
+ *
+ * How To use it: - remove the die() in line 2 (security)
+ * - make sure all lang-folders are writeable for your webserver
+ * - open the contrib/lc_parse_strings.php in your browser
+ * - lang/base.js will be written
+ * - open base.js, translate all strings into your language and save it
+ * as yourlangauge.js
+ * - send the translated file to the xinha-team
+ **/
+
+
+
+error_reporting(E_ALL);
+
+$ret = array();
+$files = getFiles("../", "js$");
+foreach($files as $file)
+{
+ $fp = fopen($file, "r");
+ $data = "";
+ while(!feof($fp)) {
+ $data .= fread($fp, 1024);
+ }
+
+ preg_match_all('#_lc\("([^"]+)"\)|_lc\(\'([^\']+)\'\)#', $data, $m);
+ foreach($m[1] as $i) {
+ if(trim($i)=="") continue;
+ $ret[] = $i;
+ }
+ foreach($m[2] as $i) {
+ if(trim($i)=="") continue;
+ $ret[] = $i;
+ }
+
+ if(eregi('htmlarea\\.js$', $file)) {
+ //toolbar-buttons
+ //bold: [ "Bold"
+ preg_match_all('#[a-z]+: *\[ * "([^"]+)"#', $data, $m);
+ foreach($m[1] as $i) {
+ if(trim($i)=="") continue;
+ $ret[] = $i;
+ }
+
+ //HTMLArea._lc({key: 'button_bold', string
+ preg_match_all('#HTMLArea\\._lc\\({key: \'([^\']*)\'#', $data, $m);
+ foreach($m[1] as $i) {
+ if(trim($i)=="") continue;
+ $ret[] = $i;
+ }
+
+ //config.fontname, fontsize and formatblock
+ $data = substr($data, strpos($data, "this.fontname = {"), strpos($data, "this.customSelects = {};")-strpos($data, "this.fontname = {"));
+ preg_match_all('#"([^"]+)"[ \t]*:[ \t]*["\'][^"\']*["\'],?#', $data, $m);
+ foreach($m[1] as $i) {
+ if(trim($i)=="") continue;
+ $ret[] = $i;
+ }
+ }
+}
+
+$files = getFiles("../popups/", "html$");
+foreach($files as $file)
+{
+ if(preg_match("#custom2.html$#", $file)) continue;
+ if(preg_match('#old_#', $file)) continue;
+ $ret = array_merge($ret, parseHtmlFile($file));
+}
+$ret = array_unique($ret);
+$langData['HTMLArea'] = $ret;
+
+
+
+$plugins = getFiles("../plugins/");
+foreach($plugins as $pluginDir)
+{
+ $plugin = substr($pluginDir, 12);
+ if($plugin=="ibrowser") continue;
+ $ret = array();
+
+ $files = getFiles("$pluginDir/", "js$");
+ $files = array_merge($files, getFiles("$pluginDir/popups/", "html$"));
+ $files = array_merge($files, getFiles("$pluginDir/", "php$"));
+ foreach($files as $file)
+ {
+ $fp = fopen($file, "r");
+ $data = "";
+ if($fp) {
+ echo "$file open...<br>";
+ while(!feof($fp)) {
+ $data .= fread($fp, 1024);
+ }
+ preg_match_all('#_lc\("([^"]+)"|_lc\(\'([^\']+)\'#', $data, $m);
+ foreach($m[1] as $i) {
+ if(trim(strip_tags($i))=="") continue;
+ $ret[] = $i;
+ }
+ foreach($m[2] as $i) {
+ if(trim(strip_tags($i))=="") continue;
+ $ret[] = $i;
+ }
+ }
+ }
+
+ if($plugin=="TableOperations")
+ {
+ preg_match_all('#options = \\[([^\\]]+)\\];#', $data, $m);
+ foreach($m[1] as $i) {
+ preg_match_all('#"([^"]+)"#', $i, $m1);
+ foreach($m1[1] as $i) {
+ $ret[] = $i;
+ }
+ }
+
+ //["cell-delete", "td", "Delete cell"],
+ preg_match_all('#\\["[^"]+",[ \t]*"[^"]+",[ \t]*"([^"]+)"\\]#', $data, $m);
+ foreach($m[1] as $i) {
+ $ret[] = $i;
+ }
+ }
+
+
+ $files = getFiles("$pluginDir/", "html$");
+ $files = array_merge($files, getFiles("$pluginDir/", "php$"));
+ foreach($files as $file)
+ {
+ $ret = array_merge($ret, parseHtmlFile($file, $plugin));
+ }
+
+ $files = getFiles("$pluginDir/popups/", "html$");
+ foreach($files as $file)
+ {
+ $ret = array_merge($ret, parseHtmlFile($file, $plugin));
+ }
+ $ret = array_unique($ret);
+
+ $langData[$plugin] = $ret;
+}
+
+foreach($langData as $plugin=>$strings)
+{
+ if(sizeof($strings)==0) continue;
+
+
+ $data = "// I18N constants\n";
+ $data .= "//\n";
+ $data .= "//LANG: \"base\", ENCODING: UTF-8\n";
+ $data .= "//Author: Translator-Name, <em...@example.com>\n";
+ $data .= "// FOR TRANSLATORS:\n";
+ $data .= "//\n";
+ $data .= "// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE\n";
+ $data .= "// (at least a valid email address)\n";
+ $data .= "//\n";
+ $data .= "// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;\n";
+ $data .= "// (if this is not possible, please include a comment\n";
+ $data .= "// that states what encoding is necessary.)\n";
+ $data .= "\n";
+ $data .= "{\n";
+ sort($strings);
+ foreach($strings as $string) {
+ $string = str_replace(array('\\', '"'), array('\\\\', '\\"'), $string);
+ $data .= " \"".$string."\": \"\",\n";
+ }
+ $data = substr($data, 0, -2);
+ $data .= "\n";
+ $data .= "}\n";
+
+ if($plugin=="HTMLArea")
+ $file = "../lang/base.js";
+ else
+ $file = "../plugins/$plugin/lang/base.js";
+
+ $fp = fopen($file, "w");
+ if(!$fp) continue;
+ fwrite($fp, $data);
+ fclose($fp);
+ echo "$file written...<br>";
+}
+
+
+
+
+function parseHtmlFile($file, $plugin="")
+{
+ $ret = array();
+
+ $fp = fopen($file, "r");
+ if(!$fp) {
+ die("invalid fp");
+ }
+ $data = "";
+ while(!feof($fp)) {
+ $data .= fread($fp, 1024);
+ }
+
+ if($plugin=="FormOperations" || $plugin=="SuperClean" || $plugin=="Linker") {
+ //<l10n>-tags for inline-dialog or panel-dialog based dialogs
+ $elems = array("l10n");
+ } else {
+ $elems = array("title", "input", "select", "legend", "span", "option", "td", "button", "div", "label");
+ }
+ foreach($elems as $elem) {
+ preg_match_all("#<{$elem}[^>]*>([^<^\"]+)</$elem>#i", $data, $m);
+ foreach($m[1] as $i) {
+ if(trim(strip_tags($i))=="") continue;
+ if($i=="/") continue;
+ if($plugin=="ImageManager" && preg_match('#^--+$#', $i)) continue; //skip those ------
+ if($plugin=="CharacterMap" && preg_match('#&[a-z0-9]+;#i', trim($i)) || $i=="@") continue;
+ if($plugin=="SpellChecker" && preg_match('#^\'\\.\\$[a-z]+\\.\'$#', $i)) continue;
+ $ret[] = trim($i);
+ }
+ }
+
+ if($plugin=="FormOperations" || $plugin=="SuperClean" || $plugin=="Linker")
+ {
+ //_( for inline-dialog or panel-dialog based dialogs
+ preg_match_all('#"_\(([^"]+)\)"#i', $data, $m);
+ foreach($m[1] as $i) {
+ if(trim($i)=="") continue;
+ $ret[] = $i;
+ }
+ }
+ else
+ {
+ preg_match_all('#title="([^"]+)"#i', $data, $m);
+ foreach($m[1] as $i) {
+ if(trim(strip_tags($i))=="") continue;
+ if(strip_tags($i)==" - ") continue; //skip those - (ImageManager)
+ $ret[] = $i;
+ }
+ }
+ return($ret);
+}
+
+
+function getFiles($rootdirpath, $eregi_match='') {
+ $array = array();
+ if ($dir = @opendir($rootdirpath)) {
+ $array = array();
+ while (($file = readdir($dir)) !== false) {
+ if($file=="." || $file==".." || $file==".svn") continue;
+ if($eregi_match=="")
+ $array[] = $rootdirpath."/".$file;
+ else if(eregi($eregi_match,$file))
+ $array[] = $rootdirpath."/".$file;
+
+ }
+ closedir($dir);
+ }
+ return $array;
+}
+
+
+
+
+
+?>
Propchange: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/contrib/lc_parse_strings.php
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/contrib/php-xinha.php
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/contrib/php-xinha.php?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/contrib/php-xinha.php (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/contrib/php-xinha.php Sun Oct 8 12:53:13 2006
@@ -0,0 +1,202 @@
+<?php
+ /** Write the appropriate xinha_config directives to pass data to a PHP (Plugin) backend file.
+ *
+ * ImageManager Example:
+ * The following would be placed in step 3 of your configuration (see the NewbieGuide
+ * (http://xinha.python-hosting.com/wiki/NewbieGuide)
+ *
+ * <script language="javascript">
+ * with (xinha_config.ImageManager)
+ * {
+ * <?php
+ * xinha_pass_to_php_backend
+ * (
+ * array
+ * (
+ * 'images_dir' => '/home/your/directory',
+ * 'images_url' => '/directory'
+ * )
+ * )
+ * ?>
+ * }
+ * </script>
+ *
+ */
+
+ function xinha_pass_to_php_backend($Data, $KeyLocation = 'Xinha:BackendKey')
+ {
+
+ $bk = array();
+ $bk['data'] = serialize($Data);
+
+ @session_start();
+ if(!isset($_SESSION[$KeyLocation]))
+ {
+ $_SESSION[$KeyLocation] = uniqid('Key_');
+ }
+
+ $bk['session_name'] = session_name();
+ $bk['key_location'] = $KeyLocation;
+ $bk['hash'] =
+ function_exists('sha1') ?
+ sha1($_SESSION[$KeyLocation] . $bk['data'])
+ : md5($_SESSION[$KeyLocation] . $bk['data']);
+
+
+ // The data will be passed via a postback to the
+ // backend, we want to make sure these are going to come
+ // out from the PHP as an array like $bk above, so
+ // we need to adjust the keys.
+ $backend_data = array();
+ foreach($bk as $k => $v)
+ {
+ $backend_data["backend_data[$k]"] = $v;
+ }
+
+ // The session_start() above may have been after data was sent, so cookies
+ // wouldn't have worked.
+ $backend_data[session_name()] = session_id();
+
+ echo 'backend_data = ' . xinha_to_js($backend_data) . "; \n";
+
+ }
+
+ /** Convert PHP data structure to Javascript */
+
+ function xinha_to_js($var, $tabs = 0)
+ {
+ if(is_numeric($var))
+ {
+ return $var;
+ }
+
+ if(is_string($var))
+ {
+ return "'" . xinha_js_encode($var) . "'";
+ }
+
+ if(is_array($var))
+ {
+ $useObject = false;
+ foreach(array_keys($var) as $k) {
+ if(!is_numeric($k)) $useObject = true;
+ }
+ $js = array();
+ foreach($var as $k => $v)
+ {
+ $i = "";
+ if($useObject) {
+ if(preg_match('#^[a-zA-Z]+[a-zA-Z0-9]*$#', $k)) {
+ $i .= "$k: ";
+ } else {
+ $i .= "'$k': ";
+ }
+ }
+ $i .= xinha_to_js($v, $tabs + 1);
+ $js[] = $i;
+ }
+ if($useObject) {
+ $ret = "{\n" . xinha_tabify(implode(",\n", $js), $tabs) . "\n}";
+ } else {
+ $ret = "[\n" . xinha_tabify(implode(",\n", $js), $tabs) . "\n]";
+ }
+ return $ret;
+ }
+
+ return 'null';
+ }
+
+ /** Like htmlspecialchars() except for javascript strings. */
+
+ function xinha_js_encode($string)
+ {
+ static $strings = "\\,\",',%,&,<,>,{,},@,\n,\r";
+
+ if(!is_array($strings))
+ {
+ $tr = array();
+ foreach(explode(',', $strings) as $chr)
+ {
+ $tr[$chr] = sprintf('\x%02X', ord($chr));
+ }
+ $strings = $tr;
+ }
+
+ return strtr($string, $strings);
+ }
+
+
+ /** Used by plugins to get the config passed via
+ * xinha_pass_to_backend()
+ * returns either the structure given, or NULL
+ * if none was passed or a security error was encountered.
+ */
+
+ function xinha_read_passed_data()
+ {
+ if(isset($_REQUEST['backend_data']) && is_array($_REQUEST['backend_data']))
+ {
+ $bk = $_REQUEST['backend_data'];
+ session_name($bk['session_name']);
+ @session_start();
+ if(!isset($_SESSION[$bk['key_location']])) return NULL;
+
+ if($bk['hash'] ===
+ function_exists('sha1') ?
+ sha1($_SESSION[$bk['key_location']] . $bk['data'])
+ : md5($_SESSION[$bk['key_location']] . $bk['data']))
+ {
+ return unserialize(ini_get('magic_quotes_gpc') ? stripslashes($bk['data']) : $bk['data']);
+ }
+ }
+
+ return NULL;
+ }
+
+ /** Used by plugins to get a query string that can be sent to the backend
+ * (or another part of the backend) to send the same data.
+ */
+
+ function xinha_passed_data_querystring()
+ {
+ $qs = array();
+ if(isset($_REQUEST['backend_data']) && is_array($_REQUEST['backend_data']))
+ {
+ foreach($_REQUEST['backend_data'] as $k => $v)
+ {
+ $v = ini_get('magic_quotes_gpc') ? stripslashes($v) : $v;
+ $qs[] = "backend_data[" . rawurlencode($k) . "]=" . rawurlencode($v);
+ }
+ }
+
+ $qs[] = session_name() . '=' . session_id();
+ return implode('&', $qs);
+ }
+
+
+ /** Just space-tab indent some text */
+ function xinha_tabify($text, $tabs)
+ {
+ if($text)
+ {
+ return str_repeat(" ", $tabs) . preg_replace('/\n(.)/', "\n" . str_repeat(" ", $tabs) . "\$1", $text);
+ }
+ }
+
+ /** Return upload_max_filesize value from php.ini in kilobytes (function adapted from php.net)**/
+ function upload_max_filesize_kb()
+ {
+ $val = ini_get('upload_max_filesize');
+ $val = trim($val);
+ $last = strtolower($val{strlen($val)-1});
+ switch($last)
+ {
+ // The 'G' modifier is available since PHP 5.1.0
+ case 'g':
+ $val *= 1024;
+ case 'm':
+ $val *= 1024;
+ }
+ return $val;
+}
+?>
\ No newline at end of file
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/db/current
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/db/current?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/db/current (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/db/current Sun Oct 8 12:53:13 2006
@@ -0,0 +1 @@
+0 1 1
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/db/format
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/db/format?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/db/format (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/db/format Sun Oct 8 12:53:13 2006
@@ -0,0 +1 @@
+1
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/db/fs-type
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/db/fs-type?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/db/fs-type (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/db/fs-type Sun Oct 8 12:53:13 2006
@@ -0,0 +1 @@
+fsfs
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/db/revprops/0
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/db/revprops/0?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/db/revprops/0 (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/db/revprops/0 Sun Oct 8 12:53:13 2006
@@ -0,0 +1,5 @@
+K 8
+svn:date
+V 27
+2006-06-29T04:36:11.991500Z
+END
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/db/revs/0
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/db/revs/0?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/db/revs/0 (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/db/revs/0 Sun Oct 8 12:53:13 2006
@@ -0,0 +1,11 @@
+PLAIN
+END
+ENDREP
+id: 0.0.r0/17
+type: dir
+count: 0
+text: 0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e
+cpath: /
+
+
+17 107
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/db/uuid
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/db/uuid?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/db/uuid (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/db/uuid Sun Oct 8 12:53:13 2006
@@ -0,0 +1 @@
+5eea2584-b8b6-4340-af44-1d8a5d749e22
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/db/write-lock
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/db/write-lock?view=auto&rev=454197
==============================================================================
(empty)
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/dialog.js
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/dialog.js?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/dialog.js (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/dialog.js Sun Oct 8 12:53:13 2006
@@ -0,0 +1,80 @@
+// htmlArea v3.0 - Copyright (c) 2003-2004 interactivetools.com, inc.
+// This copyright notice MUST stay intact for use (see license.txt).
+//
+// Portions (c) dynarch.com, 2003-2004
+//
+// A free WYSIWYG editor replacement for <textarea> fields.
+// For full source code and docs, visit http://www.interactivetools.com/
+//
+// Version 3.0 developed by Mihai Bazon.
+// http://dynarch.com/mishoo
+//
+// $Id: dialog.js 594 2006-10-03 16:13:53Z ray $
+
+// Though "Dialog" looks like an object, it isn't really an object. Instead
+// it's just namespace for protecting global symbols.
+
+function Dialog(url, action, init) {
+ if (typeof init == "undefined") {
+ init = window; // pass this window object by default
+ }
+ Dialog._geckoOpenModal(url, action, init);
+}
+
+Dialog._parentEvent = function(ev) {
+ setTimeout( function() { if (Dialog._modal && !Dialog._modal.closed) { Dialog._modal.focus() } }, 50);
+ try {
+ if (Dialog._modal && !Dialog._modal.closed) {
+ HTMLArea._stopEvent(ev);
+ }
+ } catch (e) {
+ //after closing the popup in IE the events are not released and trying to access Dialog._modal.closed causes an error
+ }
+};
+
+
+// should be a function, the return handler of the currently opened dialog.
+Dialog._return = null;
+
+// constant, the currently opened dialog
+Dialog._modal = null;
+
+// the dialog will read it's args from this variable
+Dialog._arguments = null;
+
+Dialog._geckoOpenModal = function(url, action, init) {
+ var dlg = window.open(url, "hadialog",
+ "toolbar=no,menubar=no,personalbar=no,width=10,height=10," +
+ "scrollbars=no,resizable=yes,modal=yes,dependable=yes");
+ Dialog._modal = dlg;
+ Dialog._arguments = init;
+
+ // capture some window's events
+ function capwin(w) {
+ HTMLArea._addEvent(w, "click", Dialog._parentEvent);
+ HTMLArea._addEvent(w, "mousedown", Dialog._parentEvent);
+ HTMLArea._addEvent(w, "focus", Dialog._parentEvent);
+ }
+ // release the captured events
+ function relwin(w) {
+ HTMLArea._removeEvent(w, "click", Dialog._parentEvent);
+ HTMLArea._removeEvent(w, "mousedown", Dialog._parentEvent);
+ HTMLArea._removeEvent(w, "focus", Dialog._parentEvent);
+ }
+ capwin(window);
+ // capture other frames, note the exception trapping, this is because
+ // we are not permitted to add events to frames outside of the current
+ // window's domain.
+ for (var i = 0; i < window.frames.length; i++) {try { capwin(window.frames[i]); } catch(e) { } };
+ // make up a function to be called when the Dialog ends.
+ Dialog._return = function (val) {
+ if (val && action) {
+ action(val);
+ }
+ relwin(window);
+ // capture other frames
+ for (var i = 0; i < window.frames.length; i++) { try { relwin(window.frames[i]); } catch(e) { } };
+ Dialog._modal = null;
+ };
+ Dialog._modal.focus();
+};
\ No newline at end of file
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/format
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/format?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/format (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/format Sun Oct 8 12:53:13 2006
@@ -0,0 +1 @@
+3
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/post-commit.tmpl
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/post-commit.tmpl?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/post-commit.tmpl (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/post-commit.tmpl Sun Oct 8 12:53:13 2006
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+# POST-COMMIT HOOK
+#
+# The post-commit hook is invoked after a commit. Subversion runs
+# this hook by invoking a program (script, executable, binary, etc.)
+# named 'post-commit' (for which this file is a template) with the
+# following ordered arguments:
+#
+# [1] REPOS-PATH (the path to this repository)
+# [2] REV (the number of the revision just committed)
+#
+# The default working directory for the invocation is undefined, so
+# the program should set one explicitly if it cares.
+#
+# Because the commit has already completed and cannot be undone,
+# the exit code of the hook program is ignored. The hook program
+# can use the 'svnlook' utility to help it examine the
+# newly-committed tree.
+#
+# On a Unix system, the normal procedure is to have 'post-commit'
+# invoke other programs to do the real work, though it may do the
+# work itself too.
+#
+# Note that 'post-commit' must be executable by the user(s) who will
+# invoke it (typically the user httpd runs as), and that user must
+# have filesystem-level permission to access the repository.
+#
+# On a Windows system, you should name the hook program
+# 'post-commit.bat' or 'post-commit.exe',
+# but the basic idea is the same.
+#
+# The hook program typically does not inherit the environment of
+# its parent process. For example, a common problem is for the
+# PATH environment variable to not be set to its usual value, so
+# that subprograms fail to launch unless invoked via absolute path.
+# If you're having unexpected problems with a hook program, the
+# culprit may be unusual (or missing) environment variables.
+#
+# Here is an example hook script, for a Unix /bin/sh interpreter.
+# For more examples and pre-written hooks, see those in
+# the Subversion repository at
+# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and
+# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
+
+
+REPOS="$1"
+REV="$2"
+
+commit-email.pl "$REPOS" "$REV" commit-watchers@example.org
+log-commit.py --repository "$REPOS" --revision "$REV"
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/post-lock.tmpl
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/post-lock.tmpl?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/post-lock.tmpl (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/post-lock.tmpl Sun Oct 8 12:53:13 2006
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+# POST-LOCK HOOK
+#
+# The post-lock hook is run after a path is locked. Subversion runs
+# this hook by invoking a program (script, executable, binary, etc.)
+# named 'post-lock' (for which this file is a template) with the
+# following ordered arguments:
+#
+# [1] REPOS-PATH (the path to this repository)
+# [2] USER (the user who created the lock)
+#
+# The paths that were just locked are passed to the hook via STDIN (as
+# of Subversion 1.2, only one path is passed per invocation, but the
+# plan is to pass all locked paths at once, so the hook program
+# should be written accordingly).
+#
+# The default working directory for the invocation is undefined, so
+# the program should set one explicitly if it cares.
+#
+# Because the lock has already been created and cannot be undone,
+# the exit code of the hook program is ignored. The hook program
+# can use the 'svnlook' utility to help it examine the
+# newly-created lock.
+#
+# On a Unix system, the normal procedure is to have 'post-lock'
+# invoke other programs to do the real work, though it may do the
+# work itself too.
+#
+# Note that 'post-lock' must be executable by the user(s) who will
+# invoke it (typically the user httpd runs as), and that user must
+# have filesystem-level permission to access the repository.
+#
+# On a Windows system, you should name the hook program
+# 'post-lock.bat' or 'post-lock.exe',
+# but the basic idea is the same.
+#
+# Here is an example hook script, for a Unix /bin/sh interpreter:
+
+REPOS="$1"
+USER="$2"
+
+# Send email to interested parties, let them know a lock was created:
+mailer.py lock "$REPOS" "$USER" /path/to/mailer.conf
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/post-revprop-change.tmpl
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/post-revprop-change.tmpl?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/post-revprop-change.tmpl (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/post-revprop-change.tmpl Sun Oct 8 12:53:13 2006
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+# POST-REVPROP-CHANGE HOOK
+#
+# The post-revprop-change hook is invoked after a revision property
+# has been added, modified or deleted. Subversion runs this hook by
+# invoking a program (script, executable, binary, etc.) named
+# 'post-revprop-change' (for which this file is a template), with the
+# following ordered arguments:
+#
+# [1] REPOS-PATH (the path to this repository)
+# [2] REV (the revision that was tweaked)
+# [3] USER (the username of the person tweaking the property)
+# [4] PROPNAME (the property that was changed)
+# [5] ACTION (the property was 'A'dded, 'M'odified, or 'D'eleted)
+#
+# [STDIN] PROPVAL ** the old property value is passed via STDIN.
+#
+# Because the propchange has already completed and cannot be undone,
+# the exit code of the hook program is ignored. The hook program
+# can use the 'svnlook' utility to help it examine the
+# new property value.
+#
+# On a Unix system, the normal procedure is to have 'post-revprop-change'
+# invoke other programs to do the real work, though it may do the
+# work itself too.
+#
+# Note that 'post-revprop-change' must be executable by the user(s) who will
+# invoke it (typically the user httpd runs as), and that user must
+# have filesystem-level permission to access the repository.
+#
+# On a Windows system, you should name the hook program
+# 'post-revprop-change.bat' or 'post-revprop-change.exe',
+# but the basic idea is the same.
+#
+# The hook program typically does not inherit the environment of
+# its parent process. For example, a common problem is for the
+# PATH environment variable to not be set to its usual value, so
+# that subprograms fail to launch unless invoked via absolute path.
+# If you're having unexpected problems with a hook program, the
+# culprit may be unusual (or missing) environment variables.
+#
+# Here is an example hook script, for a Unix /bin/sh interpreter.
+# For more examples and pre-written hooks, see those in
+# the Subversion repository at
+# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and
+# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
+
+
+REPOS="$1"
+REV="$2"
+USER="$3"
+PROPNAME="$4"
+ACTION="$5"
+
+propchange-email.pl "$REPOS" "$REV" "$USER" "$PROPNAME" watchers@example.org
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/post-unlock.tmpl
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/post-unlock.tmpl?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/post-unlock.tmpl (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/post-unlock.tmpl Sun Oct 8 12:53:13 2006
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+# POST-UNLOCK HOOK
+#
+# The post-unlock hook runs after a path is unlocked. Subversion runs
+# this hook by invoking a program (script, executable, binary, etc.)
+# named 'post-unlock' (for which this file is a template) with the
+# following ordered arguments:
+#
+# [1] REPOS-PATH (the path to this repository)
+# [2] USER (the user who destroyed the lock)
+#
+# The paths that were just unlocked are passed to the hook via STDIN
+# (as of Subversion 1.2, only one path is passed per invocation, but
+# the plan is to pass all unlocked paths at once, so the hook program
+# should be written accordingly).
+#
+# The default working directory for the invocation is undefined, so
+# the program should set one explicitly if it cares.
+#
+# Because the lock has already been destroyed and cannot be undone,
+# the exit code of the hook program is ignored.
+#
+# On a Unix system, the normal procedure is to have 'post-unlock'
+# invoke other programs to do the real work, though it may do the
+# work itself too.
+#
+# Note that 'post-unlock' must be executable by the user(s) who will
+# invoke it (typically the user httpd runs as), and that user must
+# have filesystem-level permission to access the repository.
+#
+# On a Windows system, you should name the hook program
+# 'post-unlock.bat' or 'post-unlock.exe',
+# but the basic idea is the same.
+#
+# Here is an example hook script, for a Unix /bin/sh interpreter:
+
+REPOS="$1"
+USER="$2"
+
+# Send email to interested parties, let them know a lock was removed:
+mailer.py unlock "$REPOS" "$USER" /path/to/mailer.conf
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/pre-commit.tmpl
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/pre-commit.tmpl?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/pre-commit.tmpl (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/pre-commit.tmpl Sun Oct 8 12:53:13 2006
@@ -0,0 +1,70 @@
+#!/bin/sh
+
+# PRE-COMMIT HOOK
+#
+# The pre-commit hook is invoked before a Subversion txn is
+# committed. Subversion runs this hook by invoking a program
+# (script, executable, binary, etc.) named 'pre-commit' (for which
+# this file is a template), with the following ordered arguments:
+#
+# [1] REPOS-PATH (the path to this repository)
+# [2] TXN-NAME (the name of the txn about to be committed)
+#
+# The default working directory for the invocation is undefined, so
+# the program should set one explicitly if it cares.
+#
+# If the hook program exits with success, the txn is committed; but
+# if it exits with failure (non-zero), the txn is aborted, no commit
+# takes place, and STDERR is returned to the client. The hook
+# program can use the 'svnlook' utility to help it examine the txn.
+#
+# On a Unix system, the normal procedure is to have 'pre-commit'
+# invoke other programs to do the real work, though it may do the
+# work itself too.
+#
+# *** NOTE: THE HOOK PROGRAM MUST NOT MODIFY THE TXN, EXCEPT ***
+# *** FOR REVISION PROPERTIES (like svn:log or svn:author). ***
+#
+# This is why we recommend using the read-only 'svnlook' utility.
+# In the future, Subversion may enforce the rule that pre-commit
+# hooks should not modify the versioned data in txns, or else come
+# up with a mechanism to make it safe to do so (by informing the
+# committing client of the changes). However, right now neither
+# mechanism is implemented, so hook writers just have to be careful.
+#
+# Note that 'pre-commit' must be executable by the user(s) who will
+# invoke it (typically the user httpd runs as), and that user must
+# have filesystem-level permission to access the repository.
+#
+# On a Windows system, you should name the hook program
+# 'pre-commit.bat' or 'pre-commit.exe',
+# but the basic idea is the same.
+#
+# The hook program typically does not inherit the environment of
+# its parent process. For example, a common problem is for the
+# PATH environment variable to not be set to its usual value, so
+# that subprograms fail to launch unless invoked via absolute path.
+# If you're having unexpected problems with a hook program, the
+# culprit may be unusual (or missing) environment variables.
+#
+# Here is an example hook script, for a Unix /bin/sh interpreter.
+# For more examples and pre-written hooks, see those in
+# the Subversion repository at
+# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and
+# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
+
+
+REPOS="$1"
+TXN="$2"
+
+# Make sure that the log message contains some text.
+SVNLOOK=/usr/local/bin/svnlook
+$SVNLOOK log -t "$TXN" "$REPOS" | \
+ grep "[a-zA-Z0-9]" > /dev/null || exit 1
+
+# Check that the author of this commit has the rights to perform
+# the commit on the files and directories being modified.
+commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg || exit 1
+
+# All checks passed, so allow the commit.
+exit 0
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/pre-lock.tmpl
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/pre-lock.tmpl?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/pre-lock.tmpl (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/pre-lock.tmpl Sun Oct 8 12:53:13 2006
@@ -0,0 +1,64 @@
+#!/bin/sh
+
+# PRE-LOCK HOOK
+#
+# The pre-lock hook is invoked before an exclusive lock is
+# created. Subversion runs this hook by invoking a program
+# (script, executable, binary, etc.) named 'pre-lock' (for which
+# this file is a template), with the following ordered arguments:
+#
+# [1] REPOS-PATH (the path to this repository)
+# [2] PATH (the path in the repository about to be locked)
+# [3] USER (the user creating the lock)
+#
+# The default working directory for the invocation is undefined, so
+# the program should set one explicitly if it cares.
+#
+# If the hook program exits with success, the lock is created; but
+# if it exits with failure (non-zero), the lock action is aborted
+# and STDERR is returned to the client.
+
+# On a Unix system, the normal procedure is to have 'pre-lock'
+# invoke other programs to do the real work, though it may do the
+# work itself too.
+#
+# Note that 'pre-lock' must be executable by the user(s) who will
+# invoke it (typically the user httpd runs as), and that user must
+# have filesystem-level permission to access the repository.
+#
+# On a Windows system, you should name the hook program
+# 'pre-lock.bat' or 'pre-lock.exe',
+# but the basic idea is the same.
+#
+# Here is an example hook script, for a Unix /bin/sh interpreter:
+
+REPOS="$1"
+PATH="$2"
+USER="$3"
+
+# If a lock exists and is owned by a different person, don't allow it
+# to be stolen (e.g., with 'svn lock --force ...').
+
+# (Maybe this script could send email to the lock owner?)
+SVNLOOK=/usr/local/bin/svnlook
+GREP=/bin/grep
+SED=/bin/sed
+
+LOCK_OWNER=`$SVNLOOK lock "$REPOS" "$PATH" | \
+ $GREP '^Owner: ' | $SED 's/Owner: //'`
+
+# If we get no result from svnlook, there's no lock, allow the lock to
+# happen:
+if [ "$LOCK_OWNER" == "" ]; then
+ exit 0
+fi
+
+# If the person locking matches the lock's owner, allow the lock to
+# happen:
+if [ "$LOCK_OWNER" == "$USER" ]; then
+ exit 0
+fi
+
+# Otherwise, we've got an owner mismatch, so return failure:
+echo "Error: $PATH already locked by ${LOCK_OWNER}." 1>&2
+exit 1
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/pre-revprop-change.tmpl
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/pre-revprop-change.tmpl?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/pre-revprop-change.tmpl (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/pre-revprop-change.tmpl Sun Oct 8 12:53:13 2006
@@ -0,0 +1,66 @@
+#!/bin/sh
+
+# PRE-REVPROP-CHANGE HOOK
+#
+# The pre-revprop-change hook is invoked before a revision property
+# is added, modified or deleted. Subversion runs this hook by invoking
+# a program (script, executable, binary, etc.) named 'pre-revprop-change'
+# (for which this file is a template), with the following ordered
+# arguments:
+#
+# [1] REPOS-PATH (the path to this repository)
+# [2] REVISION (the revision being tweaked)
+# [3] USER (the username of the person tweaking the property)
+# [4] PROPNAME (the property being set on the revision)
+# [5] ACTION (the property is being 'A'dded, 'M'odified, or 'D'eleted)
+#
+# [STDIN] PROPVAL ** the new property value is passed via STDIN.
+#
+# If the hook program exits with success, the propchange happens; but
+# if it exits with failure (non-zero), the propchange doesn't happen.
+# The hook program can use the 'svnlook' utility to examine the
+# existing value of the revision property.
+#
+# WARNING: unlike other hooks, this hook MUST exist for revision
+# properties to be changed. If the hook does not exist, Subversion
+# will behave as if the hook were present, but failed. The reason
+# for this is that revision properties are UNVERSIONED, meaning that
+# a successful propchange is destructive; the old value is gone
+# forever. We recommend the hook back up the old value somewhere.
+#
+# On a Unix system, the normal procedure is to have 'pre-revprop-change'
+# invoke other programs to do the real work, though it may do the
+# work itself too.
+#
+# Note that 'pre-revprop-change' must be executable by the user(s) who will
+# invoke it (typically the user httpd runs as), and that user must
+# have filesystem-level permission to access the repository.
+#
+# On a Windows system, you should name the hook program
+# 'pre-revprop-change.bat' or 'pre-revprop-change.exe',
+# but the basic idea is the same.
+#
+# The hook program typically does not inherit the environment of
+# its parent process. For example, a common problem is for the
+# PATH environment variable to not be set to its usual value, so
+# that subprograms fail to launch unless invoked via absolute path.
+# If you're having unexpected problems with a hook program, the
+# culprit may be unusual (or missing) environment variables.
+#
+# Here is an example hook script, for a Unix /bin/sh interpreter.
+# For more examples and pre-written hooks, see those in
+# the Subversion repository at
+# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and
+# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
+
+
+REPOS="$1"
+REV="$2"
+USER="$3"
+PROPNAME="$4"
+ACTION="$5"
+
+if [ "$ACTION" = "M" -a "$PROPNAME" = "svn:log" ]; then exit 0; fi
+
+echo "Changing revision properties other than svn:log is prohibited" >&2
+exit 1
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/pre-unlock.tmpl
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/pre-unlock.tmpl?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/pre-unlock.tmpl (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/pre-unlock.tmpl Sun Oct 8 12:53:13 2006
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+# PRE-UNLOCK HOOK
+#
+# The pre-unlock hook is invoked before an exclusive lock is
+# destroyed. Subversion runs this hook by invoking a program
+# (script, executable, binary, etc.) named 'pre-unlock' (for which
+# this file is a template), with the following ordered arguments:
+#
+# [1] REPOS-PATH (the path to this repository)
+# [2] PATH (the path in the repository about to be unlocked)
+# [3] USER (the user destroying the lock)
+#
+# The default working directory for the invocation is undefined, so
+# the program should set one explicitly if it cares.
+#
+# If the hook program exits with success, the lock is destroyed; but
+# if it exits with failure (non-zero), the unlock action is aborted
+# and STDERR is returned to the client.
+
+# On a Unix system, the normal procedure is to have 'pre-unlock'
+# invoke other programs to do the real work, though it may do the
+# work itself too.
+#
+# Note that 'pre-unlock' must be executable by the user(s) who will
+# invoke it (typically the user httpd runs as), and that user must
+# have filesystem-level permission to access the repository.
+#
+# On a Windows system, you should name the hook program
+# 'pre-unlock.bat' or 'pre-unlock.exe',
+# but the basic idea is the same.
+#
+# Here is an example hook script, for a Unix /bin/sh interpreter:
+
+REPOS="$1"
+PATH="$2"
+USER="$3"
+
+# If a lock is owned by a different person, don't allow it be broken.
+# (Maybe this script could send email to the lock owner?)
+
+SVNLOOK=/usr/local/bin/svnlook
+GREP=/bin/grep
+SED=/bin/sed
+
+LOCK_OWNER=`$SVNLOOK lock "$REPOS" "$PATH" | \
+ $GREP '^Owner: ' | $SED 's/Owner: //'`
+
+# If we get no result from svnlook, there's no lock, return success:
+if [ "$LOCK_OWNER" == "" ]; then
+ exit 0
+fi
+# If the person unlocking matches the lock's owner, return success:
+if [ "$LOCK_OWNER" == "$USER" ]; then
+ exit 0
+fi
+
+# Otherwise, we've got an owner mismatch, so return failure:
+echo "Error: $PATH locked by ${LOCK_OWNER}." 1>&2
+exit 1
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/start-commit.tmpl
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/start-commit.tmpl?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/start-commit.tmpl (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/hooks/start-commit.tmpl Sun Oct 8 12:53:13 2006
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+# START-COMMIT HOOK
+#
+# The start-commit hook is invoked before a Subversion txn is created
+# in the process of doing a commit. Subversion runs this hook
+# by invoking a program (script, executable, binary, etc.) named
+# 'start-commit' (for which this file is a template)
+# with the following ordered arguments:
+#
+# [1] REPOS-PATH (the path to this repository)
+# [2] USER (the authenticated user attempting to commit)
+#
+# The default working directory for the invocation is undefined, so
+# the program should set one explicitly if it cares.
+#
+# If the hook program exits with success, the commit continues; but
+# if it exits with failure (non-zero), the commit is stopped before
+# a Subversion txn is created, and STDERR is returned to the client.
+#
+# On a Unix system, the normal procedure is to have 'start-commit'
+# invoke other programs to do the real work, though it may do the
+# work itself too.
+#
+# Note that 'start-commit' must be executable by the user(s) who will
+# invoke it (typically the user httpd runs as), and that user must
+# have filesystem-level permission to access the repository.
+#
+# On a Windows system, you should name the hook program
+# 'start-commit.bat' or 'start-commit.exe',
+# but the basic idea is the same.
+#
+# The hook program typically does not inherit the environment of
+# its parent process. For example, a common problem is for the
+# PATH environment variable to not be set to its usual value, so
+# that subprograms fail to launch unless invoked via absolute path.
+# If you're having unexpected problems with a hook program, the
+# culprit may be unusual (or missing) environment variables.
+#
+# Here is an example hook script, for a Unix /bin/sh interpreter.
+# For more examples and pre-written hooks, see those in
+# the Subversion repository at
+# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and
+# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
+
+
+REPOS="$1"
+USER="$2"
+
+commit-allower.pl --repository "$REPOS" --user "$USER" || exit 1
+special-auth-check.py --user "$USER" --auth-level 3 || exit 1
+
+# All checks passed, so allow the commit.
+exit 0
Added: incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/htmlarea.css
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/htmlarea.css?view=auto&rev=454197
==============================================================================
--- incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/htmlarea.css (added)
+++ incubator/roller/trunk/web/roller-ui/authoring/editors/xinha/htmlarea.css Sun Oct 8 12:53:13 2006
@@ -0,0 +1,256 @@
+.htmlarea { background: #fff; margin:2px; }
+
+.htmlarea .toolbar {
+ cursor: default;
+ /*background: ButtonFace;*/
+ padding: 3px;
+ border: 1px solid;
+ border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
+}
+.htmlarea .toolbar table { margin: 0; font-family: tahoma,verdana,sans-serif; font-size: 11px; }
+.htmlarea .toolbar img { border: none; vertical-align: top; }
+.htmlarea .toolbar .label { padding: 0px 3px; }
+
+.htmlarea .toolbar .button {
+ /*background: ButtonFace;*/
+ color: ButtonText;
+ border: 1px solid ButtonFace;
+ padding: 1px;
+ margin: 0px;
+ width: 18px;
+ height: 18px;
+}
+.htmlarea .toolbar a.button:hover {
+ border: 1px solid;
+ border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
+}
+.htmlarea .toolbar a.buttonDisabled:hover {
+ /*background: ButtonFace;*/
+}
+.htmlarea .toolbar .buttonActive,
+.htmlarea .toolbar .buttonPressed
+{
+ padding: 2px 0px 0px 2px;
+ border: 1px solid;
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+}
+.htmlarea .toolbar .buttonPressed {
+ background: ButtonHighlight;
+}
+.htmlarea .toolbar .indicator {
+ padding: 0px 3px;
+ overflow: hidden;
+ width: 20px;
+ text-align: center;
+ cursor: default;
+ border: 1px solid ButtonShadow;
+}
+
+.htmlarea .toolbar .buttonDisabled img {
+ filter: gray() alpha(opacity = 25);
+ -moz-opacity: 0.25;
+ opacity: 0.25;
+}
+
+.htmlarea .toolbar .separator {
+ /*position: relative;*/
+ margin: 3px;
+ border-left: 1px solid ButtonShadow;
+ border-right: 1px solid ButtonHighlight;
+ width: 0px;
+ height: 18px;
+ padding: 0px;
+}
+
+.htmlarea .toolbar .space { width: 5px; }
+
+.htmlarea .toolbar select, .htmlarea .toolbar option { font: 11px Tahoma,Verdana,sans-serif;}
+
+.htmlarea .toolbar select,
+.htmlarea .toolbar select:hover,
+.htmlarea .toolbar select:active {
+ margin-top: 2px;
+ margin-bottom: 1px;
+ color: ButtonText;
+}
+
+.htmlarea iframe.xinha_iframe, .htmlarea textarea.xinha_textarea
+{
+ border: none; /*1px solid;*/
+}
+
+.htmlarea .statusBar {
+ border: 1px solid;
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+ padding: 2px 4px;
+ /*background: ButtonFace;*/
+ color: ButtonText;
+ font: 11px Tahoma,Verdana,sans-serif;
+}
+
+.htmlarea .statusBar .statusBarTree a {
+ padding: 2px 5px;
+ color: #00f;
+}
+
+.htmlarea .statusBar .statusBarTree a:visited { color: #00f; }
+.htmlarea .statusBar .statusBarTree a:hover {
+ background-color: Highlight;
+ color: HighlightText;
+ padding: 1px 4px;
+ border: 1px solid HighlightText;
+}
+
+
+/* popup dialogs */
+
+.dialog {
+ color: ButtonText;
+ background: ButtonFace;
+}
+
+.dialog .content { padding: 2px; }
+
+.dialog, .dialog button, .dialog input, .dialog select, .dialog textarea, .dialog table {
+ font: 11px Tahoma,Verdana,sans-serif;
+}
+
+.dialog table { border-collapse: collapse; }
+
+.dialog .title, .dialog h1
+{
+ background: #008;
+ color: #ff8;
+ border-bottom: 1px solid #000;
+ padding: 1px 0px 2px 5px;
+ font-size: 12px;
+ font-weight: bold;
+ cursor: default;
+}
+.dialog h1 { margin:0px;}
+.dialog .title .button {
+ float: right;
+ border: 1px solid #66a;
+ padding: 0px 1px 0px 2px;
+ margin-right: 1px;
+ color: #fff;
+ text-align: center;
+}
+
+.dialog .title .button-hilite { border-color: #88f; background: #44c; }
+
+.dialog button {
+ width: 5em;
+ padding: 0px;
+}
+
+.dialog .buttonColor {
+ padding: 1px;
+ cursor: default;
+ border: 1px solid;
+ border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
+}
+
+.dialog .buttonColor-hilite {
+ border-color: #000;
+}
+
+.dialog .buttonColor .chooser, .dialog .buttonColor .nocolor {
+ height: 0.6em;
+ border: 1px solid;
+ padding: 0px 1em;
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+}
+
+.dialog .buttonColor .nocolor { padding: 0px; }
+.dialog .buttonColor .nocolor-hilite { background-color: #fff; color: #f00; }
+
+.dialog .label { text-align: right; width: 6em; }
+.dialog .value input { width: 100%; }
+.dialog .buttons { text-align: right; padding: 2px 4px 0px 4px; }
+
+.dialog legend { font-weight: bold; }
+.dialog fieldset table { margin: 2px 0px; }
+
+.popupwin {
+ padding: 0px;
+ margin: 0px;
+}
+
+.popupwin .title {
+ background: #fff;
+ color: #000;
+ font-weight: bold;
+ font-size: 120%;
+ padding: 3px 10px;
+ margin-bottom: 10px;
+ border-bottom: 1px solid black;
+ letter-spacing: 2px;
+}
+
+form { margin: 0px; border: none; }
+
+
+/* Panels */
+.htmlarea .panels.top
+{
+ border-bottom : 1px solid;
+ border-color: ButtonShadow;
+}
+
+.htmlarea .panels.right
+{
+ border-left : 1px solid;
+ border-color: ButtonShadow;
+}
+
+.htmlarea .panels.left
+{
+ border-right : 1px solid;
+ border-color: ButtonShadow;
+}
+
+.htmlarea .panels.bottom
+{
+ border-top : 1px solid;
+ border-color: ButtonShadow;
+}
+
+.htmlarea .panel h1 {
+ background: ButtonFace;
+ border: 1px solid;
+ border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
+ margin: 0px;
+ padding: 0px;
+ font-size:100%;
+ font-weight:bold;
+ padding: 2px;
+ clear:left;
+
+}
+
+.htmlarea .panel { overflow:auto; }
+.htmlarea .panels.left .panel { border-right:none; border-left:none; }
+.htmlarea .panels.left h1 { border-right:none; }
+.htmlarea .panels.right .panel { border-right:none; border-left:none; }
+.htmlarea .panels.left h1 { border-left:none; }
+.htmlarea { border: 1px solid black; }
+
+.loading
+{
+ background-color:#666;
+ position:absolute;
+ z-index:998;
+}
+.loading_main
+{
+ font-size:1.6em;
+ color:#ff6;
+ text-align:center;
+}
+.loading_sub
+{
+ font-size:1.0em;
+ color:#fff;
+ text-align:center;
+}