News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Disable showing pictures in Quotes

Started by mystik, March 11, 2005, 10:33:53 AM

Previous topic - Next topic

mystik

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????


Oldiesmann

Add this to style.css, right after the .quote block:

.quote img
{
  display: none;
}
Michael Eshom
Christian Metal Fans

mystik

daaamn so easy and works like a charm   8) ;D

Oldiesmann

Michael Eshom
Christian Metal Fans

mystik

#4
hehe  :D :D.......i'm sure other ppl hate this too...hope they find this useful

ivytony

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

I can do like this:

.quote real/wma
{
  display: none;
}

Anguz

Quote from: Oldiesmann on March 11, 2005, 05:03:05 PM
Add this to style.css, right after the .quote block:

.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.

Quote from: ivytony on March 14, 2005, 12:02:07 PM
so, similarly, to disable the showing of realplayer or wma files,

I can do like this:

.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

[Unknown]

So, you'd use:

.quote embed, .quote object

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

-[Unknown]

127.0.0.1

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

dtm.exe

This is an awesome trick :).

-Dan The Man

Dannii

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."

dtm.exe

#11
OK, I just tried this out and it didn't work.

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

-Dan The Man

tekgik

Hi there!

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


Thanks!

Sverre

Quote from: 127.0.0.1 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

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.

Sverre

#14
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 :)

Greengoat

Quote from: Oldiesmann on March 11, 2005, 05:03:05 PM
Add this to style.css, right after the .quote block:

.quote img
{
  display: none;
}


Worked perfectly.  Thanks.

Geno15

Oldiesmann ---- Wow that sure is one hot tip..I was about to ask the same question. Thank you sir!

FlixyaFriend

Quote from: Oldiesmann on March 11, 2005, 05:03:05 PM
Add this to style.css, right after the .quote block:

.quote img
{
  display: none;
}


Thank for this trick. it's work very well.
samsung ue46c8000 [nofollow]

Skoony

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

Illori


Advertisement: