SMF Tricks

SMF General => Tips and Tutorials => Topic started by: AsusRev on December 12, 2013, 03:47:31 AM

Title: Facebook Style Tooltips
Post by: AsusRev on December 12, 2013, 03:47:31 AM
Search index.template.php:

// RTL languages require an additional stylesheet.
if ($context['right_to_left'])
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/rtl.css" />';


add after:

    // Tipsy jQuery Plugin style
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/tipsy.css" />';


search:

// Here comes the JavaScript bits!
echo '


add after:

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript" src="', $settings['theme_url'], '/scripts/jquery.tipsy.js"></script>
<script type="text/javascript">
  $(function() {
    $("[title]").tipsy({fade: true, gravity: $.fn.tipsy.autoNS});
  });
</script>


Update 2 file:

Theme/default/scriptsjquery.tipsy.js
Theme/default/css/tipsy.css




One thing is unfortunately not good in this code: MinDI theme does not work. Someone will help you with this?

(https://smftricks.com/proxy.php?request=http%3A%2F%2Fs9.postimage.org%2F8pgypcfr3%2Ffb_stilusu_buborek.png&hash=9c1cd8b612b9e69ca0e507bf68036d63e1884f0d)
Title: Re:Facebook Style Tooltips
Post by: EduardO on December 12, 2013, 02:43:10 PM
Gracias por compartir el tiootips. Lo testeare en mi foro y te comento como  me fue.


PD: No funciona! >.<