[x] Navigation

[x] Languages

[x] Design
Each user can view the site with a different theme.
Themes marked with a * also change the forum look.

[x] Downloads (Top)

Automatischer Hyperlink im Shoutblock ?
Fragen und Diskussionen zu Modulen / Erweiterungen
Post new topic    Reply to topic    Printer Friendly Page     Forum Index ›  Module & Blöcke

View previous topic :: View next topic  
Author Message
Joerg12
Investigator
Investigator

Offline Offline
Joined: Aug 11, 2006
Posts: 42

PostPosted: 26.12.2008 18:40
Post subject: Automatischer Hyperlink im Shoutblock ?

Hallo,

ist es evtl. möglich daß bei Postings im Shoutblock die URLs automatisch als Hyperlinks dagestellt werden ?? Irgendwie funktioniert das bei mir gar nicht.

Habe mal den "zuständigen" Code für die URL-Erkennung nachgepostet...

PHP:
   if ($shoutconf['urlonoff']) {
$comment = preg_replace("#\[url\#[0-9]\]#is", '', $comment);
//Allow for URL tags
$patterns[] = "#\[url\]([\w]+?://[^ \"\n\r\t<]*?)\[/url\]#ise";
$replacements[] = "lock_url('\\1')";
// [url]www.cpgnuke.com[/url] (no xxxx:// prefix).
$patterns[] = "#\[url\]((www|ftp)\.[^ \"\n\r\t<]*?)\[/url\]#ise";
$replacements[] = "lock_url('http://\\1')";
// [url=xxxx://www.cpgnuke.com]cpgnuke[/url]
$patterns[] = "#\[url=([\w]+?[://|\.|/][^ \"\n\r\t<]*?)\](.*?)\[/url\]#ise";
$replacements[] = "lock_url('\\1')";
// [url=www.cpgnuke.com]cpgnuke[/url] (no xxxx:// prefix).
$patterns[] = "#\[url=((www|ftp)\.[^ \"\n\r\t<]*?)\](.*?)\[/url\]#ise";
$replacements[] = "lock_url('http://\\1')";
$comment = preg_replace($patterns, $replacements, $comment);
} else {
if (
eregi("\[url\](.*)", $comment)) { $error = _SHOUTNOURL; }
}

Bin für jeden Hinweis dankbar !

Gruss
Jörg.


Joerg12's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Dragonfly CMS 9.2.1, PHP 5.2.5, MySQL 5.0.18
Back to top
View user's profile
Display posts from previous:   
Post new topic    Reply to topic    Printer Friendly Page    Forum Index ›  Module & Blöcke
Page 1 of 1
All times are GMT + 1 Hour



Jump to:  


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum




Interactive software released under GNU GPL, Code Credits, Privacy Policy