Template:UI/global community
"Join a growing global community" main-page section. Two-column layout: stats + action buttons on the left, world map of community members on the right. Stacks single-column on narrow viewports.
Renders, top to bottom:
- Section heading —
<h2>"Join a growing global
community" by default. Set heading= to override, or pass
an empty string to suppress.
- Two-column grid
- Side column (left)
- Stats row — three plain icon+number+label units (no card
- Side column (left)
chrome, no links) in a 3-column grid. Each button below aligns directly under the stat in the same grid column.
- Members (
usersicon) —
- Members (
13. Counts all registered wiki
accounts (the magic-word total, not just members with a
Community-member profile page).
- Discussions (
message-squareicon) —
- Discussions (
#askcount of forum posts under the public root forum, scoped via. Same subtree-scoping idiom as Template:UI/recent_discussions_feed — keeps private workshop-forum posts out of the public count.
- Publications (
bookicon) —#ask
- Publications (
count of pages inCategory:Publication. The Publication category is expected to be synced in from a sister wiki; the query carriesdefault=0so the stat renders0until that lands.
- Button bar — three columns aligned with the stats above:
column 1 is login-state-conditional (Create an account for anons, Your community profile for logged-in users), column 2 is Join the discussion, column 3 is Explore publications (links to the wiki's curated Publications page so visitors can land on the same content the stat is counting).
- Subscribe footer — a small "Stay in the loop — Subscribe
to our mailing list →" caption rendered beneath the button bar
when subscribe_url= is set, hidden otherwise. Demoted
from a primary button because subscribing is a recurring CTA
rather than a one-shot conversion: the visual weight competes with
the membership and discussion buttons, but losing the affordance
entirely cuts a working channel for staying in touch.
- Map (right) —
format=mapover
- Map (right) —
The following coordinate was not recognized: +..
Sits at its natural height so the empty-state doesn't stretch to
fill the side column.
Map params: kept deliberately minimal
The first cut of this template carried mainlabel=-,
service=leaflet, width=100%, and
markercluster=on. On the deployed wiki the map then
silently fell through to default= ("No community members
on the map yet.") even though the same selector worked in
format=table. Stripped back to just
?Has geographic location + format=map +
height + zoom, which matches a known-working
Special:Ask test on miniscope.org. Add params back deliberately if
needed (in a separate change, so it's clear which one breaks if it
breaks again).
Map privacy posture
Popups currently show the linked page title (the member's User:
page) because we dropped mainlabel=- to get the map
rendering at all. On a permission-restricted wiki like miniscope.org,
anon clicks on those links hit a login wall, so the link target stays
private — but the popup title (the username) is visible.
If you need stricter privacy (visible dots, no name in the popup),
the right move is a template= override that renders
generic marker content. Out of scope for this template until we
verify the basic map render is stable.
Anon vs logged-in button gating
Same idiom as Template:UI/hero and the workshop status block:
buttons wrapped in <span class="hero-btn-anon"> only
show for anonymous viewers; those in
<span class="hero-btn-user"> only for logged-in
viewers. Relies on Tweeki's body.tweeki-user-anon body
class and the visibility CSS that lives in MediaWiki:Common.css
(documented as a hard dep by UI/hero).
Discussions and Explore-publications buttons are unguarded and appear regardless of login state. The CTA progression reads:
- anon: Create an account (primary) → Join the discussion →
Explore publications
- logged-in: Your community profile (primary) → Join the
discussion → Explore publications
The mailing-list subscribe link sits below the button row as a small caption (see "Subscribe footer" above), unguarded by login state.
Why Special:MyPage for "Your community profile"
The button form-edits the current user's User:<username>
page using the Community-member Page Form. The link target is:
Special:MyPage?action=formedit&form=Community+member
Built via
https://miniscope.org/index.php?title=Special:MyPage&action=formedit&form=%E2%80%A6.
The wrap is required: fullurl
appends the query string verbatim, so a form name with a space
("Community member") would otherwise terminate the URL at the first
space when MediaWiki parses
[external_url label] syntax — the part after the space
leaks into the visible label.
How this resolves at click time:
- Browser hits
/wiki/Special:MyPage?action=formedit&form=Community+member - Special:MyPage serves a 302 redirect to the viewer's
User:<username>page, preserving the query string (a deliberate MW feature, also used bySpecial:MyTalk).
- The User: page is loaded with
action=formedit, which
Page Forms intercepts and renders as a form-edit UI.
&form=Community membertells Page Forms to use that
specific form (rather than autodetecting from category).
This avoids the $CURRENTUSER$ dead-end: MediaWiki has no
parse-time magic word for "the current viewer's username" — by
design, since parser output is cached and shared across viewers.
Special:MyPage is the MW-canonical way to express "this
viewer's user page" in a static link.
Params (all optional)
heading— section heading (default: "Join a growing
global community"). Empty string suppresses the <h2>.
discussion_root— full title of the public forum
subtree root (default:Forum:Home). Used both as the count'sHas parent forumfilter and as the "Join the discussion" link target.
publication_category— bare category name, no
Category:prefix (default:Publication).
signup_page— destination for anon "Create an account"
button (default:Special:RequestAccount; override toSpecial:CreateAccounton wikis without ConfirmAccount).
profile_page— destination for the logged-in profile
button (default: Special:MyPage; see the section above
for the redirect mechanics).
profile_form— Page Forms form name to use for the
profile-edit URL (default:Community member). When set, the button links to{profile_page}?action=formedit&form={profile_form}; pass an empty value to fall back to a plain page link.
publications_page— destination for the Explore-
publications button (default:Publications). Set this to whatever page on the host wiki renders theUI/publications_libraryview.
subscribe_url— external mailing-list signup URL. When
empty, the subscribe footer link is hidden.
subscribe_prefix— short caption preceding the
subscribe link (default: Stay in the loop —). Pass an
empty value to suppress the lead-in.
signup_label/profile_label/
discussion_label/explore_label/subscribe_label— button / link labels. The subscribe label defaults toSubscribe to our mailing list.
members_label/discussions_label/
publications_label— stat-label overrides (defaults: "Members", "Discussions", "Publications"). Stay generic by default so the template can serve any wiki; per-wiki specifics (e.g.publications_label=Publications using Miniscopesfor miniscope.org) belong in the Main Page invocation.
map_height— CSS height for the map container
(default: 360px).
map_zoom— initial Leaflet zoom level
(default: 1, world view).
Cross-template dependencies
- Template:UI/icon — one per stat (
users,
message-square,book).
- Template:UI/button — every action button.
- Map rendering: relies on the Maps extension being installed with the
Leaflet service available (true on miniscope.org per thehas_input_type=leafletsetting onHas geographic location).