I am trying to configure the "External Edit" feature in MediaWiki from [1]. One of the things mentioned (recommended) in there is to put the following piece of code in User's .js file:
addOnloadHook(function() { var editTab = document.getElementById("ca-edit"); if (!editTab) return; var editURL = editTab.getElementsByTagName("a")[0].href; addPortletLink("p-cactions", editURL + "&externaledit=true", "EE", "ca-exted", "External editor", ""); });
I am assuming that I might have to put this code in User's standard.js file [2].
How do I access my personal standard.js file?
My User page is accessible as follow: http://myserver/wiki/index.php/User:TechGeek
Thanks
[1] http://www.mediawiki.org/wiki/Manual:External_editors
[2] http://www.mediawiki.org/wiki/Manual:Interface/JavaScript#Personal_scripts
Tech Geek wrote:
I am trying to configure the "External Edit" feature in MediaWiki from [1]. One of the things mentioned (recommended) in there is to put the following piece of code in User's .js file:
addOnloadHook(function() { var editTab = document.getElementById("ca-edit"); if (!editTab) return; var editURL = editTab.getElementsByTagName("a")[0].href; addPortletLink("p-cactions", editURL + "&externaledit=true", "EE", "ca-exted", "External editor", ""); });
I am assuming that I might have to put this code in User's standard.js file [2].
How do I access my personal standard.js file?
My User page is accessible as follow: http://myserver/wiki/index.php/User:TechGeek
Thanks
[1] http://www.mediawiki.org/wiki/Manual:External_editors
[2] http://www.mediawiki.org/wiki/Manual:Interface/JavaScript#Personal_scripts
If you are using monobook skin that would be http://myserver/wiki/index.php/User:TechGeek/monobook.js If you are using vector skin, http://myserver/wiki/index.php/User:TechGeek/vector.js and so on. There will be a common.js but that's not on a release yet.
Note that you can also choose "Use external editor" in your preferences (but if it's not configured it will look like a download!).
Thanks. I was able to put the code in but did not help much. For example, I uploaded a file called Test.xls on my Wiki: http://wiki.koolsolutions.com/index.php?title=File:TestFile.xls
But when I click on the link "Edit this file using an external application", all I get is a Firefox Download box (I am using Windows Machine) for index.php instead. How I can edit this excel file in place using MS Excel which is installed on my system.
Tech Geek wrote:
Thanks. I was able to put the code in but did not help much. For example, I uploaded a file called Test.xls on my Wiki: http://wiki.koolsolutions.com/index.php?title=File:TestFile.xls
But when I click on the link "Edit this file using an external application", all I get is a Firefox Download box (I am using Windows Machine) for index.php instead. How I can edit this excel file in place using MS Excel which is installed on my system.
You need a program registered to handle application/x-external-editor mime types which can launch Excel for you (and upload the modified file afterwards). See http://www.mediawiki.org/wiki/Manual:External_editors
mediawiki-l@lists.wikimedia.org