if ($allowedButtons === NULL) { $allowedButtons = TMCE_getButtons(); } $retval = array(); foreach (explode(',', $buttons) as $button) { if ($button === '|' or in_array($button, $allowedButtons)) { $retval[] = $button; } } return implode(',', $retval); } //=================================================================== // Main //=================================================================== // Gets configuration from db $A = TMCE_getConfig(); $theme = $A['theme']; $toolbars = unserialize($A['buttons']); list($useTinyBrowser, $plugins) = TMCE_checkPlugins($A['plugins']); $enter_function = (int) $A['enter_function']; // Decides locale list($language, $directionality) = TMCE_getLocale(); // Decides mode switch ($_TMCE_CONF['targets']) { case 'all': $mode = 'textareas'; break; case 'css_class': $mode = 'specific_textareas'; break; case 'css_id':
but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ // switch off error handling, to use custom handler error_reporting(E_ALL); // set script time out higher, to help with thumbnail generation @set_time_limit(240); require_once dirname(__FILE__) . '/../../../../../lib-common.php'; if (!in_array('tinymce', $_PLUGINS)) { die('No direct access!'); } $tb_perms = TMCE_getConfig(); $tinybrowser = array(); // Session control and security check - to enable please uncomment //if(isset($_GET['sessidpass'])) session_id($_GET['sessidpass']); // workaround for Flash session bug //session_start(); //$tinybrowser['sessioncheck'] = 'authenticated_user'; //name of session variable to check // Random string used to secure Flash upload if session control not enabled - be sure to change! $tinybrowser['obfuscate'] = '5505a454fa748e311655fb50911b7614'; // Set default language (ISO 639-1 code) list($tinybrowser['language'], $tinybrowser['directionality']) = TMCE_getLocale(); // Set the integration type (TinyMCE is default) $tinybrowser['integration'] = 'tinymce'; // Possible values: 'tinymce', 'fckeditor' // Default is rtrim($_SERVER['DOCUMENT_ROOT'],'/') (suitable when using absolute paths, but can be set to '' if using relative paths) $tinybrowser['docroot'] = rtrim($_SERVER['DOCUMENT_ROOT'], '/'); // Folder permissions for Unix servers only