Wiki:Notes lingo

From Helminthic Therapy wiki
Jump to: navigation, search

Home>Wiki:Notes>Wiki:Notes lingo

Fix for Lingo links

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: ADAncylostoma duodenale. A species of roundworm, aka the Old World hookworm, that is not suitable for use in helminthic therapy. [https://en.wikipedia.org/wiki/Ancylostoma_duodenale Wikipedia:Ancylostoma duodenale], IBSIrritable bowel syndrome is a widespread condition involving recurrent abdominal pain and diarrhoea or constipation. [https://en.wikipedia.org/wiki/Irritable_Bowel_Syndrome Wikipedia:Irritable Bowel Syndrome], MCADMast cell activation disorder, also known as mast cell activation syndrome (MCAS). An immunological condition. [https://en.wikipedia.org/wiki/Mast_cell_activation_syndrome Wikipedia:Mast cell activation syndrome], MCASMast cell activation syndrome, also referred to as mast cell activation disorder (MCAD). An immunological condition. [https://en.wikipedia.org/wiki/Mast_cell_activation_syndrome Wikipedia:Mast cell activation syndrome], MCSMultiple Chemical Sensitivity is a chronic physical illness affecting people of all ages and backgrounds. It involves allergic-type reactions to very low levels of chemicals in everyday products and often also sensitivity to food, medicines, moulds and electromagnetic fields. [https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1241652/ A review of a two-phase population study of multiple chemical sensitivities], O&P Test"Ova and Parasites" or "Ova, cysts, and Parasites" are typical names for a pathology test of faeces (stool) that can reveal the presence of parasites, including hookworms and whipworms. To be accurate, this needs to be carried out by someone with experience of looking for the eggs of these species, preferably at a School of Tropical Medicine. See: [http://helminthictherapywiki.org/wiki/index.php/Stool_testing_(egg_counting) Stool testing (egg counting)]

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.