HTH-C.com - Forum
Latest News Latest Threads
Neuerung: Persönliche Galerie
Informationen zur Übernahme der Erweite..
HTH Blog - Version 2.0
#HTH.Systems - Betatester gesucht
Neueröffnung - PHPKit-Award.de
HTH Webchat v3
Letzter Beitrag Happy Birthday Bottyline Weiblicher Benutzer Heute, 0:00 Zeit der letzten Antwort
Letzter Beitrag PHPKit 1.6.6 Treffnix Männlicher Benutzer 14.03.2024 - 06:20 Zeit der letzten Antwort
Letzter Beitrag Gibt es eigentlich noch jemand der PHPki.. Treffnix Männlicher Benutzer 14.03.2024 - 06:19 Zeit der letzten Antwort
Letzter Beitrag Herzlich Willkommen Botty Männlicher Benutzer 22.02.2024 - 13:50 Zeit der letzten Antwort
Letzter Beitrag PHPKit 1.6.6 ohne ASCE auf PHP8x Myrddin Männlicher Benutzer 22.03.2023 - 13:36 Zeit der letzten Antwort
 53.545 Posts & 4.945 Themen in 78 Foren
Forenübersicht » Support / Hilfe » PHPKit 1.6.4 & 1.6.5 & 1.6.6 » Modifikationen » Problem mit BBCode Parse

Problem mit BBCode Parse
3 Beiträge in diesem Thema
 Seiten (1):    1  
28.08.2008 - 13:46 Uhr
Beitrag: #1
Hallo!

Ich habe mir von Musel BBcode Parse heruntergeladen. Dies ist für PHPKIT 1.6.1.
Da ich aber die 1.6.4 im Einsatz habe, hab ich den Inhalt der lib_parse.php nach bbcode.php kopiert und angepasst.

Funktioniert auch super bis auf die Ausgabe einiger Zeichen:

so is original:

Zitat
eval("\$config_do.= \"".pkTpl("config_all")."\";");
site_mail_htm='".$SQL->f($_POST['site_mail_htm'])."'");



und so die ausgabe:

Zitat
eval("\$config_do.= \"".pkTpl("config_all")."\";");
site_mail_htm='".$SQL->f($_POST['site_mail_htm'])."&#39



Kann mir jm. helfen das Problem zu lösen? Scheint mit der Funktion get_html_translation_table(HTML_ENTITIES); zusammen zu hängen...

Die letzten Zeilen der bbcode.php:



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

PHP-Quelltext

 function code_check($text) {    
$pattern="/\[PHP](.*)\[\/PHP\]/esiU";    
while(
preg_match($pattern,$text)) {
$text=preg_replace($pattern,"highlight_phpcode('\\1')",$text);  }
$pattern="/\[CODE](.*)\[\/CODE\]/esiU";    
while(
preg_match($pattern,$text)) {      
$text=preg_replace($pattern,"highlight_code('\\1')",$text);    }    
return 
$text;  }   

