Hi Howard
Sorry to hear about the late great cat. <a moment of silence, with head bowed down briefly>
...
<Head lifted up again>
Anyway, the Good News is that I achieved what I sought out to do! Here's the code snippet of my Moodle theme's header.html file:
<body>
...
<?php
$haystack = me();
$needle = "forum";
$pos = strpos(strtolower($haystack),strtolower($needle));
//echo $pos;
if($pos === false) {
// string needle NOT found in haystack
// do nothing!
}
else {
// string needle found in haystack
// so, go ahead and activate the embed code!
echo "<script type='text/javascript'>";
echo "(function(d){
var app = d.createElement('script'); app.type = 'text/javascript'; app.async = true;
var pt = ('https:' == document.location.protocol ? 'https://' : 'http://');
app.src = pt + 'www.speakpipe.com/loader/7si4wqs7jgqocgr318inx135q75ovcmg.js';
var s = d.getElementsByTagName('script')[0]; s.parentNode.insertBefore(app, s);
})(document);";
echo"</script>";
}
?>
</body>
...
You can test it out here:
http://www.moodurian.com/mod/forum/view.php?id=3885
and the SpeakPipe voice recorder gets activated! See below image, right edge.

-OR-
http://www.moodurian.com
(or any part of the website that does not have the word "forum" in its URL) and
the SpeakPipe embed code is not activated! It's nowhere to be seen.

Chalk up another success in Moodle coding and doing what was previously not
thought possible (at least by me!). All thanks to you, Howard!
Regards
Frankie Kam