News - Features - Downloads - Forum - Team - Support - Switch View: Screen
Login - Registrierung - Passwort vergessen
Codepaste - Details
Weitere Infos zum Codepaste

Name TinyMCE BugFix for ABCode & HTML
Autor de sKaoS
CMS-Version ClanSphere 2011
Datei tinymce/tiny_init.php
Datum 06.10.2012 um 00:55 Uhr
Beschreibung ==== DEUTSCH ====
Dieser Fix sorgt dafür, dass TinyMCE als ABCode & HTML-Editor zur gleichen Zeit verwendet werden kann.

==== ENGLISH ====
This Bugfix is for the TinyMCE ABCode and HTML-Editor which makes it able to use it for both editor parallel.
Alter Code Alter Code +-
 
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
1. / 2. / ... 
<?php
// ClanSphere 2009 - www.clansphere.net
// $Id: tiny_init.php 400 2010-10-01 08:21:51Z hajo $

// copy domain and session settings from clansphere servervars

$domain htmlspecialchars($_SERVER['HTTP_HOST'], ENT_QUOTES);
$domain = (strpos($domain'.') !== FALSE) ? $domain '';

session_name('cs' md5($domain));
session_start();

// set content type header to identify this file as javascript
header('Content-type: application/javascript');

$lang = empty($_SESSION['tinymce_lang']) ? 'en' $_SESSION['tinymce_lang'];
$mode = empty($_SESSION['tinymce_mode']) ? $_SESSION['tinymce_mode'];
$mode_abcode = empty($_SESSION['tinymce_mode_abcode']) ? $_SESSION['tinymce_mode_abcode'];
$skin = empty($_SESSION['tinymce_skin']) ? array() : explode('/'$_SESSION['tinymce_skin']);
$skin_info = !empty($skin[0]) ? $skin[0] : 'default';
$skin_varn = !empty($skin[1]) ? $skin[1] : '';

if(!empty(
$mode_abcode)) {
?>
$(function() {
  $(document).bind('csAjaxLoad', function(event,element) {
    $(element).find('textarea.rte_abcode').tinymce({
      mode                                : 'specific_textareas',
      editor_selector                     : 'rte_abcode',
      theme                               : 'advanced',
      language                            : '<?php echo $lang?>',
      skin                                : '<?php echo $skin_info?>',
      skin_variant                        : '<?php echo $skin_varn?>',
      plugins                             : 'autoresize, clansphere_abcode, clansphere_features, contextmenu, inlinepopups, searchreplace',
      theme_advanced_buttons1             : 'link,unlink,image,hr, | ,quote,php,clipbox,threadlink, | ,search,replace,help',
      theme_advanced_buttons2             : 'justifyleft,justifycenter,justifyright,justifyfull, | ,bold,italic,underline,strikethrough, | ,indent,bullist,numlist, | ,undo,redo',
      theme_advanced_buttons3             : 'formatselect,fontsizeselect,forecolor, | , removeformat,cleanup',
      theme_advanced_toolbar_location     : 'top',
      theme_advanced_toolbar_align        : 'left',
      theme_advanced_statusbar_location   : 'bottom',
      theme_advanced_resizing             : true,
      theme_advanced_resize_horizontal    : false,
      theme_advanced_resizing_use_cookie  : false,
      theme_advanced_font_sizes           : '8=8pt,10=10pt,12=12pt,20=20pt,50=50pt',
      theme_advanced_blockformats         : 'h1,h2,h3,h4,h5,h6',
      remove_linebreaks                   : false,
      convert_fonts_to_spans              : false,
      entity_encoding                     : 'raw'
    });
  }).triggerHandler('csAjaxLoad', document.body);
});
<?php
}
if(!empty(
$mode)) {
?>
$(function() {
  $(document).bind('csAjaxLoad', function(event,element) {
    $(element).find('textarea.rte_html').tinymce({
      mode                                : 'specific_textareas',
      editor_selector                     : 'rte_html',
      theme                               : 'advanced',
      language                            : '<?php echo $lang?>',
      skin                                : '<?php echo $skin_info?>',
      skin_variant                        : '<?php echo $skin_varn?>',
      plugins                             : "advhr,advimage,advlink,autoresize,contextmenu,emotions,fullscreen,iespell,inlinepopups,layer,media,nonbreaking,pagebreak,paste,preview,print,safari,save,searchreplace,style,table,visualchars,xhtmlxtras",
      theme_advanced_buttons1             : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,fontselect,fontsizeselect",
      theme_advanced_buttons2             : "pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,preview,|,forecolor,backcolor",
      theme_advanced_buttons3             : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,fullscreen",
      theme_advanced_buttons4             : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,pagebreak",
      theme_advanced_toolbar_location     : "top",
      theme_advanced_toolbar_align        : "left",
      theme_advanced_statusbar_location   : "bottom",
      theme_advanced_resizing             : true,
      theme_advanced_resize_horizontal    : false,
      theme_advanced_resizing_use_cookie  : false,
      use_native_selects                  : true
    });
  }).triggerHandler('csAjaxLoad', document.body);
});
<?php
}
?>
Neuer Code Neuer Code +-
 
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
1. / 2. / ... 
<?php
// ClanSphere 2009 - www.clansphere.net
// $Id: tiny_init.php 400 2010-10-01 08:21:51Z hajo $

