$_TMCE_CONF['target_class'] = 'tinymce_enabled'; } $target_ids = '"' . implode('", "', $_TMCE_CONF['target_ids']) . '"'; // Loads style format file if one exists $style_formats = FALSE; $style_path = $_CONF['path_html'] . 'tinymce/js/style_formats.js'; clearstatcache(); if (is_readable($style_path)) { $style_formats = file_get_contents($style_path); } if ($style_formats === FALSE) { $style_formats = $_TMCE_CONF['default_styles']; } $element_format = (defined('XHTML') and XHTML === ' /') ? 'xhtml' : 'html'; // Builds a template list $templates = TMCE_getTemplateList(); if (count($templates) > 0) { $temp = array(); foreach ($templates as $template) { $temp[] = '{title: "' . TMCE_esc($template['title']) . '", src: "' . $template['src'] . '", description: "' . TMCE_esc($template['description']) . '"}'; } $templates = implode(', ', $temp); } else { $templates = ''; } // Starts storing JavaScript code as a string $js = <<<EOD // +---------------------------------------------------------------------------+ // | TinyMCE Plugin for Geeklog - The Ultimate Weblog | // +---------------------------------------------------------------------------+ // | public_html/tinymce/js/tinymce_loader.js.php |
function TMCE_getAdminTemplateList() { global $_CONF; $retval = array(); $templates = TMCE_getTemplateList(); if (count($templates) === 0) { $retval = '<p>' . TMCE_str('admin_no_template') . '</p>'; } else { $sw = 1; foreach ($templates as $template) { $className = 'pluginRow' . (string) $sw; $retval[] = '<tr class="' . $className . '" onmouseover="className=\'pluginRollOver\';" onmouseout="className=\'' . $className . '\';"><td class="admin-list-field"><a href="' . $_CONF['site_admin_url'] . '/plugins/tinymce/index.php?what=template&mode=edit&template=' . rawurlencode(basename($template['src'])) . '" title="' . TMCE_str('admin_edit') . '"><img src="' . $_CONF['site_url'] . '/tinymce/images/edit.png" title="' . TMCE_str('admin_edit') . '"' . XHTML . '></a></td class="admin-list-field"><td>' . TMCE_esc($template['title']) . '</td><td class="admin-list-field">' . TMCE_esc($template['description']) . '</td><td class="admin-list-field">' . date('Y-m-d H:i:s', $template['updated']) . '</td></tr>'; $sw++; if ($sw >= 2) { $sw = 1; } } $retval = '<table class="admin-list-table">' . LB . '<tr style="background: #ffffff;"><th class="admin-list-headerfield">' . TMCE_str('admin_edit') . '</th><th class="admin-list-headerfield">' . TMCE_str('admin_title') . '</th><th class="admin-list-headerfield">' . TMCE_str('admin_description') . '</th><th class="admin-list-headerfield">' . TMCE_str('admin_updated') . '</th></tr>' . LB . implode(LB, $retval) . '</table>' . LB; } return $retval; }