Convert quoted images to url

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
User avatar
Ger
Registered User
Posts: 2117
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100

Re: Convert quoted images to url

Post by Ger »

The $crepl-variable has one $ too much. Don't know for sure that's what's causing the error, but I guess so.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
Kharon
Registered User
Posts: 235
Joined: Thu Oct 26, 2006 5:27 pm

Re: Convert quoted images to url

Post by Kharon »

problem solved :) thank you, Ger

find

Code: Select all

$inmessage = str_replace($$crepl, $qcode[1], $inmessage);
replace

Code: Select all

$inmessage = str_replace($crepl, $qcode[1], $inmessage);
Lurx
Registered User
Posts: 21
Joined: Thu Dec 18, 2008 12:32 pm

Re: Convert quoted images to url

Post by Lurx »

Great idea, works splendidly :) Thanks!
stainless_steelrat
Registered User
Posts: 39
Joined: Mon Jun 19, 2006 5:17 pm

Re: Convert quoted images to url

Post by stainless_steelrat »

Confirmed. Just installed the image multi-quoting. Works fine on one of the sites....

(with the && fix of course).
User avatar
Ger
Registered User
Posts: 2117
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100

Re: Convert quoted images to url

Post by Ger »

Thanks for testing, I changed it in my earlier post.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
Kharon
Registered User
Posts: 235
Joined: Thu Oct 26, 2006 5:27 pm

Re: Convert quoted images to url

Post by Kharon »

suggestion,question and request : attachment images is not working in quote post ?

thank you
User avatar
Ger
Registered User
Posts: 2117
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100

Re: Convert quoted images to url

Post by Ger »

That has nothing to do with this MOD. Attachments aren't really a part of the post, but are kinda "linked" to it. So even with a clean, unmodded phpBB3-installation, attachments aren't quoted.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
Kharon
Registered User
Posts: 235
Joined: Thu Oct 26, 2006 5:27 pm

Re: Convert quoted images to url

Post by Kharon »

hmm

okay,I understand

thank you,Ger
User avatar
DragonMaster1
Registered User
Posts: 994
Joined: Tue Aug 17, 2004 11:04 am
Name: Terry

Re: Convert quoted YouTube to url

Post by DragonMaster1 »

RupertGee 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:

Code: Select all

$qres = preg_replace('#\[img\](.*)\[/img\]#iU', '[ [url=\1]'. $user->lang['IMAGE'] .'[/url] ]', $qmatchin);
Add after:

Code: Select all

$replacement = preg_replace('#\[youtube\]\n*(.*)\n*\[/youtube\]#iU', '[url=$1]Writer posted a YouTube video[/url]', $replacement); // RupertGee Addition
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.
Does not work for me
User avatar
Ger
Registered User
Posts: 2117
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100

Re: Convert quoted images to url

Post by Ger »

Some more information would help...
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
User avatar
DragonMaster1
Registered User
Posts: 994
Joined: Tue Aug 17, 2004 11:04 am
Name: Terry

Re: Convert quoted images to url

Post by DragonMaster1 »

Ger wrote:Some more information would help...

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
User avatar
paciuli
Registered User
Posts: 64
Joined: Thu Dec 06, 2007 10:36 pm

Re: Convert quoted images to url

Post by paciuli »

Great mod, really one of the most useful I've come across so far, and the video mod works fine too! I'll add more entries for all my embed codes :)
Just a minor glitch: this line

Code: Select all

$replacement = preg_replace('#\[url=\n*(.*)\n*\]\n*\[img\]\n*(.*)\n*\[/img\]\n*\[/url\]#iU', '[ [url=$1]'. $user->lang['IMAGE'] .'[/url] ]', $replacement);
converts 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 :oops: suggestions? :D
Thanks a lot! :)
Biliardoweb - Italian billiard community - http://www.biliardoweb.com
User avatar
Ger
Registered User
Posts: 2117
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100

Re: Convert quoted images to url

Post by Ger »

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
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.
paciuli wrote:Great mod, really one of the most useful I've come across so far
Thanks! :)
paciuli wrote:Just a minor glitch: this line

Code: Select all

    $replacement = preg_replace('#\[url=\n*(.*)\n*\]\n*\[img\]\n*(.*)\n*\[/img\]\n*\[/url\]#iU', '[ [url=$1]'. $user->lang['IMAGE'] .'[/url] ]', $replacement);
converts 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 :oops: suggestions?
That's the result of a discussion I had about it. But you can change it by replacing that line to:

Code: Select all

    $replacement = preg_replace('#\[url=\n*(.*)\n*\]\n*\[img\]\n*(.*)\n*\[/img\]\n*\[/url\]#iU', '[ [url=$2]'. $user->lang['IMAGE'] .'[/url] ]', $replacement);
With the $2 backreference you get the second sample pattern (within ( and ) ).
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
spoda-b.com
Registered User
Posts: 52
Joined: Wed Dec 31, 2008 8:09 pm

Re: Convert quoted images to url

Post by spoda-b.com »

I installed this mod using AutoMOD and I got the following errors.

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)
I'm using the latest version of PHPBB, PHP, SQL, etc.
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.
spoda-b.com
Registered User
Posts: 52
Joined: Wed Dec 31, 2008 8:09 pm

Re: Convert quoted images to url

Post by spoda-b.com »

spoda-b.com wrote:I installed this mod using AutoMOD and I got the following errors.

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)
I'm using the latest version of PHPBB, PHP, SQL, etc.
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.
but after a few seconds it redirects to the post and works fine...

Return to “[3.0.x] MOD Database Releases”