|
From: Jon O. <jon...@us...> - 2008-05-21 21:58:42
|
Update of /cvsroot/mxbb/mx_simpledoc/simpledoc/modules In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv17041 Modified Files: simpledoc__tab-edit-content.php simpledoc_index.php Log Message: rewritten, a lot, for tinyMCE Index: simpledoc_index.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/modules/simpledoc_index.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** simpledoc_index.php 30 Jun 2006 12:24:38 -0000 1.4 --- simpledoc_index.php 21 May 2008 21:58:37 -0000 1.5 *************** *** 19,23 **** { global $template, $lang, $db, $theme, $board_config, $phpEx, $simpledoc_config, $debug, $mx_root_path, $module_root_path, $CONTENT, $PUBLISH; ! global $mx_page, $mx_block, $simpledoc_projectName; // --- 19,23 ---- { global $template, $lang, $db, $theme, $board_config, $phpEx, $simpledoc_config, $debug, $mx_root_path, $module_root_path, $CONTENT, $PUBLISH; ! global $mx_page, $mx_block, $simpledoc_projectName, $theme, $userdata; // *************** *** 38,41 **** --- 38,106 ---- $tree_html = $this->build_tree_html($tree); + $convert = array( + 'arabic' => 'ar', + 'bulgarian' => 'bg', + 'catalan' => 'ca', + 'czech' => 'cs', + 'danish' => 'da', + 'german' => 'de', + 'english' => 'en', + 'estonian' => 'et', + 'finnish' => 'fi', + 'french' => 'fr', + 'greek' => 'el', + 'spanish_argentina' => 'es[_-]ar', + 'spanish' => 'es', + 'gaelic' => 'gd', + 'galego' => 'gl', + 'gujarati' => 'gu', + 'hebrew' => 'he', + 'hindi' => 'hi', + 'croatian' => 'hr', + 'hungarian' => 'hu', + 'icelandic' => 'is', + 'indonesian' => 'id', + 'italian' => 'it', + 'japanese' => 'ja', + 'korean' => 'ko', + 'latvian' => 'lv', + 'lithuanian' => 'lt', + 'macedonian' => 'mk', + 'dutch' => 'nl', + 'norwegian' => 'no', + 'punjabi' => 'pa', + 'polish' => 'pl', + 'portuguese_brazil' => 'pt[_-]br', + 'portuguese' => 'pt', + 'romanian' => 'ro', + 'russian' => 'ru', + 'slovenian' => 'sl', + 'albanian' => 'sq', + 'serbian' => 'sr', + 'slovak' => 'sv', + 'swedish' => 'sv', + 'thai' => 'th', + 'turkish' => 'tr', + 'ukranian' => 'uk', + 'urdu' => 'ur', + 'viatnamese' => 'vi', + 'chinese_traditional_taiwan' => 'zh[_-]tw', + 'chinese_simplified' => 'zh', + ); + + $user_lang = $userdata['user_lang']; + + if ( !file_exists( $mx_root_path . 'modules/mx_shared/tinymce/jscripts/tiny_mce/langs/' . $convert[$user_lang] . '.js' ) ) + { + $user_lang = $board_config['default_lang']; + + if ( !file_exists( $mx_root_path . 'modules/mx_shared/tinymce/jscripts/tiny_mce/langs/' . $convert[$user_lang] . '.js' ) ) + { + $user_lang = 'english'; + } + } + + $tiny_lang = $convert[$user_lang]; + $template->assign_vars( array( 'MX_ROOT_PATH' => $mx_root_path, *************** *** 118,121 **** --- 183,193 ---- 'VIEW_DOC' => ' - <a href="'.$this->this_simpledoc_mxurl('mode=view').'" >[' . $lang['sd_Doc_view'] . ']</a>', + // + // TinyMCE + // + 'PATH' => $mx_root_path, + 'LANG' => $tiny_lang, + 'TEMPLATE' => $mx_root_path . 'templates/'. $theme['template_name'] . '/' . $theme['head_stylesheet'] + )); Index: simpledoc__tab-edit-content.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/modules/simpledoc__tab-edit-content.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** simpledoc__tab-edit-content.php 22 Jul 2007 21:08:59 -0000 1.4 --- simpledoc__tab-edit-content.php 21 May 2008 21:58:37 -0000 1.5 *************** *** 103,106 **** --- 103,107 ---- $html = IoFile::read($path); + /* // Date in the past header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); *************** *** 117,121 **** --- 118,124 ---- header('Content-type: text/html; charset='.$CONFIG['encoding']); + */ ?> + <!-- <form name="simpleform" action="./modules/mx_simpledoc/simpledoc/modules/simpledoc__tab-save-content.php" method="post" onSubmit="ste.submit(); saveContent(this); this.blur();return false;"> <input type="hidden" id="id" name="id" value="<?php echo get('id'); ?>"> *************** *** 126,135 **** <input type="hidden" id="body-tmp" name="body-tmp" value="<?php echo htmlspecialchars($html); ?>"> </form> ! <!-- <form action="javascript:void(0)" method="post"> ! <textarea id="body" name="body" cols="60" rows="10"><?php echo htmlspecialchars($html); ?></textarea> ! <p><input id="save-document" type="button" value="Save Document" onclick="ste.submit(); saveContent(); this.blur();"> (ctrl+s)</p> ! <input type="hidden" id="body-tmp" name="body-tmp" value="<?php echo htmlspecialchars($html); ?>"> </form> ! --> <p id="saved"></p> \ No newline at end of file --- 129,138 ---- <input type="hidden" id="body-tmp" name="body-tmp" value="<?php echo htmlspecialchars($html); ?>"> </form> ! --> <form action="javascript:void(0)" method="post"> ! <textarea id="body" name="body" cols="100" rows="40"><?php echo $html; ?></textarea> ! <p><input id="save-document" type="button" value="Save Document" onclick="saveContent(); this.blur();"> (ctrl+s)</p> ! <!--<input type="hidden" id="body-tmp" name="body-tmp" value="<?php echo trim($html); ?>">--> </form> ! <p id="saved"></p> \ No newline at end of file |