MyBB Community Forums

Full Version: Avatar Precision Control Plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
An Avatar Precision Control Plugin is needed to Administrate several locations on the board with different sizes of the same Avatar file for each of these areas.

I need the ability to control different sizes of the individual Avatars visible within the Admin CP / User viewer (200px), User CP (300px), the Member List (200px), and of course within Posts (120px).

The problem with the Default settings for the Avatar controlled from within the Admin CP is that it changes everywhere to the one size except for the Admin CP / User viewer which stays at thumbnail size no matter what.

As I first described the situation, we need discrete control of default sizes for each area of the board. Not a one size fits all approach that is the current standard of MyBB.

I'm willing to compensate (as in pay money for) anyone willing to take this project on as long as you understand I don't have a ton of cash to throw at this.

Thank you for reading and I hope you will take this seriously and contact me soon.

Auriel
Unless I'm missing something there are several options for this within the core. One avatar size for posts, one for the member list, etc.
(2014-05-12, 03:00 AM)Omar G. Wrote: [ -> ]Unless I'm missing something there are several options for this within the core. One avatar size for posts, one for the member list, etc.

Omar,

I wish it was that simple but as MyBB is written right now, all of the places where the Avatar is displayed, pull from the one User file. It would be better to leave it that way and just have a plugin that gives us discrete, individual, separate control of the size for each location. If we do it the way you are suggesting we would need four files for each member of the board. I just think it would be simpler to resize the one file for all locations.

I should also mention that Leefish says the Avatar display in the Admin CP doesn't used the same css as the rest of the site but uses Javascript although a few minutes ago I uses some CSS from Leefish to override the Javascript statement and increase the Admin CP / User view to the 200px that my clients wanted.
  • Admin CP / User viewer (200px)
  • Member List (200px)
  • User CP (300px)
  • Posts (120px)

Thank you for trying to be helpful and look forward to any other suggestions you may have.

Auriel
Couldn't you just use CSS classes? I'm not sure I am interpreting this correctly.
Perhaps it would help if we explained a bit how avatars work.

Uploader uploads an image: it will be shown on every page where the avatars are coded. In at least two areas the image size is set via the site settings. The image you see there is scaled. The real image might be 400 by 400 pixels, but the site shows the scaled version.

You can overwrite this scaling by using css. So in the code I gave you on some other thread it was something like

div.user_image img

The important part there is the img. That tells the css that that you want to change something about the image inside the div called user_image, not every image. This means sometimes you have to change the HTML. You can put a CLASS on the img tag, or you can make sure the avatar is inside a div you know the name of.


example
<img src="./uploads/avatars/avatar_23276.jpg?dateline=1359080725" alt="" width="70" height="70">

can become
<img class="myhugeavatar"src="./uploads/avatars/avatar_23276.jpg?dateline=1359080725" alt="" width="70" height="70">

css:

img.myhugeavatar {
width:200px!important;
height:200px!important;
}


You can apply this principle using your browser to inspect and find the name of the div and then target the image inside it. If it doesn't work apply IMPORTANT to the width and height (like in the code I gave you). In some areas of MyBB the avatar is hard-coded in the php. This is when you use a div wrapped around the image.
(2014-05-12, 11:24 AM)Leefish Wrote: [ -> ]Perhaps it would help if we explained a bit how avatars work.

Uploader uploads an image: it will be shown on every page where the avatars are coded. In at least two areas the image size is set via the site settings. The image you see there is scaled. The real image might be 400 by 400 pixels, but the site shows the scaled version.

You can overwrite this scaling by using css. So in the code I gave you on some other thread it was something like

div.user_image img

The important part there is the img. That tells the css that that you want to change something about the image inside the div called user_image, not every image. This means sometimes you have to change the HTML. You can put a CLASS on the img tag, or you can make sure the avatar is inside a div you know the name of.


example
<img src="./uploads/avatars/avatar_23276.jpg?dateline=1359080725" alt="" width="70" height="70">

can become
<img class="myhugeavatar"src="./uploads/avatars/avatar_23276.jpg?dateline=1359080725" alt="" width="70" height="70">

css:

img.myhugeavatar {
width:200px!important;
height:200px!important;
}


You can apply this principle using your browser to inspect and find the name of the div and then target the image inside it. If it doesn't work apply IMPORTANT to the width and height (like in the code I gave you). In some areas of MyBB the avatar is hard-coded in the php. This is when you use a div wrapped around the image.

Thanks for taking the time to explain.

I think I understand the principle involved. It's just going to take time, study and experimentation to figure out the right div for each location or I guess in this case I would have to create a div for each location.

I hope I just made sense. Been up all night. Need sleep then I spend some time studying MyBB with the browser to see if I can figure out the different css for each location.

Oh and hi shade. Good to see you. Been awhile. Thanks for stopping by and giving me some feedback on this issue.

Thanks again Leefish. Talk to you guys later.

(-_-) Zzzz . . .