"He who conquers others is strong; he who conquers himself is mighty."
                -- Lau Tzu

Author Topic: Feature request - automatic "info window" for common terms  (Read 11293 times)

Sir James A

  • Weapons & Armor addict
  • Knight of the Order
  • Forum Veteran
  • ****
  • Posts: 6,043
I've seen this in a variety of places, and since we are getting a more diverse member base (SCA, HEMA, etc), I thought it could be a useful addition. It's the little "pop-in" message that shows up when you hover over a word/abbreviation you might not know. Example here:

http://flowplayer.org/tools/demos/tooltip/
(hover over the 4 images on the page)

It could be useful things such as SCA, HEMA, WMA, and also for common "group" terms like Unterhau, Oberhau, Pflug, Vom Tag, that are probably not too prevalent outside of the core WMA community.

I'm not sure how hard it is to add it to the forum, but I can provide a specific forum example, if it would help any.
Knight, Order of the Marshal
Sable, a chevron between three lions statant Argent

Sir William

  • Cogito ergo sum
  • Knight of the Order
  • Forum Veteran
  • ****
  • Posts: 7,154
Re: Feature request - automatic "info window" for common terms
« Reply #1 on: 2011-03-21, 16:07:11 »
That'd be awesome...save me from having to look it up all the time til it sinks in.  lol
The Black Knight, Order of the Marshal
'Per Pale Azure and Sable, a Chevron counterchanged fimbriated argent.' 
“Pride makes a man, it drives him, it is the shield wall around his reputation.  Men die, but reputation does not.â€

Sir Edward

  • Forum Admin
  • Commander of the Order
  • Forum Veteran
  • *****
  • Posts: 9,340
  • Verum et Honorem.
    • ed.toton.org
Re: Feature request - automatic "info window" for common terms
« Reply #2 on: 2011-03-21, 16:08:41 »
Yeah, one of the cool features on myArmoury is that they have a list of words that get auto-highlighted as links to articles. A glossary mod on the forum would be cool. Looking at the SMF mods list, I see a glossary mod for the 2.x series (still in release candidates), but not one for the 1.x line.  A downloadable mod would be ideal, of course.
Sir Ed T. Toton III
Knight Commander, Order of the Marshal

( Personal Site | My Facebook )

Sir Edward

  • Forum Admin
  • Commander of the Order
  • Forum Veteran
  • *****
  • Posts: 9,340
  • Verum et Honorem.
    • ed.toton.org
Re: Feature request - automatic "info window" for common terms
« Reply #3 on: 2011-03-21, 16:14:22 »

The compatibility is slightly out of date, but this one is half-way there:

http://custom.simplemachines.org/mods/index.php?mod=1140

It allows people to manually add tooltips to their own messages.

This is the one that's more correct to what we want, but it's designed for the 2.x series:

http://custom.simplemachines.org/mods/index.php?mod=1525
Sir Ed T. Toton III
Knight Commander, Order of the Marshal

( Personal Site | My Facebook )

Sir Edward

  • Forum Admin
  • Commander of the Order
  • Forum Veteran
  • *****
  • Posts: 9,340
  • Verum et Honorem.
    • ed.toton.org
Re: Feature request - automatic "info window" for common terms
« Reply #4 on: 2011-03-21, 18:42:22 »

The compatibility is slightly out of date, but this one is half-way there:

http://custom.simplemachines.org/mods/index.php?mod=1140

It allows people to manually add tooltips to their own messages.

(I'm hacking on this message to test out some options. Installed this mod, learned from it, and removed it)

I'm [csstooltip=This is a test! A much longer test, indeed. I wonder how it will look.]testing something out[/csstooltip], using just CSS and a small edit to the forum code. (This CSS method looks good as long is it's not at the bottom or on the right side of the message, otherwise it scrolls off)

Second test: [inlinetip=This is a test! A much longer test, indeed. I wonder how it will look.]testing something out[/inlinetip] to see how well it works with inline text. This one allows the message box to resize appropriately so it never extends out of view, but everything shifts around. Not as pretty ,but more reliable.

[tooltip=This is a test! A much longer test, indeed. I wonder how it will look.]Test #3[/tooltip] is using the jQuery method. So is [tooltip=This is another test that also has long text. It's even longer than the others to try to fill up a bit more of the pop-up box.]test #4[/tooltip]

« Last Edit: 2011-03-22, 15:06:39 by Sir Edward »
Sir Ed T. Toton III
Knight Commander, Order of the Marshal

( Personal Site | My Facebook )

Sir Edward

  • Forum Admin
  • Commander of the Order
  • Forum Veteran
  • *****
  • Posts: 9,340
  • Verum et Honorem.
    • ed.toton.org
Re: Feature request - automatic "info window" for common terms
« Reply #5 on: 2011-03-22, 15:15:57 »
Since that jQuery part looks pretty easy to implement to make the actual pop-ups, I'm now looking into the code to see what it would take to automatically add them for a variety of words. The path of least resistance might be to just hard-code an array that contains the words and definitions.

Maybe we should start coming up with a specific list of words to have definitions for?

Some examples:

Swordsmanship groups or genres:  VAF, NYHFA, MEMAG, MASHS, ARMA, SCA, WMA/HEMA, JSA

