Tips: Control your avatar size

17 years 7 months ago #21647 by stevebor1
Tips: Control your avatar size was created by stevebor1
I was thinking at first, why does CB connector link the large CB Image instead of the small one from CB to the forum? I know I could edit CB connector, but controlling the large one is nice depending on the forum layout. With that being said i used CSS to control the forum avatar.

In forum/templates/subSilver/overall_header.tpl

Around Line 143 find:

[code:1].postdetails { font-size : {T_FONTSIZE1}px; color : {T_BODY_TEXT}; }[/code:1]
and add this code after
[code:1].postdetails img {max-width: 125px; width:expression(this.width > 125 ? "125px" : this.width); }[/code:1]

so basical, max-width: 125px controls the width in firefox
the next controls in ie6
image greater than 125 size down to 125. you can replace with whatever you want.

Karma Me Up!
File Attachment:


FITcommunity
Joomla! 1.0.12 - Community Builder 1.0.2 - Joomlaboard 1.1.2
Own Mods Featured Profile Mod
My Real Day Job
File Attachment:

Mobile Wallet and Social Lending, Anywhere!

Please Log in to join the conversation.

17 years 7 months ago #21668 by geeffland
Replied by geeffland on topic Re:Tips: Control your avatar size
Thanks for the tip!!!

Hopefully I can get v2 to resize (shrink only) the larger CB image to the max limits defined in the phpbb admin... Think I know which chunks of code I need to access... just need to implement it...

Greg

CB3PD Developer - CB Connector (formerly phpBB Connector) plugin

Please Log in to join the conversation.

17 years 6 months ago #22554 by bigbluebottle
Replied by bigbluebottle on topic Re:Tips: Control your avatar size
There is a PHPBB MOD over on www.phpbb.com that does it already, you should be able to capitalize on that code. Search for the Fast Resize Remote Avatar Mod.

Please Log in to join the conversation.

17 years 6 months ago #22557 by geeffland
Replied by geeffland on topic Re:Tips: Control your avatar size
Thanks for the info... took a quick peek...

That mod resizes the image on the client side when viewing the page... which is slightly different that what I was planning. I was going to create a resized copy for phpBB to use. I know the author claims it does not slow down phpbb "at all" but I would venture to guess that a large image being fed in and scaled down on the client would take a longer time to show than if the server had already made a smaller image to serve up...

Greg

CB3PD Developer - CB Connector (formerly phpBB Connector) plugin

Please Log in to join the conversation.

Moderators: beatnantgeefflandmartijn189krileon
Time to create page: 0.227 seconds

Facebook Twitter LinkedIn