Advertisement:

Author Topic: Disable showing pictures in Quotes  (Read 29127 times)

Offline mystik

  • Semi-Newbie
  • *
  • Posts: 59
Disable showing pictures in Quotes
« on: March 11, 2005, 10:33:53 AM »
Its rather annoying wen one user post a large image, then subsequent users quote this post so you end up with several posts showing the same  image  >:(


is there a way to disable showing images in QUOTATIONS????


Offline Oldiesmann

  • Developer
  • SMF Super Hero
  • *
  • Posts: 24,814
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • http://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: Disable showing pictures in Quotes
« Reply #1 on: March 11, 2005, 05:03:05 PM »
Add this to style.css, right after the .quote block:

Code: [Select]
.quote img
{
  display: none;
}
Michael Eshom
Webmaster / SMF Lead Developer
oldiesmann@simplemachines.org

Offline mystik

  • Semi-Newbie
  • *
  • Posts: 59
Re: Disable showing pictures in Quotes
« Reply #2 on: March 11, 2005, 05:16:14 PM »
daaamn so easy and works like a charm   8) ;D

Offline Oldiesmann

  • Developer
  • SMF Super Hero
  • *
  • Posts: 24,814
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • http://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: Disable showing pictures in Quotes
« Reply #3 on: March 11, 2005, 05:20:40 PM »
Isn't CSS fun? :)
Michael Eshom
Webmaster / SMF Lead Developer
oldiesmann@simplemachines.org

Offline mystik

  • Semi-Newbie
  • *
  • Posts: 59
Re: Disable showing pictures in Quotes
« Reply #4 on: March 11, 2005, 05:24:10 PM »
hehe  :D :D.......i'm sure other ppl hate this too...hope they find this useful
« Last Edit: March 11, 2005, 05:25:47 PM by mystik »

Offline ivytony

  • Jr. Member
  • **
  • Posts: 122
Re: Disable showing pictures in Quotes
« Reply #5 on: March 14, 2005, 12:02:07 PM »
so, similarly, to disable the showing of realplayer or wma files,

I can do like this:

Code: [Select]
.quote real/wma
{
  display: none;
}

Offline Anguz

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,430
  • Gender: Male
    • cristianlavaque.com
Re: Disable showing pictures in Quotes
« Reply #6 on: March 17, 2005, 03:54:00 AM »
Add this to style.css, right after the .quote block:

Code: [Select]
.quote img
{
  display: none;
}

The only disadvantage is that smileys don't won't show either, but it's a small price to pay, I guess.

so, similarly, to disable the showing of realplayer or wma files,

I can do like this:

Code: [Select]
.quote real/wma
{
  display: none;
}

Not really sure about that one, though. The mime type is not a selector, but you can use the tag used to embed it in HTML.
Cristián Lávaque http://cristianlavaque.com

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Disable showing pictures in Quotes
« Reply #7 on: March 17, 2005, 02:20:13 PM »
So, you'd use:

.quote embed, .quote object

For not showing smileys, hmm... if browsers supported all CSS rules, it'd be easy.

-[Unknown]

Offline 127.0.0.1

  • Jr. Member
  • **
  • Posts: 265
  • Gender: Male
Re: Disable showing pictures in Quotes
« Reply #8 on: June 26, 2005, 02:40:09 AM »
I don't like this particular method because emoticons get hidden too. A better method would result in displaying only the url of images (not including emoticons) in quotes. My PHP is too rusty to attempt this though :(

Invision Power Board has this feature. It'd probably be a good little add-on to future versions of smf :P

Offline dtm.exe

  • SMF Hero
  • ******
  • Posts: 5,465
Re: Disable showing pictures in Quotes
« Reply #9 on: June 26, 2005, 02:54:24 AM »
This is an awesome trick :).

-Dan The Man

Offline Dannii

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,211
  • Mind the volcano!
    • My homepage
Re: Disable showing pictures in Quotes
« Reply #10 on: June 26, 2005, 07:17:08 AM »
Yes I think it would work better to alter the subs.php file... although I wouldn't know how too.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Offline dtm.exe

  • SMF Hero
  • ******
  • Posts: 5,465
Re: Disable showing pictures in Quotes
« Reply #11 on: June 29, 2005, 10:21:14 PM »
OK, I just tried this out and it didn't work.

EDIT: Solved...forgot the "." :P.

-Dan The Man
« Last Edit: June 29, 2005, 10:25:37 PM by OIDanTheManIO »

