Wiki:Notes lingo

From Helminthic Therapy wiki
Jump to navigation Jump to search

Home>Wiki:Notes>Wiki:Notes lingo

Fix for Lingo links[edit]

Brief:

Lingo Extension version 2.0.1 (2016-03-12) for MediaWiki doesn't show links in the Lingo tips. Below is a quick fix.
See our Terminology page - Notice how our [xxx] type wiki link markup all work in Lingo tips.
Lingo examples: AD, IBS, MCAD, MCAS, MCS, O&P Test

Details:

Lingo uses the qTip2 library 'http://qtip2.com' which creates nice tips and handles rich HTML just fine.
However the Lingo.js file passes in the raw wiki markup which qTip2 doesn't understand.
Note that MediaWiki allows raw HTML but not the <a> link so we need another solution.

Solution:

The solution is to modify Lingo.js code file to convert [xxx] type wiki markup to <a> HTML.

  • On your server find <mediaWiki>/extensions/Lingo/libs/Lingo.js
  • Backup 'Lingo.js' to 'Lingo(orig).js'
  • Edit 'Lingo.js' and change the line -- content : tooltip.html(), to content : convertLink(tooltip.html()),
  • Now all we need to do is add the function convertLink()

You will find convertLink() function, plus a live test here... http://jsfiddle.net/helpware/Le1jzwt4/

Email me (Robert) if you get stuck.