[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Conversion edge cases



On Sun, 2025-07-27 at 21:01 +0100, Andrew Sayers wrote:
[...]
> == #acl ===
> 
> The following pages use access control lists -
> how will they be handled in the new wiki?
[...]

https://www.mediawiki.org/wiki/Help:Protected_pages

> == #format ==
> 
> Some pages use "#FORMAT" / "#format" to indicate the parser the page should use.
> "wiki" is widely used (and does nothing), the rest are only used on these pages:
[...]

At least for plain text, everything can be wrapped in a <nowiki> tag to
prevent parsing, or a code block.

> == #language ==
[...]

I think the Translate extension handles language stuff automatically
from the page path, so language doesn't need to be declared on each
page.

> == #pragma ==
> 
> "#pragma description" is widely used.

If it's necessary, extensions for setting description meta include:
https://www.mediawiki.org/wiki/Extension:WikiSEO
https://www.mediawiki.org/wiki/Extension:Description2
https://www.mediawiki.org/wiki/Extension:PageProperties
https://www.mediawiki.org/wiki/Extension:MetaMaster

> "#pragma hide-title true" is used on FrontPage and its localisations,
> plus the following pages:
[...]
> ... I'm not sure it does anything though?

Looks like it was removed in a MoinMoin update?
MW equivalent is https://www.mediawiki.org/wiki/Extension:NoTitle

> "#pragma keywords" is widely used.
> 
> "#pragma section-numbers 0" and "pragma section-numbers off" are used
> on several pages, but don't seem to do anything.  For example, see
> BOINC/ServerGuide (`#pragma section-numbers 0`) and ApacheCassandra
> (`#pragma section-numbers off`).  Both pages have numbered tables
> of contents.
> 
> Some pages have "#pragma section-numbers 2" or even "... 3", but again
> these don't seem to do anything.

These are for determining what gets included in TOC and for numbering
section headings. For example, see
https://wiki.debian.org/MaythamAlsudany/SectionNumbers1 vs.
https://wiki.debian.org/MaythamAlsudany/SectionNumbers2

> == #refresh ==
> 
> This seems to be disabled on the current wiki, and a quick search doesn't show
> a MediaWiki alternative.  I guess convert these to comments?

This is pretty much an alias to redirect. The first integer argument is
the delay in seconds.

> == AbandonedPages, AdvancedSearch ==
> 
> I don't see any evidence of these being used on the site.

These are system pages AFAICT. MW should have Special: pages to cover
these.

> == <<Anchor>> ==
[...]
https://www.mediawiki.org/wiki/Help:Links#Anchors
https://www.mediawiki.org/wiki/Template:Anchor

> == <<AttachList>> ==
[...]

Wouldn't be relevant since files in MW aren't namespaced under pages,
but rather all go into the File: namespace.

> == <<BR>> ==
[...]

MW equivalent is HTML <br> tag.

> == <<Date>> ==
> 
> Used on several pages, always with a datetime argument of the form
> YYYY-MM-DDTHH:MM:SSZ.

I'm guessing MW equivalent is
https://www.mediawiki.org/wiki/Help:Magic_words#dateformat

> == <<DateTime>> ==
> 
> The following pages use DateTime without an argument, causing the pages
> to be re-rendered on every refresh:

I don't see how that would be useful, other than maybe a dynamic link?
MW equivalent would be a template with {{CURRENTYEAR}}-{{CURRENTMONTH}}-
{{CURRENTDAY2}}
https://www.mediawiki.org/wiki/Template:CURRENTDATE

> Apart from that, this is used on several pages, always with a datetime argument
> of the form YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS+TTTT.

I guess this is the MW equivalent, though I don't know how useful this
would be:
https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions#time

> == <<DebianCodename>>, <<DebianCodenameLink>>, <<DebianDate>>, <<DebianVersion>> ==

MW equivalent is templates.

> == <<FootNote>> ==

MW equivalent is <ref> from the Cite extension.

[...]
> == <<Include>> ==
> 
> Widely used, often with "from" and "to" arguments.  Several pages use other
> arguments, for example DebianDay/2015 has a 
> <<Include(^DebianDay/2015/.*$,,to=\"\\[?\\[?Category\",sort=ascending, editlink)>>

For listing subpages, MW can use Special:PrefixIndex:
e.g. {{Special:PrefixIndex/MyParentPage}}
https://www.mediawiki.org/wiki/Help:All_pages_with_prefix

For more advanced use cases or including content:
https://www.mediawiki.org/wiki/Extension:DynamicPageList3
For example, I used this locally for listing team pages on the Teams
page and including the first paragraph from those pages as the short
description that follows. See attached screenshots if that helps
understand what I just said.

> == <<MailTo>> ==
> 
> Widely used, seems to show the mangled text to logged-out users and a nice
> e-mail address when logged in.  See e.g. KevinCoyner.

Could be implemented with a template that checks if
{{currentloggeduser}} variable is populated and shows different content,
though this only helps if spammers don't look at the raw page content.
https://www.mediawiki.org/wiki/Extension:MyVariables#:~:text={{currentuserrealname}}

> == <<MessageId>> // <MID>> ==

MW equivalent is a template.

> == <<MonthCalendar>> ==

I was already looking into this for FreedomBox/ProgressCalls.
There's a list at https://www.mediawiki.org/wiki/Calendars

- https://www.mediawiki.org/wiki/Extension:SimpleCalendar
Either shows one month or one year. Not interactive, just a table of
dates and links to subpages with those dates. To show current month, you
need to use the {{CURRENTMONTH}} variable in the month parameter.

- Cargo's calendar display
- https://www.mediawiki.org/wiki/Extension:JsCalendar
These two both rely on JS, but seem to be more useful since they're
interactive and can list events. I haven't had a thorough look though.

> == <<Navigation>> ==
[...]

Seems like it could be a template at a glance.

> == <<NewPage>> ==
[...]

https://www.mediawiki.org/wiki/Extension:PageTemplates
https://www.mediawiki.org/wiki/Extension:Page_Forms

[...]
> = Interwiki links =

As previously discussed, these can be implemented as MW Interwiki links
as well as templates.

--
Maytham

Attachment: Image-MMZ592.png
Description: PNG image

Attachment: Image-OQ7392.png
Description: PNG image

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: