• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Avatars - Big & Tall

Enables large-sized avatars in posts with tall aspect ratio, good for portraits.

Jake Bunce

XenForo moderator
Staff member
#1
Jake Bunce submitted a new resource:

Avatars - Big & Tall - Enables large-sized avatars in posts with tall aspect ratio, good for portraits.

Admin CP -> Appearance -> Templates -> EXTRA.css

Add this:

Code:
.thread_view .messageList a.avatar img,
.thread_view .quickReply a.avatar img,
.conversation_view .messageList a.avatar img,
.conversation_view .quickReply a.avatar img
{
	width: 142px;
	height: auto;
}
Admin CP -> Appearance -> Templates -> message_user_info

Replace the avatar code:

Code:
			<xen:avatar user="$user" size="m" />
With this:

Code:
			<xen:avatar user="$user" size="l"...
Read more about this resource...
 

Luxus

Well-known member
#6
Great now I can revert changes since I had edited the core files for mine.
You only have to edit core files if you want to change the original sizes of m, l and s avatars, created with GD library or ImageMagick. Or use an add-on.
 

JABRONI

Well-known member
#9
I can't get this to work for some reason. I put the code in the Extra.css & changed the Message User Info code bit.

I am using m instead of l for my avatars. I changed my m to 150px. I don't know if that is the problem or not, but it could be. Do I have to use l?

Edit: Apparently, I do need to use l.
 

Jake Bunce

XenForo moderator
Staff member
#10
I can't get this to work for some reason. I put the code in the Extra.css & changed the Message User Info code bit.

I am using m instead of l for my avatars. I changed my m to 150px. I don't know if that is the problem or not, but it could be. Do I have to use l?

Edit: Apparently, I do need to use l.
Yeah, use the large version of the image. Medium avatars are only 96x96 and up-scaling kind of sucks. Rather than up-scaling the medium avatar these instructions use the large avatar and then downsize it.
 

Jake Bunce

XenForo moderator
Staff member
#12
This is looking odd in the mod XenKing Directory. I am trying to figure out what to look for so it uses the same rules. Any ideas?

Example: http://forum.spiritcompany.com/reviews/trading-a-ton-of-big-name-gyms-selling-some.31418/
In EXTRA.css, add the additional code in red:

Code:
.thread_view .messageList a.avatar img,
.thread_view .quickReply a.avatar img,
.conversation_view .messageList a.avatar img,
.conversation_view .quickReply a.avatar img,
.sfreview_view .messageList a.avatar img
{
	width: 142px;
	height: auto;
}

.messageUserInfo
{
	width: 170px !important;
}

.message .messageInfo,
#QuickReply
{
	margin-left: 186px !important;
}
 

kingston

Well-known member
#13
In EXTRA.css, add the additional code in red:

Code:
.thread_view .messageList a.avatar img,
.thread_view .quickReply a.avatar img,
.conversation_view .messageList a.avatar img,
.conversation_view .quickReply a.avatar img,
.sfreview_view .messageList a.avatar img
{
width: 142px;
height: auto;
}
 
.messageUserInfo
{
width: 170px !important;
}
 
.message .messageInfo,
#QuickReply
{
margin-left: 186px !important;
}

Thank you!
 
#14
Is there a reason that i always get a server not responding on time error ? this happens while changing the message_user_info template
 

Jake Bunce

XenForo moderator
Staff member
#15
Is there a reason that i always get a server not responding on time error ? this happens while changing the message_user_info template
Possibly too many styles installed. Delete any excess styles.

And check the log for a detailed error message:

Admin CP -> Tools -> Server Error Log
 
#17
Mysqli statement execute error : Duplicate entry 'message_user_info-7' for key 'title_style_id'
  1. Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
  2. Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
  3. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 574
  4. Zend_Db_Adapter_Abstract->insert() in XenForo/DataWriter.php at line 1591
  5. XenForo_DataWriter->_insert() in XenForo/DataWriter.php at line 1580
  6. XenForo_DataWriter->_save() in XenForo/DataWriter.php at line 1381
  7. XenForo_DataWriter->save() in XenForo/ControllerAdmin/Template.php at line 358
  8. XenForo_ControllerAdmin_Template->actionSaveMultiple() in XenForo/FrontController.php at line 310
  9. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  10. XenForo_FrontController->run() in /home2/skullgar/public_html/foro/admin.php at line 13
 

Jake Bunce

XenForo moderator
Staff member
#18
Mysqli statement execute error : Duplicate entry 'message_user_info-7' for key 'title_style_id'
Hmm. That may be a problem with your template data. Try running this query to remove the record:

Code:
DELETE
FROM xf_template
WHERE title = 'message_user_info'
AND style_id = 7;
And you should probably run /install after this to rebuild the master data.
 

kingston

Well-known member
#20
In EXTRA.css, add the additional code in red:

Code:
.thread_view .messageList a.avatar img,
.thread_view .quickReply a.avatar img,
.conversation_view .messageList a.avatar img,
.conversation_view .quickReply a.avatar img,
.sfreview_view .messageList a.avatar img
{
width: 142px;
height: auto;
}
 
.messageUserInfo
{
width: 170px !important;
}
 
.message .messageInfo,
#QuickReply
{
margin-left: 186px !important;
}
I just noticed that the user avatar in the message to post is still oversized. Any idea what that would be? Screen Shot 2013-04-25 at 11.33.55 AM.png