News:

Wondering if this will always be free?  See why free is better.

Main Menu

Remove images from Quotes

Started by Chas Large, March 30, 2010, 03:34:14 PM

Previous topic - Next topic

Chas Large

Quote from: Wiejeben on November 28, 2012, 07:22:16 AM
Thank you very much :) This modification is really useful, it keeps everything a lot cleaner.
But is there a way to apply this to all excising posts? If not, well, nah don't mind it it's fine :P

Greetings,
Maarten
Glad you found it useful but sadly there is no way to edit the posts prior to installing the mod other than manual editing.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

PopUpSteve

Interesting mod. I would love to install this but from your last statement:
Quoteno way to edit the posts prior to installing the mod
it makes me think that you are modifying the text at the time of the post. Wouldn't be better to modify the text as it is being displayed, on the fly as it were and not changing the original? That way it would work with all existing posts, no matter when they were made and allow for changes to your mod in the future.
Steve
"Even a broken clock is right twice a day, unless it's digital."

Chas Large

A good point and you're quite right, the mod removes the image from a quoted post on a post by post basis rather than by running a dB query to achieve the same effect.

If you care to come up with the dB query code to do it, I'm happy to modify the mod and give you credit for that work.

Personally I don't think it's necessary as it would involve running the query for every quote made to check for an image and remove it, this might push up the overhead on the server somewhat.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Steve

Is this mod still being maintained? I seem to be having issues with it working since the upgrade to 2.0.7.
DO NOT pm me for support!

Chas Large

Maintained? no, not unless changes in SMF 2.0.xx cause any issues, it works perfectly in 2.0.7. Could be clashing with other mods? What are the symptoms and what other mods do you have installed?
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Steve

Thanks for responding. I actually fixed it this morning. I parsed the code where you download the mod from and in the modifications.english.php file, somehow the line that was supposed to be right above the end code wasn't there. I found it several lines back, moved it to where it was supposed to be, and voila! Works like a charm now.

Don't know why and I'm not sure I care as long as it works. lol :D
DO NOT pm me for support!

Chas Large

Glad you got it working. It's common for mods to add text code to the end of that file so my best guess is that another mod added text to the end and somehow corrupted the file.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Steve

Well, that was short-lived. It's now not working again. Good grief. I have a lot of mods installed so it could be cumbersome to try and figure out which mod is conflicting. I'll dig some more but if you still want a list I'll give it to you.
DO NOT pm me for support!

Steve

I did discover something. I use the dQuoteSelection mod and if there are center tags around the image, it doesn't work. Remove the center tags in the quote and it works fine. :)
DO NOT pm me for support!

Chas Large

Yes, that would do it. My mod is very simple and to make it try and look for all possible combinations of BBCode around an image would make it difficult and slow. So it is what it is I'm afraid. Sometimes mods clash and there is little we can do about it given how many mods there are available. It's impossible to test a mod with all other mods.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Steve

No worries my friend. It works as advertised and now that I know what's going on, I'm very happy with it. :D
DO NOT pm me for support!

TrackMustangsOnline


Antechinus

Hey Chas, would you mind if I nicked some of this code to port it to Elk?

Chas Large

Quote from: Antechinus on September 24, 2016, 06:43:09 PM
Hey Chas, would you mind if I nicked some of this code to port it to Elk?
Sure, with the usual acknowledgements included, go ahead.

What is Elk (other than a big deer)? ;)
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Antechinus

Thanks.

It's forum software. Forked from SMF 2.1 Alpha ages ago. ;)

pikeman

Hello, is a modification for 2.1 planned?

gevv

Quote from: pikeman on February 13, 2022, 07:36:02 AMHello, is a modification for 2.1 planned?

Hi,

remove_image_from_quotes_modification.xml

search

'content' => '$1',
replace

'content' => '<div>$1</div>',
ElkArte is a modern, powerful community building forum software. https://www.elkarte.net/

pikeman


gevv

ElkArte is a modern, powerful community building forum software. https://www.elkarte.net/

Advertisement: