You can embed a group into your website by using an iFrame and specifying the group's URL.
Setting Up iFrame
To embed a group in an external web page, copy and paste the following iFrame HTML into the web page's HTML source (make sure to change forum-name to your group name:
<iframe id="forum_embed"
src="javascript:void(0)"
scrolling="no"
frameborder="0"
width="900"
height="700">
</iframe>
<script type="text/javascript">
document.getElementById("forum_embed").src =
"https://groups.google.com/forum/embed/?place=forum/forum-name" +
"&showsearch=true&showpopout=true&parenturl=" +
encodeURIComponent(window.location.href);
</script>
In the above example, you would want to change forum-name to the name of the group you want to pull into the iFrame. In addition, if you are pulling a group from a Google Apps domain (a site owned by an organization or a company), you will have to add a parameter at the end of the URL:
&domain=yourdomain.com
In the above example, you would replace yourdomain.com with the domain name for your group.
Customizing the display of your group
You can use other URL parameters to change the behavior of your iFrame and the display of your group:
showsearch:trueif you want to show a search box,falseif you don't want the box to showshowtabs:trueif you want to show the view selector tabs,falseif you don't want to show tabstheme: A value ofdefaultwill use the default Google Discussions Forum theme instead of the monochrome embedded themehideforumtitle:trueif you want to show the forum title and description,falseif you don't want to show the title or descriptionhidesubject:trueif you want to hide the subject of the last post in My Forums view,falseif you want to leave the subject visiblehl: The default language for the forum (if left out, Google will try to detect the user's chosen language)fragments:trueif you want to use fragments instead of query parameters for permalinks (for example,http://parenturl.com/path#foruminstead ofhttp://parenturl.com/path?place=forum),falseif you want to use query parametersparenturl: The URL of the page embedding the iFrame (used to generate permalinks)
You can string together these parameters by separating them with an ampersand,
&. For example, if you wanted to have an iFrame with a forum that showed the popout icons and had the Google Discussions Forum theme, your URL might be:
https://groups.google.com/forum/embed/?place=forum/forum-name&domain=yourdomain.com&showpopout=true&theme=default

0 comments:
Post a Comment