Seite 1 von 2
Klickbare LINKS abschalten ...
Verfasst: 06.11.2002 08:17
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 !!!
Verfasst: 06.11.2002 11:11
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);
}
Verfasst: 06.11.2002 14:24
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)
Verfasst: 06.11.2002 14:28
von Simpson
Schau mal ins include Verzeichnis

da findeste die bbcode.php
Verfasst: 06.11.2002 15:42
von Gast
DAAAANKE an EUCH !!!
Funzt klasse ...

Verfasst: 06.11.2002 17:32
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
Verfasst: 29.11.2002 20:41
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 !

Verfasst: 30.11.2002 13:05
von Gast
Weil's wegen der Sicherheit wichtig ist schieb ich's mal hoch ...
THANKS !!!
Verfasst: 30.11.2002 14:54
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 ...
Verfasst: 30.11.2002 15:53
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 ...