Advertisement:

Author Topic: Limiting signature size  (Read 79841 times)

Offline TokyoBanana

  • Semi-Newbie
  • *
  • Posts: 10
Limiting signature size
« on: October 20, 2004, 10:07:39 PM »
Mod Available Signature Settings Mod

Original Post

I would be really happy if this feature was included sometime soon in one of the next updates to SMF. Meanwhile, does anyone know a mod for this? I found a similar one but that's for disabling images.
Just a clarification: I don't want to limit the size of images posted in the threads, except for signatures.


Thanks a lot! :)
« Last Edit: February 09, 2007, 05:15:01 PM by SleePy »

Offline Anguz

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,430
  • Gender: Male
    • cristianlavaque.com
Re: Limiting signature size
« Reply #1 on: October 20, 2004, 10:32:48 PM »
You could do something as simple as adding this to your CSS file:

Code: [Select]
.signature
{
width: 468;
height: 60;
overflow: hidden;
}

That'll set the signature space to that and whatever exceeding it will be hidden.

The width and height you can change to what you want, but then remember that every sig, even if they don't need that much, will be that much. So don't make it too big either. I used those measures in the past and have found them pretty good, but it's your preference.
« Last Edit: October 20, 2004, 10:42:32 PM by Anguz »
Cristián Lávaque http://cristianlavaque.com

Offline Anguz

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,430
  • Gender: Male
    • cristianlavaque.com
Re: Limiting signature size
« Reply #2 on: October 20, 2004, 10:41:04 PM »
Hmm... looks like besides the class, there's inline styling for the signature. You may need to edit it in Display.template.php.

Code: [Select]
<div style="overflow: auto; width: 100%; padding-bottom: 3px;" class="signature">

I think that now that there's a class for the signature, you can safely take style property out of that div and just add the padding-bottom: 3px; to my previous post.

Remember that when you edit themes, you make a copy of the file in the default one, don't modify the originals. Here's good info on that topic:

http://www.simplemachines.org/community/index.php?topic=16843.0
Cristián Lávaque http://cristianlavaque.com

Offline TokyoBanana

  • Semi-Newbie
  • *
  • Posts: 10
Re: Limiting signature size
« Reply #3 on: October 22, 2004, 06:36:48 PM »
All right!

Thanks a lot! ;)

Yo spiffy, don't forget to have a look. XD

Offline Elijah Bliss

  • Sophist Member
  • *****
  • Posts: 1,340
Re: Limiting signature size
« Reply #4 on: November 17, 2004, 09:34:39 PM »
I still can't get the CSS signature resize to work.

Offline Anguz

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,430
  • Gender: Male
    • cristianlavaque.com
Re: Limiting signature size
« Reply #5 on: December 19, 2004, 12:54:54 PM »
I still can't get the CSS signature resize to work.

My mistake. It's because the width and height are missing the px after the values. Also, the hidden doesn't work cause the inline auto for overflow weights more. Remove the style attribute from the signature div and in style.css add this:

Code: [Select]
.signature
{
width: 468px;
height: 60px;
overflow: hidden;
padding: 3px;
}
« Last Edit: December 20, 2004, 11:30:21 AM by Anguz »
Cristián Lávaque http://cristianlavaque.com

Offline Elijah Bliss

  • Sophist Member
  • *****
  • Posts: 1,340
Re: Limiting signature size
« Reply #6 on: December 19, 2004, 04:52:34 PM »
I still can't get the CSS signature resize to work.

My mistake. It's because the width and height are missing the px after the values. Also, the hidden doesn't work cause the inline auto for overflow weigths more. Remove the style attribute from the signature div and in style.css add this:

Code: [Select]
.signature
{
width: 468px;
height: 60px;
overflow: hidden;
padding: 3px;
}

Thanks, works like a charm!

Offline inthe80s

  • Charter Member
  • Jr. Member
  • *
  • Posts: 166
  • Gender: Male
  • Pick a winner...
    • in the 00s
Re: Limiting signature size
« Reply #7 on: December 20, 2004, 09:13:39 AM »
agrreed... I've used CSS before, and didn't even notice the missing px on each one (boy am I embarassed).  thanks for the help.
Running SMF since May '04.  Started with YaBB on Oct 2001.

Offline Anguz

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,430
  • Gender: Male
    • cristianlavaque.com
Re: Limiting signature size
« Reply #8 on: December 20, 2004, 11:31:31 AM »
NP. I'm glad you got it working. :)
Cristián Lávaque http://cristianlavaque.com