// copy domain and session settings from clansphere servervars

$domain htmlspecialchars($_SERVER['HTTP_HOST'], ENT_QUOTES);
$domain = (strpos($domain'.') !== FALSE) ? $domain '';

session_name('cs' md5($domain));
session_start();

// set content type header to identify this file as javascript
header('Content-type: application/javascript');

$lang = empty($_SESSION['tinymce_lang']) ? 'en' $_SESSION['tinymce_lang'];
$mode = empty($_SESSION['tinymce_mode']) ? $_SESSION['tinymce_mode'];
$mode_abcode = empty($_SESSION['tinymce_mode_abcode']) ? $_SESSION['tinymce_mode_abcode'];
$skin = empty($_SESSION['tinymce_skin']) ? array() : explode('/'$_SESSION['tinymce_skin']);
$skin_info = !empty($skin[0]) ? $skin[0] : 'default';
$skin_varn = !empty($skin[1]) ? $skin[1] : '';
print 
"$(function() {";

if(!empty(
$mode_abcode)) {
?>
  $(document).bind('csAjaxLoad', function(event,element) {
    $(element).find('textarea.rte_abcode').tinymce({
      mode                                : 'specific_textareas',
      editor_selector                     : 'rte_abcode',
      theme                               : 'advanced',
      language                            : '<?php echo $lang?>',
      skin                                : '<?php echo $skin_info?>',
      skin_variant                        : '<?php echo $skin_varn?>',
      plugins                             : 'autoresize, clansphere_abcode, clansphere_features, contextmenu, inlinepopups, searchreplace',
      theme_advanced_buttons1             : 'link,unlink,image,hr, | ,quote,php,clipbox,threadlink, | ,search,replace,help',
      theme_advanced_buttons2             : 'justifyleft,justifycenter,justifyright,justifyfull, | ,bold,italic,underline,strikethrough, | ,indent,bullist,numlist, | ,undo,redo',
      theme_advanced_buttons3             : 'formatselect,fontsizeselect,forecolor, | , removeformat,cleanup',
      theme_advanced_toolbar_location     : 'top',
      theme_advanced_toolbar_align        : 'left',
      theme_advanced_statusbar_location   : 'bottom',
      theme_advanced_resizing             : true,
      theme_advanced_resize_horizontal    : false,
      theme_advanced_resizing_use_cookie  : false,
      theme_advanced_font_sizes           : '8=8pt,10=10pt,12=12pt,20=20pt,50=50pt',
      theme_advanced_blockformats         : 'h1,h2,h3,h4,h5,h6',
      remove_linebreaks                   : false,
      convert_fonts_to_spans              : false,
      entity_encoding                     : 'raw'
    });
  })
<?php
}
if(!empty(
$mode)) {
?>
  $(document).bind('csAjaxLoad', function(event,element) {
    $(element).find('textarea.rte_html').tinymce({
      mode                                : 'specific_textareas',
      editor_selector                     : 'rte_html',
      theme                               : 'advanced',
      language                            : '<?php echo $lang?>',
      skin                                : '<?php echo $skin_info?>',
      skin_variant                        : '<?php echo $skin_varn?>',
      plugins                             : "advhr,advimage,advlink,autoresize,contextmenu,emotions,fullscreen,iespell,inlinepopups,layer,media,nonbreaking,pagebreak,paste,preview,print,safari,save,searchreplace,style,table,visualchars,xhtmlxtras",
      theme_advanced_buttons1             : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,fontselect,fontsizeselect",
      theme_advanced_buttons2             : "pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,preview,|,forecolor,backcolor",
      theme_advanced_buttons3             : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,fullscreen",
      theme_advanced_buttons4             : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,pagebreak",
      theme_advanced_toolbar_location     : "top",
      theme_advanced_toolbar_align        : "left",
      theme_advanced_statusbar_location   : "bottom",
      theme_advanced_resizing             : true,
      theme_advanced_resize_horizontal    : false,
      theme_advanced_resizing_use_cookie  : false,
      use_native_selects                  : true
    });
  })
<?php
}
print 
".triggerHandler('csAjaxLoad', document.body);
});"
;
?>
Zurück - Übersicht


Bitte Login benutzen, um Kommentare zu schreiben.


ClanSphere Project - Mailus - Imprint - Disclaimer - Scriptinfo