Last modified: 2014-04-10 12:23:16 UTC
I've recently been working on an extension, and it would be nice for it to show a PostEdit success box when it successfully completes an operation. However, doing this at the moment would mean loading a Javascript file, the PHP setting a JS config var for whether to display the PostEdit box or not, JS checking this variable, JS getting a message for the text to display, etc. What would really be useful would be a way, just in PHP, for extensions to specify that a PostEdit box should be shown, with the text to display. The code would then ensure that JS to show the box is loaded on the page (which would possibly also save resources over the above method). I am not entirely sure how this would be best implemented, but possibly something like wfShowPostEdit( $text ), that could be easily called in an extension's code. Something like this would make it many more times easier for extensions to show PostEdit boxes.
MediaWiki 1.21 provides a wgPostEdit variable (bug 43270) depending on mediawiki.action.view.postEdit. Per bug 48276, the VisualEditor extension depends on it, but looks like you'd like to define your own strings to display here?
Yeah, it would be nice extensions to be able to show their own messages, depending on their function. (Sorry about the categorisation stuff, still pretty unexperienced here :) )