MyBB Community Forums

Full Version: Letter Avatars 1.0.2
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
(2020-09-17, 01:36 PM)Shade Wrote: [ -> ]TopStats applies an unnecessary htmlspecialchars_uni() to all avatar urls before they are formatted by format_avatar(). Long story short, & becomes & and this breaks ui-avatars.com image processing.

To solve, open inc/plugins/topStats.php and get rid of all htmlspecialchars_uni() applied to avatar urls. You can easily spot them by looking for the string "format_avatar(htmlspecialchars_uni(". Eg.:

$useravatar = format_avatar(htmlspecialchars_uni($row['avatar']), $row['avatardimensions'], my_strtolower($this->getConfig('AvatarWidth')));

Becomes

$useravatar = format_avatar($row['avatar'], $row['avatardimensions'], my_strtolower($this->getConfig('AvatarWidth')));

Shade! Thank you. I'm about to go purchase your plugins.
Hey Shade,

Same thing is happening with "Last Poster Avatar" plugin when showing the Letter avatar, it shows the avatar as double letter, rather than single letters. Can you please help with this as well?
Fatal error: Uncaught Error: Non-static method LetterAvatars::addAvatarToUser() cannot be called statically in /var/www/.../data/www/.../inc/plugins/letteravatars.php:107 Stack trace: #0 /var/www/.../data/www/.../admin/modules/config/plugins.php(428): letteravatars_install() #1 /var/www/.../data/www/.../admin/index.php(825): require('/var/www/promo/...') #2 {main} thrown in /var/www/.../data/www/.../inc/plugins/letteravatars.php on line 107.

I use php 8.1.3.

Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, non-static method LetterAvatars::admin() cannot be called statically in /var/www/.../data/www/..../inc/class_plugins.php:136 Stack trace: #0 /var/www/.../data/www/.../admin/modules/config/plugins.php(19): pluginSystem->run_hooks(Array) #1 /var/www/.../data/www/.../admin/index.php(825): require('/var/www/promo/...') #2 {main} thrown in /var/www/.../data/www/.../inc/class_plugins.php on line 136
Letter Avatars has not been updated for PHP 8.
Has anyone found a way to update this plugin for PHP 8.1? I am getting the same errors!
Pages: 1 2 3 4 5