Hallo, Gast! (Registrieren)

Letzte Ankündigung: MyBB 1.8.39 veröffentlicht (02.06.25)


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste
Hilfe WYSIWYG Editor!
#1
Habe den WYSIWYG Editor installiert. Nun kann man aber nicht mehr mein selbst erstelltes Profilfeld Geschlecht auswählenSad

Kann mir jemand helfen...

Erste erkentnisse: Es liegt an der functions.php


denn:

In der readme steht: Ich soll das hier ersetzen:
PHP-Code:
function htmlspecialchars_uni($message)
{
$message = preg_replace("#&(?!\#[0-9]+;)#si", "&", $message); // Fix & but allow unicode
$message = str_replace("<","&lt;",$message);
$message = str_replace(">","&gt;",$message);
$message = str_replace("\"","&quot;",$message);
$message = str_replace(" ", "&nbsp;&nbsp;", $message);
return
$message;
}

durch
PHP-Code:
# ATTENTION ATTENTION ATTENTION
# if you access to admin control panel with the URL like this:
# http://mysite.com/mybb/xxx_admin_xxx/index.php
# then you should change this code
#
# if(strpos($_SERVER['PHP_SELF'],"/admin")===false)
#
# to
#
# if(strpos($_SERVER['PHP_SELF'],"/xxx_admin_xxx")===false)
#
# LOOK BELOW

function htmlspecialchars_uni($message)
{
//EDITOR
global $_SERVER;

$message = preg_replace("#&(?!\#[0-9]+;)#si", "&amp;", $message); // Fix & but allow unicode
$message = str_replace("<","&lt;",$message);
$message = str_replace(">","&gt;",$message);
$message = str_replace("\"","&quot;",$message);
$message = str_replace(" ", "&nbsp;&nbsp;", $message);

//EDITOR - PAY ATTENTION HERE
if(strpos($_SERVER['PHP_SELF'],"/admin")===false)
$message=get_hoteditor($message,0);

return
$message;
}

//---------------------------------------------------------------------------------------------------------
//EDITOR - Replace text inside [EDITOR= .... EDITOR] to HTML code
function get_hoteditor($res="",$replace_quote=""){
global
$_COOKIE;
preg_match_all("/\{EDITOR=(.*?)EDITOR\}/si",$res,$matches);
$get_code = $matches[1][0];
if(
$get_code !=""){
$res=str_replace("$get_code","{HOTEDITOR_TMP}",$res);
$get_code=str_replace("&amp;","&",$get_code);
$get_code=str_replace("&lt;","<",$get_code);
$get_code=str_replace("&gt;",">",$get_code);
$get_code=str_replace("[<]","&lt;",$get_code);
$get_code=str_replace("[>]","&gt;",$get_code);
$get_code=str_replace("[<]","&lt;",$get_code);
$get_code=str_replace("[>]","&gt;",$get_code);
$get_code=str_replace("<br />","",$get_code);
if(
$replace_quote=="1") {
$get_code=str_replace("&quot;","\"",$get_code);
}
$get_code=str_replace("&nbsp;"," ",$get_code);

//Strip All Unwanted HTML Tags (incase user copy (Ctrl-C) and paste (Ctrl-V) stuff to HotEditor
$get_code=strip_tags($get_code,"<p><a><span><div><font><b><i><u><strong><em><ul><ol><li><blockquote><img><strike><sub><sup><hr><pre><tt><br>");

// Clear all onClick onMouseOver onMouseOut onMouseDown onMouseUp onMouseMove onBlur cursor
// position absolute visibility visible z-index

// Example <span onClick=alert('BOOOO')>Click here</span>
// will be replaced to <span =alert('BOOOO')>Click here</span>
// in this way your board won't mess up. Hope this will help.

$match_count = preg_match_all("/<(.*?)>/si", $get_code, $matches_code);

for (
$i = 0; $i < $match_count; $i++){
$get_code1 = $matches_code[1][$i];
$get_code2 = $matches_code[1][$i];
$get_code2 = preg_replace("/id=/si", "", $get_code2);
$get_code2 = preg_replace("/name=/si", "", $get_code2);
$get_code2 = preg_replace("/onclick=/si", "", $get_code2);
$get_code2 = preg_replace("/onmouseover=/si", "", $get_code2);
$get_code2 = preg_replace("/onmouseout=/si", "", $get_code2);
$get_code2 = preg_replace("/onmousedown=/si", "", $get_code2);
$get_code2 = preg_replace("/onmouseup=/si", "", $get_code2);
$get_code2 = preg_replace("/onmousemove=/si", "", $get_code2);
$get_code2 = preg_replace("/onblur=/si", "", $get_code2);
$get_code2 = preg_replace("/ondblclick=/si", "", $get_code2);
$get_code2 = preg_replace("/onload=/si", "", $get_code2);
$get_code2 = preg_replace("/onsubmit=/si", "", $get_code2);
$get_code2 = preg_replace("/onchange=/si", "", $get_code2);
$get_code2 = preg_replace("/onfocus=/si", "", $get_code2);
$get_code2 = preg_replace("/onselect=/si", "", $get_code2);
$get_code2 = preg_replace("/onunload=/si", "", $get_code2);
$get_code2 = preg_replace("/onkeypress=/si", "", $get_code2);
$get_code2 = preg_replace("/position:/si", "", $get_code2);
$get_code =str_replace($get_code1,$get_code2,$get_code);
}

$get_code=str_replace("\r\n",' ',$get_code);
$get_code=str_replace("\n",' ',$get_code);

$res=str_replace("{HOTEDITOR_TMP}","$get_code",$res);
$res=str_replace("{EDITOR=","",$res);
$res=str_replace("EDITOR}","",$res);
}
else{
$res=str_replace("\r\n",'<br>',$res);
$res=str_replace("\n",'',$res);
$res=str_replace("{EDITOR= EDITOR}","",$res);
}

return
$res ;
}

wenn ich das mache kommt der fehler.
Zitieren
#2
Damit ihr das Problem nachstellen könnt:

Laded euchhttp://www.ecardmax.com/hoteditor/hoteditor_mybb123_mod.zip runter dann kopiert die dateien class_parser und functions.php nach /inc

jetzt guckt in euer forum und ihr seht das ihr das geschlcht nicht mehr wählen könnt.
Zitieren


Möglicherweise verwandte Themen…
Thema Verfasser Antworten Ansichten Letzter Beitrag
  WYSIWYG Editor Problem SyntaX 18 6.578 24.10.2012, 15:25
Letzter Beitrag: SyntaX
Pencil Jitbit WYSIWYG-BBCode Editor für MyBB 2 3.567 15.09.2010, 10:36
Letzter Beitrag: PaintFoX
  WYSIWYG-Editor für MyBB 1.6 tholler 1 3.407 20.08.2010, 22:54
Letzter Beitrag: Falkenauge Mihawk
  Suche WYSIWYG-Editor Armin 3 2.416 28.02.2009, 15:47
Letzter Beitrag: Armin
  Zusammenfassung für WYSIWYG-Editor KarlMay 3 2.434 15.09.2008, 12:26
Letzter Beitrag: ows