Summary: Talk page for PTVPopups.
Maintainer: ccox
Users: (View? / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.

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

Talk page for the PTVPopups recipe (users?).