Several improvements
This commit is contained in:
parent
bdd2754740
commit
59b45f7fc1
|
@ -230,7 +230,8 @@ function bbcode($Text,$preserve_nl = false) {
|
||||||
$Text);
|
$Text);
|
||||||
|
|
||||||
// [img=widthxheight]image source[/img]
|
// [img=widthxheight]image source[/img]
|
||||||
$Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '<img src="$3" style="height: $2px; width: $1px;" >', $Text);
|
//$Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '<img src="$3" style="height: $2px; width: $1px;" >', $Text);
|
||||||
|
$Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '<img src="$3" style="width: $1px;" >', $Text);
|
||||||
|
|
||||||
// Images
|
// Images
|
||||||
// [img]pathtoimage[/img]
|
// [img]pathtoimage[/img]
|
||||||
|
|
|
@ -83,12 +83,15 @@ function collecturls($message) {
|
||||||
$urls = array();
|
$urls = array();
|
||||||
foreach ($result as $treffer) {
|
foreach ($result as $treffer) {
|
||||||
// A list of some links that should be ignored
|
// A list of some links that should be ignored
|
||||||
$list = array("/user/", "/tag/", "/profile/", "/search?search=", "mailto:", "/u/", "/node/",
|
$list = array("/user/", "/tag/", "/group/", "/profile/", "/search?search=", "mailto:", "/u/", "/node/",
|
||||||
"//facebook.com/profile.php?id=", "//plus.google.com/");
|
"//facebook.com/profile.php?id=", "//plus.google.com/");
|
||||||
foreach ($list as $listitem)
|
foreach ($list as $listitem)
|
||||||
if (strpos($treffer[1], $listitem) !== false)
|
if (strpos($treffer[1], $listitem) !== false)
|
||||||
$ignore = true;
|
$ignore = true;
|
||||||
|
|
||||||
|
if ((strpos($treffer[1], "//plus.google.com/") !== false) and (strpos($treffer[1], "/posts") !== false))
|
||||||
|
$ignore = false;
|
||||||
|
|
||||||
if (!$ignore)
|
if (!$ignore)
|
||||||
$urls[$treffer[1]] = $treffer[1];
|
$urls[$treffer[1]] = $treffer[1];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user