webadressen automatisch als link?
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
- danysahne333
- Mitglied
- Beiträge: 363
- Registriert: 30.06.2004 00:25
- Wohnort: Kolkwitz
- Kontaktdaten:
webadressen automatisch als link?
wenn ich eine webadresse in einem posting schreibe. z.b. www.test.de dann wird diese adresse generell als link dargestellt obwohl ich keine url-tags benutzt habe.
wie kann ich das ändern???
wie kann ich das ändern???
Da müsstest du die includes/bbcode.php ändern.
Bin mir nicht sicher, aber versuch mal das:
Ersetze mit:
Bin mir nicht sicher, aber versuch mal das:
Code: Alles auswählen
function make_clickable($text)
{
// pad it with a space so we can match things at the start of the 1st line.
$ret = ' ' . $text;
// matches an "xxxx://yyyy" URL at the start of a line, or after a space.
// xxxx can only be alpha characters.
// yyyy is anything up to the first space, newline, comma, double quote or <
$ret = preg_replace("#(^|[\n ])([\w]+?://[^ \"\n\r\t<]*)#is", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $ret);
// matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing
// Must contain at least 2 dots. xxxx contains either alphanum, or "-"
// zzzz is optional.. will contain everything up to the first space, newline,
// comma, double quote or <.
$ret = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r<]*)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret);
// matches an email@domain type address at the start of a line, or after a space.
// Note: Only the followed chars are valid; alphanums, "-", "_" and or ".".
$ret = preg_replace("#(^|[\n ])([a-z0-9&\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", "\\1<a href=\"mailto:\\2@\\3\">\\2@\\3</a>", $ret);
// Remove our padding..
$ret = substr($ret, 1);
return($ret);
Code: Alles auswählen
/*function make_clickable($text)
{
// pad it with a space so we can match things at the start of the 1st line.
$ret = ' ' . $text;
// matches an "xxxx://yyyy" URL at the start of a line, or after a space.
// xxxx can only be alpha characters.
// yyyy is anything up to the first space, newline, comma, double quote or <
$ret = preg_replace("#(^|[\n ])([\w]+?://[^ \"\n\r\t<]*)#is", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $ret);
// matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing
// Must contain at least 2 dots. xxxx contains either alphanum, or "-"
// zzzz is optional.. will contain everything up to the first space, newline,
// comma, double quote or <.
$ret = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r<]*)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret);
// matches an email@domain type address at the start of a line, or after a space.
// Note: Only the followed chars are valid; alphanums, "-", "_" and or ".".
$ret = preg_replace("#(^|[\n ])([a-z0-9&\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", "\\1<a href=\"mailto:\\2@\\3\">\\2@\\3</a>", $ret);
// Remove our padding..
$ret = substr($ret, 1);
return($ret);*/
- danysahne333
- Mitglied
- Beiträge: 363
- Registriert: 30.06.2004 00:25
- Wohnort: Kolkwitz
- Kontaktdaten:
wenn ich das mache bekomme ich folgende fehlermeldung:
hast du noch ne idee?
Parse error: parse error in /home/www/web159/html/includes/bbcode.php on line 718
Parse error: parse error in /home/www/web159/html/includes/bbcode.php on line 718
Warning: Cannot modify header information - headers already sent by (output started at /home/www/web159/html/includes/bbcode.php:718) in /home/www/web159/html/includes/sessions.php on line 311
Warning: Cannot modify header information - headers already sent by (output started at /home/www/web159/html/includes/bbcode.php:718) in /home/www/web159/html/includes/sessions.php on line 312
Warning: Cannot modify header information - headers already sent by (output started at /home/www/web159/html/includes/bbcode.php:718) in /home/www/web159/html/includes/functions.php on line 796
hast du noch ne idee?
-
- Ehemaliges Teammitglied
- Beiträge: 5703
- Registriert: 26.02.2004 00:09
Code: Alles auswählen
----- öffne -----
includes/bbcode.php
----- finde -----
function make_clickable($text)
{
----- füge danch ein -----
return($text); //exit function without doing anything
---
- danysahne333
- Mitglied
- Beiträge: 363
- Registriert: 30.06.2004 00:25
- Wohnort: Kolkwitz
- Kontaktdaten:
jetzt bekomme ich leider folgenden fehler.
Parse error: parse error in /home/www/web159/html/includes/bbcode.php on line 720
Warning: Cannot modify header information - headers already sent by (output started at /home/www/web159/html/includes/bbcode.php:720) in /home/www/web159/html/includes/page_header.php on line 607
Warning: Cannot modify header information - headers already sent by (output started at /home/www/web159/html/includes/bbcode.php:720) in /home/www/web159/html/includes/page_header.php on line 609
Warning: Cannot modify header information - headers already sent by (output started at /home/www/web159/html/includes/bbcode.php:720) in /home/www/web159/html/includes/page_header.php on line 610
-
- Ehemaliges Teammitglied
- Beiträge: 5703
- Registriert: 26.02.2004 00:09
- danysahne333
- Mitglied
- Beiträge: 363
- Registriert: 30.06.2004 00:25
- Wohnort: Kolkwitz
- Kontaktdaten:
hier ist sie http://www.cottbustalk.de/bilder/bbcode.txt
-
- Ehemaliges Teammitglied
- Beiträge: 5703
- Registriert: 26.02.2004 00:09
Die Änderungen von Fabse musst Du natürlich zuerst wieder rückgänig machen. 
Du kannst ein Funktion die Du nicht benutzen willst nicht einfach auskommentieren. Entweder rufst Du diese erst gar nicht auf oder gibst direkt am Anfang der Funktion den übergebenen Wert unverändert wieder zurück. (Das ist genau das was meine Änderung macht.)
Gruß Christian

Du kannst ein Funktion die Du nicht benutzen willst nicht einfach auskommentieren. Entweder rufst Du diese erst gar nicht auf oder gibst direkt am Anfang der Funktion den übergebenen Wert unverändert wieder zurück. (Das ist genau das was meine Änderung macht.)
Gruß Christian
---
- danysahne333
- Mitglied
- Beiträge: 363
- Registriert: 30.06.2004 00:25
- Wohnort: Kolkwitz
- Kontaktdaten:
so s funktioniert jetzt nur gibs eine neues problem:Christian_W hat geschrieben:Die Änderungen von Fabse musst Du natürlich zuerst wieder rückgänig machen.
Du kannst ein Funktion die Du nicht benutzen willst nicht einfach auskommentieren. Entweder rufst Du diese erst gar nicht auf oder gibst direkt am Anfang der Funktion den übergebenen Wert unverändert wieder zurück. (Das ist genau das was meine Änderung macht.)
Gruß Christian
wenn ich jetzt was schreibe hab ich die ganze zeit sowas hier :
http://www.cottbustalk.de/bilder/problem.jpg
hat da wer ne idee?