2 Jan 2019 #1

Show hovercard with "last poster avatar" plugin

Regular user
First of all a big thank you for this fantastic plugin. I should have it tried earlier!

It works very well on my installation. Just one thing I would like to get done.
I am using the plugin last poster avatar from whiteneo.
It would be great if the card appears when hovering over the plugins avatar.

I am not sure how to achieve this. The variable for the avatar with this plugin is:

The default variable is:

Currently the hovercard only shows with the default variable.
Is there a way to modify hovercard so that it is triggered as well with the other variable?

Thanks for any pointer!
  • 1
  • 2
Shade 6 Jan 2019
Yes, you can't duplicate a plugin, you'll have to edit the original version. I still haven't had a look at the plugin though, sorry.
Shade 24 Jan 2019
Hi, I’ll install the plugin this evening now that I’ve got some free time.
Shade 24 Jan 2019
Here are the culprits:
1) disable "Modal box Popup" settings from Avatarep settings;

2) inc/plugins/avatarep.php, line 726, find:
$user['avatar'] = '<div class="avatarep_fd">' $user['avatar'] . '</div>'
Replace with:
$user['avatar'] = "<a data-uid='{$user['uid']}' href='{$avatar['profilelink']}'>" $user['avatar'] . '</a>'
3) inc/plugins/avatarep.php, lines 704-706, find:
$user['avatar'] = "<a href=\""$avatar['profilelink'] . "\" title=\"".$user['avatarep_title']."\">".$user['avatar']."</a>";

Replace with:

Basically the last step is just a removal of everything after "else".