function 
highlight_code($code){         
$trans get_html_translation_table(HTML_ENTITIES);        
$code stripslashes(strtr(strip_tags(str_replace('</P>',"\n",str_replace('<BR>',"\n",str_replace('\\',"\\\\",$code)))), array_flip($trans)));        
ob_start();        
highlight_string("<?\n".$code." ");        
$code ob_get_contents();        
ob_end_clean();         
$code explode('<br />'$code);         
$textwidth "500";        
$textsmallheight "22";         
$text '<table class="standard" border="0" width="'.$textwidth.'" cellpadding="4" cellspacing="1" >';        
$text .= '<tr><br><td class="quote">';        
$text .= '<table class="quote" border="0" width="'.$textwidth.'" cellpadding="0" cellspacing="0" >';        
$text .= '<tr><td class="quote"><b>Code:</b></td></tr>';        
$text .= '<tr><td class="quote">';        
$text .= '<table border="0" width="100%" cellpadding="0" cellspacing="0" >';        
$text .= '<tr>';         
for (
$x=1$x sizeof($code); $x++)         
if (
$code[$x] != ''$x+0;            
$textheight $x*$textsmallheight;            
$text .= '<td style="background-color: #FFFFFF;" width="100%" valign="top">';            
$text .= '<div style="overflow: auto; width: '.$textwidth.'px; height: '.$textheight.'px">';            
$text .= '<table class="quote" border="0" cellpadding="2" cellspacing="0" width="100%">';         
for (
$x=1$x sizeof($code); $x++)          
if (
$code[$x]!='')            
$text .= '<tr><td style="background-color: #FFFFFF;" width="100%" height="'.$textsmallheight.'" nowrap>'.$code[$x].'</td></tr>';            
$text .= '</table></div></td></tr></table></td></tr></table></td></tr></table>';         
$pattern "/COLOR\=\"\#(.*)\"/esiU";        
while (
preg_match($pattern,$text)) {          
$text=preg_replace($pattern,"color2style('\\1')",$text);        }        
return 
$text;   }   

function 
highlight_phpcode($code){         
$trans get_html_translation_table(HTML_ENTITIES);        
$code stripslashes(strtr(strip_tags(str_replace('</P>',"\n",str_replace('<BR>',"\n",str_replace('\\',"\\\\",$code)))), array_flip($trans)));        
ob_start();        
highlight_string("<?\n".$code." ");        
$code ob_get_contents();        
ob_end_clean();         
$code explode('<br />'$code);        
$textwidth "500";        
$textsmallwidth "40";        
$textsmallheight "22";         
$text '<table class="standard" border="0" width="'.$textwidth.'" cellpadding="4" cellspacing="1" >';        
$text .= '<tr><br><td class="quote">';        
$text .= '<table class="quote" border="0" width="'.$textwidth.'" cellpadding="0" cellspacing="0" >';        
$text .= '<tr><td class="quote" width="'.$textsmallwidth.'" ></td><td class="quote"><b>Quell-Code:</b></td></tr>';        
$text .= '<tr><td class="quote" colspan="2">';        
$text .= '<table border="0" width="100%" cellpadding="0" cellspacing="0" align="left">';        
$text .= '<tr><td valign="top" width="'.$textsmallwidth.'">';        
$text .= '<table class="quote" border="0" cellpadding="2" cellspacing="0" width="'.$textsmallwidth.'" >';         
for (
$x=1$x sizeof($code); $x++)          
if (
$code[$x] != '')            
$text .= '<tr><td class="quote" height="'.$textsmallheight.'" align="right" nowrap>'.($x+0).'&nbsp;</td></tr>';            
$text .= '</table></td>';            
$textheight $x*$textsmallheight;            
$textwidth $textwidth-($textsmallwidth);            
$text .= '<td style="background-color: #FFFFFF;" width="100%" valign="top">';            
$text .= '<div style="overflow: auto; width: '.$textwidth.'px; height: '.$textheight.'px">';            
$text .= '<table class="quote" border="0" cellpadding="2" cellspacing="0" width="100%">';         
for (
$x=1$x sizeof($code); $x++)          
if (
$code[$x]!='')            
$text .= '<tr><td style="background-color: #FFFFFF;" width="100%" height="'.$textsmallheight.'" nowrap>'.$code[$x].'</td></tr>';            
$text .= '</table></div></td></tr></table></td></tr></table></td></tr></table>';         
$pattern "/COLOR\=\"\#(.*)\"/esiU";        
while (
preg_match($pattern,$text)) {          
$text=preg_replace($pattern,"color2style('\\1')",$text);        }        
return 
$text;   }    

function 
color2style($font_code) {     
return 
"style=\"color: $font_code\"";   }


 
Zum Anfang der Seite
29.08.2008 - 00:30 Uhr
Beitrag: #2
laut kitnetwork ist eine 1.6.4 version des code_parse geplant... entweder solnage warten, oder den aktuellen stand der dinge auf kitnetwork.de erfragen

mfg

 
Zum Anfang der Seite
02.09.2008 - 09:58 Uhr
Beitrag: #3
Hi Bullet. Das hatte ich gelesen... Thx!

Hab mir in der Zwischenzeit aber schon selbst geholfen.

Das Ergebnis und die Einbauanleitung kann man hier sehen:
http://bjoern81.kicks-ass.org/include.php?path=forumsthread&threadid=39

Bin für Verbesserungsvorschläge offen  lachend

 
Zum Anfang der Seite
 Seiten (1):    1  

Ähnliche Themen
 
Support Support » Klapptext und Download BBCode Problem - Letzte Antwort von BuLLeT am 28.12.09, 15:49 Klapptext und Download BBCode Problem  (28.12.09, 15:49)
Support Support » BBcode - Letzte Antwort von BuLLeT am 04.10.09, 00:18 BBcode  (04.10.09, 00:18)
Support Support » BBCode Klapptext [1.6.5] - Letzte Antwort von Milano am 27.08.11, 16:38 BBCode Klapptext [1.6.5]  (27.08.11, 16:38)
Support Support » Scriptfenster BBcode - Letzte Antwort von archipage am 21.10.07, 21:00 Scriptfenster BBcode  (21.10.07, 21:00)
Modifikationen Modifikationen » BBcode Bildergröße - Letzte Antwort von DHH am 28.02.18, 08:29 BBcode Bildergröße  (28.02.18, 08:29)

HTH-C.com - Webmedien & Community