News:

Join the Facebook Fan Page.

Main Menu

Avatar Resize

Started by Ilkharnos, August 14, 2017, 02:57:55 AM

Previous topic - Next topic

Ilkharnos

Hello,

I would like to have a mod (or a method) to resize all the avatars used by forum users to 120x120 automatically. So, if a forum user's avatar height is 100 px, I want SMF to resize this avatar automatically so that its height will be 120 px. It is not a problem if this avatar looks terrible after the resize. But it is a problem for me if its height is different from 120 px. Is there any way to do this? I searched for a mod but I couldn't find it.

Thank you very much.

Kindred

I don't think so...  smf will size DOWN oversized avatars, but will not force an avatar to size up

You can, of course, manually set this in your themes' CSS to force the avatar image size.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

Why is it important to have them this size, exactly?

Steve

DO NOT pm me for support!

Ilkharnos

Quote from: Arantor on August 14, 2017, 10:32:44 AM
Why is it important to have them this size, exactly?

I use simple portal as a front page. There is a portal block which shows an avatar, and this block's height is affected by the user avatar's height. My portal blocks are aligned with each other assuming that the user's avatar is 120 px height. If the avatar has a different height, the block alignment is no more. It is not a big deal, but it disturbs me as a designer. I encourage users to use 120x120 avatars, but they don't know the reason and generally ignore this rule.

Quote from: Steve on August 14, 2017, 10:45:36 AM
Don't know if this will do exactly what you want: https://custom.simplemachines.org/mods/index.php?mod=3948

I will check this out and inform you about the results.

Thank you very much.

Ilkharnos

This mod caused another problem for me.

I installed the mod manually (and successfully), created 100x100 and 150x150 avatars for testing, uploaded these avatars via ftp and called these avatars in my profile settings. However, the last step (calling avatars from SMF and pressing the edit button) crashed after a great deal of loading. This is the case even if I disable the mod (or delete its php files). Now, I cannot call any avatar from URL to SMF no matter if I use or don't use the mod. If I call an avatar's URL, the process waits and crashes when I press the edit button.

I'm not really sure if this mod was the reason, but I am sure that there wasn't such a problem in my forum. What could be the reason?

Thanks in advance.

Ilkharnos

#6
Now I see that I also can't edit other profile fields as long as such a problem exists. I have to completely uninstall this mod, but I don't know how. I believe the mod changed some settings and they don't go away even if I delete the mod's php files.

Ilkharnos

I have just found out that, If I type an avatar URL starting with http://, I can submit the changes I made in a profile without any problem but the browser starts to give "Not Secure" warning in all of the pages which includes (or related to) this avatar.

If I type the avatar URL with https:// prefix and try to submit it, it fails 90% of the time (I even got a database error once when I try to edit a specific profile). The successful 10% comes after a very long loading session. I don't know if this is related to the Fix Avatar Size mod (I don't use it at the moment, but I am unsure about if I could uninstall it properly or not).

So, I will be grateful if someone can adress the problem. Thank you very much.

Gwenwyfar

Quote from: Ilkharnos on August 16, 2017, 03:13:27 AM
Quote from: Arantor on August 14, 2017, 10:32:44 AM
Why is it important to have them this size, exactly?

I use simple portal as a front page. There is a portal block which shows an avatar, and this block's height is affected by the user avatar's height. My portal blocks are aligned with each other assuming that the user's avatar is 120 px height. If the avatar has a different height, the block alignment is no more. It is not a big deal, but it disturbs me as a designer. I encourage users to use 120x120 avatars, but they don't know the reason and generally ignore this rule.

Why not just scale it to always be 120px on your portal block, then? A line of css would suffice for that. Or an alternative way would be to just always leave 120px space there for the avatar, even if it doesn't use all of it, and center it (which may look better than upscaling)

If you really do want everyone's avatar to be 120x120 no matter where, set that limit on smf and then do the same: Scale the rest up with css. No need to overcomplicate it.
"It is impossible to communicate with one that does not wish to communicate"

Ilkharnos

Thank you for your advices.

I set the avatar settings in SMF.

In the CSS side, it might not be very clear (or easy) for me. There are also different entries in the same block (like a welcome message, unread posts, etc.), not just an avatar. When I look at the CSS file, I don't see any avatar-specific setting. What I see is general styles which governs all of the entries in that block. Unfortunately I don't know how to set the avatar apart and type an avatar-specific style (like avatar height or width).

Gwenwyfar

Quote from: Ilkharnos on August 16, 2017, 10:37:35 AM
Thank you for your advices.

I set the avatar settings in SMF.

In the CSS side, it might not be very clear (or easy) for me. There are also different entries in the same block (like a welcome message, unread posts, etc.), not just an avatar. When I look at the CSS file, I don't see any avatar-specific setting. What I see is general styles which governs all of the entries in that block. Unfortunately I don't know how to set the avatar apart and type an avatar-specific style (like avatar height or width).
That will depend on the theme/portal you're using. Try using your browser's inspector to find out what selector you can use to match the desired avatar(s).
"It is impossible to communicate with one that does not wish to communicate"

Kindred

and do note.... you do NOT uninstall a mod by "deleting php files"
that will cause many more errors than the mod itself -- you uninstall a mod by using the uninstall link for that mod in the package manager (the same place where you installed the mod in the first place)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Ilkharnos

If I can see its name in the package manager, I uninstall them from the "Uninstall" link. But what if I don't see its name?

I started to install all mods manually (because my package manager doesn't install anything), and when I install them manually they are generally invisible, like Avatar Size Fix mod.

I tried to figure out how I can uninstall it properly by altering the codes, but it is beyond my ability.

Thank you for all the answers. I will keep these in mind, and try to solve my problem.

Ilkharnos

Quote from: Gwenwyfar on August 16, 2017, 11:30:23 AMThat will depend on the theme/portal you're using. Try using your browser's inspector to find out what selector you can use to match the desired avatar(s).

Thanks a lot! Now I am able to resize the avatar myself using css. I managed to find its selector name and added it to css.

My remaining questions are:

- Submitting my profile changes takes very, very long (like 2-3 mins) when there is a https:// URL in the avatar url field. My submitting efforts generally end up with a "Connection Failure" error. When they do, if I press "back" button in my browser and view the "edit profile" page again, I see that it didn't actually fail. I see the changes I had made with a success message. If I try to press the submit button again in that very moment, it immediatelly gives a success message again. All of these seem strange to me. What could be the reason?

- Can I uninstall a mod if I don't see it in my package manager?

Thanks in advance.

Kindred

If you manually installed a mod, you ar correct, it will not display in the package manager... you would have to manually undo all of the code changes that you did when you manually installed to mod in the first place
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: