×
Namespaces

Variants
Actions
(Difference between revisions)

Template:Sandbox3

From Nokia Developer Wiki
Jump to: navigation, search
hamishwillee (Talk | contribs)
m (Hamishwillee - Add collabsible heading support)
hamishwillee (Talk | contribs)
m (Hamishwillee -)
Line 1: Line 1:
<noinclude>{{InternalUse|visible=true}}{{UnderConstruction|This is a draft (experimental) template for category pages }}
+
<noinclude>{{Abstract|Base template for right aligned fix-sized information boxes}}.  
{{Abstract|visible=true|Lists recently edited articles in specified categorie(s)}}. Minor edits are ignored and results are specified in descending order of edit date.
+
  
The template allows you to control the appearance and content of the list by restricting the number of items shown, add categories, show hidden articles, specify the language etc.
+
{{InternalUse|visible=true}}
 +
[[Category:FNWiki]]
  
[[Category:FNWiki]]
+
== Usage ==   
== Usage ==
+
<!-- Describe how to use here -->
  <nowiki>{{ListRecentlyEdited</nowiki>|''category name''}}
+
Use '''<nowiki>{{InfoBoxRightHandSide|title=</nowiki>''your title''<nowiki>|image=</nowiki>''image file name''<nowiki>|text="text content"}}</nowiki>''' to display titled information text inside a box.  
where ''category name'' is any category. The maximum number of topics that can be listed will be displayed. If no category is specified, recently edited 'English' topics will be displayed.
+
* ''title'': Title of box
Other parameters may be passed as pipe separated values
+
* ''text'': Box text
* Un named parameters: Up to 7 un-named parameters are treated as additional categories included in the search (ie the union of all topics in all categories specified as unnamed parameters will be part of the results set)
+
* ''image'': Filename of image to be displayed on left hand side (optional)
* ''count'': The number of values to return. If unspecified this will be the maximum number that can be returned by DPL
+
* ''link'': Link url from image
* ''language'': The category of the specific language returned values are to be restricted to. If no ''language'' is specified then English topics will be returned
+
* ''andcategory'' (and ''andcategory2 to andcategory10''): Topics returned will be in the intersection of unnamed parameters and categories specified in ''andcategory''
+
* ''notcategory'' (and ''notcategory2 to notcategory20''): Topics returned will not include articles in these categories
+
By default the author is shown, categories are not shown, article names are displayed full length and knowledgbase articles are included in the output. These can be changed using the following parameters:
+
* ''columns'': Sets the number of columns. Default is to list articles in one column
+
* ''crop'': If specified, article titles will be restricted to this length
+
* ''adduser=false'': Hides the author - by default the author is shown
+
* ''showkb=false'': Be default knowledgebase articles are included. If this parameter is specified as false, the articles will be removed
+
* ''addcategories=true'': If specified, categories will be listed in output
+
* ''showdrafts=true'': If true, draft items will be shown (hidden by default)
+
* ''showhidden=true'': If true, articles in categories Archived, FNWiki and Advertising are shown (hidden by default)
+
* ''addeditdate=true'': If specified, date is shown.
+
** ''userdateformat'': If specified, used formatstring with letters like "y,Y,m,M,d,D,h,H,i,I,s"
+
* ''uses'': Specify the templates that must be in articles in the list .Note that to specify multiple templates use the half pipe - e.g.
+
uses=Template:KBKI '''¦''' Template:KBTS '''¦''' Template:KBCS
+
* ''notuses'': Specify the templates that must not be in articles in the list .Note that to specify multiple templates use the half pipe - e.g.
+
notuses=Template:KBKI '''¦''' Template:KBTS '''¦''' Template:KBCS
+
The following parameters are specialist (expected to be used by other templates)
+
* ''lastrevisionbefore'': Displays only articles created before a certain date in YYYYMMDD format. Used primarily with order=ascending to show lists older than a particular date. By default, not used
+
* ''order=ascending'': This can reverse the order of the list so that oldest non-minor edits are shown first.
+
* ''ordermethod=title'': To change to alphabetic listing. Default is ordered by last edit.
+
  
