Snippets
[phpBB Debug] PHP Warning : in file [ROOT]/vendor/twig/twig/src/Template.php on line 359 : Array to string conversion
Array
martin
Admin
Status:
Offline
User theme: Dark
Posts: 5132 Joined: Apr 6th, '14, 14:12
Post
by martin » Mar 29th, '15, 17:41
The finds maybe a little different in 3.1.x but i'm sure you can work it out (3.1.x has an extra line in the finds)
Open: includes/functions_content.php
Find This may be a partial find and not the whole line Code: Select all
/**
* A subroutine of make_clickable used with preg_replace
Add before Add these lines on a new blank line before the preceding line(s) to find Code: Select all
/**
* A subroutine of make_clickable to retrieve
* titles of links posted
*
*/
function make_title_link($url, $text)
{
$handle = @file_get_contents($url);
if(!empty($handle))
{
preg_match('@<meta\s+http-equiv="Content-Type"\s+content="([\w/]+)(;\s+charset=([^\s"]+))?@i', $handle, $matches );
if(isset($matches[3]))
{
$handle = $handle;
}
else
{
$handle = mb_convert_encoding($handle, 'HTML-ENTITIES', "UTF-8");
}
$dom = new DOMDocument();
if (@$dom->loadHTML($handle))
{
$xpath = new DOMXPath($dom);
if (!empty($xpath->query('//title')->item(0)->nodeValue))
{
$title = $xpath->query('//title')->item(0)->nodeValue;
$text = str_replace("\n", " ",$title);
return $text;
}
}
}
return $text;
}
Find This may be a partial find and not the whole line Add after Add these lines on a new blank line after the preceding line(s) to find Code: Select all
$text = make_title_link($url, $text);
Find This may be a partial find and not the whole line Code: Select all
$url = 'http://' . $url;
$text = $short_url;Add after Add these lines on a new blank line after the preceding line(s) to find Code: Select all
$text = make_title_link($url, $text);
Demo if installed here Blades-place - Index page
Electronics, Cars, Fashion, Collectibles, Coupons and More | eBay
YouTube to mp3 Converter
[phpBB Debug] PHP Warning : in file [ROOT]/vendor/twig/twig/src/Template.php on line 359 : Array to string conversion
Array
dsaf
Users
Status:
Offline
User theme: Dark
Posts: 33 Joined: Jan 17th, '15, 16:51
Post
by dsaf » Mar 29th, '15, 18:23
Your a good man, Thankyou!
[phpBB Debug] PHP Warning : in file [ROOT]/vendor/twig/twig/src/Template.php on line 359 : Array to string conversion
Array
Jaantje
Users
Status:
Offline
User theme: Dark
Posts: 356 Joined: Nov 2nd, '14, 20:25
Post
by Jaantje » Mar 29th, '15, 18:45
martin works great
Grreeetttttzzzzz, Jaantje
[phpBB Debug] PHP Warning : in file [ROOT]/vendor/twig/twig/src/Template.php on line 359 : Array to string conversion
Array
martin
Admin
Status:
Offline
User theme: Dark
Posts: 5132 Joined: Apr 6th, '14, 14:12
Post
by martin » Mar 29th, '15, 19:24
[phpBB Debug] PHP Warning : in file [ROOT]/vendor/twig/twig/src/Template.php on line 359 : Array to string conversion
Array
Solidjeuh
Users
Status:
Offline
User theme: Dark
Posts: 348 Joined: Dec 13th, '14, 01:40
Post
by Solidjeuh » Aug 15th, '15, 16:43
Maybe I'm blind..
But is there also a topic for 'internal link' ?
Forum voor NL Extensie vertalingen ---> https://www.supportforum.be
----------------------------------------------------------------------------
[phpBB Debug] PHP Warning : in file [ROOT]/vendor/twig/twig/src/Template.php on line 359 : Array to string conversion
Array
martin
Admin
Status:
Offline
User theme: Dark
Posts: 5132 Joined: Apr 6th, '14, 14:12
Post
by martin » Aug 15th, '15, 19:24
Forum Link to Topic Title now (ABD) still WORKS - Martins-Place.dyndns.info
wrong site mate.
[phpBB Debug] PHP Warning : in file [ROOT]/vendor/twig/twig/src/Template.php on line 359 : Array to string conversion
Array
Solidjeuh
Users
Status:
Offline
User theme: Dark
Posts: 348 Joined: Dec 13th, '14, 01:40
Post
by Solidjeuh » Aug 15th, '15, 19:30
Woepssssss
Thank you
[phpBB Debug] PHP Warning : in file [ROOT]/vendor/twig/twig/src/Template.php on line 359 : Array to string conversion
Array
martin
Admin
Status:
Offline
User theme: Dark
Posts: 5132 Joined: Apr 6th, '14, 14:12
Post
by martin » Aug 15th, '15, 19:45
Let me know if any edits need fixing and il bring it up to date.
[phpBB Debug] PHP Warning : in file [ROOT]/vendor/twig/twig/src/Template.php on line 359 : Array to string conversion
Array
Solidjeuh
Users
Status:
Offline
User theme: Dark
Posts: 348 Joined: Dec 13th, '14, 01:40
Post
by Solidjeuh » Aug 15th, '15, 19:48
martin wrote: let me know if any edits need fixing and il bring it up to date.
Tried it, and it works..
[phpBB Debug] PHP Warning : in file [ROOT]/vendor/twig/twig/src/Template.php on line 359 : Array to string conversion
Array
martin
Admin
Status:
Offline
User theme: Dark
Posts: 5132 Joined: Apr 6th, '14, 14:12
Post
by martin » Aug 15th, '15, 19:48
[phpBB Debug] PHP Warning : in file [ROOT]/vendor/twig/twig/src/Template.php on line 359 : Array to string conversion
Array
martin
Admin
Status:
Offline
User theme: Dark
Posts: 5132 Joined: Apr 6th, '14, 14:12
Post
by martin » Aug 15th, '15, 19:52
Cough wanna go one better Search icon on internal links - Martins-Place.dyndns.info
[phpBB Debug] PHP Warning : in file [ROOT]/vendor/twig/twig/src/Template.php on line 359 : Array to string conversion
Array
Solidjeuh
Users
Status:
Offline
User theme: Dark
Posts: 348 Joined: Dec 13th, '14, 01:40
Post
by Solidjeuh » Aug 23rd, '15, 18:13
I had to undo these edits
I use 'OneAll Social Login'
And it takes the memberlist 10 to 30 seconds to load because of the 'website / facebook links'.
And not just those facebook links, but also all others
[phpBB Debug] PHP Warning : in file [ROOT]/vendor/twig/twig/src/Template.php on line 359 : Array to string conversion
Array
Anuj Dhawan
Users
Status:
Offline
User theme: Dark
Posts: 109 Joined: Aug 31st, '15, 08:32
Post
by Anuj Dhawan » Oct 29th, '15, 10:03
Hi,
Can this be converted to an extension? Manual edits are pain in a$$.
[phpBB Debug] PHP Warning : in file [ROOT]/vendor/twig/twig/src/Template.php on line 359 : Array to string conversion
Array
RMcGirr83
Users
Status:
Offline
User theme: Dark
Posts: 3 Joined: Nov 6th, '15, 11:38
Post
by RMcGirr83 » Feb 22nd, '16, 11:32
And more code that looks very familiar to me. /me wonders if dmzx and martin scrapped my entire forum when it used to be up.
You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.
[phpBB Debug] PHP Warning : in file [ROOT]/vendor/twig/twig/src/Template.php on line 359 : Array to string conversion
Array
martin
Admin
Status:
Offline
User theme: Dark
Posts: 5132 Joined: Apr 6th, '14, 14:12
Post
by martin » Feb 22nd, '16, 12:22
Naaa It's on phpmodders lol note for 3.1 the finds are a little different tho.