Offline tekgik

  • Semi-Newbie
  • *
  • Posts: 45
Re: Disable showing pictures in Quotes
« Reply #12 on: February 23, 2006, 06:37:35 AM »
Hi there!

I cant seem to find the where to out this code on smf 1.1 rc2 style.css.


Thanks!

Offline Sverre

  • Sr. Member
  • ****
  • Posts: 748
Re: Disable showing pictures in Quotes
« Reply #13 on: September 30, 2006, 04:44:41 AM »
I don't like this particular method because emoticons get hidden too. A better method would result in displaying only the url of images (not including emoticons) in quotes. My PHP is too rusty to attempt this though :(

Invision Power Board has this feature. It'd probably be a good little add-on to future versions of smf :P

I totally agree! I've been playing around with the // Remove any nested quotes, if necessary. part in Post.php to achieve this. It was easy to remove images from quotes this way, but since I don't know anything about regex/the preg_replace command, I have no idea how to keep the image url/replace [img][/img] tags with [url][/url] tags…

A nice bonus of doing it this way would be that it doesn't remove the ability to post pictures inside a quote block if you really need to.

Offline Sverre

  • Sr. Member
  • ****
  • Posts: 748
Re: Disable showing pictures in Quotes
« Reply #14 on: October 08, 2006, 09:29:12 AM »
I've continued to tinker with the piece of code in Post.php, and I think I might have found a solution...

Someone has to verify that the added code won't create any problems or introduce security hazards though, since I have no idea what I'm doing with this regex stuff :P

In Post.php (1.0.x and 1.1.x):

Code: (find) [Select]
// Remove any nested quotes, if necessary.
if (!empty($modSettings['removeNestedQuotes']))
$form_message = preg_replace(array('~\n?\[quote.*?\].+?\[/quote\]\n?~is', '~^\n~', '~\[/quote\]~'), '', $form_message);

Code: (add after) [Select]
// Remove images from quotes.
$form_message = preg_replace(array('~\[/?img.*?\]~is', '""'), '', $form_message);

and for the quick reply:

Code: (find) [Select]
// Remove any nested quotes.
if (!empty($modSettings['removeNestedQuotes']))
$row['body'] = preg_replace(array('~\n?\[quote.*?\].+?\[/quote\]\n?~is', '~^\n~', '~\[/quote\]~'), '', $row['body']);

Code: (add after) [Select]
// Remove images from quotes.
$row['body'] = preg_replace(array('~\[/?img.*?\]~is', '""'), '', $row['body']);

EDIT:
It doesn't work perfectly in situations with [img] tags wrapped in [url] tags to post a thumbnail or add a link to the image (for example back to image hosts such as http://imageshack.us). Otherwise, the modification seems to do exactly what I wanted it to do :)
« Last Edit: May 29, 2007, 07:29:02 PM by Sverre »

Offline Greengoat

  • Semi-Newbie
  • *
  • Posts: 55
Re: Disable showing pictures in Quotes
« Reply #15 on: January 08, 2007, 12:43:40 AM »
Add this to style.css, right after the .quote block:

Code: [Select]
.quote img
{
  display: none;
}

Worked perfectly.  Thanks.

Offline Geno15

  • Semi-Newbie
  • *
  • Posts: 17
Re: Disable showing pictures in Quotes
« Reply #16 on: January 26, 2009, 07:20:58 PM »
Oldiesmann ---- Wow that sure is one hot tip..I was about to ask the same question. Thank you sir!

Offline FlixyaFriend

  • Semi-Newbie
  • *
  • Posts: 18
    • samsung ue46c8000
Re: Disable showing pictures in Quotes
« Reply #17 on: January 30, 2009, 11:06:30 AM »
Add this to style.css, right after the .quote block:

Code: [Select]
.quote img
{
  display: none;
}

Thank for this trick. it's work very well.

Offline Skoony

  • Newbie
  • *
  • Posts: 1
Re: Disable showing pictures in Quotes
« Reply #18 on: January 13, 2011, 08:34:45 AM »
Hello,

I would like to apply this as well, but as you can see, there is no style.css file in the css folder for the theme:


I'm a complete newbie so please don't run over me :P

Offline Illori

  • Project Manager
  • SMF Master
  • *
  • Posts: 48,067
Re: Disable showing pictures in Quotes
« Reply #19 on: January 13, 2011, 01:19:04 PM »
try index.css instead