Template:InfoBox ohloh

From Gentoo Wiki
Jump to:navigation Jump to:search
[edit

Documentation

Note
This page is a template. It contains some standardized, often used text, which can be transcluded inside other pages. As this template is widely used in our wiki, it may be protected in which case only staff members can change it. Use the discussion page to propose enhancements or fixes, or to voice your opinion.

Use this template inside an {{InfoBox stack}} to provide a link to an Open Hub project page in a right-floated box.

Parameters

Parameter name Required? Default value Description
Anonymous parameter 1 No {{lc:{{BASEPAGENAME}}}} The project id part of the project's URL.
header No (n/a) Set this to yes or true to display a Resources heading, but only if the infobox is the first one in an {{InfoBox stack}}.

The value of the anonymous parameter, if provided, must match the final portion of the target URL at openhub.net. For example, using lightdm gives a link to http://www.openhub.net/p/lightdm. By default, the all-lowercase version of the current page title is used. The default doesn't work right if there are any spaces in the article title, in which case the project id should be specified using the anonymous parameter.

Usage

This template must be used inside of an {{InfoBox stack}}, as seen in the template's testcases:

Correct

One anonymous parameter (an Ohloh project name)
Wiki code
{{InfoBox stack
| {{InfoBox ohloh|gentoo}}
}}
Main version
Sandbox version


No parameter (when title contains no spaces)
Wiki code
{{InfoBox stack
| {{InfoBox ohloh}}
}}
Main version
Sandbox version


↑ If the Ohloh project identifier matches the page title (all lowercase), then it is convenient to drop the anonymous parameter and call the template with no parameters. However, this doesn't work when the page title contains spaces (like this page, titled InfoBox ohloh). This example is being rendered as if the page title is the single word InfoBox. The first "Incorrect" example below shows what really happens when the page title contains a space. (Note that Open Hub project names for multiword software titles sometimes replace spaces with hyphens but sometimes use a special abbreviated version of the name [like mozlaunch for "Mozilla Launchers"], so it is not possible to automatically covert titles with spaces to valid project ids. Just search for the project title at Ohloh and use the anonymous parameter to specify the Ohloh project name, as shown in the previous example.)


Using header=true
Wiki code
{{InfoBox stack
| {{InfoBox ohloh|gentoo|header=true}}
}}
Main version
Resources
Sandbox version
Resources


Incorrect

Using no parameter when the page title contains a space (link text contains part of page title)
Wiki code
{{InfoBox stack
| {{InfoBox ohloh}}
}}
Main version
Sandbox version


↑ The title of this page, InfoBox ohloh, contains a space, which is causing the second word of the page title (ohloh) to show up as the first word of the link text. This is because the wikicode that forms the external link is [https://www.openhub.net/p/infobox ohloh Ohloh] instead of, say, [https://www.openhub.net/p/infobox_ohloh Ohloh].


Used outside of an {{InfoBox stack}} (wide box, not right-floated)
Wiki code
{{InfoBox ohloh|gentoo}}
Main version
Sandbox version


See also[edit]

The templates below are implemented using {{InfoBox}}. They should also appear in Category:InfoBox templates, which may be more complete than this list.

These templates should be used within an {{InfoBox stack}}. Each should provide its own header parameter, but if necessary {{InfoBox header}} can be used.

Underlined text indicates the default heading provided by header=true for each type of template.

For use in articles
Resources
Article status
For use on talk pages
Talk status
(Note that the simpler {{Talk}} can be used in place of both of these.)
For use on user pages
User info
Babel (spoken-language indicators)
Note
The above documentation is transcluded from Template:InfoBox ohloh/doc. (edit | history)
Editors can experiment in this template's sandbox (edit) and testcases (edit) pages.
Please add categories and interwikis to the /doc subpage. (See the subpages of this template.)