Video of Day

Insert a forum into a webpage


If you want to encourage discussion on your website, you can add a forum to any webpage you own using Google Groups.
Here's how to embed a forum:
  1. Go to the HTML source of your website.
  2. Copy and paste the HTML (written below in green). Make sure you paste it where you would like your forum to show on your site. Important: In the HTML, make sure to change "forum-name" to the name of your group. The text you need to replace is written in red below.
    <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>

    Using Google Groups for work or school?: If you're embedding a forum from a site that's owned by an organization or company, you'll need to add a parameter to the end of the URL. The URL in your HTML should look like this instead:
    "https://groups.google.com/forum/embed/?place=forum/forum-name&domain"
    You'll still need to replace "forum-name" with the name of your forum, and you should replace "domain" with the actual domain of the organization (ex. yourdomain.com).
     
  3. Customize how the forum looks on your site by adding parameters to the end of the URL in the code. The table below includes the changes you can make and how to add each parameter, and you can string together these parameters by separating them with an ampersand (&). For example, if you want your embedded forum to include a search box and the Google Discussions Forum theme, your URL might be:
    https://groups.google.com/forum/embed/?place=forum/forum-name&domain=yourdomain.com&showsearch:true&theme=default
What you can doParameter at the end of the URL
Hide or show a search box in your forum
  • To show a search box, add: &showsearch=true
  • To hide a search box, add: &showsearch=false
Hide or show selector tabs in the top right corner that let users see your member list, the "About" information for your group, and be able to see all topics
  • To show selector tabs, add:&showtabs=true
  • To hide selector tabs, add:&showtabs=false
Change the theme of your forum to the default Google Discussions Forum theme (It will replace the monochrome theme that's used automatically when you embed a forum)To change the theme, add: &theme
Hide or show the forum's title and description
  • To show the forum's title and description, add:&hideforumtitle=false
  • To hide the forum title and description, add:&hideforumtitle=true
Hide or show the subject of the post
  • To show the subject of each post, add: &hidesubject=true
  • To hide the subject of each post, add:&hidesubject=false
Set the default language of the forum (if you don't include this, Google will try to guess the user's chosen language)To set the default language, add a parameter and the two letter language code: &hl
Choose the format of links to your posts http://parenturl.com/path#forum instead of http://parenturl.com/path?place=forum)
  • To use fragments (ex: http://parenturl.com/path#forum), add: &fragments=true
  • To use query parameters (ex. http://parenturl.com/path?place=forum), add:&fragements=false
Choose if links to your topics and messages go to the forum embedded on your website, or to the Google Groups siteTo link users to embedded forum, add:&parenturl
Share on Google Plus

About Admin

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment