Topic on Extension talk:VisualEditor

VisualEditor and shared uploads

3
Synonymshawfinch (talkcontribs)

I've got shared uploads configured on my wiki and it works fine, but VisualEditor doesn't seem to take it into account. Searching for files returns nothing because there are none of the local wiki, and the upload tab returns the disabled uploads message.

Is there any way for VisualEditor to search for images on the shared uploads wiki rather than the local ones?

Thanks!

Ivan Mudrik (talkcontribs)

I have the same problem, somebody help me! :)

Ivan Mudrik (talkcontribs)

Answering my own question (see Manual:$wgForeignFileRepos):

$wgLBFactoryConf = array(

'class' => 'LBFactoryMulti',

'sectionsByDB' => array(

'dewiki' => 's1',

'enwiki' => 's1',

'eswiki' => 's1',

'frwiki' => 's1',

'hiwiki' => 's1',

'itwiki' => 's1',

'jawiki' => 's1',

'plwiki' => 's1',

'ptwiki' => 's1',

'ruwiki' => 's1',

'svwiki' => 's1',

'zhwiki' => 's1',

),

'sectionLoads' => array(

's1' => array(

'localhost'  => 0, // All on section s1, which has single master, at localhost.

),

),

'serverTemplate' => array(

'dbname'        => $wgDBname,

'user'          => $wgDBuser,

'password'      => $wgDBpassword,

'type'          => 'mysql',

'flags'         => DBO_DEFAULT,

'max lag'       => 30,

),

);

$wgForeignFileRepos[] = [

'class' => 'ForeignDBViaLBRepo',

'wiki' => 'dewiki',

'name' => 'dewiki', # displayname (eg. the vector-skin-tab “View on OtherWiki“) may be set at wiki-specific MediaWiki:Shared-repo-name-<otherwiki>

'url' => 'https://de.companypedia.net/w/images',

'directory' => '/var/www/mediawiki/wiki/w/images',

'hashLevels' => 2, # This must be the same for the other family member

'tablePrefix' => '',

'hasSharedCache' => false,

'fetchDescription' => true,

'scriptDirUrl' => 'https://de.companypedia.net/w', # has effect whether description can be fetched

];

$wgForeignFileRepos[] = [

'class' => 'ForeignDBViaLBRepo',

'wiki' => 'enwiki',

'name' => 'enwiki',

'url' => 'https://en.companypedia.net/w/images',

'directory' => '/var/www/mediawiki/wiki/w/images',

'hashLevels' => 2,

'tablePrefix' => '',

'hasSharedCache' => false,

'fetchDescription' => true,

'scriptDirUrl' => 'https://en.companypedia.net/w',

];

$wgForeignFileRepos[] = [

'class' => 'ForeignDBViaLBRepo',

'wiki' => 'eswiki',

'name' => 'eswiki',

'url' => 'https://es.companypedia.net/w/images',

'directory' => '/var/www/mediawiki/wiki/w/images',

'hashLevels' => 2,

'tablePrefix' => '',

'hasSharedCache' => false,

'fetchDescription' => true,

'scriptDirUrl' => 'https://es.companypedia.net/w',

];

$wgForeignFileRepos[] = [

'class' => 'ForeignDBViaLBRepo',

'wiki' => 'frwiki',

'name' => 'frwiki',

'url' => 'https://fr.companypedia.net/w/images',

'directory' => '/var/www/mediawiki/wiki/w/images',

'hashLevels' => 2,

'tablePrefix' => '',

'hasSharedCache' => false,

'fetchDescription' => true,

'scriptDirUrl' => 'https://fr.companypedia.net/w',

];

$wgForeignFileRepos[] = [

'class' => 'ForeignDBViaLBRepo',

'wiki' => 'hiwiki',

'name' => 'hiwiki',

'url' => 'https://hi.companypedia.net/w/images',

'directory' => '/var/www/mediawiki/wiki/w/images',

'hashLevels' => 2,

'tablePrefix' => '',

'hasSharedCache' => false,

'fetchDescription' => true,

'scriptDirUrl' => 'https://hi.companypedia.net/w',

];

$wgForeignFileRepos[] = [

'class' => 'ForeignDBViaLBRepo',

'wiki' => 'itwiki',

'name' => 'itwiki',

'url' => 'https://it.companypedia.net/w/images',

'directory' => '/var/www/mediawiki/wiki/w/images',

'hashLevels' => 2,

'tablePrefix' => '',

'hasSharedCache' => false,

'fetchDescription' => true,

'scriptDirUrl' => 'https://it.companypedia.net/w',

];

$wgForeignFileRepos[] = [

'class' => 'ForeignDBViaLBRepo',

'wiki' => 'jawiki',

'name' => 'jawiki',

'url' => 'https://ja.companypedia.net/w/images',

'directory' => '/var/www/mediawiki/wiki/w/images',

'hashLevels' => 2,

'tablePrefix' => '',

'hasSharedCache' => false,

'fetchDescription' => true,

'scriptDirUrl' => 'https://ja.companypedia.net/w',

];

$wgForeignFileRepos[] = [

'class' => 'ForeignDBViaLBRepo',

'wiki' => 'plwiki',

'name' => 'plwiki',

'url' => 'https://pl.companypedia.net/w/images',

'directory' => '/var/www/mediawiki/wiki/w/images',

'hashLevels' => 2,

'tablePrefix' => '',

'hasSharedCache' => false,

'fetchDescription' => true,

'scriptDirUrl' => 'https://pl.companypedia.net/w',

];

$wgForeignFileRepos[] = [

'class' => 'ForeignDBViaLBRepo',

'wiki' => 'ptwiki',

'name' => 'ptwiki',

'url' => 'https://pt.companypedia.net/w/images',

'directory' => '/var/www/mediawiki/wiki/w/images',

'hashLevels' => 2,

'tablePrefix' => '',

'hasSharedCache' => false,

'fetchDescription' => true,

'scriptDirUrl' => 'https://pt.companypedia.net/w',

];

$wgForeignFileRepos[] = [

'class' => 'ForeignDBViaLBRepo',

'wiki' => 'ruwiki',

'name' => 'ruwiki',

'url' => 'https://ru.companypedia.net/w/images',

'directory' => '/var/www/mediawiki/wiki/w/images',

'hashLevels' => 2,

'tablePrefix' => '',

'hasSharedCache' => false,

'fetchDescription' => true,

'scriptDirUrl' => 'https://ru.companypedia.net/w',

];

$wgForeignFileRepos[] = [

'class' => 'ForeignDBViaLBRepo',

'wiki' => 'svwiki',

'name' => 'svwiki',

'url' => 'https://sv.companypedia.net/w/images',

'directory' => '/var/www/mediawiki/wiki/w/images',

'hashLevels' => 2,

'tablePrefix' => '',

'hasSharedCache' => false,

'fetchDescription' => true,

'scriptDirUrl' => 'https://sv.companypedia.net/w',

];

$wgForeignFileRepos[] = [

'class' => 'ForeignDBViaLBRepo',

'wiki' => 'zhwiki',

'name' => 'zhwiki',

'url' => 'https://zh.companypedia.net/w/images',

'directory' => '/var/www/mediawiki/wiki/w/images',

'hashLevels' => 2,

'tablePrefix' => '',

'hasSharedCache' => false,

'fetchDescription' => true,

'scriptDirUrl' => 'https://zh.companypedia.net/w',

];

Reply to "VisualEditor and shared uploads"