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
:true
if you want to show a search box,false
if you don't want the box to showshowtabs
:true
if you want to show the view selector tabs,false
if you don't want to show tabstheme
: A value ofdefault
will use the default Google Discussions Forum theme instead of the monochrome embedded themehideforumtitle
:true
if you want to show the forum title and description,false
if you don't want to show the title or descriptionhidesubject
:true
if you want to hide the subject of the last post in My Forums view,false
if 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
:true
if you want to use fragments instead of query parameters for permalinks (for example,http://parenturl.com/path#forum
instead ofhttp://parenturl.com/path?place=forum
),false
if 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