Click anywhere to close this dialog

Farewell

Great is the art of beginning, but greater is the art of ending
Henry Wadsworth Longfellow

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

Default avatar with Hovercards

6 Aug 2019
#1
This issue is marked as solved

You are viewing page #2

Show original post

Best answer

Shade 6 Aug 2019 Edited
inc/plugins/hovercards.php, line 388:

$users[] = $user
Add before:

if (!$user['avatar']) {
    
$user['avatar'] = 'what you want';

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.

All replies

ProX 6 Aug 2019
#11
This one doesn't seem to be working in my case.

Tried with ! and empty();
Shade 6 Aug 2019
#12
Do you have a board URL so I can look into it directly?
ProX 6 Aug 2019 Edited
#13
Do you have a board URL so I can look into it directly?
Shade (6 Aug 2019)
Solved. Seems like php was misbehaving and after reloading xampp on localhost it worked.
Shade 6 Aug 2019
#14
Look up for the AJAX request in the Network tab when you hover a username. Does the response include the avatar?
ProX 6 Aug 2019
#15
Look up for the AJAX request in the Network tab when you hover a username. Does the response include the avatar?
Shade (6 Aug 2019)
Yes and it includes repeated 52 calls for every user without avatar via xhr.
Shade 6 Aug 2019
#16
The call is unique and gathers all the users currently in the page you’re watching so it doesn’t have to query every time. Is the URL relative or absolute? I believe if it’s relative it won’t display.
ProX 6 Aug 2019
#17
The call is unique and gathers all the users currently in the page you’re watching so it doesn’t have to query every time. Is the URL relative or absolute? I believe if it’s relative it won’t display.
Shade (6 Aug 2019)
But it gets requeried on page refresh unfortunately. It's absolute path.
Shade 6 Aug 2019
#18
Yes, a browser caching was planned long ago, but never managed to add it. I will test the above code later.
Shade 6 Aug 2019 Edited
#19
Ah, you’re on localhost. This might explain why. Absolute urls are treated like remote avatars, and Google cannot load localhost urls of course. Try relative without the initial trailing slash and dot.
ProX likes this post
ProX 6 Aug 2019
#20
Ah, you’re on localhost. This might explain why. Absolute urls are treated like remote avatars, and Google cannot load localhost urls of course. Try relative without the initial trailing slash and dot.
Shade (6 Aug 2019)
Yeah localhost could be the thing. I guess you don't have to focus anymore on this as we achieved the main goal, hence its solved from my side.