Jump to content

Template:GuestbookWidget: Difference between revisions

From LovedForever
Restructure for "Stories" tab relocation: now placed directly on the PersonName/Stories page itself instead of the parent page, so no more ifexist/transclusion indirection is needed
Deploy Group A (Request 2): doc updated to reflect form now goes at the bottom of Stories pages
Line 1: Line 1:
<div class="guestbook-form-widget" data-guestbook-subpage="{{FULLPAGENAME}}"></div>
<div class="guestbook-form-widget" data-guestbook-subpage="{{FULLPAGENAME}}"></div>
<noinclude>
<noinclude>
Drop <code><nowiki>{{GuestbookWidget}}</nowiki></code> at the top of a memorial's own
Drop <code><nowiki>{{GuestbookWidget}}</nowiki></code> at the <strong>bottom</strong> of a
"PersonName/Stories" subpage -- not the main memorial page. It renders a native
memorial's own "PersonName/Stories" subpage, below any existing entries -- not the main
submission form (built by <code>MediaWiki:Common.js</code>) that posts new entries
memorial page. Visitors read the existing stories first, then find the form last. It
directly onto *this* page via the Action API (<code>action=edit</code>,
renders a native submission form (built by <code>MediaWiki:Common.js</code>) that posts
<code>appendtext</code>); they then appear below as <code>{{Memory|...}}</code>
new entries onto *this* page as <code>{{Memory|...}}</code> entries, inserted directly
entries, since the existing entries on the page are simply the rest of its
above this transclusion (not simply appended to the end of the page) so the form stays
wikitext -- there is no separate storage subpage any more.
pinned at the bottom as more entries are added -- since the existing entries on the page
are simply the rest of its wikitext, there is no separate storage subpage any more.


A "Stories" tab pointing at this subpage is added automatically to the parent
A "Stories" tab pointing at this subpage is added automatically to the parent
memorial page (see the <code>SkinTemplateNavigation::Universal</code> hook in
memorial page (see the <code>SkinTemplateNavigation::Universal</code> hook in
<code>LocalSettings.php</code>) for any page whose "/Stories" subpage
<code>LocalSettings.php</code>) for every main-namespace page, as a redlink until
transcludes this template -- so this page needs to exist and contain
its "/Stories" subpage actually exists.
<code><nowiki>{{GuestbookWidget}}</nowiki></code> before the tab will appear on
its parent.


Posting is open to anyone, logged in or not -- anonymous visitors can post
Posting is open to anyone, logged in or not -- anonymous visitors can post

Revision as of 02:30, 17 September 2026

Drop {{GuestbookWidget}} at the bottom of a memorial's own "PersonName/Stories" subpage, below any existing entries -- not the main memorial page. Visitors read the existing stories first, then find the form last. It renders a native submission form (built by MediaWiki:Common.js) that posts

new entries onto *this* page as

A Visitor



entries, inserted directly above this transclusion (not simply appended to the end of the page) so the form stays pinned at the bottom as more entries are added -- since the existing entries on the page are simply the rest of its wikitext, there is no separate storage subpage any more.

A "Stories" tab pointing at this subpage is added automatically to the parent memorial page (see the SkinTemplateNavigation::Universal hook in LocalSettings.php) for every main-namespace page, as a redlink until its "/Stories" subpage actually exists.

Posting is open to anyone, logged in or not -- anonymous visitors can post text, but the photo-upload button is disabled for them (MediaWiki's default permissions don't grant anonymous users the "upload" right).