Module:Check for unknown parameters and Main Page: Difference between pages

From Frontierpedia, the Microsoft Agent encyclopedia
(Difference between pages)
m (5 revisions imported)
 
frontierpediav5>WikiSysop
(fixed icon sizes so text doesn't mess up on smaller screens)
 
Line 1: Line 1:
-- This module may be used to compare the arguments passed to the parent
-- with a list of arguments, returning a specified result if an argument is
-- not on the list
local p = {}


local function trim(s)
<!--        BANNER ACROSS TOP OF PAGE        -->
return s:match('^%s*(.-)%s*$')
<div id="mp-topbanner" style="clear:both; position:relative; box-sizing:border-box; width:100%; margin:1.2em 0 6px; min-width:47em; border:1px solid #ddd; background-color:#f9f9f9; color:#000; white-space:nowrap;">
end
<!--        "WELCOME TO FRONTIERPEDIA" AND ARTICLE COUNT        -->
 
<div style="margin:0.4em; width:22em; text-align:center;">
local function isnotempty(s)
<div style="font-size:162%; padding:.1em;">Welcome to [[Frontierpedia]],</div>
return s and s:match('%S')
<div style="font-size:90%;">an encyclopedia centered around TMAFE and related communities.</div>
end
<div id="articlecount" style="font-size:85%;">There are currently {{NUMBEROFEDITS}} edits in {{NUMBEROFARTICLES}} articles done by {{NUMBEROFUSERS}} users. </div>
 
</div>
local function clean(text)
</div>
-- Return text cleaned for display and truncated if too long.
{{DISPLAYTITLE:<span style="opacity:0;position:absolute;">{{FULLPAGENAME}}</span>}}__NOTOC__ __NOEDITSECTION__
-- Strip markers are replaced with dummy text representing the original wikitext.
<div class="mp-row">
local pos, truncated
<div class="mp-box mp-purple">
local function truncate(text)
== Featured article ==
if truncated then
[[File:Microsoft_Agent_mash_screenshot_gif.png|frameless|right|150px]]'''[[Microsoft Agent]]''' was a technology developed by Microsoft that allows for users to interact with animated characters inside applications and web pages. It used text to speech engines to allow the animated characters to speak to the end user. These animated characters were called "Microsoft Agents". It came preinstalled with Windows beginning with Windows 98. Microsoft Agent continued to release alongside all Windows versions until Windows 7 in 2009, following Microsoft's discontinuation of Microsoft Agent. The latest release of Microsoft Agent was version 2.0 on October 12th, 1998.  
return ''
</div>
end
<div class="mp-box mp-purple">
if mw.ustring.len(text) > 25 then
== News ==
truncated = true
* June 17th, 2021 - Most legacy infobox templates now have a banner displayed above them stating they are legacy templates. These pages will be upgraded to the modern infobox variants over the next few days. Feel free to help port them over.
text = mw.ustring.sub(text, 1, 25) .. '...'
* June 12th, 2021 - The search feature inside the wiki has been improved and there is also an improved notification system.
end
* April 25th, 2021 - The search bar and search page are now no longer case sensitive. This means means searching something such as "a" can make it show pages with capital As instead of nothing at all. Support for math symbols and math formulas was also added to the wiki.
return mw.text.nowiki(text)
</div>
end
</div>
local parts = {}
<div class="mp-row">
for before, tag, remainder in text:gmatch('([^\127]*)\127[^\127]*%-(%l+)%-[^\127]*\127()') do
<div class="mp-box mp-purple">
pos = remainder
== Did you know... ==
table.insert(parts, truncate(before) .. '&lt;' .. tag .. '&gt;...&lt;/' .. tag .. '&gt;')
*... that [[Microsoft Agent]] is over 20 years old?
end
*... that [[Frontierpedia]] was originally proposed in 2019?
table.insert(parts, truncate(text:sub(pos or 1)))
*... that Windows Vista had a different TTS voice for Microsoft Agent?
return table.concat(parts)
*... that there are over 500 members inside of [[The Microsoft Agent Frontier Empire]]?
end
*... that despite popular belief, Microsoft Agent does not come bundled with Windows 95?
 
*... that Windows 7 was the first version of Windows to stop supporting Microsoft Agent?
function p._check(args, pargs)
*... that Frontierpedia replaced the TMAFE Wiki, which had replaced the Konnor88 Wiki?
if type(args) ~= "table" or type(pargs) ~= "table" then
*... that the current iteration of Frontierpedia was launched {{Time ago|March 28th, 2021|magnitude=days}}?
-- TODO: error handling
</div>
return
<div class="mp-box mp-purple">
end
== Recent Changes ==
 
{{Special:SimpleChanges/11}}
-- create the list of known args, regular expressions, and the return string
More information about these changes can be found at [[Special:RecentChanges]].
local knownargs = {}
</div>
local regexps = {}
<div class="mp-box mp-purple">
for k, v in pairs(args) do
== Help ==
if type(k) == 'number' then
* [[Help:List of Infobox Templates|List of infobox templates]]
v = trim(v)
* [[Help:Adding Missing Images|Adding missing images]]
knownargs[v] = 1
* [[Help:Export Pages from TMAFE Wiki and Import to Frontierpedia|Export pages from TMAFE Wiki and import to Frontierpedia]]
elseif k:find('^regexp[1-9][0-9]*$') then
* [[Help:Adding Categories to a Page|Adding categories to a page]]
table.insert(regexps, '^' .. v .. '$')
* [[Help:Create a page|Creating a page]]
end
* [[Help:Dealing with errors|Dealing with errors]]
end
* [[Frontierpedia:Manual of Style|The basics of editing]]
 
* [[Frontierpedia:Staff list|List of staff]]
-- loop over the parent args, and make sure they are on the list
* [[Help:Customization|Customizing a user page, avatar, or theme]]
local ignoreblank = isnotempty(args['ignoreblank'])
<br><br>
local showblankpos = isnotempty(args['showblankpositional'])
More help can be found at the Help category in the sidebar.
local values = {}
</div>
for k, v in pairs(pargs) do
</div>
if type(k) == 'string' and knownargs[k] == nil then
<div class="mp-row">
local knownflag = false
<div class="mp-box mp-purple">
for _, regexp in ipairs(regexps) do
== Rules ==
if mw.ustring.match(k, regexp) then
# All of TMAFE's server rules apply here. These rules can be found in the #server-rules channel on TMAFE's Discord.
knownflag = true
# Spam articles are not allowed and will be quickly deleted.
break
# The [[Frontierpedia:Manual of Style|MOS]] must be followed.
end
# Obey all other rules of TMAFE such as the license agreement.
end
# Vandalizing of pages is strictly prohibited.
if not knownflag and ( not ignoreblank or isnotempty(v) )  then
# Organizing raids on this wiki is prohibited.
table.insert(values, clean(k))
# Revealing information that a user wishes to keep private will result in permanent block.
end
# Doing or promoting illegal activity is strictly prohibited.
elseif type(k) == 'number' and
# Inserting false/misleading information is prohibited.
knownargs[tostring(k)] == nil and
# Identity politics and discussion of them are prohibited as the state of Georgia doesn't recognize most topics regarding identity politics. This includes topics such as gender.
( showblankpos or isnotempty(v) )
# Enjoy your time at Frontierpedia!
then
</div>
table.insert(values, k .. ' = ' .. clean(v))
</div>
end
<div class="mp-row">
end
<div class="mp-box mp-purple">
 
== Other parts of TMAFE ==
-- add results to the output tables
<gallery widths=76px heights=76px >
local res = {}
File:Tmafesitelogo.png|link=TMAFE Website|<center>[https://tmafe.com TMAFE.COM]</center>
if #values > 0 then
File:FrontierpediaLogo.png|link=Frontierpedia|<center>[https://frontierpedia.tmafe.com/wiki/Main_Page Frontierpedia]</center>
local unknown_text = args['unknown'] or 'Found _VALUE_, '
File:Youtube_social_icon_red.png|<center>[https://www.youtube.com/channel/UC81WkhGIiH46gPuCS7r1u1Q YouTube]</center>
 
File:2021 Twitter logo - blue.png|<center>[https://twitter.com/TMAFE_Official Twitter]</center>
if mw.getCurrentFrame():preprocess( "{{REVISIONID}}" ) == "" then
File:Discord-Logo-Color.png|<center>[https://discord.gg/yh2zmWr Discord]</center>
local preview_text = args['preview']
</gallery>
if isnotempty(preview_text) then
</div>
preview_text = require('Module:If preview')._warning({preview_text})
</div>
elseif preview == nil then
preview_text = unknown_text
end
unknown_text = preview_text
end
for _, v in pairs(values) do
-- Fix odd bug for | = which gets stripped to the empty string and
-- breaks category links
if v == '' then v = ' ' end
 
-- avoid error with v = 'example%2' ("invalid capture index")
local r = unknown_text:gsub('_VALUE_', {_VALUE_ = v})
table.insert(res, r)
end
end
 
return table.concat(res)
end
 
function p.check(frame)
local args = frame.args
local pargs = frame:getParent().args
return p._check(args, pargs)
end
 
return p

Revision as of 01:39, 26 June 2021

Welcome to Frontierpedia,
an encyclopedia centered around TMAFE and related communities.
There are currently 7,074 edits in 34 articles done by 112 users.

Featured article

Microsoft Agent was a technology developed by Microsoft that allows for users to interact with animated characters inside applications and web pages. It used text to speech engines to allow the animated characters to speak to the end user. These animated characters were called "Microsoft Agents". It came preinstalled with Windows beginning with Windows 98. Microsoft Agent continued to release alongside all Windows versions until Windows 7 in 2009, following Microsoft's discontinuation of Microsoft Agent. The latest release of Microsoft Agent was version 2.0 on October 12th, 1998.

News

  • June 17th, 2021 - Most legacy infobox templates now have a banner displayed above them stating they are legacy templates. These pages will be upgraded to the modern infobox variants over the next few days. Feel free to help port them over.
  • June 12th, 2021 - The search feature inside the wiki has been improved and there is also an improved notification system.
  • April 25th, 2021 - The search bar and search page are now no longer case sensitive. This means means searching something such as "a" can make it show pages with capital As instead of nothing at all. Support for math symbols and math formulas was also added to the wiki.

Did you know...

  • ... that Microsoft Agent is over 20 years old?
  • ... that Frontierpedia was originally proposed in 2019?
  • ... that Windows Vista had a different TTS voice for Microsoft Agent?
  • ... that there are over 500 members inside of The Microsoft Agent Frontier Empire?
  • ... that despite popular belief, Microsoft Agent does not come bundled with Windows 95?
  • ... that Windows 7 was the first version of Windows to stop supporting Microsoft Agent?
  • ... that Frontierpedia replaced the TMAFE Wiki, which had replaced the Konnor88 Wiki?
  • ... that the current iteration of Frontierpedia was launched 1125 days ago?

Recent Changes

More information about these changes can be found at Special:RecentChanges.

Rules

  1. All of TMAFE's server rules apply here. These rules can be found in the #server-rules channel on TMAFE's Discord.
  2. Spam articles are not allowed and will be quickly deleted.
  3. The MOS must be followed.
  4. Obey all other rules of TMAFE such as the license agreement.
  5. Vandalizing of pages is strictly prohibited.
  6. Organizing raids on this wiki is prohibited.
  7. Revealing information that a user wishes to keep private will result in permanent block.
  8. Doing or promoting illegal activity is strictly prohibited.
  9. Inserting false/misleading information is prohibited.
  10. Identity politics and discussion of them are prohibited as the state of Georgia doesn't recognize most topics regarding identity politics. This includes topics such as gender.
  11. Enjoy your time at Frontierpedia!