Widget Errors
Did you check log files? do they show any errors?
Thanks for getting back to me. I checked the log files and they didn't show any errors. I'm not sure if it really matters, but when I remove the # from {{#widget:....}} the code from Widget:YouTube appears on the page. The code is
<object width="" height=""><param name="movie" value="http://www.youtube.com/v/"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/" type="application/x-shockwave-flash" wmode="transparent" width="" height=""></embed></object>
When I leave the # in the code nothing shows up on the page. It is pretty weird. Have any other ideas?
Thanks again for both of your help. I'm very eager to get this working, so I poked around the PHP code a little bit. I was wondering if you might be able to help me interpret what I found.
In wiki_get_template, the line
$widgetCode = $widgetArticle->getContent();
is returning the content of the YouTube widget. This seems like a good sign in that Smarty is able to access the wiki template.
However, in renderWidget, when I inserted the code,
echo "<-- renderWidget afteroutput=$output-->";
right after
$output = 'ENCODED_CONTENT '.base64_encode($output).' END_ENCODED_CONTENT';,
the resulting HTML included <-- renderWidget afteroutput=ENCODED_CONTENT END_ENCODED_CONTENT-->
In other words, the content of the widget seems to get completely lost by the end of renderWidget. Somehow, it looks like fetch() isn't working quite right.
You can view this for yourself at the following page: http://tmswiki.medialayer.net/w/index.php?title=Scratch_pad&action=purge Because the wiki is being used and I didn't want to leave any detritus around, I added a '!' right after the '<' in the following line
echo "<-- renderWidget afteroutput=$output-->";
Doing so turned the output into an HTML comment, so it can only be seen if you look at the source.