Hello, I'm still wondering why javascript won't work wiht me ...I try a toolbar
modification now. In MediaWiki:Common.js and User:Me/common.js but still nothing happens:
get the basic setup form here:
https://www.mediawiki.org/wiki/Extension:WikiEditor/Toolbar_customization#B…
and the costumization snippet from here:
https://www.mediawiki.org/wiki/Extension:WikiEditor/Toolbar_customization/L…
var customizeToolbar = function() {
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'main',
group: 'format',
tools: {
"strikethrough": {
label: 'Strike',
type: 'button',
icon:
'//upload.wikimedia.org/wikipedia/commons/3/30/Btn_toolbar_rayer.png',
action: {
type: 'encapsulate',
options: {
pre: "<s>",
post: "</s>"
}
}
}
}
});
};
/* Check if view is in edit mode and that the required modules are available. Then,
customize the toolbar . . . */
if ( $.inArray( mw.config.get( 'wgAction' ), [ 'edit', 'submit' ]
) !== -1 ) {
mw.loader.using( 'user.options', function () {
// This can be the string "0" if the user disabled the preference
([[bugzilla:52542#c3]])
if ( mw.user.options.get( 'usebetatoolbar' ) == 1 &&
mw.user.options.get( 'showtoolbar' ) == 1 ) {
$.when(
mw.loader.using( 'ext.wikiEditor.toolbar' ),
$.ready
).then( customizeToolbar );
}
} );
}
// Add the customizations to LiquidThreads' edit toolbar, if available
mw.hook( 'ext.lqt.textareaCreated' ).add( customizeToolbar );
please help me with that ...
Myname To <mailusenet(a)yahoo.de> schrieb am 17:20 Mittwoch, 3.September 2014:
thank you Svetlana, do I have to copy the snipet in MediaWiki:Common.js instead of the
import...? and what I have to change in the snipet? In
http://www.mediawiki.org/wiki/Adding_HTML_to_wiki_pages is nothing about the
ResourceLoader ... Nico
svetlana <svetlana(a)fastmail.com.au> schrieb am 16:19 Mittwoch, 3.September 2014:
https://www.mediawiki.org/wiki/ResourceLoader/Migration_guide_%28users%29#m…
3rd snippet
On Wed, 3 Sep 2014, at 22:46, Myname To wrote:
hello, can you please help me with this:
I recently installed mediawiki on Centos6.5 and after following the instructions for
adding HTML and JS to
wikipages:
http://www.mediawiki.org/wiki/Adding_HTML_to_wiki_pages (the page was last modified on 22
August 2014, at 21:10.)
I can't use no simple javascript with wikimedia ...
First I checked in LocalSettings.php:
$wgUseSiteJs = true;
$wgAllowUserJs = true;
$wgAllowUserCss = true;
My Mediawiki is completely empty so I put Inside
MediaWiki:YourScript.js nothing else than:
var helloWorld = document.getElementById('helloWorldID');
newPageElement.innerHTML = '<script type="text/javascript">
document.write('<b>Hello World</b>');
</script>';
also in MediaWiki:Common.js I have just one single code:
importScript('MediaWiki:YourScript.js');
and for the Template:helloWorld I did only that:
<div id="helloWorldID"></div>
and in MediaWiki:YourScript it stand one word:
{{helloWorld}}
... nothing happens (also after refresh, shift f5 etc.)
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l