Code: Select all
$inmessage = str_replace($$crepl, $qcode[1], $inmessage);
Code: Select all
$inmessage = str_replace($crepl, $qcode[1], $inmessage);
Does not work for meRupertGee wrote:This is a great mod; images in quotes are so annoying.
My board also lets users post YouTube video. That means the video gets quoted too! Argh! So I modded this mod to take care of YouTube too, converting the embedded video player to a text link when quoted. It's my first mod-of-mod....
Look for:Add after:Code: Select all
$qres = preg_replace('#\[img\](.*)\[/img\]#iU', '[ [url=\1]'. $user->lang['IMAGE'] .'[/url] ]', $qmatchin);
My board supports English only and so I hardcorded the text link; you'll want to change that to language specific text for your multi-lingual board.Code: Select all
$replacement = preg_replace('#\[youtube\]\n*(.*)\n*\[/youtube\]#iU', '[url=$1]Writer posted a YouTube video[/url]', $replacement); // RupertGee Addition
Ger wrote:Some more information would help...
Code: Select all
$replacement = preg_replace('#\[url=\n*(.*)\n*\]\n*\[img\]\n*(.*)\n*\[/img\]\n*\[/url\]#iU', '[ [url=$1]'. $user->lang['IMAGE'] .'[/url] ]', $replacement);
Perhaps you use different tags voor de youtubes? In that case you should change the code as such. Otherwise, I don't know an you'd probably await RupertGee to answer.DragonMaster1 wrote:Using 304 and code entered exactly as shown
The basic convert to a link works but the YouTube addition does nothing....as if nothing was added at all
Thanks!paciuli wrote:Great mod, really one of the most useful I've come across so far
That's the result of a discussion I had about it. But you can change it by replacing that line to:paciuli wrote:Just a minor glitch: this lineconverts images surrounded by a URL tag, but the resulting link points to the URL, which could be a web site or whatever. I think it should always point to the image address instead... I'm not very experienced with reg exp, so I can't sort this out myself suggestions?Code: Select all
$replacement = preg_replace('#\[url=\n*(.*)\n*\]\n*\[img\]\n*(.*)\n*\[/img\]\n*\[/url\]#iU', '[ [url=$1]'. $user->lang['IMAGE'] .'[/url] ]', $replacement);
Code: Select all
$replacement = preg_replace('#\[url=\n*(.*)\n*\]\n*\[img\]\n*(.*)\n*\[/img\]\n*\[/url\]#iU', '[ [url=$2]'. $user->lang['IMAGE'] .'[/url] ]', $replacement);
Code: Select all
[phpBB Debug] PHP Notice: in file /includes/message_parser.php on line 44: Undefined variable: user
[phpBB Debug] PHP Notice: in file /includes/message_parser.php on line 44: Trying to get property of non-object
[phpBB Debug] PHP Notice: in file /includes/message_parser.php on line 45: Undefined variable: user
[phpBB Debug] PHP Notice: in file /includes/message_parser.php on line 45: Trying to get property of non-object
[phpBB Debug] PHP Notice: in file /includes/message_parser.php on line 46: Undefined variable: user
[phpBB Debug] PHP Notice: in file /includes/message_parser.php on line 46: Trying to get property of non-object
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 2119: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3184)
but after a few seconds it redirects to the post and works fine...spoda-b.com wrote:I installed this mod using AutoMOD and I got the following errors.I'm using the latest version of PHPBB, PHP, SQL, etc.Code: Select all
[phpBB Debug] PHP Notice: in file /includes/message_parser.php on line 44: Undefined variable: user [phpBB Debug] PHP Notice: in file /includes/message_parser.php on line 44: Trying to get property of non-object [phpBB Debug] PHP Notice: in file /includes/message_parser.php on line 45: Undefined variable: user [phpBB Debug] PHP Notice: in file /includes/message_parser.php on line 45: Trying to get property of non-object [phpBB Debug] PHP Notice: in file /includes/message_parser.php on line 46: Undefined variable: user [phpBB Debug] PHP Notice: in file /includes/message_parser.php on line 46: Trying to get property of non-object [phpBB Debug] PHP Notice: in file /includes/functions.php on line 2119: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3184)
My site is: http://spoda-b.com
My theme is: Hermes Gray
My test account is: test/test
The mod does work, so to speak. However the font on the page/thread is rather large and the error displays above the site in the header (i think is what it's called)
any help is much appreciated.