can we st this to admin panel as well ?
Yes we can:Follow the instruction on page #1 (
http://www.4homepages.de/forum/index.php?topic=25098.0)
And the follow my instruction for ACP:
ADDON: TinyMCE for ACPStep 1
Open / öffne:
admin/admin_functions.phpSearch / Suche:
<script type="text/javascript" language="javascript" src="<?php echo ROOT_PATH; ?>admin/calendar.js"></script>
Add after / danach einfügen:
<script type="text/javascript" src="<?php echo ROOT_PATH; ?>tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "advanced",
editor_selector : "mceAdvanced",
plugins : "safari,emotions",
theme_advanced_buttons1 : "bold,italic,underline,separator,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,bullist,numlist,undo,redo,emotions",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom"
});
</script>
Search / suche:
function show_textarea_row($title, $name, $value = "", $cols = "", $rows = 10) {
global $error, $HTTP_POST_VARS, $textarea_size;
$cols = (empty($cols)) ? $textarea_size : $cols;
if (isset($error[$name])) {
$title = sprintf("<span class=\"marktext\">%s *</span>", $title);
}
if (isset($HTTP_POST_VARS[$name])/* && $value == ""*/) {
$value = stripslashes($HTTP_POST_VARS[$name]);
}
echo "<tr class=\"".get_row_bg()."\" valign=\"top\">\n<td><p class=\"rowtitle\">".$title."</p></td>\n<td><p><textarea name=\"".$name."\" rows=\"".$rows."\" cols=\"".$cols."\">".format_text($value, 2)."</textarea></p></td>\n</tr>\n";
}Add after / danach einfügen:
function show_tinymce_row($title, $name, $value = "", $cols = "", $rows = 10) {
global $error, $HTTP_POST_VARS, $textarea_size;
$cols = (empty($cols)) ? $textarea_size : $cols;
if (isset($error[$name])) {
$title = sprintf("<span class=\"marktext\">%s *</span>", $title);
}
if (isset($HTTP_POST_VARS[$name])/* && $value == ""*/) {
$value = stripslashes($HTTP_POST_VARS[$name]);
}
echo "<tr class=\"".get_row_bg()."\" valign=\"top\">\n<td><p class=\"rowtitle\">".$title."</p></td>\n<td><p><textarea name=\"".$name."\" rows=\"".$rows."\" cols=\"".$cols."\" class=\"mceAdvanced\">".format_text($value, 2)."</textarea></p></td>\n</tr>\n";
}Step 2
Now are tricky / Jetzt wird es etwas knifflig
Replace all / erste alle
show_textarea_rowto / zu
show_tinymce_rowfor showing up the tinymce / damit der tinymce angezeigt wird
Example for the image upload / Beispiel für den Bilder uploade
Open / öffne:
admin/images.phpSearch / suche:
show_textarea_row($title, "image_description", $image_row['image_description'], $textarea_size);replace with / ersetze mit
show_tinymce_row($title, "image_description", $image_row['image_description'], $textarea_size);Search / Suche:
show_input_row($lang['field_image_name'], "image_name_".$i, "", $textinput_size);
show_textarea_row($lang['field_description_ext'],"image_description_".$i, "", $textarea_size);replace with / ersetze mit:
show_input_row($lang['field_image_name'], "image_name_".$i, "", $textinput_size);
show_tinymce_row($lang['field_description_ext'],"image_description_".$i, "", $textarea_size);It works perfekt with the Template-Edit:
Der TinyMCE Editor ist bestens für Template bearbeitung im ACP geeignet
Step 1
Open / öffne:
admin/templates.phpSearch / Suche:
echo "<textarea name=\"content\" cols=\"60\" rows=\"30\" wrap=\"off\" class=\"template_textarea\">\n";
echo htmlspecialchars($content);
echo "</textarea>";replace with / ersetze mit:
echo "<textarea name=\"content\" cols=\"60\" rows=\"30\" wrap=\"off\" class=\"template_textarea mceAdvanced\">\n";
echo htmlspecialchars($content);
echo "</textarea>\n";
echo "<textarea name=\"content\" cols=\"60\" rows=\"30\" wrap=\"off\" class=\"template_textarea\">\n";
echo htmlspecialchars($content);
echo "</textarea>";Thats all / Das ist alles
Pleas Push the Button / Bitte auf den Button drücken
LG