Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Topic started by: ADoomedMarine on August 21, 2004, 02:01:28 PM

Title: Ability to remove images from signatures
Post by: ADoomedMarine on August 21, 2004, 02:01:28 PM
I want to still allow BBC code in signatures but just not images and also certain other's like tables.
Title: Re: Ability to remove images from signatures
Post by: [Unknown] on August 21, 2004, 04:12:46 PM
Well, try the following:

.signature img
{
   display: none;
}

In your CSS.  After adding it, please make sure to hit Ctrl-F5 in your browser.

Does that take out images, at all?

-[Unknown]
Title: Re: Ability to remove images from signatures
Post by: ADoomedMarine on August 21, 2004, 10:33:26 PM
Excellent works nicely.  Thanks.

EDIT:

Would this work in all browsers?  Because I wouldn't mind a php approach to it... where abouts in the code is the signature image submitted?  You could replace the image tag with "Not allowed" text or something.
Title: Re: Ability to remove images from signatures
Post by: David on August 22, 2004, 02:50:19 AM
Wow, that is slick.
Title: Re: Ability to remove images from signatures
Post by: andrea on August 22, 2004, 03:27:51 AM
Quote from: [Unknown] on August 21, 2004, 04:12:46 PM
Well, try the following:

.signature img
{
   display: none;
}

In your CSS.  After adding it, please make sure to hit Ctrl-F5 in your browser.

Does that take out images, at all?

-[Unknown]

This is super cool. I suppose this could also be used to suppress profile images in a specific theme, right?
Title: Re: Ability to remove images from signatures
Post by: dschwab9 on August 22, 2004, 03:29:38 AM
Quote from: andrea on August 22, 2004, 03:27:51 AM
I suppose this could also be used to suppress profile images in a specific theme, right?

You mean avatars?  Why not just take them out of the template?
Title: Re: Ability to remove images from signatures
Post by: [Unknown] on August 22, 2004, 03:48:04 AM
Because this is so uber slick ;).  Added in RC1, though, mind you ;).

Yes, Andrea, it could be used to accomplish many things - but there's currently no .avatar, etc.  If you could make me a list of ones you want (avatar, etc.) I would be willing to make at least some of them a reality for the next release.

-[Unknown]
Title: Re: Ability to remove images from signatures
Post by: klumy on August 22, 2004, 04:07:32 AM
I like this feature "Ability to remove images from signatures ".

How about adding this to the user optionsmenu with pulldownmenu

- Show signatures
- show signatures without images
- Don't show Signatures
Title: Re: Ability to remove images from signatures
Post by: Anguz on August 23, 2004, 04:07:07 PM
Quote from: klumy on August 22, 2004, 04:07:32 AM
I like this feature "Ability to remove images from signatures ".

How about adding this to the user optionsmenu with pulldownmenu

- Show signatures
- show signatures without images
- Don't show Signatures

You can probably do this with JS to change the class of the signature, but I don't know much JavaScript.

