The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Resizing avatars in postbit?
Hey guys, I'm making a mobile skin and would like to display the poster's avatar next to their name in postbit_legacy. I added the bit of code to do this, but since it's a mobile skin, the avatars are way too big.
How would I go about to make them smaller, just for that skin? Don't know exactly what size I would want just yet, guess it will take some testing, but they have to definitely be smaller. Any help would be awesome, thanks! --------------- Added [DATE]1522894992[/DATE] at [TIME]1522894992[/TIME] --------------- I actually figured it out.. somewhat. This is my code: Code:
<if condition="$show['avatar']"> <br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl] width="40px" height="40px" <phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a> </if> Only thing is, some of the avatars come out as rectangles (tall and thin). Is there a way to make them perfectly square instead of rectangle? |
#2
|
|||
|
|||
Anyone? It seems with the code above, the height changes to 40px, but the width can vary.
Any way around this? Thanks! |
#3
|
||||
|
||||
Try using the "style" attribute instead to introduce inline CSS...like:
HTML Code:
<img src="$post[avatarurl] style="height: 40px; width: 40px;" <phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" />
|
#4
|
|||
|
|||
Hmm, for some reason that made the avatars bigger, and some of them are still rectangles rather than squares.
|
#5
|
||||
|
||||
You must have CSS elsewhere taking precedence. Try:
HTML Code:
<img src="$post[avatarurl] style="height: 40px !important; width: 40px; !important" <phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" />
|
#6
|
|||
|
|||
That did the same.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|