<?php include_once '../doc-typo3-funcs.php'; $doxygen_vars = array( "title" => "TYPO3 4.0.1: typo3_src-4.0.1/typo3/sysext/rtehtmlarea/htmlarea/plugins/SpellChecker/spell-check-logic.php Source File", "datetime" => "Sat Dec 2 19:22:34 2006", "date" => "2 Dec 2006", "doxygenversion" => "1.4.6", "projectname" => "TYPO3 4.0.1", "projectnumber" => "4.0.1" ); get_header($doxygen_vars); ?> <!-- Generated by Doxygen 1.4.6 --> <div class="tabs"> <ul> <li><a href="main.html"><span>Main Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="classes.html"><span>Classes</span></a></li> <li id="current"><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> <li> <form action="search.php" method="get"> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td><label> <u>S</u>earch for </label></td> <td><input type="text" name="query" value="" size="20" accesskey="s"/></td> </tr> </table> </form> </li> </ul></div> <div class="nav"> <a class="el" href="dir_c8daf1ad746050abf985cc546c89e248.html">typo3_src-4.0.1</a> » <a class="el" href="dir_18071ae4545d8b3e0364d30c0659c74a.html">typo3</a> » <a class="el" href="dir_57bf1ed8249c1fd5b014486d01bcb27a.html">sysext</a> » <a class="el" href="dir_ba35782bbbbab3dd5f9ad49363790eab.html">rtehtmlarea</a> » <a class="el" href="dir_e5a2ca74e88ef0f053f11628d36724cf.html">htmlarea</a> » <a class="el" href="dir_e42ff823dfc48f8909bf7416dcc677bc.html">plugins</a> » <a class="el" href="dir_1f4985026a32ede730819629564825b2.html">SpellChecker</a></div> <h1>spell-check-logic.php</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <?php <a name="l00002"></a>00002 <span class="comment">/***************************************************************</span> <a name="l00003"></a>00003 <span class="comment">* Copyright notice</span> <a name="l00004"></a>00004 <span class="comment">*</span> <a name="l00005"></a>00005 <span class="comment">* (c) 2003-2006 Stanislas Rolland (stanislas.rolland(arobas)fructifor.ca)</span> <a name="l00006"></a>00006 <span class="comment">* All rights reserved</span> <a name="l00007"></a>00007 <span class="comment">*</span> <a name="l00008"></a>00008 <span class="comment">* This script is part of the Typo3 project. The Typo3 project is</span> <a name="l00009"></a>00009 <span class="comment">* free software; you can redistribute it and/or modify</span> <a name="l00010"></a>00010 <span class="comment">* it under the terms of the GNU General Public License as published by</span> <a name="l00011"></a>00011 <span class="comment">* the Free Software Foundation; either version 2 of the License, or</span> <a name="l00012"></a>00012 <span class="comment">* (at your option) any later version.</span> <a name="l00013"></a>00013 <span class="comment">*</span> <a name="l00014"></a>00014 <span class="comment">* The GNU General Public License can be found at</span> <a name="l00015"></a>00015 <span class="comment">* http://www.gnu.org/copyleft/gpl.html.</span> <a name="l00016"></a>00016 <span class="comment">*</span> <a name="l00017"></a>00017 <span class="comment">* This script is distributed in the hope that it will be useful,</span> <a name="l00018"></a>00018 <span class="comment">* but WITHOUT ANY WARRANTY; without even the implied warranty of</span> <a name="l00019"></a>00019 <span class="comment">* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> <a name="l00020"></a>00020 <span class="comment">* GNU General Public License for more details.</span> <a name="l00021"></a>00021 <span class="comment">*</span> <a name="l00022"></a>00022 <span class="comment">* This copyright notice MUST APPEAR in all copies of the script!</span> <a name="l00023"></a>00023 <span class="comment">***************************************************************/</span> <a name="l00032"></a>00032 error_reporting (E_ALL ^ E_NOTICE); <a name="l00033"></a>00033 define('TYPO3_OS', (stristr(PHP_OS,'win') && !stristr(PHP_OS,'darwin')) ? 'WIN' : ''); <a name="l00034"></a>00034 <span class="keywordflow">if</span> (!defined('PATH_thisScript')) define('PATH_thisScript',str_replace('<span class="comment">//','/', str_replace('\\','/', (php_sapi_name()=='cgi'||php_sapi_name()=='xcgi'||php_sapi_name()=='isapi' ||php_sapi_name()=='cgi-fcgi')&&((!empty($_SERVER['ORIG_PATH_TRANSLATED'])&&isset($_SERVER['ORIG_PATH_TRANSLATED']))?$_SERVER['ORIG_PATH_TRANSLATED']:$_SERVER['PATH_TRANSLATED'])? ((!empty($_SERVER['ORIG_PATH_TRANSLATED'])&&isset($_SERVER['ORIG_PATH_TRANSLATED']))?$_SERVER['ORIG_PATH_TRANSLATED']:$_SERVER['PATH_TRANSLATED']):((!empty($_SERVER['ORIG_SCRIPT_FILENAME'])&&isset($_SERVER['ORIG_SCRIPT_FILENAME']))?$_SERVER['ORIG_SCRIPT_FILENAME']:$_SERVER['SCRIPT_FILENAME']))));</span> <a name="l00035"></a>00035 <span class="keywordflow">if</span> (!defined('PATH_site')) define('PATH_site', dirname(dirname(dirname(dirname(dirname(dirname(dirname(PATH_thisScript))))))).<span class="charliteral">'/'</span>); <a name="l00036"></a>00036 <span class="keywordflow">if</span> (!defined('PATH_t3lib')) define('PATH_t3lib', PATH_site.'t3lib/'); <a name="l00037"></a>00037 define('PATH_typo3conf', PATH_site.'typo3conf/'); <a name="l00038"></a>00038 define('TYPO3_mainDir', 'typo3/'); <a name="l00039"></a>00039 <span class="keywordflow">if</span> (!defined('PATH_typo3')) define('PATH_typo3', PATH_site.TYPO3_mainDir); <a name="l00040"></a>00040 if (!defined('PATH_tslib')) { <a name="l00041"></a>00041 <span class="keywordflow">if</span> (@is_dir(PATH_site.'typo3/sysext/cms/tslib/')) { <a name="l00042"></a>00042 define('PATH_tslib', PATH_site.'typo3/sysext/cms/tslib/'); <a name="l00043"></a>00043 } elseif (@is_dir(PATH_site.'tslib/')) { <a name="l00044"></a>00044 define('PATH_tslib', PATH_site.'tslib/'); <a name="l00045"></a>00045 } <a name="l00046"></a>00046 } <a name="l00047"></a>00047 define('TYPO3_MODE<span class="charliteral">','</span>FE'); <a name="l00048"></a>00048 <a name="l00049"></a>00049 require_once(PATH_t3lib.'<span class="keyword">class</span>.t3lib_div.php'); <a name="l00050"></a>00050 require_once(PATH_t3lib.'<span class="keyword">class</span>.t3lib_extmgm.php'); <a name="l00051"></a>00051 require_once(PATH_t3lib.'config_default.php'); <a name="l00052"></a>00052 require_once(PATH_typo3conf.'localconf.php'); <a name="l00053"></a>00053 require_once(PATH_tslib.'<span class="keyword">class</span>.tslib_fe.php'); <a name="l00054"></a>00054 require_once(PATH_t3lib.'<span class="keyword">class</span>.t3lib_tstemplate.php'); <a name="l00055"></a>00055 require_once(PATH_t3lib.'<span class="keyword">class</span>.t3lib_page.php'); <a name="l00056"></a>00056 require_once(PATH_tslib.'<span class="keyword">class</span>.tslib_content.php'); <a name="l00057"></a>00057 require_once(<a class="code" href="classt3lib__extMgm.html#f395b211d97293002bbf92c3802392f5">t3lib_extMgm::extPath</a>('rtehtmlarea').'pi1/<span class="keyword">class</span>.<a class="code" href="classtx__rtehtmlarea__pi1.html">tx_rtehtmlarea_pi1</a>.php'); <a name="l00058"></a>00058 require_once(PATH_t3lib.'<span class="keyword">class</span>.t3lib_userauth.php'); <a name="l00059"></a>00059 require_once(PATH_tslib.'<span class="keyword">class</span>.tslib_feuserauth.php'); <a name="l00060"></a>00060 <a name="l00061"></a>00061 $typoVersion = <a class="code" href="classt3lib__div.html#764fcca6287e86a8c2aad10a5752b847">t3lib_div::int_from_ver</a>($GLOBALS['TYPO_VERSION']); <a name="l00062"></a>00062 require_once(PATH_t3lib.'<span class="keyword">class</span>.t3lib_cs.php'); <a name="l00063"></a>00063 <a name="l00064"></a>00064 <span class="keywordflow">if</span> (!defined ('TYPO3_db')) die ('The configuration file was not included.'); <a name="l00065"></a>00065 <span class="keywordflow">if</span> (isset($HTTP_POST_VARS['GLOBALS']) || isset($HTTP_GET_VARS['GLOBALS'])) die('You cannot set the GLOBALS-array from outside <span class="keyword">this</span> script.'); <a name="l00066"></a>00066 <a name="l00067"></a>00067 require_once(PATH_t3lib.'<span class="keyword">class</span>.t3lib_db.php'); <a name="l00068"></a>00068 $TYPO3_DB = <a class="code" href="classt3lib__div.html#b47f8a8e8be44b79a0b8064dcd427bc1">t3lib_div::makeInstance</a>('<a class="code" href="classt3lib__DB.html">t3lib_DB</a>'); <a name="l00069"></a>00069 <a name="l00070"></a>00070 require_once(PATH_t3lib.'<span class="keyword">class</span>.t3lib_timetrack.php'); <a name="l00071"></a>00071 $GLOBALS['TT'] = <span class="keyword">new</span> <a class="code" href="classt3lib__timeTrack.html">t3lib_timeTrack</a>; <a name="l00072"></a>00072 <a name="l00073"></a>00073 <span class="comment">// ***********************************</span> <a name="l00074"></a>00074 <span class="comment">// Creating a fake $TSFE object</span> <a name="l00075"></a>00075 <span class="comment">// ***********************************</span> <a name="l00076"></a>00076 $TSFEclassName = <a class="code" href="classt3lib__div.html#aa1c0a3d032e0841991ae355b42f2c25">t3lib_div::makeInstanceClassName</a>('<a class="code" href="classtslib__fe.html">tslib_fe</a>'); <a name="l00077"></a>00077 $id = isset($HTTP_GET_VARS['<span class="keywordtype">id</span>'])?$HTTP_GET_VARS['<span class="keywordtype">id</span>']:0; <a name="l00078"></a>00078 $GLOBALS['TSFE'] = <span class="keyword">new</span> $TSFEclassName($TYPO3_CONF_VARS, $id, <span class="charliteral">'0'</span>, 1, '', '<span class="charliteral">','</span><span class="charliteral">','</span>'); <a name="l00079"></a>00079 $GLOBALS['TSFE']->connectToMySQL(); <a name="l00080"></a>00080 $GLOBALS['TSFE']->initFEuser(); <a name="l00081"></a>00081 $GLOBALS['TSFE']->fetch_the_id(); <a name="l00082"></a>00082 $GLOBALS['TSFE']->getPageAndRootline(); <a name="l00083"></a>00083 $GLOBALS['TSFE']->initTemplate(); <a name="l00084"></a>00084 $GLOBALS['TSFE']->tmpl->getFileName_backPath = PATH_site; <a name="l00085"></a>00085 $GLOBALS['TSFE']->forceTemplateParsing = 1; <a name="l00086"></a>00086 $GLOBALS['TSFE']->getConfigArray(); <a name="l00087"></a>00087 $spellChecker = <a class="code" href="classt3lib__div.html#b47f8a8e8be44b79a0b8064dcd427bc1">t3lib_div::makeInstance</a>('<a class="code" href="classtx__rtehtmlarea__pi1.html">tx_rtehtmlarea_pi1</a>'); <a name="l00088"></a>00088 $spellChecker->cObj = <a class="code" href="classt3lib__div.html#b47f8a8e8be44b79a0b8064dcd427bc1">t3lib_div::makeInstance</a>('<a class="code" href="classtslib__cObj.html">tslib_cObj</a>'); <a name="l00089"></a>00089 $conf = $GLOBALS['TSFE']->tmpl->setup['plugin.'][$spellChecker->prefixId.<span class="charliteral">'.'</span>]; <a name="l00090"></a>00090 $spellChecker->main($conf); <a name="l00091"></a>00091 ?> </pre></div><?php include_once '../doc-typo3-funcs.php'; get_footer(); ?>