MyBB Community Forums

Full Version: Restrict Signature Image Size : Maintain Forum Decency
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
We often see users apply huge images in signatures that appear in postbit making the postbit look more like an advert zone. That not only destroys the decency of the board but much annoying too.

This tweak will handle this issue restricting the size of the signature image in postbit as desired / defined by admin.

Go to template:
ACP > Templates & Styles > Templates > {theme_name} Templates > Postbit Templates > postbit_signature

Find this:
{$post['signature']}

Change it to:
<div class="postbit_sig">{$post['signature']}</div>

Save the template.
Now open your theme's showthread.css in advanced edit mode:
ACP > Templates & Styles > Themes > {theme_name} > showthread.css > Edit Stylesheet : Advanced Mode

and add the following at the end:

.postbit_sig div img, .postbit_sig div a img {
max-height: 70px;
}

Change the height pixel value as required and save.

Now the signatures of the users in postbit will be maintained not exceeding the size limit you have specified.

Note: Declaring height or width only will change the subsequent width or height maintaining aspect ratio. You can declare both the values; ( eg. max-width: 100px; ) in that case whichever value will exceed the tweak will take effect.
Not Working For Me [Image: DgCfSVq.png]

And Here Is A Proofe http://ktech.esy.es/Meko/showthread.php?tid=6
^ @ Diyar, it appears that you have added div class signature in the postbit template but missed adding required css content
.signature div img, .signature div a img {max-height: 70px;}
Sorry i dont got it please i am new to mybb
Its detailed in the tutorial as much possible.
Follow step by step once again from the beginning.
Make sure completing the steps, don't skip anything.
If you are having trouble to understand or edit anywhere - let us know.
No I did it like yours take a look at my codes
[Image: jYCi5BT.png]

the second image
[Image: tLDvcoH.png]
I can't see any image in anyone's signature in your linked board.

On a mandatory note: I can't see any "MyBB" linkback as well; which is mandatory for asking support here. So, I guess you are losing eligibility having support.
قه‌حپه‌ باب بتگرم ده‌تده‌مه‌ به‌ر چه‌قوان ئه‌وه‌ چییه‌ ئه‌و فشه‌ فشه‌

English :

thank you for its not working Smile
Its applied to my site for more than 6 months.
Sad its not working for you you couldn't make it work.

Its natural as I can't see any image in anyone's sig in your site and this affects in images only.
Are you sure you have got what this tutorial is meant to do?
Hey Dude if i dont know whats the point of the tut then why i came here ?
i tested it before its not working ! if your not believing me you can go and create an account then test it and see !
Pages: 1 2