Last modified: 2014-04-10 12:23:16 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T65740, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 63740 - Provide easy, backend way for extensions to show PostEdit notifications with custom content
Provide easy, backend way for extensions to show PostEdit notifications with ...
Status: NEW
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-04-09 18:57 UTC by adamr_carter
Modified: 2014-04-10 12:23 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description adamr_carter 2014-04-09 18:57:17 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.
Comment 1 Andre Klapper 2014-04-09 20:22:48 UTC
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?
Comment 2 adamr_carter 2014-04-09 20:33:54 UTC
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 :) )

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links