clarified documentation and added backlink

master
Fabien Benetou 14 years ago
parent 379744239c
commit 100e0df5ef
  1. 25
      pmwiki_recipes/pim_functions.php

@ -165,22 +165,29 @@ textFont(font);
$older_gnuplot_version = "<div><center><img src=\"/pub/visualization/edits_per_page/{$pagename}.png\" alt=\"/pub/visualization/edits_per_page/{$pagename}.png\"/></br>(<a href=\"$ScriptUrl/Wiki/Visualization#timeline\">visualization details</a>).</center></div><hr />"; $older_gnuplot_version = "<div><center><img src=\"/pub/visualization/edits_per_page/{$pagename}.png\" alt=\"/pub/visualization/edits_per_page/{$pagename}.png\"/></br>(<a href=\"$ScriptUrl/Wiki/Visualization#timeline\">visualization details</a>).</center></div><hr />";
} }
// generated via e.g. /*
// P=ReadingNotes.TheThingsWeDo; grep ^text= $P | sed "s/%0a/\\n/g" | sed "s/[^a-zA-Z]/ /g" > $P.txt && espeak -f $P.txt -w ../pub/audio/$P.wav && oggenc ../pub/audio/$P.wav && rm ../pub/audio/$P.wav $P.txt details at http://fabien.benetou.fr/MemoryRecalls/ImprovingPIM#AudioPIM
// note that the output could be improved by better parsing and exploring SSML/HTML support generated via e.g.
// details on the HTML markup P=ReadingNotes.TheThingsWeDo; grep ^text= $P | sed "s/%0a/\\n/g" | sed "s/[^a-zA-Z]/ /g" > $P.txt && espeak -f $P.txt -w ../pub/audio/$P.wav && oggenc ../pub/audio/$P.wav && rm ../pub/audio/$P.wav $P.txt
// https://developer.mozilla.org/en/HTML/Element/audio note that the output could be improved by better parsing and exploring SSML/HTML support
// http://www.w3.org/TR/html5/video.html#attr-media-controls details on the HTML markup
https://developer.mozilla.org/en/HTML/Element/audio
http://www.w3.org/TR/html5/video.html#attr-media-controls
*/
function DisplayAudio($pagename){ function DisplayAudio($pagename){
global $ScriptUrl, $PubDir, $FarmD; global $ScriptUrl, $PubDir, $FarmD;
$audiofile = $FarmD."/pub/audio/".$pagename.".ogg"; $audiofile = $FarmD."/pub/audio/".$pagename.".ogg";
$audiourl = $ScriptUrl."/pub/audio/".$pagename.".ogg"; $audiourl = $ScriptUrl."/pub/audio/".$pagename.".ogg";
if (file_exists($audiofile)) if (file_exists($audiofile))
print "<div width=\"100px\"><a name=\"audiodisplay\"> print "
<div width=\"100px\"><a name=\"DisplayAudio\">
<audio width=\"100\" controls=\"controls\" > <audio width=\"100\" controls=\"controls\" >
<source src=\"$audiourl\" type=\"audio/ogg\" /> <source src=\"$audiourl\" type=\"audio/ogg\" />
Your browser does not allow HTML5 audio.</audio> Your browser does not allow HTML5 audio.
</a></br>Download the <a href=\"$audiourl\">audio file (ogg)</a> to play later.</div>"; </audio>
</a></br>Download the <a href=\"$audiourl\">audio file (ogg)</a> to play later
(see <a href=\"$ScriptUrl/MemoryRecalls/ImprovingPIM#AudioPIM\">details</a>).
</div>";
} }
//display images with transparancy invertionnaly proportional to last time of update //display images with transparancy invertionnaly proportional to last time of update

Loading…
Cancel
Save