Customizing your Plugin
Overview
Of course you can use the Degree3 Plugin "out of the box" and it'll work just fine, but sometimes you may want to customize it to get the best results. You don't have to be a programmer to try most of the suggestions on this page, but you will need access to the code on your site.
Sample Code
Your plugin code should look something like this:
<script src="http://degree3.com/js/d3_widget.js?&id=200007" type="text/javascript"></script><div id="d3-widget"></div>
Notice the URL in bold - this page shows you how to customize that URL to change the plugin's behavior and make it even more useful for your visitors.
Basic Options
These are options you can set when building your plugin code on our Get Plugin page.
Layout
Code: "layout=tab"
Default: tab
The basic options for Layout are "module" or "tab" which determines if the plugin sits within your page layout, or off to the side. There are two other options:
- tabmodule shows the module AND the tab at the side of the page
- none shows neither the module NOR the tab; instead this setting allows you to use your own callout for the popup. To call the popup, you can attach class "dgr3-poplink" to any text, div, or other element on your page, and then a click on that element will spawn the Ask a Question popup.
Backfill
Code: "backfill=0|1|2"
Applies to: Module and Tab layouts
Default: 1 (on)
The "backfill" option lets you choose whether to fill out your Q&A module with other questions that are not specifically for that page or category. By default, backfilling is turned on, so your plugin will first show the Q&A from the page it is on (or the category you set), and it will then show questions from elsewhere on the site.
Set "backfill=0" to show only questions that were asked on the same URL the plugin is on. If you have set a category, the plugin will only show questions in that category.
Set "backfill=2" to show the latest questions from anywhere on your site, regardless of the page on which they were asked. This is a good choice for your homepage, or a main Q&A page.
Question count
Code: "qcount=3"
Default: 5
Applies to: Module layout
Using the "qcount" argument, you can change the number of questions that the plugin will show in Module layout. This can be set to anything between 0 and 20. We recommend higher numbers if you are using the plugin in a wide column on your site. If you have very limited space, you may want to consider setting this to 2 or 3, or even 0. This setting does not affect the questions shown within the popup.
Question length
Code: "qmaxlength=75"
Default: 75
Applies to: Module layout
Using the "qmaxlength" argument, you can change the length of the questions that appear in the module. This setting does not affect the questions shown within the popup.
Categories
Code: "cat=0"
Default: no category
Required: Premium Plan
If you have upgraded to one of our premium plans, you will have the option to create categories for your Q&A. You can find the Category Manager for your site in your Dashboard.
Once you have created your categories, you will need to build your plugin code. All questions asked through the plugin are then linked to that category, AND by default the plugin will show questions from that category first.
For example, if you have several pages in your Support section, you could build the plugin with the category set to "Support", and insert it on those pages. Then, questions asked there are shown only in your Support section, and questions asked in other sections of your site would not be shown (if you also turn off backfill - see below.)
For large sites, you can use categories for particular topics or products. Let's say you have several pages about the Microsoft Xbox covering the specs, feedback, photos, prices, and support. You could set up a category for Xbox for your plugins on those pages, and people browsing those pages will see all Xbox Q&A, and only Xbox Q&A.
Note: you can also use the "URL" parameter to group pages (more info below.) The plugin will always show questions by category if a category is set, otherwise it will show them by URL.
If you are not a programmer, be sure to use our Get Plugin page to build your plugin codes, and do not edit the code yourself.
Advanced Options
These options require that you "URL encode" your parameters. If you just need to create a few tags, and are not creating the tags through code, you can use this URL encoder online - just type in your text or URL, hit "Encode", and you're done!
Title
Code: "title=Page%20Title" (URL encoded)
Default: Plugin looks for title of current page
Applies to: Module and Tab layouts
When we display your questions, they are accompanied by the name of the page on which they were asked, like
"How do I set the title?" asked on Customizing your Plugin.
The plugin will try to find the title of your page, but you may also pass the title directly if you like. The plugin looks for the page title in the following places in order:
1) "title=" in the plugin code (url encoded)
2) OpenGraph title
3) <title> tag in your HTML
4) The first <H1> tag on your page
If you are not a programmer, please do not try to edit this part of the code yourself.
URL
Code: "url=http://example.com/pageuri" (URL encoded)
Default: Plugin looks for URL of current page
Applies to: Module and Tab layouts
When we display your questions, they will always be accompanied by a link to the page on which they were asked.
The plugin will try to find the url of your page, but you may also pass the title directly if you like. This is useful for stripping out campaign tracking codes, so we can group your Q&A with the proper pages on your site. The plugin looks for the page url in the following places in order:
1) "url=" in the plugin code (url encoded)
2) OpenGraph URL
3) A rel=canonical tag
4) The URL as seen in the browser's address bar
By default, the plugin shows Q&A from the page it is on first, so you can use this parameter to group questions, similar to the category parameter. For example, if you have page paths like "/xbox/discussion", "/xbox/tips", and "/xbox/support", you could pass the URL on those pages as "http://example.com/xbox", and we will group all Q&A asked on those pages together.
If you are not a programmer, please do not try to edit this part of the code yourself.
Recommendations
Small sites
For small sites that have a narrow subject focus such as small businesses or sites selling a single product or service, we recommend leaving backfill on because most questions will be relevant to the user, and it will make it easier for them to see the questions that are being asked, learn from them, and even answer them. The use of categories is optional, but we recommend only using a handful.
Large sites
For larger sites, we recommend using categories (available with premium accounts) to make sure questions are relevant to the page on which they are shown. You can use categories for sections of your site (like "Support" or "Downloads") or even specific products ("Apple iPad" or "BMW 335"). In this case, you should also turn off backfill to keep irrelevant questions from being shown.
For very large sites, you may want to use the URL parameter to group Q&A appropriately. For instance, if you have a large e-commerce site with several pages for each item (iPad reviews, iPad price comparison, iPad support, etc.), you may want to pass the URL for your main iPad page to the plugin for each of the subpages, so all iPad Q&A will be grouped together. In this instance, you would turn backfill off.
If you show Q&A on your homepage, we recommend not using categories and setting backfill=2, so people can see the latest questions asked from anywhere on your site.

