[Mediawiki-l] interwiki transclusion with images - second try

Andreas Rindler arindler at jenandi.com
Thu Aug 2 10:26:35 UTC 2007

we got it to work (big thanks to Liam!) but the solution is not
related to anything in this thread (!?). Just to recap, I wanted to
pull articles with images from my public wiki to my internal wiki
(using transclusion). The articles came through, but images appeared
as placeholders with a link to the source images on the public wiki
(so you could click on it and view the image on the public wiki)..

The solution is to add the below to LocalSettings.php on the source wiki:

This adds the proper scr= attribute to the <img> tag which means that
the transcluded article also pulls through the image.

Make sure you also set the following on the local wiki:
$wgAllowExternalImages = true;
$wgEnableScaryTranscluding = true;

So no $wgSharedUploadXXX configuration or NFS configuration is
necessary at all. Shareduploads enable you to specify a link in a
regular article (no transclusion) to an image that doesn't exist on
the local wiki and force the local wiki to check the image repository
at another wiki (configured in $wgSharedUploadPath and
$wgSharedUploadDirectory) if it can pull the image from there.

Anyone have a suggestion where on mediawiki.org I should document this properly?


On 27/07/07, Andreas Rindler <arindler at jenandi.com> wrote:
> I am gonna change my setup. I am currently using a Linux box to host Mike2 (external website A) and a Windows machine for the internal site. I will switch to Linux internally, set up an exact mirror of the public site and try to use NFS over SSH between the two sites ( http://www.howtoforge.com/nfs_ssh_tunneling). I know that Wikipedia is run on multiple, distributed server farms. Are you using the same setup then in order to have all the Wikipedia project sites connect to Wikicommons to transclude/include the media files?
> Another option I am considering is to schedule a 1 minute cron job with rscync over ssh to mirror the public site internally and then use transclusion from a local server.
> I will keep you posted on my experiments...
> Thanks,
> Andi
> On 25/07/07, Andreas Rindler <arindler at jenandi.com> wrote:
> >
> >
> > On 25/07/07, Platonides <Platonides at gmail.com> wrote:
> >  > Andreas Rindler wrote:
> > > > Platonides wrote:
> > > >> You seem to miss $wgSharedUploadDirectory, $wgSharedUploadDBname
> > > > and these are also configured on B, the internal wiki?
> > > > I read through the description on the below links, but I can't make
> > > > out which directory on what server I need to configure.
> > >
> > > Yes, you tell B which db A uses (by default tries to access with the
> > > same db login as B's) and on which local folder (for B) the images are
> > > (for creating thumbnails).
> > ah, makes sense.
> > I tried the setup but got an error:
> >
> > Sorry! This site is experiencing technical difficulties.
> >   Try waiting a few minutes and reloading.
> > (Can't contact the database server: Access denied for user 'wikiadmin'@'%' to database ' wikidb at localhost' (localhost))
> >
> >
> > I also found an old posting regarding this issues:
> >  http://lists.wikimedia.org/pipermail/mediawiki-l/2005-December/008696.html
> >
> > >It's a folder seen from B's server, so if A
> > > is on another computer you would mount it on B using a remote filesystem
> > > like NFS.
> > mhh,. I will have to look into that because that has security implications, right? Is there a way to have the thumbnail generation somewhere else?
> >
> >
> > >
> > >
> > > _______________________________________________
> > > MediaWiki-l mailing list
> > >  MediaWiki-l at lists.wikimedia.org
> > >  http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
> > >
> >

More information about the MediaWiki-l mailing list