vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Resizing avatars in postbit? (https://vborg.vbsupport.ru/showthread.php?t=326271)

shibby2 04-04-2018 11:55 PM

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']">
                               
                                        &nbsp;<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?

shibby2 04-06-2018 11:12 PM

Anyone? It seems with the code above, the height changes to 40px, but the width can vary.

Any way around this?

Thanks!

MarkFL 04-06-2018 11:23 PM

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" />

shibby2 04-08-2018 08:30 PM

Hmm, for some reason that made the avatars bigger, and some of them are still rectangles rather than squares.

MarkFL 04-08-2018 09:35 PM

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" />

shibby2 04-08-2018 10:20 PM

That did the same. :(


All times are GMT. The time now is 10:23 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01554 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete