Warning: The author of this contribution does not provide support for it anymore.

User Blog Mod

Re-size avatar in blog? - User Blog Mod

Re-size avatar in blog?

by Amymations » Wed Jun 08, 2011 8:00 pm

I have a probllem, my forum width is 850px (I need to keep it that way) and maximum avatar size is 15x150px. The problem is that when someone comments on a blog their avatar shows up it's too big and goes over the forum width.

Is there any way we can change it so the avatars are thumbnails or smaller?

here's an example of what I mean.

Capture2.PNG
Forum Information:
PHPBB - 3.0.9
URL - http://www.mouldingminefield.com/forum
Theme - Glacier
Template - Prosilver
Amymations
Registered User
Posts: 80
Joined: Wed Apr 28, 2010 5:28 pm
Location: Cardiff - UK
Name: Amy Baldwin
Contact:

Re: Re-size avatar in blog?

by EXreaction » Wed Jun 08, 2011 9:28 pm

You should probably widen the user info area if you're going to allow avatars that large.
User avatar
EXreaction
Former Team Member
Posts: 5666
Joined: Sun Aug 21, 2005 9:31 pm
Location: Wisconsin, U.S.
Name: Nathan
Contact:

Re: Re-size avatar in blog?

by Amymations » Sun Jun 12, 2011 1:42 pm

EXreaction wrote:You should probably widen the user info area if you're going to allow avatars that large.

How would I do that?

I changed the width of the forum to 1000px but it's too big for my liking plus it isn't enough to widen the blog. Is there any way I can remove avatars from comments? Or have them small? Like in the AJAX chat box MOD
Forum Information:
PHPBB - 3.0.9
URL - http://www.mouldingminefield.com/forum
Theme - Glacier
Template - Prosilver
Amymations
Registered User
Posts: 80
Joined: Wed Apr 28, 2010 5:28 pm
Location: Cardiff - UK
Name: Amy Baldwin
Contact:

Re: Re-size avatar in blog?

by EXreaction » Sun Jun 12, 2011 3:26 pm

Modify the view_blog template
User avatar
EXreaction
Former Team Member
Posts: 5666
Joined: Sun Aug 21, 2005 9:31 pm
Location: Wisconsin, U.S.
Name: Nathan
Contact:

Re: Re-size avatar in blog?

by Steve E. » Thu Mar 13, 2014 8:28 pm

EXreaction wrote:Modify the view_blog template


Even though this is an old post, I'm adding to this thread in case it helps anyone else.

I'm modifying the tone of my initial response to this. (I was annoyed because the vagueness of this response led me on a wild-goose chase that lasted 2 or 3 days; but I recognize that we are dealing with free support, here, and I do feel lucky that this mod even exists.)

I'm having similar issues because I am trying to get this blog, v 1.0.16, to work in Artodia Deluxe, which is responsive.

This is the best I've come up with so far. I have not figured out how to resize the avatar, but I can make it not overhang the margin.

It is possible that the best fix is not found in the user blog files. It can be addressed in the .css stylesheet of whatever style you are using.

There is an class, already included in a style's stylesheet or .css files, called "postprofile", which the blog's view_blog template file refers to. This affects the looks of the area with the avatar, which in your case is on the right. There is also an item called "postbody," which affects the look of the post or the comment itself. The problem arises in some styles because of the addition of the "left_menu" column in the view_body template, which throws off the proportions of .postbody and .postprofile in the stylesheet. (The replyrow in the template also has a width of 97% instead of 100%, which could make the avatar overhang even without the left_menu column.)

In your style's stylesheet.css , you need to mess with the total width of .postbody, plus .postprofile, plus postprofile's right margin. (plus, probably, the width of left_menu.) So, change the individual widths of these items. The "margin" line in .postbody has four values. The second one of these values is the right margin, and should have its % or pixel width changed. Do some trial and error as regards your style. If you change only the right margin, but not the general "widths" of the sections, your .postprofile may act strange and float over or under the .postbody.

BE AWARE, however, that this will also affect the values in the chat forum part of your blog, perhaps adversely. So, if you are a little more sophisticated than I, you might want to figure out how to create new classes in the stylesheet that only affect the blog, rather than trying for a compromise that suits both your chat forum and your blog.
Last edited by Steve E. on Fri Mar 14, 2014 9:32 pm
Steve E.
Registered User
Posts: 17
Joined: Thu Feb 20, 2014 10:19 pm
Contact:

Re: Re-size avatar in blog?

by Steve E. » Fri Mar 14, 2014 6:18 pm

To balance out any complaining tone at the start of my prior post: Please know that, at base, I'm VERY grateful for this User Blog mod, and all the time you've put into developing it over years. It's really, really great.
Last edited by Steve E. on Fri Mar 14, 2014 9:33 pm
Steve E.
Registered User
Posts: 17
Joined: Thu Feb 20, 2014 10:19 pm
Contact:

Re: Re-size avatar in blog?

by Steve E. » Fri Mar 14, 2014 9:26 pm

What I have NOT figured out how to do is resize the avatar in only the user blog mod.

If you simply want to remove the avatar from the comments section, fish around in the view_blog template for {replyrow.AVATAR}. Delete it, including the { } .

Similarly, you can delete the avatar in the left_menu template by finding {avatar} and removing it.


Know that if you deal with modifying the view_blog template: In Dreamweaver CS6, there are tables which show up in the design window if you are not in "live" mode. I was confounded that none of my changes to these tables seemed to affect the online version of the chat forum. I didn't notice that these are only the print view tables.
Steve E.
Registered User
Posts: 17
Joined: Thu Feb 20, 2014 10:19 pm
Contact: