Topic on Help talk:Extension:ParserFunctions

Helpful magic words needed

3
Sarang (talkcontribs)

The commons tempkate "Information" and all its derivates need parameter values for <code>date</code> and <code>author</code>.

Parser functions or magic words to generate these values wuld be very helpful.

Currently some users take "<code><nowiki>~~~~~</nowiki></code>" as a workaround for the date; but this needs correction because a date consist of year-month-day and is not a timestamp which has also the time of the day.

For the author a valid user name is needed, and not a signature as created by <code><nowiki>~~~</nowiki></code>; nevertheless some users take it as a workaround, because no better possibility exists. But it makes more troubles and needs cleanup, because an author can be a wikipdia user but not his talk page.  

Impressive names for these functions may be e.g. ~date and ~user, or ~~~d and ~~~u.

~~~~

Dinoguy1000 (talkcontribs)

Date can be inserted via some variant of {{ subst:#time: F j, Y | now }}, which can be included in whatever default skeletons are provided for copy-pasting to quickly fill out on pages. Username is a slightly more interesting case, assuming the syntax automatically substitutes when the page is saved, as ~~~~ et al do, but this is the wrong place to request such an addition; you'll need to file a feature request on Phabricator.

Tacsipacsi (talkcontribs)

For the username, one can use {{subst:REVISIONUSER}} (although I don’t think ~~~ is wrong; different users write their names differently). For the date, it should be {{subst:#time:Y-m-d}} (ISO 8601 format) so that it can be formatted in the user’s interface language. (The |now part is unnecessary, as “now” is the default anyway if nothing else is specified.)

Reply to "Helpful magic words needed"