Forums: Index → Support Requests → Adding personal buttons via personal css/js
Fandom's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.
To contact staff directly or to report bugs, please use Special:Contact.
At the moment I'm working with a few editing tools/buttons on my wiki (this is the js for them - http://doctor-who-collectors.wikia.com/wiki/MediaWiki:EditBar.js). I would like some help in adding another button, to publish pages. I need it to show only on pages that are being edited, and for it to go to "...?action=submit" rather than "...?action=edit". Can anyone help? Thanks. Tardis1963 talk 11:29, November 20, 2011 (UTC)
- You can't simply go to
?action=submit
from an edit page and have it save - the normal edit button is a form submission button. Instead of simply sending you to?action=submit
, it adds extra data to the HTTP request that tells the server what it is you're trying to do (save) and what the content of the page is, as well as a few other data points for checking things like edit conflicts. The editor form can simply be submitted, however, the RTE may need to take some extra steps first. You can check whether or not you're editing withif(document.getElementById(\'editform\'))
, and use the same reference to submit with<a href="#" onclick="document.getElementById(\'editform\').submit();"></a>
. Monchoman45 Talk Contribs Skystone 14:22,11/20/2011
I'm having trouble adding this onto the js page. Can you put it there for me? Tardis1963 talk 03:36, November 21, 2011 (UTC)
- Can anyone help with adding this? Tardis1963 talk 06:49, November 22, 2011 (UTC)