When using the code box feature in an FAQ, any glossary terms are converted into a tool-tip ( abbr ). Once the page is running, the syntax is wrapped in code tags by the syntax highlighter. These cause the abbr tags to be displayed on screen:
To solve this problem ( as a temporary fix ) I have used javascript to remove the tooltips from certain tags like headings, table headers, links, and pre (code box). This also solves the problem of jumping titles from this post: Glossary term in FAQ title causes jumping textBootloader>? <abbr rel="tooltip" data-original-title="Central processing unit">CPU</abbr> stats
Arduino explorer stk500V2 by MLS
Compiled on = Sep 9 2010
<abbr rel="tooltip" data-original-title="Central processing unit">CPU</abbr> Type = ATmega2560
__AVR_ARCH__ = 6
GCC Version = 4.3.3
AVR LibC Ver = 1.6.7
<abbr rel="tooltip" data-original-title="Central processing unit">CPU</abbr> signature= 1E9801
Low fuse = FF
High fuse = D8
Ext fuse = FD
Lock fuse = FF
Bootloader>
In Artikel.tpl, above the second last line ( anywhere above: SyntaxHighlighter.all(); ), add in this javascript code:
Code: Select all
$( 'pre, h2, thead, a' ).find( 'abbr' ).replaceWith( function (){ return $( this ).text(); } );
Code: Select all
$( 'abbr' ).each( function( i, e ){
$( "abbr[ data-original-title='" + $( e ).attr( 'data-original-title' ) + "']" ).each(
function( i, e ){ if( i > 0 ) $( e ).replaceWith( function (){ return $( this ).text(); } ); }
)}
);
if( i > 0 ) == only one occurrence.
if( i > 1 ) == 1 repeat.
if( i > 2 ) == and so on...
These are only a few hacks to get the desired result. I'm having a look at inc/PMF/glossary.php to see where I could suggest some changes.