Template:PluginCard: Difference between revisions

From Miranda NG
Jump to navigation Jump to search
(small fix for Plugin name if no name is specified.)
No edit summary
Tag: Manual revert
 
(64 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<!--Localisation
<includeonly><!-- use #titleparts instead of MagicWords if pagetitle will change -->{{
-->{{Localization/PluginCard|{{{1}}}}}<!--
  #vardefine:PluginFileName | {{BASEPAGENAMEE}}
-->{{DISPLAYTITLE:{{{name|}}} }}{| class="infobox bordered plugincard " cellpadding="4" style="margin: 0 0 10px 10px; width: 22em; font-size: 90%; float: right;clear: right; box-shadow:1px 1px 3px #999;"
}}{{
| align="center" colspan=2 bgcolor="#ccccff" style="font-size:110%;" | '''''{{{name|{{BASEPAGENAME}}}}}'''''
  #if: {{#varexists:PluginLang}}
{{#ifeq:{{{screenshot|}}}|***| | {{!}}-
  | {{PageLang | {{#var:PluginLang}} }} <!-- from ResolveLang pages -->
{{!}} align="center" colspan="2" {{!}} {{#if:{{{screenshot|}}}|[[Image:{{{screenshot}}}{{!}}border{{!}}{{{name}}}{{!}}200px]]|''{{#hashvalue: localisation |noimage|No image}}''}}}}
  | {{#vardefine:PluginLang | {{PageLangCode}} }}{{PageLang | {{PageLangCode}} }} <!-- remove the first one after transition to PageLang -->
{{RowColor|#ccccff|'''{{#hashvalue:localisation|filename|Filename}}'''|{{{dll|{{BASEPAGENAME}}.dll}}}}}
}}<!-- Language localisation ...
<!--am-->{{#if:{{{author|}}}| {{RowColor|#ccccff|'''{{#hashvalue: localisation |plugin-author|Plugin author}}'''|{{Developer|{{{author|}}}}}}}}}
  -->{{Localization/PluginCard|{{#var:PageLang}} }}<!--
{{#if:{{{authors|}}}|{{RowColor|#ccccff|'''{{#hashvalue: localisation |plugin-authors|Plugin authors}}'''|{{{authors|}}}}}|}}<!--/am-->
and default values
|- valign="top"
  -->{{Localization/PluginCard|}}<!--
{{#if:{{{requirements|}}}|{{RowColor|#ccccff|'''{{#hashvalue: localisation |systemreq|System <br/>requirements}}'''|{{{requirements|}}}}}|}}
Load information about plugin
|-
  -->{{PluginInfo|}}<!--
{{#if:{{{homepage|}}}|[{{{homepage|}}} '''{{#hashvalue: localisation |homepage|Homepage}}''']<br/>|}}
Page title
{{#vardefine:pluginName|{{lc:{{#if:{{{basename|}}}|{{{basename}}}|{{#if:{{{dll|}}}|{{#replace:{{{dll|}}}|.dll|}}|{{BASEPAGENAME}}}}}}}}}}
  -->{{DISPLAYTITLE: {{
|-
      #if: {{{name|}}}
| align="center" colspan="2" bgcolor="#ccccff" style="font-size:110%;" |
      | {{{name}}}
'''{{#hashvalue:localisation |download-title|Download links}}:'''
      | {{#hashvalue:{{#var:PluginFileName}} |name |{{#var:PluginFileName}} }}
{{#if:{{{hideDownloadLinks|}}}| |
      }}
{{!}}-
    }}<!--
{{RowColor|#fff|{{#hashvalue: localisation |download-stable|Stable version}}:| {{#if:{{{hide-s32|}}}| |[http://miranda-ng.org/distr/stable/x32/Plugins/{{#var:pluginName}}.zip x32],}} {{#if:{{{hide-s64|}}}| |[http://miranda-ng.org/distr/stable/x64/Plugins/{{#var:pluginName}}.zip x64]}}}}
Check if Plugin:PluginName page exist if not display warning and add creation link
{{!}}-
-->{{#ifexist: Plugin:{{#var:PluginFileName}}
{{RowColor|#fff|{{#hashvalue: localisation |download-current|Current version}}:| {{#if:{{{hide-l32|}}}| |[http://miranda-ng.org/distr/x32/Plugins/{{#var:pluginName}}.zip x32],}} {{#if:{{{hide-l64|}}}| |[http://miranda-ng.org/distr/x64/Plugins/{{#var:pluginName}}.zip x64]}}}}}}
  |
{{!}}-
  | {{TNT|Warning|If you want to create a new Plugin page, you are doing it wrong. Do not save this page/changes. You need to create page {{Strong|Plugin:{{#var:PluginFileName}}}}. Please create it using the link below. Content will be generated automatically. You only need to save the changes.
{{#if:{{{additionalLinks|}}}|
}}<span class="plainlinks createlinks">[{{fullurl:Plugin:{{#var:PluginFileName}} | action=edit&preload=Template:PluginPage/preload&summary=Plugin:{{#var:PluginFileName}} }} '''Create page''']</span>{{clear}}<br/>
{{!}}-
{{RowColor|#fff|{{#hashvalue: localisation |links-other|Other}}:| {{{additionalLinks|}}}}}
|}}
|}<includeonly>{{Languages}}
[[Category:{{#hashvalue: localisation |cat-lang|Plugins:English}}]][[Category:Plugins]]
{{#if:{{{screenshot|}}}| |[[Category:Todo:{{#hashvalue: localisation |cat-todo|Screenshot required}}]]}}
</includeonly>
<noinclude>{{Languages/Template|by=PluginCard/by|cz=PluginCard/cz|de=PluginCard/de|en=PluginCard/en|fr=PluginCard/fr|pl=PluginCard/pl|ru=PluginCard}}
{{-}}
Использование:
<pre>{{PluginCard
| language code (English if empty or incorrect code)
| name = Название плагина
| author = Автор плагина
| authors = Авторы плагина
| screenshot = (н) Скриншот плагина (Поставьте *** (три звезды) если плагину не требуется скриншот)
| requirements = (н) Системные требования (к примеру, необходимые runtime библиотеки)
| dll = (н) Имя dll плагина (перечисление)
| basename = (н) Имя dll плагина, без расширения (предпочтительный вариант)
| langpackru = (н) Перевод плагина (имя файла без .txt в SVN русского лангпака)
| additionalLinks = (н) Дополнительные ссылки на скачивание, показываемые в карточке плагина
| hideDownloadLinks = (н) Не показывать дефолтные ссылки на скачивание
| hide-s32 = (н) Не показывать ссылку на стейбл-32
| hide-s64 = (н) Не показывать ссылку на стейбл-64
| hide-l32 = (н) Не показывать ссылку на лейтест-32
| hide-l64 = (н) Не показывать ссылку на лейтест-64
}}
}}
</pre>
{| class="plugincard" id="plugininfo" cellpadding="4" style="margin: 0 0 10px 10px; width: 22em; font-size: 90%; float: right;clear: right; box-shadow:1px 1px 3px #999;"
* Использовать dll следует если у плагина имеется несколько вариантов именования длл.
<!--
* Использовать basename следует если имя зип-архива с плагином не совпадает с именем данной страницы без языкового суффикса.
 
* (н) = указывать необязательно.
Title
 
-->
! colspan="2" id="pluginname" style="font-size:110%;background-color:#ccccff;" | {{
  #if: {{{name|}}}
  | {{{name}}}
  | {{#hashvalue:{{#var:PluginFileName}} |name |{{#var:PluginFileName}} }}
}}
<!--
 
Screenshot
 
-->{{
  #ifeq: {{
    #if: {{{screenshot|}}}
    | {{{screenshot}}}
    | {{#hashvalue:{{#var:PluginFileName}} |screenshot}}
  }} | ***
  |&#32;
  |{{!}}-
  {{!}} colspan="2" id="pluginimage" style="text-align:center;font-style: italic;"{{!}} <!--
      display an image
    -->{{
    #if: {{{screenshot|}}}
    | [[File:{{{screenshot}}} | {{
          #ifeq: {{{screenshotOpt|}}} | {{{screenshotOpt|-}}} <!-- specified and may be empty -->
          |{{
              #if: {{{screenshotOpt|}}} <!-- if not empty -->
              | {{{screenshotOpt}}}
              | &#32;
            }}
          |{{
              #if: {{#hashkeyexists:{{#var:PluginFileName}} |screenshotOpt}} <!-- if specified -->
              | {{#hashvalue:{{#var:PluginFileName}} |screenshotOpt |&#32;}} <!-- &#32; if empty -->
              | border{{!}}200px  <!-- default image options -->
            }}
        }} | <!-- caption -->{{
          #if: {{{name|}}}
          | {{{name}}}
          | {{#hashvalue:{{#var:PluginFileName}} |name |{{#var:PluginFileName}} }}
        }}
      ]]
    |{{
        #if: {{#hashvalue:{{#var:PluginFileName}} |screenshot}}
        | [[File:{{#hashvalue:{{#var:PluginFileName}} |screenshot}} | {{
              #ifeq: {{{screenshotOpt|}}} | {{{screenshotOpt|-}}} <!-- specified and may be empty -->
              |{{
                #if: {{{screenshotOpt|}}} <!-- if not empty -->
                | {{{screenshotOpt}}}
                | &#32;
              }}
              |{{
                #if: {{#hashkeyexists:{{#var:PluginFileName}} |screenshotOpt}} <!-- if specified -->
                | {{#hashvalue:{{#var:PluginFileName}} |screenshotOpt |&#32;}} <!-- &#32; if empty -->
                | border{{!}}200px  <!-- default image options -->
              }}
            }} | <!-- caption  -->{{
              #if: {{{name|}}}
              | {{{name}}}
              | {{#hashvalue:{{#var:PluginFileName}} |name |{{#var:PluginFileName}} }}
            }}
          ]]
        | {{#hashvalue: localisation |noimage |{{#hashvalue:defaultL |noimage}} }} <!-- no screenshot -->
      }}
  }}
}}
<!--
 
Filename
 
-->|- id="filename"
{{
  #if: {{#hashvalue:{{#var:PluginFileName}} |hideFileName}}
  |&#32;
  |{{
    RowColor|#ccccff;font-weight:bold|{{#hashvalue:localisation|filename |{{#hashvalue:defaultL |filename}} }}
    |{{ <!-- display filename -->
        #if: {{#hashvalue:{{#var:PluginFileName}} |filename}}
        | {{#hashvalue:{{#var:PluginFileName}} |filename}}
        | {{#var:PluginFileName}}
      }}.dll
  }}
}}
<!--
 
Author
 
-->{{
  #if: {{{author|}}}
  |{{
    RowColor|#ccccff;font-weight:bold|{{#hashvalue: localisation |plugin-author |{{#hashvalue:defaultL |plugin-author}} }}
    | {{Developer|{{{author|}}} }}
  }}
  |{{
    #if: {{#hashvalue:{{#var:PluginFileName}} |author}}
    |{{
        RowColor|#ccccff;font-weight:bold|{{#hashvalue: localisation |plugin-author |{{#hashvalue:defaultL |plugin-author}} }}
        | {{Developer|{{#hashvalue:{{#var:PluginFileName}} |author}} }}
      }}
    |
  }}
}}
<!--
 
Authors
 
-->{{
  #if: {{{authors|}}}
  |{{
    RowColor|#ccccff;font-weight:bold|{{#hashvalue: localisation |plugin-authors |{{#hashvalue:defaultL |plugin-authors}} }}
    | {{{authors|}}}
  }}
  |{{
    #if: {{#hashvalue:{{#var:PluginFileName}} |authors}}
    |{{
        RowColor|#ccccff;font-weight:bold|{{#hashvalue: localisation |plugin-authors |{{#hashvalue:defaultL |plugin-authors}} }}
        | {{#hashvalue:{{#var:PluginFileName}} |authors}}
      }}
    |
  }}
}}
<!--
 
Requirements
 
-->|-  style="vertical-align:top;" id="requirements"
{{
  #if: {{{requirements|}}}
  |{{
    RowColor|#ccccff;font-weight:bold|{{#hashvalue: localisation |systemreq |{{#hashvalue:defaultL |systemreq}}}}
    | {{{requirements|}}}
  }}
  |{{
    #if: {{#hashvalue:{{#var:PluginFileName}} |requirements}}
    |{{
        RowColor|#ccccff;font-weight:bold|{{#hashvalue: localisation |systemreq |{{#hashvalue:defaultL |systemreq}}}}
        | {{#hashvalue:{{#var:PluginFileName}} |requirements}}
      }}
    |
  }}
}}
<!--
 
Homepage
 
-->|- id="homepage"
{{
  #if: {{{homepage|}}}
  | {{!}} style="text-align:center;font-weight:bold;" colspan="2" {{!}}[{{{homepage|}}} {{#hashvalue: localisation |homepage |{{#hashvalue:defaultL |homepage}} }}]
  |{{
    #if: {{#hashvalue:{{#var:PluginFileName}} |homepage}}
    | {{!}}  style="text-align:center;font-weight:bold;" colspan="2" {{!}}[{{#hashvalue:{{#var:PluginFileName}} |homepage}} {{#hashvalue: localisation |homepage |{{#hashvalue:defaultL |homepage}} }}]
    |
  }}
}}
<!--
 
Download links
 
-->|- id="download"
! colspan="2" style="font-size:110%;background-color:#ccccff;" |{{
<!-- don't display download-title, if there is no links -->
  #if:{{
        #if: {{{hideDownloadLinks|}}}
        |{{
          #if: {{{additionalLinks|}}}
          | display title
          |{{
              #if: {{#hashvalue:{{#var:PluginFileName}} |additionalLinks}}
              | display title
              |
            }}
        }}
        |{{
          #if: {{#hashvalue:{{#var:PluginFileName}} |hideDownloadLinks}}
          |{{
              #if: {{{additionalLinks|}}}
              | display title
              |{{
                #if: {{#hashvalue:{{#var:PluginFileName}} |additionalLinks}}
                | display title
                |
              }}
            }}
          | display title
        }}
      }}
  | {{#hashvalue:localisation |download-title |{{#hashvalue:defaultL |download-title}}}}
  |&#32;
}}
{{
  #if:{{
        #if: {{{hideDownloadLinks|}}}
        | {{{hideDownloadLinks}}}
        |{{
          #if: {{#hashvalue:{{#var:PluginFileName}} |hideDownloadLinks}}
          | {{#hashvalue:{{#var:PluginFileName}} |hideDownloadLinks}}
          |
        }}
      }}
  |
  |
  <!-- stable -->
  {{
    #if: {{#hashvalue:{{#var:PluginFileName}} |hide-stable}}
    |
    |{{
      RowColor|#fff|{{#hashvalue: localisation |download-stable |{{#hashvalue:defaultL |download-stable}} }}:
      |{{ <!-- s-32-bit -->
          #if: {{#hashvalue:{{#var:PluginFileName}} |hide-s32}}
          |
          |{{ <!-- custom download link -->
            #if:  {{#hashvalue:{{#var:PluginFileName}} |link-s32}}
            | [{{#hashvalue:{{#var:PluginFileName}} |link-s32}} 32-bit],&#32;
            | [//miranda-ng.org/distr/stable/x32/Plugins/{{lc:{{#var:PluginFileName}}}}.zip 32-bit],&#32;
          }}
        }}{{ <!-- s-64-bit -->
          #if: {{#hashvalue:{{#var:PluginFileName}} |hide-s64}}
          |
          |{{ <!-- custom download link -->
            #if:  {{#hashvalue:{{#var:PluginFileName}} |link-s64}}
            | [{{#hashvalue:{{#var:PluginFileName}} |link-s64}} 64-bit]
            | [//miranda-ng.org/distr/stable/x64/Plugins/{{lc:{{#var:PluginFileName}}}}.zip 64-bit]
          }}
        }}
    }}
  }}
  <!-- latest -->
  {{
    #if: {{#hashvalue:{{#var:PluginFileName}} |hide-latest}}
    |
    |{{
      RowColor|#fff|{{#hashvalue: localisation |download-current |{{#hashvalue:defaultL |download-current}} }}:
      |{{ <!-- l-32-bit -->
          #if: {{#hashvalue:{{#var:PluginFileName}} |hide-l32}}
          |
          |{{ <!-- custom download link -->
            #if:  {{#hashvalue:{{#var:PluginFileName}} |link-l32}}
            | [{{#hashvalue:{{#var:PluginFileName}} |link-l32}} 32-bit],&#32;
            | [//miranda-ng.org/distr/x32/Plugins/{{lc:{{#var:PluginFileName}}}}.zip 32-bit],&#32;
          }}
        }}{{ <!-- l-64-bit -->
          #if: {{#hashvalue:{{#var:PluginFileName}} |hide-l64}}
          |
          |{{ <!-- custom download link -->
            #if:  {{#hashvalue:{{#var:PluginFileName}} |link-l64}}
            | [{{#hashvalue:{{#var:PluginFileName}} |link-l64}} 64-bit]
            | [//miranda-ng.org/distr/x64/Plugins/{{lc:{{#var:PluginFileName}}}}.zip 64-bit]
          }}
        }}
    }}
  }}
}}
<!--
 
Additional links
 
-->
<!-- check if any -->{{
  #if:{{
        #if: {{{additionalLinks|}}}
        | {{{additionalLinks}}}
        |{{
          #if: {{#hashvalue:{{#var:PluginFileName}} |additionalLinks}}
          | {{#hashvalue:{{#var:PluginFileName}} |additionalLinks}}
          |
        }}
      }}
  |{{
    RowColor|#fff|{{#hashvalue: localisation |links-other |{{#hashvalue:defaultL |links-other}} }}:
    |{{
        #if: {{#hashvalue:{{#var:PluginFileName}} |additionalLinks}}
        | {{#hashvalue:{{#var:PluginFileName}} |additionalLinks}},&#32;{{#if:{{{additionalLinks|}}} | {{{additionalLinks}}} |}}
        |{{
          #if: {{{additionalLinks|}}}
          | {{{additionalLinks}}}
          |
        }}
      }}
  }}
}}
|}<!--
 
--><!--
Load information about plugin's gropus
  -->{{PluginInfo/Groups|}}<!--
 
Categories
 
-->[[Category:Plugins{{#translation:}}]]
[[Category:All plugins pages]]
{{
  #if: {{{screenshot}}}
  |
  |{{#ifeq: {{#var:PageLang}} | en
    |{{#if: {{#hashvalue:{{#var:PluginFileName}} |screenshot}}
      |
      | [[Category:Todo:{{#hashvalue: localisation |cat-todo |{{#hashvalue:defaultL |cat-lang}} }}]]
    }}
    |
  }}
}}<nowiki/></includeonly><noinclude>
{{Documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
</noinclude>

Latest revision as of 23:39, 26 October 2022

Template documentation[view] [edit] [history] [purge]

Usage

name
No image
Filename PluginFileName.dll
Author author
Authors author_1, author_2
System
requirements
requirements
Homepage
Download links
Stable version: x32, x64
Current version: x32, x64
Other: additionalLink_1, additionalLink_2

See also