Latest topics
» FM Themes
by SLGray Today at 16:48

» User - Made Creations
by SLGray Today at 16:48

» The Football Forums
by Mati Today at 15:22

» [BUG] Avatar doesn't resize when reading the profile
by Samantha NL Today at 12:33

» Search Bar Options
by Samantha NL Today at 11:38

» Chit Chat Thread
by Jazeon Today at 05:42

» Christmas logo
by Teo! Today at 03:56

» SyncEditor
by keko_ferkeko Today at 00:31

» Private message bg color
by Mr.Alam Yesterday at 22:54

» Multi-step Login Form
by Samantha NL Yesterday at 12:54

» Member of the Month
by Samantha NL Yesterday at 12:38

» Forumactif Edge - Dutch Translation
by Samantha NL Yesterday at 10:49

» Widget : Staff Online
by Samantha NL Yesterday at 10:39

» Questions about styling the Main Search Box
by Samantha NL Yesterday at 10:24

» Found a typo in your default Edge CSS
by Samantha NL Yesterday at 03:07

Recent Tutorials
Who is online?
In total there are 8 users online :: 0 Registered, 0 Hidden and 8 Guests :: 1 Bot

None

[ View the whole list ]


Most users ever online was 172 on Fri 19 Feb 2016, 05:17

Change the style of tooltips with tooltipster !

View previous topic View next topic Go down

Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4091
Points : 8395
Reputation : 2010
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Google Chrome Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Tue 15 Mar 2016, 07:05

With tooltipster you can enhance the style of the tooltips on your forum, allowing you to make them fit with your theme or personal tastes. Smile


Click to view demo

This plugin is already pre-installed on all forumotion forums thanks to a recent update. All we need to do is execute a script on all elements with a title attribute. Wink


Installation


For this to work you first need to enable the following option. Go to Admin Panel > General > Messages > Configuration and enable the option entitled "Activate the preview of profiles on the tag usernames." Click save and then go to Modules > JavaScript codes management and create a new script with the following settings.

Title : Tooltipster Tooltips
Placement : In all the pages
Code:
$(function(){
  // general options for editing the tooltip
  // see more : http://iamceege.github.io/tooltipster/#options
  var options = {
    animation : 'fade',
    arrow : true,
    speed : 300,
    delay : 300,
    onlyOne : true,
    theme : 'tooltipster-default'
  },
 
  // delay execution by placing the function into another queue
  // helps with applying to other JS created elements such as the editor
  queue = true,
  titles,
 
  parse = function() {
    titles = $('[title]');
    titles.tooltipster && titles.not('[title=""], .mentiontag, .tooltipstered').tooltipster(options);
  };
 
  queue ? $(parse) : parse();
});

When you're finished click save and your tooltips should now display differently ! Yes To find out how to change the options and more please see the next section.


Modifications


At the top of the script you should see an options object. This object contains the general settings for the tooltip, such as the display animation, delay, and theme. To find a full explanation on the options please see this page. Options that aren't included can be added in by creating a new property and value in the object. Wink


theme : As the main options are already covered I'll go over how to install and change the theme. The tooltip themes are installed via a CSS classname --
Code:
.tooltipster-default
for example. To change the theme all you need to do is change the classname, which can be found in the options object under the "theme" property. These are the currently existing themes for tooltipster :
https://github.com/iamceege/tooltipster/tree/master/css/themes

You can preview them here : ( FYI Forumotion uses "shadow" as the .tooltipster-default theme. )
http://iamceege.github.io/tooltipster/#themes

Click on one of the files and then copy and paste the code to Display > Colors > CSS stylesheet. For example, if I chose the "tooltipster-punk" theme, I'd change this part of the script :
Code:
    theme : 'tooltipster-default'

into this :
Code:
    theme : 'tooltipster-punk'

Thus making my tooltips more punkish. Rock


If you have any questions or comments feel free to leave them below. Be creative and make your tooltips awesome ! Banana

Notice
Tutorial written by Ange Tuteur.
Tooltipster jQuery plugin by Caleb Jacob.
Reproduction not permitted without consent from the author.


Last edited by Ange Tuteur on Tue 19 Apr 2016, 18:05; edited 3 times in total
SLGray
Valued Member
Title :
Owner of 2 Forums
Gender : Male
Age : 43
Posts : 2174
Points : 4072
Reputation : 246
Location : United States
Language : English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile http://www.fmthemes.forumotion.com https://www.facebook.com/FM-Themes-655055824604957 https://twitter.com/FMThemes https://pinterest.com/FMThemes

PostSLGray on Tue 15 Mar 2016, 17:03

Is there a place where we can see the different themes in action?

Thanks for sharing this amazing tutorial.

Edit: I have noticed one issue. The tooltips appears to cover the thing I have the cursor on. It does not appear above it.
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4091
Points : 8395
Reputation : 2010
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Google Chrome Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Tue 15 Mar 2016, 17:37

Oh right, you can see the themes here. I'll add that in, thanks. Smile

I think it might be related to the theme, try adding the CSS code below :
Code:
#wrap {
  margin-top:30px;
}

If that doesn't work try changing the 30px to -30px.
SLGray
Valued Member
Title :
Owner of 2 Forums
Gender : Male
Age : 43
Posts : 2174
Points : 4072
Reputation : 246
Location : United States
Language : English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile http://www.fmthemes.forumotion.com https://www.facebook.com/FM-Themes-655055824604957 https://twitter.com/FMThemes https://pinterest.com/FMThemes

PostSLGray on Tue 15 Mar 2016, 18:41

-30 worked. Thanks.
Van-Helsing

Title :
Coding Expert.
I.T Manager.
Web Developer.
Gender : Male
Age : 42
Posts : 765
Points : 2028
Reputation : 69
Location : Somewhere out there!
Language : English, Greek
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : punBB
Awards :
View all awards
View user profile

PostVan-Helsing on Wed 16 Mar 2016, 10:36

Very nice tutorial Thumb left Thank you very much @Ange Tuteur.

--------

Wilson

Title : Did I mentioned I like banana? Gender : Unspecified
Age : 30
Posts : 863
Points : 1900
Reputation : 123
Language : Filipino and Engrish
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
Awards :
View all awards
View user profile http://generalaxis.forums.com.bz/

PostWilson on Thu 31 Mar 2016, 11:22

I've been looking for this kind of tutorial, google doesn't always helps. Thanks for the tutorial!

--------

A banana a banana does not banana doctor banana. -Poetic

View previous topic View next topic Back to top

Create an account or log in to leave a reply

You need to be a member in order to leave a reply.

Create an account

Join our community by creating a new account. It's easy!


Create a new account

Log in

Already have an account? No problem, log in here.


Log in

 
Permissions in this forum:
You cannot reply to topics in this forum