When I originally suggested using CSS (http://www.simplemachines.org/community/index.php?topic=14629.msg123549#msg123549) for this, I decided to include it with my signature randomizer and size limit mod. But the option to hide or show images in the sig would be set from the forum settings and would apply to any theme using the mod, not member independent.

I don't know if something like that would be wanted or even needed, since it's really easy to modify the CSS, but still some would like it, or so I thought.

There's also the issue of Flash, cause when the tag is not disabled in the forum, it can be used in the signatures as well and would defeat the class' style to not show images. There's probably a way to not display it as well using CSS, but that I don't know yet. [Unknown] most likely knows.

Title: Re: Ability to remove images from signatures
Post by: [Unknown] on August 25, 2004, 11:34:35 PM
What's wrong with putting display: none; on object, embed, etc.?

-[Unknown]
Title: Re: Ability to remove images from signatures
Post by: Anguz on August 26, 2004, 05:35:11 AM
Oh, didn't know those worked on Flash, it's just that I hadn't thought of that, never really used Flash so I didn't know how it's done. Thanks :)
Title: Re: Ability to remove images from signatures
Post by: williammc on August 26, 2004, 06:36:00 AM
Quote from: [Unknown] on August 21, 2004, 04:12:46 PM
Well, try the following:

.signature img
{
   display: none;
}

In your CSS.  After adding it, please make sure to hit Ctrl-F5 in your browser.

Does that take out images, at all?

-[Unknown]

Thanks, been added and it works nicely.
Title: Re: Ability to remove images from signatures
Post by: NoRad on August 28, 2004, 10:57:01 PM
Snitz had an option where users could select in their profile if they want to view signatures at all. I always had that turned off because I thought signatures was a waste of space and bandwidth. It just made it harder for me to skim posts.
Title: Re: Ability to remove images from signatures
Post by: Metho on August 28, 2004, 11:52:44 PM
So does SMF.... Modify Profile => Look and Layout Preferences

- Methonis
Title: Re: Ability to remove images from signatures
Post by: NoRad on August 30, 2004, 04:41:47 PM
Awesome. Thanks for the tip
Title: Re: Ability to remove images from signatures
Post by: Monkey on October 06, 2004, 08:37:20 AM
I tried this method... but I don't have a true CSS file, it's still embedded in the general format. Is there something else I could try of am I doing something wrong?

.signature img
{
   display: none;
}
Title: Re: Ability to remove images from signatures
Post by: [Unknown] on October 07, 2004, 03:52:03 AM
You have to be using an updated theme for it to work, I'm afraid.

If you want to send me a pm with your FTP information, I'll try to look at it for you.

-[Unknown]
Title: Re: Ability to remove images from signatures
Post by: Elijah Bliss on April 04, 2005, 07:12:46 PM
Is it possible to use this to only display one or two images max in a sig?
Title: Re: Ability to remove images from signatures
Post by: Anguz on April 04, 2005, 10:50:02 PM
No.
Title: Re: Ability to remove images from signatures
Post by: [Unknown] on April 04, 2005, 11:14:50 PM
If modern browsers supported CSS3, it would be.

-[Unknown]
Title: Re: Ability to remove images from signatures
Post by: ディン1031 on April 07, 2005, 02:13:20 AM
Quote from: Elijah Bliss on April 04, 2005, 07:12:46 PM
Is it possible to use this to only display one or two images max in a sig?
I've write something for my forum to limit the pictures in a signature. 
If you want to know how it work i can write oder pm it to you (but i must first look, how did i can make it... *sneakaway*)
Title: Re: Ability to remove images from signatures
Post by: Gwion on March 23, 2006, 04:59:53 AM
Works fine! :)

I only have one problem - after the change members who had an image only in the signature do no longer have the option to enter any signature in their profile. There is no longer a field displayed. Members who only had text in the signature are not affected.
Since I would like to allow text signatures - can I get this back?
The theme I am using is autumn-dark with SMF 1.1. RC2
Title: Re: Ability to remove images from signatures
Post by: tomis on May 10, 2006, 09:58:56 AM
Kudos [unknown] for the nifty css hack to supress images in signatures.  I say it's a hack because the user can still add the image to the sig, but it's just not displayed.

I would really like to see a place in admin where I can define what BBCode tags are allowed in the sigs.  I would work just like defining what's allowed in posts.  And I'd even like to see a couple more options for admin to decide as well.

For signatures:
1. define what BBCode tags are allowed
2. define how many lines are allowed.
3. define max font size allowed.
4. define max # of links allowed.

This will permit admin to keep bandwith usage down (disallowing images/flash etc) and cut down on spam/junky looking sigs. as well.

As a side note, in the profile edit pages, where you edit your signature, it should have the buttons for putting in the BBCode (like when posting). C'mon this is 2006, we should have to do things manually when they can be automated.
Title: Re: Ability to remove images from signatures
Post by: Anguz on May 11, 2006, 03:19:26 AM
tomis, just a few thoughts on what you say. If you make it simpler for users to add code, they'll add more of it, which you're trying to prevent. Also, how often does one modify the sig? Although it's uncomfortable to do it with a lot of code by hand, it's only very few times during your membership. Also, the bandwidth is not the problem, but rather the ammount of space the sigs take what is being tried to control with this topic's tip.
Title: Re: Ability to remove images from signatures
Post by: tomis on May 11, 2006, 02:48:08 PM
Quote from: Anguz on May 11, 2006, 03:19:26 AM
If you make it simpler for users to add code, they'll add more of it, which you're trying to prevent.
That's like trying to have security by obscurity, it's simply not security.  I think we should have the buttons there for convenience, and have admin-defineable limits for the sigs.  Only the BBC tags that admin allows for sigs would have the buttons there for users to add the code.  Then as admin you could allow only bold, italics, underline colors & links (for example).  In admin you would also define a hard limit for number of chars (255 for example) in sig, number of lines in sig and max font size.  This way the user has more convenience than currently, and the admin can keep the forum from looking so spammy.  We're not actually trying to prevent adding more code, we're trying to allow it in a controlled environment.

