Forum

<Module>
<ModulePrefs title="Embedded Discussion Forum" title_url="http://groups.google.com/forum" description="Discussion forums embedded content view" height="600"scaling="false" scrolling="false" render_inline="true" singleton="false"></ModulePrefs>
<!--
A default forum to display if the parent URL does not provide a forum id or search string.
-->
<UserPref name="Forum" display_name="Default forum" datatype="string" required="false"/>
<UserPref name="Domain" display_name="The domain containing the content to display" datatype="string" default_value="" required="false"/>
<UserPref name="ShowSearch" display_name="Show a search box for this forum" datatype="bool" default_value="true"/>
<UserPref name="ShowPopout" display_name="Show a link to pop out into a new window" datatype="bool" default_value="true"/>
<UserPref name="Transparency" display_name="Transparent background" datatype="bool" default_value="false" required="false"/>
<Content type="html">
<![CDATA[
<script type="text/javascript"> function init() { var url = 'https://groups.google.com'; var domain = '__UP_Domain__'; if (domain.length > 0) { url += '/a/' + encodeURIComponent(domain); } url += '/forum/embed/'; var params = { 'parenturl': _args()['parent'], 'service': 'jotspot', 'ul': '1' }; if(__UP_Transparency__) { makeTransparent(document.getElementsByTagName('html')[0]); makeTransparent(document.getElementsByTagName('body')[0]); } else { params['theme'] = 'default'; } var defaultForum = '__UP_Forum__'; if (defaultForum.length > 0) { params['place'] = 'forum/' + defaultForum; } var showPopout = __UP_ShowPopout__; if (showPopout) { params['showpopout'] = 'true'; } var showSearch = __UP_ShowSearch__; if (showSearch) { params['showsearch'] = 'true'; } initFrame(url, params); } function makeTransparent(element) { element.style.background = 'transparent'; } function initFrame(url, params) { var encodedParams = []; for (var param in params) { encodedParams.push(encodeURIComponent(param) + '=' + encodeURIComponent(params[param])); } if (encodedParams.length) { url += '?' + encodedParams.join('&'); } var frame = document.getElementById('contentFrame'); frame.src = url; } gadgets.util.registerOnLoadHandler(init); </script> <!-- The src for the iframe includes both the parent url from the site, as well as the default forum ID if one was given; the server will check the parent first, and then fallback to trying the forumid parameter on the url. --> <iframe src="javascript:void(0)" id="contentFrame" frameborder="0" width="100%" height="100%"/>
]]>
</Content>
</Module>
Comments