I announce that I cease all development and activity in the programming universe indefinitely. My career has reached the turning point I was not expecting for at least another year, leaving me highly off guard and without laid-out plans for this hobby's continuity. I have begun a 5-year residency program in Neurosurgery which is clearly not compatible, time-wise, with programming.
I gave in all my passion for developing, and you gave me back your loyalty and trust, even when I did not deserve that much. Now it is the time for payback. I release all my present and past work as Open Source software, in the hope some talented developer will continue maintaining and expanding my vision of a modern, sleek forum software. The intrinsic flexibility of MyBB is the true hidden gem of an otherwise outdated codebase; I do hope the project can continue and be updated complying to the latest coding standards.
I hereby thank Euan, kawaii, andrewjs18, Ben, Matt, Omar G., effone, Eric J., Devilshakerz, Wildcard, JordanMussi and all the other team members I have had the opportunity to work with when I was a MyBB team member. I thank Tomm M, my mentor, who inspired me to pick up coding with his piece-of-art plugins. And finally, I thank all of you MyBBoost subscribers who have helped me getting through my toughest university years economically.
Yours sincerely, Filippo
Add before:$users[] = $user;
Btw, it's not overkill even for hundreds thousands of users. You could run a single query to set a default avatar, and install a plugin that takes care of new users when they register. Just my two cents.if (!$user['avatar']) {
$user['avatar'] = 'what you want';
}
Hovercards does not come with this ability. There are plenty of plugins that handle it though. I suggest you to use Letter Avatars 1.0.2 which adds some style to default avatars.Should this already fix it?
function defaultavatarfix()
{
global $mybb;
if(!$mybb->user['avatar'] && !empty($mybb->settings['useravatar']))
{
$mybb->user['avatar'] = $mybb->settings['useravatar'];
}
}
$plugins->add_hook("global_intermediate", "defaultavatarfix");
This does not work with Hovercards as it's just a local fix. Letter Avatars 1.0.2 and all related plugins store the default avatar in the database which is the source from which Hovercards pulls data from.Just checked the code, seems like avatars are handled by javascript.
if (user.avatar.indexOf('http') > -1) {
image.src = 'https://images1-focus-opensocial.googleusercontent.com/gadgets/proxy?container=focus&refresh=300&url=' + encodeURIComponent(user.avatar);
} else {
image.src = user.avatar;
}
Nope, it just checks if it’s an uploaded avatar or a remote one. Remotes have to pass through Google to get adaptive colors due to CORS restrictions. Either way modifying Hovercards is a hassle, much simpler to use plugins for such things.The letter avatar adds remote api which I really don't like. So will have to edit it manually. Can you just tell me which function checks if avatar exists? I've tried with negative Hovercards.exists(user.avatar), but doesn't seem to be working.
It's not in the JS, but in the database, so you'll have to hack inc/plugins/hovercards.php. If you don't like external APIs, you can look for default avatar plugins on the community forums, there are plenty.Something like this?
if (empty($args[9])) // position of avatar column in db
return '/images/default_avatar.png';
Setting default avatar for hundreds of thousand members will do overkill. Even if limited it would take lots of time.
Add before:$users[] = $user;
Btw, it's not overkill even for hundreds thousands of users. You could run a single query to set a default avatar, and install a plugin that takes care of new users when they register. Just my two cents.if (!$user['avatar']) {
$user['avatar'] = 'what you want';
}