== Default List ==
+
'''Note''': using the equals (=) and pipe (|) characters inside the template parameters prevents them working properly. These characters should be replaced with the '''&amp;#61;''' and '''&amp;#124;''' codes respectively.
The default list includes recently edited English topics in any category, excluding minor edits.
+
 
</noinclude>{{#dpl:
+
== Appearance ==  
namespace={{{namespace|}}}|
+
<!-- The template itself is written after the noinclude end tag. -->
{{#if: {{{7|}}}|category={{{1}}}¦{{{2}}}¦{{{3}}}¦{{{4}}}¦{{{5}}}¦{{{6}}}¦{{{7}}}|
+
</noinclude><div class="rightColumn" style="background-attachment: scroll;background-clip: border-box;background-color: white;background-image: none;background-origin: padding-box;border-bottom-width: 0px;border-left-width: 0px;border-right-width: 0px;border-top-width: 0px;color: #333;display: block;font-family: Tahoma, Geneva, sans-serif;font-size: 12px;font-style: normal;font-variant: normal;font-weight: normal;line-height: 10px;width: 220px;z-index: 1;">
{{#if: {{{6|}}}|category={{{1}}}¦{{{2}}}¦{{{3}}}¦{{{4}}}¦{{{5}}}¦{{{6}}}|
+
<div style="padding-top:2px; padding-bottom:2px;margin-bottom:5px border-top-color: #333;border-top-style: solid;border-top-width: 2px; position: static; background: #FFFFFF;z-index:1; width:215px">
{{#if: {{{5|}}}|category={{{1}}}¦{{{2}}}¦{{{3}}}¦{{{4}}}¦{{{5}}}|
+
{{#if: {{{title|}}}|<div class="infoboxrhstitle" style="font-size:20px; font-style:normal; font-family:'Nokia Pure Text'; border-bottom-color: #EDEDED;border-bottom-style:solid; border-bottom-width: 1px; padding-bottom:15px;padding-top:15px;">{{{title}}}</div>|}}
{{#if: {{{4|}}}|category={{{1}}}¦{{{2}}}¦{{{3}}}¦{{{4}}}|
+
<div class="infoboxrhstext" align="left" style="border-color: #EDEDED; border-bottom-style:solid; border-bottom-width: 1px; padding-top:10px; padding-bottom:10px;">
{{#if: {{{3|}}}|category={{{1}}}¦{{{2}}}¦{{{3}}}|
+
{{{text}}}</div></div></div>
{{#if: {{{2|}}}|category={{{1}}}¦{{{2}}}|
+
{{#if: {{{1|}}}|category={{{1}}}|}}
+
}} }} }} }} }} }}|
+
{{#if: {{{count|}}}|count={{{count}}}|}}|
+
{{#if: {{{language|}}}|category={{{language}}}|notcategorymatch=Lang-%}}|
+
{{#if: {{{andcategory|}}}|category={{{andcategory}}}|}}|
+
{{#if: {{{andcategory2|}}}|category={{{andcategory2}}}|}}|
+
{{#if: {{{andcategory3|}}}|category={{{andcategory3}}}|}}|
+
{{#if: {{{andcategory4|}}}|category={{{andcategory4}}}|}}|
+
{{#if: {{{andcategory5|}}}|category={{{andcategory5}}}|}}|
+
{{#if: {{{andcategory6|}}}|category={{{andcategory6}}}|}}|
+
{{#if: {{{andcategory7|}}}|category={{{andcategory7}}}|}}|
+
{{#if: {{{andcategory8|}}}|category={{{andcategory8}}}|}}|
+
{{#if: {{{andcategory9|}}}|category={{{andcategory9}}}|}}|
+
{{#if: {{{andcategory10|}}}|category={{{andcategory10}}}|}}|
+
{{#if: {{{andcategory11|}}}|category={{{andcategory11}}}|}}|
+
{{#if: {{{andcategory12|}}}|category={{{andcategory12}}}|}}|
+
{{#if: {{{notcategory|}}}|notcategory={{{notcategory}}}|}}|
+
{{#if: {{{notcategory2|}}}|notcategory={{{notcategory2}}}|}}|
+
{{#if: {{{notcategory3|}}}|notcategory={{{notcategory3}}}|}}|
+
{{#if: {{{notcategory4|}}}|notcategory={{{notcategory4}}}|}}|
+
{{#if: {{{notcategory5|}}}|notcategory={{{notcategory5}}}|}}|
+
{{#if: {{{notcategory6|}}}|notcategory={{{notcategory6}}}|}}|
+
{{#if: {{{notcategory7|}}}|notcategory={{{notcategory7}}}|}}|
+
{{#if: {{{notcategory8|}}}|notcategory={{{notcategory8}}}|}}|
+
{{#if: {{{notcategory9|}}}|notcategory={{{notcategory9}}}|}}|
+
{{#if: {{{notcategory10|}}}|notcategory={{{notcategory10}}}|}}|
+
{{#if: {{{notcategory11|}}}|notcategory={{{notcategory11}}}|}}|
+
{{#if: {{{notcategory12|}}}|notcategory={{{notcategory12}}}|}}|
+
{{#if: {{{notcategory13|}}}|notcategory={{{notcategory13}}}|}}|
+
{{#if: {{{notcategory14|}}}|notcategory={{{notcategory14}}}|}}|
+
{{#if: {{{notcategory15|}}}|notcategory={{{notcategory15}}}|}}|
+
{{#if: {{{notcategory16|}}}|notcategory={{{notcategory16}}}|}}|
+
{{#if: {{{notcategory17|}}}|notcategory={{{notcategory17}}}|}}|
+
{{#if: {{{notcategory18|}}}|notcategory={{{notcategory18}}}|}}|
+
{{#if: {{{notcategory19|}}}|notcategory={{{notcategory19}}}|}}|
+
{{#if: {{{notcategory20|}}}|notcategory={{{notcategory20}}}|}}|
+
{{#if: {{{notcategory21|}}}|notcategory={{{notcategory21}}}|}}|
+
{{#if: {{{notcategory22|}}}|notcategory={{{notcategory22}}}|}}|
+
{{#if: {{{notcategory23|}}}|notcategory={{{notcategory23}}}|}}|
+
{{#if: {{{notcategory24|}}}|notcategory={{{notcategory24}}}|}}|
+
{{#if: {{{notcategory25|}}}|notcategory={{{notcategory25}}}|}}|
+
{{#if: {{{notcategory26|}}}|notcategory={{{notcategory26}}}|}}|
+
{{#if: {{{notcategory27|}}}|notcategory={{{notcategory27}}}|}}|
+
{{#if: {{{notcategory28|}}}|notcategory={{{notcategory28}}}|}}|
+
{{#if: {{{notcategory29|}}}|notcategory={{{notcategory29}}}|}}|
+
{{#if: {{{notcategory30|}}}|notcategory={{{notcategory30}}}|}}|
+
{{#if: {{{notcategory31|}}}|notcategory={{{notcategory31}}}|}}|
+
{{#if: {{{notcategory32|}}}|notcategory={{{notcategory32}}}|}}|
+
{{#if: {{{notcategory33|}}}|notcategory={{{notcategory33}}}|}}|
+
{{#if: {{{notcategory34|}}}|notcategory={{{notcategory34}}}|}}|
+
{{#if: {{{notcategory35|}}}|notcategory={{{notcategory35}}}|}}|
+
{{#if: {{{notcategory36|}}}|notcategory={{{notcategory36}}}|}}|
+
{{#if: {{{notcategory37|}}}|notcategory={{{notcategory37}}}|}}|
+
{{#if: {{{notcategory38|}}}|notcategory={{{notcategory38}}}|}}|
+
{{#if: {{{notcategory39|}}}|notcategory={{{notcategory39}}}|}}|
+
{{#if: {{{notcategory40|}}}|notcategory={{{notcategory40}}}|}}|
+
{{#if: {{{columns|}}}|columns={{{columns}}}|}}|
+
{{#if: {{{crop|}}}|titlemaxlength={{{crop}}}|}}|
+
{{#ifeq: {{{showkb|}}}|false|notuses=Template:KBKI¦Template:KBTS¦Template:KBCS|}}|
+
{{#ifeq: {{{showcategories|}}}|true|addcategories=true|}}|
+
{{#ifeq: {{{addcategories|}}}|true|addcategories=true|}}|
+
{{#if {{{adduser|}}}||{{#ifeq: {{{showauthor|}}}|false||adduser=true}}| }}|
+
{{#ifeq: {{{adduser|}}}|false||adduser=true}}|
+
{{#ifeq: {{{showdrafts|}}}|true||notcategory=Draft}}|
+
{{#ifeq: {{{showhidden|}}}|true||notcategory=FNWiki}}|
+
{{#ifeq: {{{showhidden|}}}|true||notcategory=Advert}}|
+
{{#ifeq: {{{showhidden|}}}|true||notcategory=Advertising}}|
+
{{#ifeq: {{{showhidden|}}}|true||notcategory=Archived}}|
+
{{#ifeq: {{{showdate|}}}|true|addeditdate=true|}}| <!-- deprecated (and now not documented) -->
+
{{#ifeq: {{{addeditdate|}}}|true|addeditdate=true|}}|
+
{{#if: {{{userdateformat|}}}|userdateformat={{{userdateformat}}}|}}|
+
{{#if: {{{uses|}}}|uses={{{uses}}}|}}|
+
{{#if: {{{notuses|}}}|notuses={{{notuses}}}|}}|
+
ordermethod={{{ordermethod|lastedit}}}|
+
{{#ifeq: {{{ordermethod|}}}|title|adduser=false|}}|
+
{{#ifeq: {{{ordermethod|}}}|title||minoredits={{{minoredits|exclude}}} }}|
+
order={{{order|descending}}}|
+
displaynewicon=30|
+
{{#if: {{{addheading|}}}|resultsheader={{#if: {{{collapsible|}}}|<div class="mw-collapsible {{#if: {{{collapsed|}}}|mw-collapsed|}}">|}}<h2>{{#switch: {{{language|}}} 
+
| Lang-PT
+
| Lang-Portuguese = Modificados recentemente
+
| Lang-RU
+
| Lang-Russian = Недавно измененные
+
| Lang-CN
+
| Lang-Chinese = 最近编辑
+
| Lang-JP
+
| Lang-Japanese = Recently Edited
+
| #default = Recently Edited
+
}}</h2>{{#if: {{{collapsible|}}}|<div class="mw-collapsible-content">|}}|}}|
+
{{#if: {{{addheading|}}}|<!-- empty -->|noresultsheader=None<!-- default-->}}|
+
{{#if: {{{lastrevisionbefore|}}}|lastrevisionbefore={{{lastrevisionbefore}}}|}}|
+
<!-- Fix formatting bugs in DPL. Note, this only adds page and revision, ignores adding author etc-->
+
{{#if: {{{lastrevisionbefore|}}}|format=,\n* [[%PAGE%|%TITLE%]] (%DATE%)<!-- Need to fix formatting-->|<!-- Formatting OK -->}}|
+
}}<!-- for collapsable headings close the divs -->{{#if: {{{addheading|}}}|{{#if: {{{collapsible|}}}|</div></div>|}}|}}
+

Revision as of 04:42, 27 May 2013

Base template for right aligned fix-sized information boxes.

Internal use only.

Usage

Use {{InfoBoxRightHandSide|title=your title|image=image file name|text="text content"}} to display titled information text inside a box.

  • title: Title of box
  • text: Box text
  • image: Filename of image to be displayed on left hand side (optional)
  • link: Link url from image

Note: using the equals (=) and pipe (|) characters inside the template parameters prevents them working properly. These characters should be replaced with the &#61; and &#124; codes respectively.

Appearance

{{{text}}}
 
×