Last modified: 2013-12-04 15:55:13 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T23374, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 21374 - javascript configuration of mwEmbed modules
javascript configuration of mwEmbed modules
Status: RESOLVED WONTFIX
Product: mwEmbed
Classification: Unclassified
Add media wizard (Other open bugs)
unspecified
All All
: Lowest enhancement (vote)
: ---
Assigned To: Michael Dale
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-11-01 14:02 UTC by Thomas Bleher
Modified: 2013-12-04 15:55 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Thomas Bleher 2009-11-01 14:02:03 UTC
The "Add Media Wizard" on http://prototype.wikimedia.org/s-2/index.php?title=Main_Page&action=edit has several search targets: Wikimedia Commons, Internet Archive and MetaVid. On a local test install, I got only Wikimedia Commons, but strangly all images displayed are from Flickr.

Anyway, I found no documentation on how to change these tabs. Please add it somewhere - preferably in includes/DefaultSettings.php. Thanks!
Comment 1 Michael Dale 2009-11-04 02:05:54 UTC
The Flickr being displayed while another repo is defaulted was an error fixed in r58513 

If you put something like the following in your MediaWiki:Commons.js page you can set the defaults. 

if( typeof mwAddMediaConfig == 'undefined' ){
    mwAddMediaConfig = {};
}
mwAddMediaConfig['enabled_cps'] = [ 'wiki_commons', 'archive_org', 'metavid','flickr', 'upload' ];
//or to enable all of them you could use: 
mwAddMediaConfig['enabled_cps'] = 'all';

We should add the ability to set the mwAddMediaConfig var in LocalSettings.php type configuration as well. 
Comment 2 Michael Dale 2010-01-05 23:37:49 UTC
its now mwAddMediaConfig['enabled_providers']. I have renamed this bug to reflect the base problem "javascript configuration of mwEmbed modules". Also have cc'ed Trevor to see if he wants to comment. 

Presently there is not a good structured way to package in javascript config variables from php side ... ( we presently plop them all into the the global scope in the output page.. to slightly improve the situation I propose we have a global variable like $wgMwEmbedConfig:

In php you could add in config like so: 
$wgMwEmbedConfig[ 'mwConfigOption' ] = mwConfigValue;

Then right after the mwEmbed.js in the page output we would run 
mw.setConfig( 'option', 'value'); 
for every item in the array. 

Eventually we probably want to specify per mwEmbed module loader.js applicable config values and have a real database based configuration system and interface. 

mediaWiki:Common.js would still have final say to override the php mwEmbed config values at run-time.



Comment 3 Andre Klapper 2012-12-12 15:05:43 UTC
[Removing RESOLVED LATER as discussed in
http://lists.wikimedia.org/pipermail/wikitech-l/2012-November/064240.html .
Reopening and setting priority to "Lowest".
For future reference, please use either RESOLVED WONTFIX (for issues that will
not be fixed), or simply set lowest priority. Thanks a lot!]
Comment 4 Andre Klapper 2013-12-04 15:55:13 UTC
[According to bug 54063 comment 2, Add Media Wizard is no longer supported and no future work is planned. It has been superseded by UploadWizard.]

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links