Difference between revisions of "Scholars Copyright Integration"

From Creative Commons
Jump to: navigation, search
 
 
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{template:incomplete}}
+
This document describes integrating the Scholars Copyright [http://scholars.sciencecommons.org Addendum Generator] into your website.  For general information on the Scholars Copyright project, see [http://www.sciencecommons.org/projects/publishing/index.html the project page at Science Commons].
  
This document describes integrating the Scholar's Copyright Addendum Generator into your website.  For information on the Scholar's Copyright project, see [http://www.sciencecommons.org/projects/publishing/index.html the project page at Science Commons].
+
== Basic Integration ==
  
== Basic Integration ==
+
The generator can be integrated with your site using a link or an <code>&lt;iframe&gt;</code> tag.  For example:
 +
 
 +
<code>
 +
  <iframe src="http://scholars.sciencecommons.org/iframe?partner_id=example"></iframe>
 +
</code>
 +
 
 +
The value supplied for <code>partner_id</code> should be a short, descriptive name for your site.  For example, Big Example University might supply <code>partner_id=example_u</code>.
 +
 
 +
== Default Agreement Selection ==
 +
 
 +
You may specify the default agreement selection by providing a <code>default</code> parameter in the query string.  The value of the <code>default</code> parameter is the agreement identifier.  For example, to display the generator with the '''Access-Reuse''' agreement selected:
 +
 
 +
<code>
 +
  <iframe src="http://scholars.sciencecommons.org/iframe?partner_id=example&default=retaincc"></iframe>
 +
</code>
 +
 
 +
The following agreements are available:
 +
 
 +
* '''noembargo''' Immediate Access
 +
* '''embargo''' Delayed Access
 +
* '''retaincc''' Access-Reuse
 +
* '''mit''' MIT Amendment
  
 
== Styling the Generator ==
 
== Styling the Generator ==
 +
 +
In addition to the <code>partner_id</code>, you may also supply an optional stylesheet URL.  For example:
 +
 +
<code>
 +
  <iframe src="http://scholars.sciencecommons.org/iframe?partner_id=example&stylesheet=http://example.com/scicom.css"></iframe>
 +
</code>
 +
 +
Valid style classes/ids include:
 +
 +
* '''.logo''' This class is used to style the header; you can insert your own header image by providing it as the background.
 +
* '''#content'''  The <code>content</code> div surrounds the entire selector; you can use this to set sizing, etc.
 +
* '''body''' Style the <code>body</code> tag to set the background color, etc.
 +
* '''.yui-panel .hd''' This selector is used to style the header of help dialogs.
 +
* '''.yui-panel .bd''' This selector is used to style the body of help dialogs (background, etc).
 +
* '''.yui-panel .bd p''' This selector is used to style the text of help dialogs (font size, family, etc).
 +
 +
 +
Note that if no stylesheet is specified, only the basic styling will be applied.
 +
 +
== Examples ==
 +
 +
An example of using an iframe to integrate the Addendum Generator is included with the source code.  You can find the HTML in Subversion [http://cctools.svn.sourceforge.net/viewvc/cctools/scicom/scholars/trunk/scicom/scholars/static/integration_example/ here], or see it online [http://scholars.sciencecommons.org/integration_example/index.html here].
  
 
[[Category:Technology]]
 
[[Category:Technology]]
 
[[Category:ScienceCommons]]
 
[[Category:ScienceCommons]]
[[Category:OpenSource]]
+
[[Category:Opensource]]
[[Category:Developers]]
+
[[Category:Developer]]

Latest revision as of 18:31, 8 June 2007

This document describes integrating the Scholars Copyright Addendum Generator into your website. For general information on the Scholars Copyright project, see the project page at Science Commons.

Basic Integration

The generator can be integrated with your site using a link or an <iframe> tag. For example:

  <iframe src="http://scholars.sciencecommons.org/iframe?partner_id=example"></iframe>

The value supplied for partner_id should be a short, descriptive name for your site. For example, Big Example University might supply partner_id=example_u.

Default Agreement Selection

You may specify the default agreement selection by providing a default parameter in the query string. The value of the default parameter is the agreement identifier. For example, to display the generator with the Access-Reuse agreement selected:

  <iframe src="http://scholars.sciencecommons.org/iframe?partner_id=example&default=retaincc"></iframe>

The following agreements are available:

  • noembargo Immediate Access
  • embargo Delayed Access
  • retaincc Access-Reuse
  • mit MIT Amendment

Styling the Generator

In addition to the partner_id, you may also supply an optional stylesheet URL. For example:

  <iframe src="http://scholars.sciencecommons.org/iframe?partner_id=example&stylesheet=http://example.com/scicom.css"></iframe>

Valid style classes/ids include:

  • .logo This class is used to style the header; you can insert your own header image by providing it as the background.
  • #content The content div surrounds the entire selector; you can use this to set sizing, etc.
  • body Style the body tag to set the background color, etc.
  • .yui-panel .hd This selector is used to style the header of help dialogs.
  • .yui-panel .bd This selector is used to style the body of help dialogs (background, etc).
  • .yui-panel .bd p This selector is used to style the text of help dialogs (font size, family, etc).


Note that if no stylesheet is specified, only the basic styling will be applied.

Examples

An example of using an iframe to integrate the Addendum Generator is included with the source code. You can find the HTML in Subversion here, or see it online here.