| | | | |
| | |
| Gast
Beiträge: n/a
| Hi, ich habe bei meinem Forum ein kleines Problem. Wenn der User einen PHP Code postet, wird dieser Später wieder in einem Textarea ausgeben, dies kann man hier sehen: http://newwarrior.milten.lima-city.d...ad_id=1&site=1 Was man aber leider auch sehen kann ist, das der Code nicht gehighlightet wird sondern, das dort einfach HTML Code drinne steht, leider weiß ich nicht warum. Hier meine BBCODE Funktion: Code: <?php
function bbcode ($bbcode)
{
$bbcode=preg_replace("/\[b\](.*?)\[\/b\]/si", "\\1", $bbcode);
$bbcode=preg_replace("/\[i\](.*?)\[\/i\]/si", "\\1", $bbcode);
$bbcode=preg_replace("/\[s\](.*?)\[\/s\]/si", "<s>\\1</s>", $bbcode);
$bbcode=preg_replace("/\[u\](.*?)\[\/u\]/si", "<u>\\1</u>", $bbcode);
$bbcode=preg_replace("/\[center\](.*?)\[\/center\]/si", "<center>\\1</center>", $bbcode);
$bbcode=preg_replace("/\[url\](.*?)\[\/url\]/si", "<a href=\\1>\\1</a>", $bbcode);
$bbcode=preg_replace("/\[code\](.*?)\[\/code\]/si", "<center>Code:
<div style=\"text-align:left;border:1px solid black;font-size:11px;color:green;background-color:#ececec;width:500px;padding:5px;\">\\1</div></center>
", $bbcode);
$bbcode=preg_replace("/\[img\](.*?)\[\/img\]/si", "<img src=\\1 border=\"0\">", $bbcode);
$bbcode = nl2br ($bbcode);
return $bbcode;
}
function php ($php)
{
$php=preg_replace("/\[php\](.*?)\[\/php\]/si", "<center><textarea style=backgroundcolor:#c0c0c0; rows=10 cols=85> |
| | |
| PHP Code Flüsterer Registriert seit: 21.08.2005 Beiträge: 4682 PHP-Kenntnisse: Fortgeschritten | |
| | |
| Gast
Beiträge: n/a
| Wieso machst du schon wieder einen Thread damit auf? Siehe http://www.phpfriend.de/forum/ftopic51488.html Gruß phpfan |
| Themen-Optionen | |
| Thema bewerten | |
|
|
Ähnliche Themen | ||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| [Erledigt] Textarea: Einlesen - Problem.. | Softyx | PHP Tipps 2008 | 2 | 05.07.2008 12:49 |
| [Erledigt] Galerie Problem... | coraplanet | PHP Tipps 2008 | 4 | 06.06.2008 13:42 |
| Textarea Feld dynamisch vergrößern und verkleinern? | php_frage | HTML, Usability und Barrierefreiheit | 5 | 25.04.2006 08:42 |
| Textarea Übergabe Problem | danysahne333 | PHP Tipps 2006 | 6 | 14.03.2006 13:46 |
| Problem mit textarea ,querscrollen soll nicht mehr mögl sein | 250Euro | HTML, Usability und Barrierefreiheit | 3 | 15.02.2006 20:53 |
| problem!!! | PHP Tipps 2006 | 6 | 08.02.2006 11:06 | |
| [Erledigt] wieder ein Problem bei phpmailer und smtp | PHP Tipps 2006 | 24 | 07.02.2006 01:07 | |
| Problem mit Textarea | php_frage | HTML, Usability und Barrierefreiheit | 2 | 31.12.2005 00:53 |
| Problem mit Textarea | PHP Tipps 2007 | 10 | 25.12.2005 10:58 | |
| Problem mit Select und css in xhtml + textarea | HTML, Usability und Barrierefreiheit | 2 | 05.12.2005 15:32 | |
| [Erledigt] problem mit FORM bzw TEXTAREA (FireFox) | HTML, Usability und Barrierefreiheit | 4 | 22.08.2005 14:36 | |
| [Erledigt] Problem mit Backslash | Patrick Schwarz | PHP Tipps 2005-2 | 5 | 26.07.2005 09:54 |
| textarea problem | Ohrwurm83 | PHP Tipps 2004 | 1 | 01.11.2004 17:25 |
| Problem mit alter JavaScript-Funktion | woods | PHP Tipps 2004 | 1 | 13.08.2004 13:34 |
| [Erledigt] Probleme beim ausrichten von Textarea & Button | HTML, Usability und Barrierefreiheit | 2 | 27.07.2004 14:17 | |
| Besucher kamen über folgende Suchanfragen bei Google auf diese Seite |
| textarea problem, textarea bacode frabig, css textarea problem, php str replace textarea, bbcode textarea, bbcode php textarea, bbcode textarea php, gehighlightet textarea |

Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.