Dear all,
I am trying to locate which functions get called when a user clicks save/preview buttons when in the edit mode?. I also am trying to figure out where and when the text in the edit box gets parsed. Appreciate any help.
Thanks
If you are after doing something when those functions are called, and you have a newish version of MediaWiki, you can use hooks, which as the name suggests, cause a function (or functions) to be run when certain actions are performed. The actual functions will be those called when valid POST data is detected following the edit form submission; these should, if I remember correctly, be in Article.php...
As to parsing, it depends. The text undergoes a pre-parse before it is saved, which embeds SUBSTed templates, signatures, etc. and is then stored as wikitext within the database. When it is retrieved from the database for display, the Parser object is used once more, and turns it all into XHTML, then passes it to a few more functions (mostly to tidy things up) before dumping it on the browser.
You might consider searching on http://meta.wikimedia.org and http://www.mediawiki.org for more information; the code for MediaWiki also contains some comments, and I know the MediaWiki.org web site contains a link to auto-generated documentation for developers.
Rob Church
On 11/11/05, Amruta Lonkar amrutasl@gmail.com wrote:
Dear all,
I am trying to locate which functions get called when a user clicks save/preview buttons when in the edit mode?. I also am trying to figure out where and when the text in the edit box gets parsed. Appreciate any help.
Thanks _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Rob, thanks a lot for your help. I really appreciate it. So this is what i am actually doing. I have added a button in the tool bar on the edit page in line with the buttons on top of the actual text area. This button is added for a user when he wants to enter a reference at any point in the article. When a user clicks on this button it pulls up a pop up (external to mediawiki code) page created by me located in extensions for user to enter the actuali citation information. I have created tables for the references whihc are exact replicas of the image table i.e a reference table that actually has details about the reference and a reference links table to store the association of the page and reference. So what i wanted to do was when a user hits submit on the pop up the data gets entered into the reference table. And only when user hits submit the data gets entered into the referencelinks table. I am trying to figure out that once the user submits the data on popup window, i want to pass the reference_id of the reference entered into the database back by this code to the mediawiki control and then show this id on the caret position at which the user wanted to enter the reference.I cant figure out how to do this. I know i will have to use window.opener to pass back control to the main window that opened the popup, but i cant locate to what i should give this value . I thank you for all the help. Thanks, Amruta On 11/11/05, Rob Church robchur@gmail.com wrote:
If you are after doing something when those functions are called, and you have a newish version of MediaWiki, you can use hooks, which as the name suggests, cause a function (or functions) to be run when certain actions are performed. The actual functions will be those called when valid POST data is detected following the edit form submission; these should, if I remember correctly, be in Article.php...
As to parsing, it depends. The text undergoes a pre-parse before it is saved, which embeds SUBSTed templates, signatures, etc. and is then stored as wikitext within the database. When it is retrieved from the database for display, the Parser object is used once more, and turns it all into XHTML, then passes it to a few more functions (mostly to tidy things up) before dumping it on the browser.
You might consider searching on http://meta.wikimedia.org and http://www.mediawiki.org for more information; the code for MediaWiki also contains some comments, and I know the MediaWiki.org web site contains a link to auto-generated documentation for developers.
Rob Church
On 11/11/05, Amruta Lonkar amrutasl@gmail.com wrote:
Dear all,
I am trying to locate which functions get called when a user clicks save/preview buttons when in the edit mode?. I also am trying to figure
out
where and when the text in the edit box gets parsed. Appreciate any
help.
Thanks _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org