Sword moves:  swerchau, oberhau, zornhau, unterhau

Renfaires:  MDRF, VARF, CRF, NCRF, PARF

Perhaps even some types of swords, sword parts, armor terms like tassets, coif, and gorget.

KC
« Last Edit: 2011-03-23, 03:36:37 by Sir Edward »
Sir Ed T. Toton III
Knight Commander, Order of the Marshal

( Personal Site | My Facebook )

Sir Edward

  • Forum Admin
  • Commander of the Order
  • Forum Veteran
  • *****
  • Posts: 9,340
  • Verum et Honorem.
    • ed.toton.org
Re: Feature request - automatic "info window" for common terms
« Reply #6 on: 2011-03-22, 18:07:37 »

Cool, I think that's working.
Sir Ed T. Toton III
Knight Commander, Order of the Marshal

( Personal Site | My Facebook )

Sir William

  • Cogito ergo sum
  • Knight of the Order
  • Forum Veteran
  • ****
  • Posts: 7,154
Re: Feature request - automatic "info window" for common terms
« Reply #7 on: 2011-03-22, 19:40:14 »
It IS working...I was like wth is going on lol
The Black Knight, Order of the Marshal
'Per Pale Azure and Sable, a Chevron counterchanged fimbriated argent.' 
“Pride makes a man, it drives him, it is the shield wall around his reputation.  Men die, but reputation does not.â€

Sir James A

  • Weapons & Armor addict
  • Knight of the Order
  • Forum Veteran
  • ****
  • Posts: 6,043
Re: Feature request - automatic "info window" for common terms
« Reply #8 on: 2011-03-23, 17:59:43 »
Ah, fantastic Sir Edward! Exactly what I had in mind. We could add "SCA" and "HEMA" to the list, I can't think of any others off the top of my head. Thanks!
Knight, Order of the Marshal
Sable, a chevron between three lions statant Argent

Sir Edward

  • Forum Admin
  • Commander of the Order
  • Forum Veteran
  • *****
  • Posts: 9,340
  • Verum et Honorem.
    • ed.toton.org
Re: Feature request - automatic "info window" for common terms
« Reply #9 on: 2011-03-23, 18:17:08 »
Ah, fantastic Sir Edward! Exactly what I had in mind. We could add "SCA" and "HEMA" to the list, I can't think of any others off the top of my head. Thanks!

They were some of the first ones I added. :)

This worked out pretty well. I borrowed a little of the substitution code from the mod for the forum's 2.0 release (we'll be able to use the real mod once 2.0 goes stable), but otherwise it's some simplistic custom stuff. It worked better than I thought it would.
« Last Edit: 2011-03-23, 18:19:20 by Sir Edward »
Sir Ed T. Toton III
Knight Commander, Order of the Marshal

( Personal Site | My Facebook )

Sir James A

  • Weapons & Armor addict
  • Knight of the Order
  • Forum Veteran
  • ****
  • Posts: 6,043
Re: Feature request - automatic "info window" for common terms
« Reply #10 on: 2011-03-23, 19:11:23 »
Ah, fantastic Sir Edward! Exactly what I had in mind. We could add "SCA" and "HEMA" to the list, I can't think of any others off the top of my head. Thanks!

They were some of the first ones I added. :)

This worked out pretty well. I borrowed a little of the substitution code from the mod for the forum's 2.0 release (we'll be able to use the real mod once 2.0 goes stable), but otherwise it's some simplistic custom stuff. It worked better than I thought it would.

Oh, interesting. It doesn't catch the SCA and HEMA in my first post, but does catch the WMA - at first I thought the comma throws it off, but that doesn't seem to be the case  since it caught WMA. Hmm. :confused:
Knight, Order of the Marshal
Sable, a chevron between three lions statant Argent

Sir Edward

  • Forum Admin
  • Commander of the Order
  • Forum Veteran
  • *****
  • Posts: 9,340
  • Verum et Honorem.
    • ed.toton.org
Re: Feature request - automatic "info window" for common terms
« Reply #11 on: 2011-03-23, 19:21:38 »
Oh, interesting. It doesn't catch the SCA and HEMA in my first post, but does catch the WMA - at first I thought the comma throws it off, but that doesn't seem to be the case  since it caught WMA. Hmm. :confused:

Actually it does catch them, but I have it only highlighting the first instance of it in the post (your first sentence in that post) rather than all instances.
« Last Edit: 2011-03-23, 19:22:27 by Sir Edward »
Sir Ed T. Toton III
Knight Commander, Order of the Marshal

( Personal Site | My Facebook )

Sir James A

  • Weapons & Armor addict
  • Knight of the Order
  • Forum Veteran
  • ****
  • Posts: 6,043
Re: Feature request - automatic "info window" for common terms
« Reply #12 on: 2011-03-23, 19:25:17 »
Oh, interesting. It doesn't catch the SCA and HEMA in my first post, but does catch the WMA - at first I thought the comma throws it off, but that doesn't seem to be the case  since it caught WMA. Hmm. :confused:

Actually it does catch them, but I have it only highlighting the first instance of it in the post (your first sentence in that post) rather than all instances.

Ah, indeed, oops. I'm off to seek some caffeine... :o
Knight, Order of the Marshal
Sable, a chevron between three lions statant Argent