Making CustomToolTip work with OnlineNow

This discussion is related to the CustomToolTip addon.
AaronWebsteyAaronWebstey Headband AfficionadoCole Harbour, NS ✭✭✭
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;
vrijvlinder

Comments

  • AaronWebsteyAaronWebstey Headband Afficionado Cole Harbour, NS ✭✭✭

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

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    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 ?

    AaronWebstey
  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    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 !!

    AaronWebstey
  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    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 Headband Afficionado Cole Harbour, NS ✭✭✭
    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 :).

    vrijvlinder
  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    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

    AaronWebstey
Sign In or Register to comment.