Difference between revisions of "Template:ContentDirectory"

From Creative Commons
Jump to: navigation, search
(adding details on developer API)
Line 7: Line 7:
 
   ccportal= The URL for the CC-only portal (ie: http://flickr.com/creativecommons/)|
 
   ccportal= The URL for the CC-only portal (ie: http://flickr.com/creativecommons/)|
 
   ccfeed= The URL for the CC-only feed |
 
   ccfeed= The URL for the CC-only feed |
 +
  apiportal= The URL for API documentation for the site (ie: http://www.flickr.com/services/api/)|
 
   format1=Sound|
 
   format1=Sound|
 
   format2=MovingImage|
 
   format2=MovingImage|
Line 42: Line 43:
 
|-
 
|-
 
{{#ifeq:{{{ccfeed|}}}|||{{Tablerow|Label='''CC-only feed:'''|Value=[[ccfeed:={{{ccfeed}}}]]}}}}
 
{{#ifeq:{{{ccfeed|}}}|||{{Tablerow|Label='''CC-only feed:'''|Value=[[ccfeed:={{{ccfeed}}}]]}}}}
 +
|-
 +
{{#ifeq:{{{apiportal|}}}|||{{Tablerow|Label='''Developer API:'''|Value=[[apiportal:={{{apiportal}}}]]}}}}
 
|-
 
|-
 
{{#if:{{{format1|}}}|{{Tablerow|Label='''Formats'''|Value=[[format::{{{format1}}}]]|}}{{#if:{{{format2|}}}|, [[format::{{{format2}}}]]}}{{#if:{{{format3|}}}|, [[format::{{{format3}}}]]}}{{#if:{{{format4|}}}|, [[format::{{{format4}}}]]}}{{#if:{{{format5|}}}|, [[format::{{{format5}}}]]}}{{#if:{{{format6|}}}|, [[format::{{{format6}}}]]}}  
 
{{#if:{{{format1|}}}|{{Tablerow|Label='''Formats'''|Value=[[format::{{{format1}}}]]|}}{{#if:{{{format2|}}}|, [[format::{{{format2}}}]]}}{{#if:{{{format3|}}}|, [[format::{{{format3}}}]]}}{{#if:{{{format4|}}}|, [[format::{{{format4}}}]]}}{{#if:{{{format5|}}}|, [[format::{{{format5}}}]]}}{{#if:{{{format6|}}}|, [[format::{{{format6}}}]]}}  

Revision as of 01:06, 5 November 2007

This template simplifies the creation of articles about Content Directories. When inserted in a directory's page, it creates a decorative table with information about the content provided. It also takes care of annotating the given data semantically, so that users can easily find it or query it in other articles. Do not try to read this page's source code for learning table syntax – there are far easier ways of creating tables in MediaWiki.

To use this template, insert the following at the beginning of your page. All fields are optional and should be omitted if no information is available. The page name should reflect the name of the Content Directory.

{{ContentDirectory|
  mainurl= The main URL of the site (ie: http://flickr.com)|
  ccportal= The URL for the CC-only portal (ie: http://flickr.com/creativecommons/)|
  ccfeed= The URL for the CC-only feed |
  apiportal= The URL for API documentation for the site (ie: http://www.flickr.com/services/api/)|
  format1=Sound|
  format2=MovingImage|
  format3=Image|
  format4=|
  format5=|
  format6=|
  size= Approximate size of the CC-licensed collection (ie: 1000)|
 }}

The order of the fields is not relevant. The template should be given as the first thing on a page.

Otherwise, you can easily add articles by using a form, just go here

Formats

The following are recommended values for the format fields:

  • Sound
  • Image
  • Text
  • MovingImage
  • InteractiveResource