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:

Code: [Select]
// 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:

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

search:

Code: [Select]
// Here comes the JavaScript bits!
echo '

add after:

Code: [Select]
<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=b4c476dd402dc5cce1011816ad770e19)
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! >.<