Community Central
Community Central
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.
Archive
Note: This topic has been unedited for 4956 days. It is considered archived - the discussion is over. Information in this thread may be out of date. Do not add to unless it really needs a response.


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 with if(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)