| | | | |
| | |
| PHP Code Flüsterer Registriert seit: 21.08.2005 Beiträge: 4682 PHP-Kenntnisse: Fortgeschritten | |
| | ||
| Erfahrener Benutzer Registriert seit: 18.09.2003
Beiträge: 13.598
PHP-Kenntnisse: Fortgeschritten ![]() | Zitat:
eventuell suchst du das hier: | |
| |
| | |
| Gast
Beiträge: n/a
| das kenne ich schon hab ja mal ein komplettes formatierungsformular includet gehabt aber als ich gesehen hab das das nicht funktioniert hab ichs ohne formular probiert hier das include formular: Code: <?php
function changetext($str)
{
$str = trim($str);
$str = preg_replace('/\S{60}/', '\0 ', $str);
$str = htmlspecialchars($str);
$str = preg_replace('/(\s{2})\s+/', '\1', $str);
$str = preg_replace('=\[b\](.*)\[/b\]=Uis',
'<span style="font-weight:bold;">\1</span>',
$str);
$str = preg_replace('=\[i\](.*)\[/i\]=Uis',
'<span style="font-style:italic;">\1</span>',
$str);
$str = preg_replace('=\[u\](.*)\[/u\]=Uis',
'<span style="text-decoration:underline;">\1</span>',
$str);
$str = preg_replace('=\[url\](.*)\[/url\]=Uis',
'\1',
$str);
$str = preg_replace('#\[url=(.*)\](.*)\[/url\]#Uis',
'\2',
$str);
$str = preg_replace('#(^|[^"=]{1})(http://|ftp://|mailto:|news:)([^\s<>]+)([\s\n<>]|$)#sm',
'\1\2\3\4',
$str);
$str = str_replace(':)', '[img]../g/sm1.gif[/img]', $str);
$str = str_replace(':D', '[img]../g/sm2.gif[/img]', $str);
$str = str_replace(':lol:', '[img]../g/sm3.gif[/img]', $str);
$str = str_replace(':(', '[img]../g/sm4.gif[/img]', $str);
$str = str_replace(':o', '[img]../g/sm5.gif[/img]', $str);
$str = str_replace(':shock:', '[img]../g/sm6.gif[/img]', $str);
$str = str_replace('8(', '[img]../g/sm7.gif[/img]', $str);
$str = str_replace(';)', '[img]../g/sm8.gif[/img]', $str);
$str = str_replace(':|', '[img]../g/sm9.gif[/img]', $str);
$str = str_replace(':?', '[img]../g/sm10.gif[/img]', $str);
$str = str_replace(':arrow:', '[img]../g/sm11.gif[/img]', $str);
$str = str_replace(':!', '[img]../g/sm12.gif[/img]', $str);
$str = nl2br($str);
return $str;
}
?>
edit: sch... verschreibseler |
| Themen-Optionen | |
| Thema bewerten | |
|
|
Ähnliche Themen | ||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| [Erledigt] Galerie Problem... | coraplanet | PHP Tipps 2008 | 4 | 06.06.2008 13:42 |
| Komisches Problem | Stefajo | PHP Tipps 2006 | 6 | 25.09.2006 13:49 |
| datensätze defekt oder problem mit dem einlesen? | Ministry | Datenbanken | 4 | 06.07.2006 18:42 |
| Komisches problem mit Datei Berechtigungen | stuvomatic | PHP Tipps 2006 | 5 | 28.05.2006 01:49 |
| 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 | |
| Komisches Problem mit sessions | FBI | PHP Tipps 2007 | 5 | 22.11.2005 14:15 |
| Komisches ODBC Problem... | solitaer | PHP-Fortgeschrittene | 0 | 17.09.2005 18:21 |
| xampp| komisches problem | LA-Finest | PHP Tipps 2005-2 | 7 | 09.09.2005 18:47 |
| [Erledigt] Komisches Problem, nach Aktualisierung weg | HTML, Usability und Barrierefreiheit | 7 | 13.08.2005 01:02 | |
| Komisches Problem mit Eintrag in der DB | PHP Tipps 2007 | 4 | 04.01.2005 15:41 | |
| Problem mit Weiterleitung | PHP Tipps 2004-2 | 16 | 22.12.2004 17:49 | |
| Smarty und PHP-Skript Problem | PHP Tipps 2004-2 | 2 | 03.12.2004 22:27 | |
| komisches problem mit db-eintrag [look inside pls] | anakadai | PHP Tipps 2004 | 1 | 06.11.2004 07:13 |
| Problem mit alter JavaScript-Funktion | woods | PHP Tipps 2004 | 1 | 13.08.2004 13:34 |
| Besucher kamen über folgende Suchanfragen bei Google auf diese Seite |
| decodiermaschienen |

Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.