Topic on Project:Support desk

MagicWord for Revision Comment...

3
203.25.230.238 (talkcontribs)

As part of our documentation process we need to have visibility of a few key facts about a document/article...

Specifically much of the data contained on an articles History page, who did the last edit (i.e. {{REVISIONUSER}} ) when they did the last edit {{REVISIONTIMESTAMP}} etc...

We would like to include this on the same page as the article, so users (and auditors) can easily see who made the most recent edit (and we can print an article to PDF and provide it as an offline version with version control included)

I've got the template working pretty well, however I'd like to add in the comments from the most recent revision i.e. if I save/edit an article and save comments with "Minor: Added Info on X" I'd like to reference that on the page somehow, however it seems {{REVISIONCOMMENTS}} or something similar doesn't exist... is there an easy way to do this or will I have to dive into the API and manually create this?

Cheers,

Karl.Fitz

203.25.230.238 (talkcontribs)
 {| class="wikitable" style="float:right; margin-left: 20px;"
 |+ Document - Version History
 ! 
 ! Value
 |- 
 ! Date
 | <includeonly>{{#time: Y-m-d | {{REVISIONTIMESTAMP}} }}</includeonly>
 |-
 ! Version
 | <includeonly>{{REVISIONID}}</includeonly>
 |-
 ! Name & Position
 | <includeonly>[[User:{{REVISIONUSER}}]]</includeonly>
 |-
 ! Review Notes
 | {{{LastRevNotes}}}
 |-
 ! History
 | <includeonly>[{{SERVER}}{{localurl:{{FULLPAGENAMEE}}|action=history}} History]</includeonly>
 |-
 ! Discussion
 | <includeonly>[[{{TALKSPACE}}:{{PAGENAMEE}}| Talk]]</includeonly>
 |}

I'd like to dynamically generate the Last Revision Notes if possible.

Osnard (talkcontribs)

I believe this can only be done by writing an extension. It shouldn't be to hard to implement a new wikitext variable {{REVISIONCOMMENTS}}, that just fetches the comment of the current revision.

Have a look at Manual:Variable. You will just have to look the up the data in the DB table/field 'revision'.'rev_comment'.

Consider publishing your work on mediawiki.org.

If you can't do it yourself, maybe we could find a volunteer.