PTVPopups-Talk
This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.
Problem with German Umlauts
If a PTV is followed by a German Umlaut (ä,ö,ü), the recipe does it's action, even thoughI don't want to. For example: I have defined Pr=Personenregister, then „Präposition“ gives popup „Personenregister“ from the first two letters. What can I do? – Martin, March 23, 2020
Question 02.08.2018 - Nobody who can help me?
This recipe did work very fine, but since a few days id does only work if I put the "{(ptvpopups Site.Glossar)}
" directly into the page - but not into GroupHeader or SiteHeader or tmpl file. I tried everything.
Try emailing CCox, his address is near the top of ptvpopups.phpΔ. He usually replies quickly, here he may not have noticed that this page has been modified. --Petko August 04, 2018, at 07:42 PM
I replied via email, couldn't remember if I already did. I tested the recipe on a fresh latest PmWiki and it worked. Recommended that you check if you meant PmWiki.Glossary instead of Site.Glossary. ccox August 19, 2018, at 03:53 AM
Answered Question 2017:
Excuse me for my bad English...
This rezipe ist wunderfull - but when I go to "preview", it puts html-Code like <span class='ptvpopKB' def='Exampletext'>Example</span> into my Wikicode! What can I do?
I solved the problem writing in config.php: if ($action != 'edit' and PageVar($pagename
, '$FullName') != "Abnl.Abnl") include_once("cookbook/ptvpopups.php"); (Abnl.Abnl ist a file with about 3000 lines of text, where the rezipe crashed too.
In the recipe, find >retore and change it to <restore. Actually, I think that's the "right" answer. ccox July 24, 2017, at 04:53 PM
I've looked at the recipe and noticed a slight optimization is possible. The CSS does not need to be defined for every PTV popup, simply move it before the last "}" of your function:
$HTMLStylesFmt
["ptvpopspan"] = "#wikitext .ptvpop { border-bottom: 1px dashed #000; }";$HTMLStylesFmt
["ptvpopsearch"] = "#wikitext .ptvpop:hover:after { background: rgba(20,0,0,0.85) none repeat scroll 0 0; border-radius: 6px;color: #fff;content: attr(def);margin-left:10px;margin-top:-10px; padding:3px 6px 3px 6px;position: absolute;max-width:300px;font-size:small; }";
And the Markup replacement line:
"<span class='ptvpop' def='$val'>$1</span>"
Note how I've removed the '$word' variable from both snippets. This way the CSS will be inserted only once and will apply to all popups. --Petko July 26, 2017, at 03:10 AM
Optimized and released! Thanks. ccox July 26, 2017, at 06:00 PM