XF 2.0 Add limit to signature image size

Hi @Chris D

Can you tell me how i can set a limit for the signature image?

For example, i don't want forummembers to use a signature picture bigger than 500x100 pixels. WithxHeigth.

How to set this up?
 
Did not work. Strange thing is that people only can add an URL and not upload a picture. Why is that?

Here you can see that it did not work: It published the whole picture and it's wider than 100 px

1.PNG
 

Chris D

XenForo developer
Staff member
Strange thing is that people only can add an URL and not upload a picture. Why is that?
We've never felt the need to support image uploads to signatures.

Here you can see that it did not work: It published the whole picture and it's wider than 100 px
I can certainly see that its width is wider than 100px, though I did also realise I gave you the code with the height and width values you wanted the wrong way round, though I don't think that's an issue here (I've edited my post).

Just having a look at your site, and I've loaded up the contents of the extra.less template, and it is empty. Did you definitely save the changes? Did you edit the template in the correct style/s?
 
2.PNG



I think the need is there. People want to personalise the signature. How easy it is to add a picture of your own taken on your mobile? Now people must upload them to a server, if they allready know how to do that, and copy the link. Bit hard for many people.
 

Chris D

XenForo developer
Staff member
There's no plans to add uploading to signatures at this point. You can suggest it in the Suggestions forum if it hasn't already been suggested.

The code I gave you needs to be added to the "extra.less template".

You can find that under Appearance > Search templates (making sure the correct style is selected) and typing extra.less in the search title field.

Then just paste the code in there and click save.
 

V3NTUS

Well-known member
Is there a way to prevent people from linking to signature pics which are bigger than X mb?

I've seen many members putting links of animated GIFs up to 20 mb.
 

Madhouse

Active member
Add the following to your extra.less template:
Less:
.message-signature
{
    .bbWrapper
    {
        .bbImage
        {
            max-width: 500px;
            max-height: 100px;
            overflow-x: auto;
            overflow-y: auto;
        }
    }
}

Thankyou! That worked great.

I'd like a bar or tooltip or something to tell my members that they can click and enlarge the image? How would I do that?
 

Breixo

Well-known member
Add the following to your extra.less template:
Less:
.message-signature
{
    .bbWrapper
    {
        .bbImage
        {
            max-width: 500px;
            max-height: 100px;
            overflow-x: auto;
            overflow-y: auto;
        }
    }
}
Thanks! It worked :)
I think the need is there. People want to personalise the signature. How easy it is to add a picture of your own taken on your mobile? Now people must upload them to a server, if they allready know how to do that, and copy the link. Bit hard for many people.
Would love that too... :)
https://xenforo.com/community/threads/ability-to-upload-image-attachments-in-signatures.50677/
 

deslocotoco

Well-known member
Using this Thread for my problem. Excuse me.

I need to add some boundaries for signatures in my Forum. If i do nothing my Forum is gonna be like a Berlin Wall in 1986.

So... I need a simple tip, considering that i have to add in extra.less, right?

  • Need to force the alignment to the right (no signatures messing up my content order);
  • Need to force only a color (something readable in dark theme and white theme);

What i think i can do in Permissions, please correct me if I'm wrong:
  • Need to put a limit on the size (1 or 2);
  • One image, maximum;
  • One smile maximum;
  • Two lines, maximum.

 
Top