Offline Elijah Bliss

  • Sophist Member
  • *****
  • Posts: 1,340
Re: Limiting signature size
« Reply #9 on: December 21, 2004, 06:32:40 PM »
agrreed... I've used CSS before, and didn't even notice the missing px on each one (boy am I embarassed).  thanks for the help.

on a side note, is you append img to .signature:
Code: [Select]
.signature img
{
     width: 468px;
       height: 60px;
       overflow: hidden;
       padding: 3px;
}

it wll only resize the images in the signature, which I find super cool.

Offline Anguz

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,430
  • Gender: Male
    • cristianlavaque.com
Re: Limiting signature size
« Reply #10 on: December 21, 2004, 06:36:48 PM »
But you need to modify the styles then, cause what you wrote will make any image, even smilies, 480px wide and 60px tall... not exactly what you want, is it? If max-width and max-height worked properly in IE, then could be happy and use that without a problem. You could use it, actually, and only those with decent browsers will enjoy the better display of signature images.
Cristián Lávaque http://cristianlavaque.com

Offline Elijah Bliss

  • Sophist Member
  • *****
  • Posts: 1,340
Re: Limiting signature size
« Reply #11 on: December 21, 2004, 09:44:34 PM »
But you need to modify the styles then, cause what you wrote will make any image, even smilies, 480px wide and 60px tall... not exactly what you want, is it? If max-width and max-height worked properly in IE, then could be happy and use that without a problem. You could use it, actually, and only those with decent browsers will enjoy the better display of signature images.

You have a point, i guess it's a small sacrifice since I have members who love to post 2 page magazine spreads in their signatures. Unfortunately most people do not use Safari or Firefox.

Offline ExistenZ

  • Jr. Member
  • **
  • Posts: 317
  • Gender: Male
  • Hip2b²
    • Virtual Hogwarts
Re: Limiting signature size
« Reply #12 on: January 01, 2006, 02:43:39 PM »
Does this work with RC1.1? I dont think it does...so...can anyone fix it to work with it...
Regards,
Andre

Offline Sheepy

  • Full Member
  • ***
  • Posts: 418
  • -=~ Love ~=-
    • Sheepy's SMF Mod board
Re: Limiting signature size
« Reply #13 on: January 01, 2006, 05:34:14 PM »
Why not? It's only CSS, not PHP code or something...

Offline Sverre

  • Sr. Member
  • ****
  • Posts: 748
Re: Limiting signature size
« Reply #14 on: January 03, 2006, 02:00:59 AM »
I've used this method without problem on both 1.1 RC1 and RC2 :)

Offline ExistenZ

  • Jr. Member
  • **
  • Posts: 317
  • Gender: Male
  • Hip2b²
    • Virtual Hogwarts
Re: Limiting signature size
« Reply #15 on: January 04, 2006, 04:20:01 PM »
But the process isn't very clear, is it? I still dont get what to do...

Can someone explain it a bit better....
Regards,
Andre

Offline Elijah Bliss

  • Sophist Member
  • *****
  • Posts: 1,340
Re: Limiting signature size
« Reply #16 on: January 04, 2006, 06:49:45 PM »
This should be mod and function the same as the avatar settings.

Offline ExistenZ

  • Jr. Member
  • **
  • Posts: 317
  • Gender: Male
  • Hip2b²
    • Virtual Hogwarts
Re: Limiting signature size
« Reply #17 on: January 05, 2006, 01:47:19 PM »
I agree.
Regards,
Andre

Offline perplexed

  • SMF Hero
  • ******
  • Posts: 2,595
  • It's quite perplexing isn't it
Re: Limiting signature size
« Reply #18 on: February 08, 2006, 01:05:12 PM »
I wonder if anyone could also tell me how to limit the file size of the signature images used?

All members use siggie banners loaded in photobucket accounts and load them to signature using [img ]http://[/img] tags

But some are making animated banners now and the file sizes can be huge compared to standard banners

So in addition to a width and height restriction is it also possible to have a kb restriction  ie upper limit of say 200kb?

that would be brilliant :)



also can someone confirm that all we are changing is the .css ?

Offline Anguz

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,430
  • Gender: Male
    • cristianlavaque.com
Re: Limiting signature size
« Reply #19 on: February 08, 2006, 01:20:30 PM »
You can't control the filesize with CSS. At least not that I know.
Cristián Lávaque http://cristianlavaque.com