HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Making CustomToolTip work with OnlineNow

AaronWebsteyAaronWebstey ✭✭✭
edited January 2015 in Feedback

This is hackish and there's probably a better way to do it (it would be nice if the core UserPhoto() function took an option to exclude the title attribute, e.g.), but it works for me.

In plugins/OnlineNow/class.onlinenowmodule.php, replace line 91:

echo UserPhoto($User, array('ImageClass' => 'onimage'));

with this

$UserPhoto = UserPhoto($User, array('ImageClass' => 'onimage'));
$UserPhoto = preg_replace('/(<[^>]+) title=".*?"/i', '$1', $UserPhoto);
echo $UserPhoto;

Comments

  • Should this be posted in the OnlineNow discussion instead/too?

  • edited January 2015

    You should probably use the newest version of online now I fixed a number of things.. version 3.1

    Yes I was also looking for a way to not have the name title show. But by adjusting the css of the tooltip you can make it work .

    If that fix works for you I will test it and add it to online now . The strange thing is that initially when I was working on it in the beginning way back version 1.0 , the name title would not show the tooltip for the name. Which is where the popup idea came to be. It was supposed to just show the name in a popup, then added the time as well.

    This CustomToolTip works almost too well eh ?

  • Ok I tested and updated OnlineNow so it will not show the tooltip title when you hover making it work bad with custom tooltip.

    Thanks for the fix !!

  • edited January 2015

    You would not want to remove it from the core since the avatars show all over the site. It is better to make these kind of changes in the offending plugin.

    Your way is less hackish than what I was think about doing..

  • AaronWebsteyAaronWebstey ✭✭✭
    edited January 2015

    No problem! And yes, CustomToolTip is absolutely brilliant. The tooltips as they were (at least for me) were almost useless. I've styled mine to fit in with my site (and have also fiddled with the style on one of my other favourite plugins :).

  • Yes and the font so small hardly seen , on the mac they are pastel yellow and don't go with the theme.

    I've styled mine to fit in with my site

    That is what people are supposed to do , edit the style as they please. I am glad it worked for you. And thanks for helping make them better :D

Sign In or Register to comment.