• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Block Images, bbcode in signatures

Shelley

Well-known member
I never allow Images in signatures at my site so I thought this tip to exclude images in signatures and exclude bbcode might appeal to some.

Originally Kier provided me with the code to block images so thanks and credit to kier for this. I extended that by blocking quotes and code boxes which I noticed some people use around here that can become irritating on other peoples sites.

Simply insert the following code into your EXTRA.css Template and your done. If your using more than 1 style you'll have to include the code into those Extra.css templates.

Code:
.signature .bbCodeBlock,
.signature .bbCodeImage
{
    display: none !important;
}
 
I don't personally allow images in signatures period even if they display once per page, per thread they distract from the content. Anyone that feels the same can now insert the css if they run their forums with the same mindset.
 
Thanks Shelley,

Helps prevent a lot of spam and saves some bandwidth as well. I can not believe i just stared at your OP code and Kier's code for several minutes trying to find a difference between them, eventually hit me you must have edited your post lol... on that note i could have almost sworn ive seen "Lasted edited" or "edited by @" in XF before :confused:
 
Is there a way to alter the code to allow images but restrict their size? I don't mind images but would like to keep them down to 100 height, 700 width or something in that ballpark.
 
Try something like this:

Code:
.message .signature {
max-height: 100px;
max-width: 700px;
overflow-y: auto !important;
overflow-x: auto !important;
}

You may need to fiddle with the code to get it working properly.
It won't resize the images, it will just create a scrollable box.
 
That worked perfect Brogan, thx!

In case anyone is interested, if you replace the "auto" value with "hidden", then you eliminate the scroll bars and the extra size is simply cut-off which is the effect I was trying to achieve. Also need to add .bbCodeImage to keep the entire signature area from being affected.

Code:
/* restrict the size of images in signatures */
.message .signature .bbCodeImage {
max-height: 125px;
max-width: 700px;
overflow-y: hidden !important;
overflow-x: hidden !important;
}
 
this is working perfectly for signatures in forum posts, but apparently sigs contained in conversations are controlled differently? Anyone know the code which would work for conversations?
 
The CSS class is the same for posts as it is for conversations.
I have just tested it and it works fine.

You can confirm that by checking a default style.

I suspect this is an issue related to your style.
 
One forum I visit has users posting their last.fm "recently played" blocks in their signatures. Since they have some fast-moving threads, I just disabled signature viewing. The forum actually reads much better without having to look past signatures. There is an add-on here that will display a user's signature only once per page (or is it once per thread?)...very helpful.
 
Top Bottom