BIKI Helper – Extension
Jump to navigation
Jump to search
Lou Montana (talk | contribs) (Page creation) |
Lou Montana (talk | contribs) (Add new function doc) |
||
Line 14: | Line 14: | ||
| | | | ||
* 2022-07-12: 1.00, first upload | * 2022-07-12: 1.00, first upload | ||
* 2023-06-21: 1.05, add date functions | |||
|- | |- | ||
! Version | ! Version | ||
| 1. | | 1.05 | ||
|} | |} | ||
This extension provides useful tools here and there on the BIKI. | This extension provides useful tools here and there on the BIKI. | ||
Line 27: | Line 28: | ||
*** Infoboxes ({{Template|Feature}} informative/important/warning, {{Template|Wiki}} TODO) | *** Infoboxes ({{Template|Feature}} informative/important/warning, {{Template|Wiki}} TODO) | ||
*** Game icons ({{Template|GVI}} for most games) | *** Game icons ({{Template|GVI}} for most games) | ||
* {{hl|<syntaxhighlight lang="html+handlebars" inline>{{#biki-date}}</syntaxhighlight>}} wiki function | |||
=== biki-date Function Syntax === | |||
{| class="wikitable float-right" style="font-size: .9em" | |||
| <syntaxhighlight lang="html+handlebars"> | |||
{{#biki-date}} | |||
{{#biki-date:}} | |||
{{#biki-date:age_full_months}} | |||
{{#biki-date:age_full_months|2001-06-22}} | |||
</syntaxhighlight> | |||
| | |||
{{#biki-date}}<br> | |||
{{#biki-date:}}<br> | |||
{{#biki-date:age_full_months}}<br> | |||
{{#biki-date:age_full_months|2001-06-22}}<br> | |||
|- | |||
| <syntaxhighlight lang="html+handlebars"> | |||
{{#biki-date:age_full_days|2001-06-22|2005-06-21}} | |||
{{#biki-date:age_full_days|2001-06-22|2005-06-22}} | |||
{{#biki-date:age_full_days|2001-06-22|2005-06-23}} | |||
</syntaxhighlight> | |||
| | |||
{{#biki-date:age_full_days|2001-06-22|2005-06-21}}<br> | |||
{{#biki-date:age_full_days|2001-06-22|2005-06-22}}<br> | |||
{{#biki-date:age_full_days|2001-06-22|2005-06-23}}<br> | |||
|- | |||
| <syntaxhighlight lang="html+handlebars"> | |||
{{#biki-date:age_full_months|2001-06-22|2005-06-21}} | |||
{{#biki-date:age_full_months|2001-06-22|2005-06-22}} | |||
{{#biki-date:age_full_months|2001-06-22|2005-06-23}} | |||
</syntaxhighlight> | |||
| | |||
{{#biki-date:age_full_months|2001-06-22|2005-06-21}}<br> | |||
{{#biki-date:age_full_months|2001-06-22|2005-06-22}}<br> | |||
{{#biki-date:age_full_months|2001-06-22|2005-06-23}}<br> | |||
|- | |||
| <syntaxhighlight lang="html+handlebars"> | |||
{{#biki-date:age_full_years|2001-06-22|2004-06-22}} | |||
{{#biki-date:age_full_years|2001-06-22|2005-06-21}} | |||
{{#biki-date:age_full_years|2001-06-22|2005-06-22}} | |||
{{#biki-date:age_full_years|2001-06-22|2005-06-23}} | |||
{{#biki-date:age_full_years|2001-06-22|2006-06-22}} | |||
</syntaxhighlight> | |||
| | |||
{{#biki-date:age_full_years|2001-06-22|2004-06-22}}<br> | |||
{{#biki-date:age_full_years|2001-06-22|2005-06-21}}<br> | |||
{{#biki-date:age_full_years|2001-06-22|2005-06-22}}<br> | |||
{{#biki-date:age_full_years|2001-06-22|2005-06-23}}<br> | |||
{{#biki-date:age_full_years|2001-06-22|2006-06-22}}<br> | |||
|- | |||
| <syntaxhighlight lang="html+handlebars"> | |||
{{#biki-date:ymd|2001-06-22|2005-06-21}} | |||
{{#biki-date:ymd|2001-06-22|2005-06-22}} | |||
{{#biki-date:ymd|2001-06-22|2005-06-23}} | |||
{{#biki-date:his|2001-06-22 10:30:00|2001-06-23 11:45:17}} | |||
{{#biki-date:ymdhis|2001-06-22 10:30:00|2002-05-23 11:45:17}} | |||
</syntaxhighlight> | |||
| | |||
{{#biki-date:ymd|2001-06-22|2005-06-21}}<br> | |||
{{#biki-date:ymd|2001-06-22|2005-06-22}}<br> | |||
{{#biki-date:ymd|2001-06-22|2005-06-23}}<br> | |||
{{#biki-date:his|2001-06-22 10:30:00|2001-06-23 11:45:17}}<br> | |||
: {{#biki-date:ymd|2001-06-22 10:30:00|2002-05-23 11:45:17}},<!-- I cheated for the formatting cause --><br>{{#biki-date:his|2001-06-22 10:30:00|2002-05-23 11:45:17}}<br> | |||
|} | |||
<syntaxhighlight lang="html+handlebars">{{#biki-date:format|date1|date2}}</syntaxhighlight> | |||
* format: can be one of | |||
** {{hl|age_full_days}}, {{hl|age_full_months}}, {{hl|age_full_years}} | |||
** {{hl|ymd}} (year month day), {{hl|his}} (hour minute second) or {{hl|ymdhis}} | |||
* date1: from what date to start - ideally format yyyy-mm-dd or yyyymmdd (hh:ii:ss or hhiiss) | |||
* date2: <!--(Optional, default now) --> up to what date to calculate - same as ''date1'' | |||
Revision as of 00:50, 21 June 2023
BIKI Helper | |
---|---|
Description | Provides useful tools here and there on the BIKI. |
Author | Lou Montana |
Project Start | 2022-07-12: Project start |
Release Date |
|
Version | 1.05 |
This extension provides useful tools here and there on the BIKI.
Features
- Wiki Editor Toolbar shortcuts:
- Advanced
- Code tags (SQF Syntax, SQS Syntax, config (C++), Enforce Script (C#), JSON)
- Infoboxes ({{Feature}} informative/important/warning, {{Wiki}} TODO)
- Game icons ({{GVI}} for most games)
- Advanced
{{#biki-date}}
wiki function
biki-date Function Syntax
{{#biki-date}} | |
1460 | |
47 | |
3 | |
3 year(s), 11 month(s), 29 day(s)
|
- format: can be one of
- age_full_days, age_full_months, age_full_years
- ymd (year month day), his (hour minute second) or ymdhis
- date1: from what date to start - ideally format yyyy-mm-dd or yyyymmdd (hh:ii:ss or hhiiss)
- date2: up to what date to calculate - same as date1
Installation
- Unzip the directory to wiki
/extensions /BIKIHelper - Add
wfLoadExtension( 'BIKIHelper' );
to LocalSettings.php