Quote from: Anguz on May 11, 2006, 03:19:26 AM
Also, how often does one modify the sig? Although it's uncomfortable to do it with a lot of code by hand, it's only very few times during your membership.
It all depends, some people change it every week or so- that's more than a few times during membership hopefully.

Quote from: Anguz on May 11, 2006, 03:19:26 AM
Also, the bandwidth is not the problem, but rather the ammount of space the sigs take what is being tried to control with this topic's tip.
I agree, that keeping the forum looking nice is the main interest, but if you're not going to show the whole image, why have the user download it only to hide it (or part of it) with css?  That's definitly a non-solution. :)  The benefit of enforcing these limits at the time of creating the signature, is that then all the superfluous data is not stored in the DB and downloaded by each and every viewer.

My only motivation for expressing these views is that I love SMF and I want it to get better. :)

So basically what this could look like in the admin panel would be:

Signature Configuration

Then this stuff would be enforced when the user saves their signature, and kick back an error, if it doesn't comply.
Title: Re: Ability to remove images from signatures
Post by: iv_nik on May 11, 2006, 03:02:20 PM
Is there any simple ability to remove images that exceed particular size? For examle I want users have only "userbar-sized" images, 350 x 19 pixels, not more.
Title: Re: Ability to remove images from signatures
Post by: Anguz on May 12, 2006, 02:18:29 AM
tomis, I think your points are valid, what I said in my other reply was mostly the way I think about it for my own forum, but not in a generic way, just expressing my opinion.

The one of the suggestions that you give that insterests me the most is the one where you can select the bbcode that'd be parsed, mostly because it's something that I have already had an interest on.

You may, or not, know that I worked quite a bit with the bbcode parser, and I have many ideas for it that I never actually developed. One of them was adding permissions, or selectiveness, for where the code is being used, like in sigs or boards, or by whom it's being used or viewed.

It's still something that I get interested on again from time to time, but at the same time one of those things that aren't really a priority and just stay in a would-be-nice-to-do list.

I hope someone actually does give more control to sigs some day for the users like you. I personally would just remove the parsing from sigs in my own forum, since I feel they break the flow of the conversation, I've grown to like the no-sigs in blog comments lately, but that's my personal taste.
Title: Re: Ability to remove images from signatures
Post by: tomis on May 16, 2006, 08:35:06 AM
Thanks for the relpy Anguz,

Hopefully we'll see some more control over sigs in the next release :)
Title: Re: Ability to remove images from signatures
Post by: CouteauSwiss on June 29, 2006, 06:04:36 AM
Can't wait  :P

members keep puting Huuge horribe signz   >:(
Title: Re: Ability to remove images from signatures
Post by: nico77 on August 25, 2006, 08:44:40 AM
How can I remove the ability to put BBC in signatures but keep it in posts? Is there an option to do this or am I missing it?

Many thanks..
Title: Re: Ability to remove images from signatures
Post by: IKShadow on December 07, 2006, 12:23:56 PM
Any update for 1.1 as it does not have ".signature img" in style.css
Title: Re: Ability to remove images from signatures
Post by: quicksilver1024 on December 10, 2006, 10:50:48 AM
I would like to know as well
:)
Title: Re: Ability to remove images from signatures
Post by: wyvern15 on July 15, 2007, 10:37:21 AM
Sorry to drag up an old thread.  Is there any progress in the last 7 months regarding the issue of disabling images in signatures..?!
Title: Re: Ability to remove images from signatures
Post by: redone on July 15, 2007, 11:49:36 AM
Yes there has been progress. I would expect some kind of additional controls for signatures within future versions of SMF.

Title: Re: Ability to remove images from signatures
Post by: wyvern15 on July 15, 2007, 01:01:46 PM
Thanks for the speedy reply!

Looking forward to seeing the results of these endeavours.  :D
Title: Re: Ability to remove images from signatures
Post by: metallica48423 on August 12, 2007, 01:36:50 AM
i don't think you'll be disappointed.

However, for the time being, the code in the first post of this thread will still work for completely removing images from signatures.
Title: Re: Ability to remove images from signatures
Post by: kamalgurung on February 12, 2008, 04:37:47 AM
I am using safmc and smf 1.1.4 and I used the code in style.css and no changes the signatures still appears.

Please kindly help me.
Title: Re: Ability to remove images from signatures
Post by: metallica48423 on February 12, 2008, 02:54:07 PM
its possible that the signature part uses a different id/class than what the css says to edit here -- have you searched Display.template.php for 'signature' and seen what is on the actual element for the signature?