User:Goraf/PluginCard: Difference between revisions

From Miranda NG
Jump to navigation Jump to search
(now looking for "screenshotOpt" in the order locally -> globally -> default value, in any cases)
(+includeonly to not parse it // looking for error with mw.title.new(nill))
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<!-- info about needed changes for implementation
<includeonly><onlyinclude><!-- use #titleparts instead of MagicWords if pagetitle will change -->{{
 
1. copy
 
--><!-- use #titleparts instead of MagicWords if pagetitle will change -->{{
   #vardefine:PluginFileName | {{BASEPAGENAMEE}}
   #vardefine:PluginFileName | {{BASEPAGENAMEE}}
}}{{
}}{{
   #vardefine:PluginLang | {{SUBPAGENAME}}
   #if: {{#varexists:PluginLang}}
}}<!-- Load information about plugin
  | {{PageLang | {{#var:PluginLang}} }} <!-- from ResolveLang pages -->
  -->{{PluginInfo|}}<!--  
  | {{#vardefine:PluginLang | {{SUBPAGENAME}} }}{{PageLang | {{SUBPAGENAME}} }} <!-- remove the first one after transition to PageLang -->
Language localisation ...  
}}<!-- Language localisation ...  
   -->{{Localization/PluginCard|{{#var:PluginLang}} }}<!--  
   -->{{Localization/PluginCard|{{#var:PageLang}} }}<!--  
  and default values  
  and default values  
   -->{{Localization/PluginCard|}}<!--
   -->{{Localization/PluginCard|}}<!--
Load information about plugin
  -->{{PluginInfo|}}<!--
  Page title  
  Page title  
   -->{{DISPLAYTITLE: {{
   -->{{DISPLAYTITLE: {{
Line 19: Line 17:
       | {{#hashvalue:{{#var:PluginFileName}} |name |{{#var:PluginFileName}} }}
       | {{#hashvalue:{{#var:PluginFileName}} |name |{{#var:PluginFileName}} }}
       }}
       }}
     }}<!--   
     }}<!--
-->
  Check if Plugin:PluginName page exist if not display warning and add creation link
{| 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;"
-->{{#ifexist: Plugin:{{#var:PluginFileName}}
<!--
  |
  | {{Warning|Page <tt>Plugin:{{#var:PluginFileName}}</tt> doesn't exist. Please create it using the link below. Content will be generated automatically. You only need to save the changes.
}}<span class="plainlinks createlinks">[{{fullurl:Plugin:{{#var:PluginFileName}} | action=edit&preload=Template:PluginPage/preload&summary=Plugin:{{#var:PluginFileName}} }} '''Create page''']</span>{{clear}}<br/>
}}


Title
{{Infobox
| name          =
| child          = {{{child|}}}
| subbox        = {{{subbox|}}}
| bodystyle      =


-->
| titlestyle    =
| align="center" colspan=2 bgcolor="#ccccff" style="font-size:110%;" | '''''{{
| abovestyle    = background-color:#ccccff;
| subheaderstyle =  
| title          =
| above          = {{
   #if: {{{name|}}}
   #if: {{{name|}}}
   | {{{name}}}
   | {{{name}}}
   | {{#hashvalue:{{#var:PluginFileName}} |name |{{#var:PluginFileName}} }}
   | {{#hashvalue:{{#var:PluginFileName}} |name |{{#var:PluginFileName}} }}
}}'''''
<!--
Screenshot
-->{{
  #ifeq: {{
    #if: {{{screenshot|}}}
    | {{{screenshot}}}
    | {{#hashvalue:{{#var:PluginFileName}} |screenshot}}
  }} | ***
  |&#32;
  |{{!}}-
  {{!}} align="center" colspan="2" {{!}} <!--
      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 -->
      }}
  }}
}}
}}
<!--
| subheader      =


Filename
|  imagestyle  =
| captionstyle  =
|  image        =
| caption        =
|  image2      =
| caption2      =


  -->|-
| headerstyle    =
{{
| labelstyle    = background-color:#ccccff; text-align:right;
  #if: {{#hashvalue:{{#var:PluginFileName}} |hideFileName}}
|   datastyle   =
  |&#32;
  |{{
    RowColor|#ccccff|'''{{#hashvalue:localisation|filename |{{#hashvalue:defaultL |filename}} }}'''
    |{{ <!-- display filename -->
        #if: {{#hashvalue:{{#var:PluginFileName}} |filename}}
        | {{#hashvalue:{{#var:PluginFileName}} |filename}}
        | {{#var:PluginFileName}}
      }}.dll
   }}
}}
<!--


  Author
<!-- Filename -->
| header1 =
|  label1  = {{#hashvalue:localisation|filename |{{#hashvalue:defaultL |filename}} }}
|  data1  = {{#if: {{#hashvalue:{{#var:PluginFileName}} |filename}}
    | {{#hashvalue:{{#var:PluginFileName}} |filename}}
    | {{#var:PluginFileName}}
  }}.dll


-->{{
<!-- Author -->
  #if: {{{author|}}}
| header2  =
  |{{
| label2  = {{#hashvalue: localisation |plugin-author |{{#hashvalue:defaultL |plugin-author}} }}
    RowColor|#ccccff|'''{{#hashvalue: localisation |plugin-author |{{#hashvalue:defaultL |plugin-author}} }}'''
|   data2  = {{#if: {{{author|}}}
    | {{Developer|{{{author|}}} }}
    | {{Developer|{{{author|}}} }}
  }}
    | {{#if: {{#hashvalue:{{#var:PluginFileName}} |author}}
  |{{
      | {{Developer|{{#hashvalue:{{#var:PluginFileName}} |author}} }}
    #if: {{#hashvalue:{{#var:PluginFileName}} |author}}
      |k
    |{{
        RowColor|#ccccff|'''{{#hashvalue: localisation |plugin-author |{{#hashvalue:defaultL |plugin-author}} }}'''
        | {{Developer|{{#hashvalue:{{#var:PluginFileName}} |author}} }}
       }}
       }}
    |
  }}
  }}
}}
<!--


Authors
<!-- Authors -->
 
| header3  =
-->{{
| label3  = {{#hashvalue: localisation |plugin-authors |{{#hashvalue:defaultL |plugin-authors}} }}
  #if: {{{authors|}}}
|   data3  = {{#if: {{{authors|}}}
  |{{
    | {{Developer|{{{authors|}}} }}
    RowColor|#ccccff|'''{{#hashvalue: localisation |plugin-authors |{{#hashvalue:defaultL |plugin-authors}} }}'''
    | {{#if: {{#hashvalue:{{#var:PluginFileName}} |authors}}
    | {{{authors|}}}
      | {{Developer|{{#hashvalue:{{#var:PluginFileName}} |authors}} }}
  }}
      |k
  |{{
    #if: {{#hashvalue:{{#var:PluginFileName}} |authors}}
    |{{
        RowColor|#ccccff|'''{{#hashvalue: localisation |plugin-authors |{{#hashvalue:defaultL |plugin-authors}} }}'''
        | {{#hashvalue:{{#var:PluginFileName}} |authors}}
       }}
       }}
    |
  }}
  }}
}}
<!--


Requirements
<!-- Requirements -->
 
| header4  =  
-->|- valign="top"
| label4  = {{#hashvalue: localisation |systemreq |{{#hashvalue:defaultL |systemreq}}}}
{{
|   data4  = {{#if: {{{requirements|}}}
  #if: {{{requirements|}}}
    | {{Developer|{{{requirements|}}} }}
  |{{
    | {{#if: {{#hashvalue:{{#var:PluginFileName}} |requirements}}
    RowColor|#ccccff|'''{{#hashvalue: localisation |systemreq |{{#hashvalue:defaultL |systemreq}}}}'''
      | {{Developer|{{#hashvalue:{{#var:PluginFileName}} |requirements}} }}
    | {{{requirements|}}}
      |k
  }}
  |{{
    #if: {{#hashvalue:{{#var:PluginFileName}} |requirements}}
    |{{
        RowColor|#ccccff|'''{{#hashvalue: localisation |systemreq |{{#hashvalue:defaultL |systemreq}}}}'''
        | {{#hashvalue:{{#var:PluginFileName}} |requirements}}
       }}
       }}
    |
  }}
  }}
}}
<!--


Homepage
<!-- Homepage -->
 
| header5  =
-->|-
| label5  =
{{
|  data5  = {{#if: {{{homepage|}}}
  #if: {{{homepage|}}}
    | [{{{homepage|}}} {{#hashvalue: localisation |homepage |{{#hashvalue:defaultL |homepage}} }}]
  | {{!}} align="center" colspan="2" {{!}}[{{{homepage|}}} '''{{#hashvalue: localisation |homepage |{{#hashvalue:defaultL |homepage}} }}''']
    | {{#if: {{#hashvalue:{{#var:PluginFileName}} |homepage}}
  |{{
      | [{{#hashvalue:{{#var:PluginFileName}} |homepage}} {{#hashvalue: localisation |homepage |{{#hashvalue:defaultL |homepage}} }}]
    #if: {{#hashvalue:{{#var:PluginFileName}} |homepage}}
      |
    | {{!}} align="center" colspan="2" {{!}}[{{#hashvalue:{{#var:PluginFileName}} |homepage}} '''{{#hashvalue: localisation |homepage |{{#hashvalue:defaultL |homepage}} }}''']
    |
  }}
}}
<!--
 
Download links
 
-->|-
| align="center" colspan="2" bgcolor="#ccccff" style="font-size:110%;" |{{
<!-- 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 -->{{!}}-
  {{
    RowColor|#fff|{{#hashvalue: localisation |download-stable |{{#hashvalue:defaultL |download-stable}} }}:
    |{{ <!-- s-x32 -->
      #if: {{#hashvalue:{{#var:PluginFileName}} |hide-s32}}
      |
      | [http://miranda-ng.org/distr/stable/x32/Plugins/{{lc:{{#var:PluginFileName}}}}.zip x32],
    }}{{ <!-- s-x64 -->
      #if: {{#hashvalue:{{#var:PluginFileName}} |hide-s64}}
      |
      | [http://miranda-ng.org/distr/stable/x64/Plugins/{{lc:{{#var:PluginFileName}}}}.zip x64]
    }}
   }}
   }}
  <!-- latest -->{{!}}-
  {{
    RowColor|#fff|{{#hashvalue: localisation |download-current |{{#hashvalue:defaultL |download-current}} }}:
    |{{ <!-- l-x32 -->
      #if: {{#hashvalue:{{#var:PluginFileName}} |hide-l32}}
      |
      | [http://miranda-ng.org/distr/x32/Plugins/{{lc:{{#var:PluginFileName}}}}.zip x32],
    }}{{ <!-- l-x64 -->
      #if: {{#hashvalue:{{#var:PluginFileName}} |hide-l64}}
      |
      | [http://miranda-ng.org/distr/x64/Plugins/{{lc:{{#var:PluginFileName}}}}.zip x64]
    }}
  }}
}}
<!--


  Additional links
<!-- Download links -->
| header6  =
|  label6  =
|  data6 = {{Infobox | subbox = yes
    | headerstyle = font-size:110%; background-color:#ccccff;
    | labelstyle  = font-weight:normal; text-align:right; width:60%;
 
    | header1 = {{#hashvalue:localisation |download-title |{{#hashvalue:defaultL |download-title}}}}


-->{{!}}-
    <!-- stable -->
<!-- check if any -->{{
    | label2 = {{#hashvalue: localisation |download-stable |{{#hashvalue:defaultL |download-stable}} }}:
  #if:{{
    |   data2 = stable
        #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}},{{#if:{{{additionalLinks|}}} | {{{additionalLinks}}} |}}
        |{{
          #if: {{{additionalLinks|}}}
          | {{{additionalLinks}}}
          |
        }}
      }}
  }}
}}
|}<!--


--><includeonly>{{Languages}}
    <!-- development -->
[[Category:{{#hashvalue: localisation |cat-lang |{{#hashvalue:defaultL |cat-lang}} }}]]
    | label3 = {{#hashvalue: localisation |download-current |{{#hashvalue:defaultL |download-current}} }}:
[[Category:Plugins]]
    data3 = Data 3-3
{{
  #if: {{{screenshot}}}
  |
  | [[Category:Todo:{{#hashvalue: localisation |cat-todo |{{#hashvalue:defaultL |cat-lang}} }}]]
}}{{
  #ifeq: {{#var:PluginLang}} | en
  |{{
    #if: {{#hashvalue:{{#var:PluginFileName}} |screenshot}}
    |
    | [[Category:Todo:{{#hashvalue: localisation |cat-todo |{{#hashvalue:defaultL |cat-lang}} }}]]
  }}
   |
}}<nowiki/></includeonly><!--


--><noinclude>
    <!-- additional -->
    |  label4 = {{#hashvalue: localisation |links-other |{{#hashvalue:defaultL |links-other}} }}:
    |  data4 = Data 3-3
  }}


</noinclude>
| belowstyle    =
| below          =
}}</onlyinclude>
</includeonly>

Latest revision as of 16:31, 26 May 2018