Notifications
Clear all

wpForo 1.x.x [Closed] Social media sharing buttons - no tooltips

4 Posts
2 Users
0 Likes
617 Views
Posts: 17
Topic starter
(@paulrainbow)
Eminent Member
Joined: 4 years ago

The general share buttons, whether set to icons or buttons, don't have any tooltips, although it probably doesn't matter so much with the buttons. The post sharing icons do have tooltips.

I have edited the class-api.php file and copied the tooltip code from the post sharing icons to the general icons, for Facebook, Twitter, WhatsApp and LinkedIn, i don't use the other two. If anyone else is interested, the changed lines of code are below, perhaps tooltips could be added to the next update ?

Facebook - Line 356 Β 

<span class="wpf-sb-button wpf-sb-icon wpf-fb" data-wpfurl="<?php echo esc_url($url) ?>" title="<?php wpforo_phrase('Share to Facebook'); ?>">

Twitter – Line 388

<a class="wpf-sb-button wpf-sb-icon wpf-tw" href="https://twitter.com/intent/tweet?text=<?php echo $text ?>&url=<?php echo urlencode($url) ?>" title="<?php wpforo_phrase('Tweet this post'); ?>">

WhatsApp – Line 428

<a class="wpf-sb-button wpf-sb-icon wpf-wapp" href="<?php echo $domain ?>/send?text=<?php echo $text ?>" target="_blank" data-action="share/whatsapp/share" title="<?php wpforo_phrase('Share to WhatsApp'); ?>">

LinkedIn – 458

<a class="wpf-sb-button wpf-sb-icon wpf-lin" href="https://www.linkedin.com/shareArticle?mini=true&url=<?php echo urlencode($url) ?>&title=<?php echo urlencode($title) ?>&summary=<?php echo $text ?>" target="_blank" title="<?php wpforo_phrase('Share to LinkedIn'); ?>">

3 Replies
Robert
Posts: 10503
Admin
(@robert)
Support Team
Joined: 8 years ago

Hi @paulrainbow,

Please never edit core files. Just revert all that you have done. Then explain the issue with some screenshots again. Don't forget to disable all caches when you made any changes.

Posts: 17
Topic starter
(@paulrainbow)
Eminent Member
Joined: 4 years ago

Thanks for the reply Robert, the first paragraph of my post explains the issue. Would be difficult to take a screenshot of a missing tooltip πŸ™‚

It's easy to see, if you look at class-api.php, line 356 is the part of the function that adds the facebook button, in the original file, there is no "title" specified, so no tooltip.

Tooltips are there for the post sharing buttons, but not the general sharing buttons.

Posts: 17
Topic starter
(@paulrainbow)
Eminent Member
Joined: 4 years ago

To add, this page has social media buttons, set as coloured icons, same as my forum. Hover over them and you will see no tooltip text. Pretty much everything in the sidebar has tooltip text, such as all of the icons beneath my name.

My forum is here ; https://eastcoastcruising.uk/community

Hover over the social media button and you can see that they now have tooltip text.