Modifications for phpBB3.
Try the Mods here and share Your own Mods
Forum rules
You dont have to use ModX or make your mod AutoMod compatible. A simple textfile is fine
But if you post Mods here You also have to give support
Post
by martin123456 » 16 Apr 2013, 20:29
what mod you using for external links to be renamed
http://www.somesite.com
Never mind i used a part of another mod
Open: includes/functions_content.php
find
Code: Select all
case MAGIC_URL_FULL:
$tag = 'm';
$text = $short_url;
add after
Code: Select all
$handle = @fopen($url, "r");
if ($handle)
{
while (($line = fgets($handle, 4096)) !== false)
{
if (feof($handle)) break;
$match = preg_match('$(\<title\>)(.*)(\<\/title\>)$i', $line, $matches);
if ($match and trim($matches[2] !== ''))
{
$text = strip_tags($matches[2]);
break;
}
}
fclose($handle);
}
edit i missed this part off but added it
fclose($handle);
}
Last edited by martin123456 on 19 Apr 2013, 19:25, edited 1 time in total.
Post
by Stoker » 17 Apr 2013, 03:33
I think its the one by miriam
Post
by Blackwolf » 17 Apr 2013, 09:37
Cool snippet.....thanks Martinn123456
Post
by martin123456 » 17 Apr 2013, 10:46
Stoker wrote: I think its the one by miriam
Yeah it is it looks like she put 3 mods into one internal,external.cookie
i just used the external and cookie as i use the forum to topic title for internals.
Post
by neuropass » 19 Apr 2013, 18:08
great thanks martin!!! looks like it was updated:
this is the new code:
Code: Select all
$handle = @fopen($url, "r");
if ($handle)
{
while (($line = fgets($handle, 4096)) !== false)
{
if (feof($handle)) break;
$match = preg_match('$(\<title\>)(.*)(\<\/title\>)$i', $line, $matches);
if ($match and trim($matches[2] !== ''))
{
$text = strip_tags($matches[2]);
break;
}
}
$text = html_entity_decode($text);
}
Post
by martin123456 » 19 Apr 2013, 19:26
Same code i just missed the bottom line out but have placed it there now.
Post
by Stoker » 20 Apr 2013, 18:35
Post
by martin123456 » 20 Apr 2013, 18:40
Works on my site perfect also in mchat too and it dont work in stokers mchat
2013-04-20_194556.png
edit it does work with https
links.png
You do not have the required permissions to view the files attached to this post.