Author Topic: [TUT] TINYMCE in 4images integrieren.  (Read 27550 times)

0 Members and 1 Guest are viewing this topic.

Offline GaYan

  • Sr. Member
  • ****
  • Posts: 301
  • ♫ | G2 | ♫
    • View Profile
    • Ziramagic
Re: [TUT] TINYMCE in 4images integrieren.
« Reply #15 on: February 16, 2010, 05:26:12 AM »
can we st this to admin panel as well ?
I'm Back :)

Offline Benny Change

  • Addicted member
  • ******
  • Posts: 1.788
  • #WWG1WGA
    • View Profile
    • Qlobal-Change
Re: [TUT] TINYMCE in 4images integrieren.
« Reply #16 on: June 20, 2010, 11:36:34 PM »
Kann man das ganze auch mit diesem Editor machen?
http://www.openwebware.com/wysiwyg/demo.shtml

Der ist viel besser als der TinyMCE,
wäre super wenn du dafür, oder jemand anderes, eine Möglichkeit hat!
Beste Grüße
Benny

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: [TUT] TINYMCE in 4images integrieren.
« Reply #17 on: July 02, 2010, 04:01:13 PM »
Wo ist der besser?  8O

Offline Benny Change

  • Addicted member
  • ******
  • Posts: 1.788
  • #WWG1WGA
    • View Profile
    • Qlobal-Change
Re: [TUT] TINYMCE in 4images integrieren.
« Reply #18 on: July 02, 2010, 06:21:00 PM »
Wenn du dir das mal genauer anschaust siehst du es, alleine schon das <p> Problem ist nicht vorhanden!
Beste Grüße
Benny

Offline Benny Change

  • Addicted member
  • ******
  • Posts: 1.788
  • #WWG1WGA
    • View Profile
    • Qlobal-Change
Re: [TUT] TINYMCE in 4images integrieren.
« Reply #19 on: July 06, 2010, 10:38:26 PM »
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 ACP

Step 1
Open / öffne: admin/admin_functions.php
Search / Suche:
Code: [Select]
<script type="text/javascript" language="javascript" src="<?php echo ROOT_PATH?>admin/calendar.js"></script>Add after / danach einfügen:
Code: [Select]
<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($value2)."</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($value2)."</textarea></p></td>\n</tr>\n";
}

Step 2
Now are tricky / Jetzt wird es etwas knifflig
Replace all / erste alle
show_textarea_row
to / zu
show_tinymce_row
for showing up the tinymce / damit der tinymce angezeigt wird

Example for the image upload / Beispiel für den Bilder uploade
Open / öffne: admin/images.php
Search / 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.php
Search / 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
« Last Edit: July 07, 2010, 11:18:54 AM by Sumale.nin »
Beste Grüße
Benny

Rembrandt

  • Guest
Re: [TUT] TINYMCE in 4images integrieren.
« Reply #20 on: July 06, 2010, 10:53:46 PM »

Offline Benny Change

  • Addicted member
  • ******
  • Posts: 1.788
  • #WWG1WGA
    • View Profile
    • Qlobal-Change
Re: [TUT] TINYMCE in 4images integrieren.
« Reply #21 on: July 06, 2010, 10:59:05 PM »
Hoppla, übersehen!
Beste Grüße
Benny

Offline GaYan

  • Sr. Member
  • ****
  • Posts: 301
  • ♫ | G2 | ♫
    • View Profile
    • Ziramagic
Re: [TUT] TINYMCE in 4images integrieren.
« Reply #22 on: July 09, 2010, 04:12:08 PM »
@ Sumale.nin , Thanks alot sir !
I'm Back :)

Offline x23piracy

  • Sr. Member
  • ****
  • Posts: 420
    • View Profile
    • FHG
Re: [TUT] TINYMCE in 4images integrieren.
« Reply #23 on: November 30, 2010, 05:05:09 PM »
Hi,

FYI

the simplepaste plugin is obsolete and is not needed anymore,
the newer versions of tiny mce have a new paste logic.

Some information: http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste

Wenn du dir das mal genauer anschaust siehst du es, alleine schon das <p> Problem ist nicht vorhanden!

For your <p> problem you should check these settings for init:

Code: [Select]
forced_root_block : "",
force_p_newlines : false,
remove_linebreaks : false,
force_br_newlines : true,
remove_trailing_nbsp : false,
verify_html : false,

For a normale <br> instead of a <p> you can press shift + enter in tinymce

Just an RTFM problem!: http://tinymce.moxiecode.com/punbb/viewtopic.php?id=3878&p=2


Greetz X23
« Last Edit: November 30, 2010, 06:54:53 PM by x23piracy »

Don't trust in md5 it's unsafe change your 4i galerys password hash algorythm! second pw db field, create new hashes over some time, deny old hash. Help members that cry, send informationen mail to the rest. Camouflage new pw hash in cookie. Done!

--(◔̯◔)--

 

Post your comments here