Klickbare LINKS abschalten ...

Probleme bei der regulären Arbeiten mit phpBB, Fragen zu Vorgehensweisen oder Funktionsweise sowie sonstige Fragen zu phpBB im Allgemeinen.
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.1, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Gast

Klickbare LINKS abschalten ...

Beitrag von Gast »

Wenn jemand www.google.de irgendwo reinschreibt
ist dies ein klickbarer Link, URL sollen aber nicht so
dargestellt werden ...

Früger gab's da mal einen trick das die Links nicht
klickbar dargestellt wurden ...

Kann jemand helfen ???

DANKE !!!
Acid
Ehrenadmin
Beiträge: 12195
Registriert: 26.04.2001 02:00
Wohnort: Berlin

Beitrag von Acid »

bbcode.php
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, or comma.
$ret = preg_replace("#([\n ])([a-z]+?)://([^,\t \n\r]+)#i", "\\1<a href=\"\\2://\\3\" target=\"_blank\">\\2://\\3</a>", $ret);

// matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing
// Must contain at least 2 dots. xxxx contains either alphanum, or "-"
// yyyy contains either alphanum, "-", or "."
// zzzz is optional.. will contain everything up to the first space, newline, or comma.
// This is slightly restrictive - it's not going to match stuff like "forums.foo.com"
// This is to keep it from getting annoying and matching stuff that's not meant to be a link.
$ret = preg_replace("#([\n ])www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[^,\t \n\r]*)?)#i", "\\1<a href=\"http://www.\\2.\\3\\4\" target=\"_blank\">www.\\2.\\3\\4</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);
}
..mit folgendem ersetzen..
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, or comma.
$ret = preg_replace("#([\n ])([a-z]+?)://([^\t <\n\r]+)#i", "\\1<font color=\"#FF0000\">\\2://\\3</font>", $ret);

// matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing
// Must contain at least 2 dots. xxxx contains either alphanum, or "-"
// yyyy contains either alphanum, "-", or "."
// zzzz is optional.. will contain everything up to the first space, newline, or comma.
// This is slightly restrictive - it's not going to match stuff like "forums.foo.com"
// This is to keep it from getting annoying and matching stuff that's not meant to be a link.
$ret = preg_replace("#([\n ])www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[^\t <\n\r]*)?)#i", "\\1<font color=\"#FF0000\">www.\\2.\\3\\4</font>", $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);
}
Gast

Beitrag von Gast »

DANKE !

Aaaaber die bbcode.php gibt's bei mir "nur" im den
ganzen Templates (Styles) und sie sieht ganz anders aus ...

(oder muß ich das nur im Subsilver ändern)
Benutzeravatar
Simpson
Ehemaliges Teammitglied
Beiträge: 1088
Registriert: 20.05.2002 17:35
Wohnort: Göttingen
Kontaktdaten:

Beitrag von Simpson »

Schau mal ins include Verzeichnis ;) da findeste die bbcode.php
Gast

Beitrag von Gast »

DAAAANKE an EUCH !!!

Funzt klasse ...

:)
Benutzeravatar
saerdnaer
Ehemaliges Teammitglied
Beiträge: 4268
Registriert: 21.04.2001 02:00

Beitrag von saerdnaer »

Anonymous hat geschrieben:Aaaaber die bbcode.php gibt's bei mir "nur" im den
ganzen Templates (Styles)
dort heiß sie aber bbcode.tpl und nicht bbcode.php... ;-)

ah
Gast

Beitrag von Gast »

URL-Button


Hallo Leute !

Nochmal "klickbare Links abschalten" ...

Und zwar beim posten von Nachrichten
habe ich da oben ja den "URL/" Button,
wie kann ich den enfernen das man damit
keine Links (URL's) eingeben kann ...

Wo finde ich das und wie entferne ich das ???


D A N K E (!!!) schon mal !

:)
Gast

Beitrag von Gast »

Weil's wegen der Sicherheit wichtig ist schieb ich's mal hoch ...

THANKS !!!
Acid
Ehrenadmin
Beiträge: 12195
Registriert: 26.04.2001 02:00
Wohnort: Berlin

Beitrag von Acid »

Code: Alles auswählen

			<td><span class="genmed"> 
			  <input type="button" class="button" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onClick="bbstyle(16)" onMouseOver="helpline('w')" />
			  </span></td>
..müsstest Du aus der posting_body.tpl löschen.

Und eventuell noch den BBcode für URL aus bbcode.php und bbcode.tpl ...
Gast

Beitrag von Gast »

Propiere es gleich aus - VIELEN DANK !!!

Aber als Newbie muß ich noch fragen,
muß ich das in jedem Template (Style)
ändern ?

Thanks nochmal ...
Antworten

Zurück zu „phpBB 2.0: Administration, Benutzung und Betrieb“