Tim Ware | 28 Dec 2006 18:23
Gravatar

Importing content from another wiki page

I have three wikis running off one MW install (v 1.8.2). Is there a  
way to have a way in one wiki's page to contain the content of  
another of my wiki's pages?

I have a help section which I'd like to have on all three wikis, but  
have to modify just one of them. I guess I could just use php  
includes, but then that content would exist outside the wiki space.

I tried doing this with interwiki, but could only get that to open  
the entire page, not just import its content.

Thanks.

Tim
Rob Church | 28 Dec 2006 20:59
Picon

Re: Importing content from another wiki page

On 28/12/06, Tim Ware <tim@...> wrote:
> I have three wikis running off one MW install (v 1.8.2). Is there a
> way to have a way in one wiki's page to contain the content of
> another of my wiki's pages?

Yes, interwiki transclusion.

1. Set up interwiki entries for the wikis where iw_trans = 1
2. Set $wgEnableScaryTranscluding = true; in LocalSettings.php

You'd then transclude as...

{{interwiki:template}}
{{interwiki::content}}
{{interwiki:namespace:title}}

...where "interwiki" is the interwiki prefix, "template" would be the
name of a template on the source wiki, "content" would be the title of
a main namespace page, and "namespace:title" is a regular
namespace/title pair.

Rob Church
Tim Ware | 28 Dec 2006 22:32
Gravatar

Re: Importing content from another wiki page


On Dec 28, 2006, at 11:59 AM, Rob Church wrote:
> Yes, interwiki transclusion.
>
> 1. Set up interwiki entries for the wikis where iw_trans = 1
> 2. Set $wgEnableScaryTranscluding = true; in LocalSettings.php
>
> You'd then transclude as...
>
> {{interwiki:template}}
> {{interwiki::content}}
> {{interwiki:namespace:title}}
>
> ...where "interwiki" is the interwiki prefix, "template" would be the
> name of a template on the source wiki, "content" would be the title of
> a main namespace page, and "namespace:title" is a regular
> namespace/title pair.
>

Thanks Rob. I think I'm just a bit off. Using phpMyAdmin to edit the  
db, I set the values to:

iw_prefix: wikihelp
iw_url: http://subdomain.mywiki.com/wiki/  (the path to the source wiki)
iw_local: 0
iw_trans: 1

In the source wiki I created a template called "Help" (Template:Help)

The wiki I want to pull this content into is a different subdomain on  
(Continue reading)

Rob Church | 28 Dec 2006 22:39
Picon

Re: Importing content from another wiki page

On 28/12/06, Tim Ware <tim@...> wrote:
> Thanks Rob. I think I'm just a bit off. Using phpMyAdmin to edit the
> db, I set the values to:
>
> iw_prefix: wikihelp
> iw_url: http://subdomain.mywiki.com/wiki/  (the path to the source wiki)

You need to include $1 somewhere in the path - this indicates where
the article is. For instance, http://en.wikipedia.org/wiki/$1 - $1 is
replaced with the title to be fetched.

> iw_local: 0

See whether setting iw_local = 1 is needed; it's 1 on a local test
wiki of mine, but I don't know if it's *required* - will check.

> iw_trans: 1

This is in the interwiki table for the wiki you want to transclude the
content onto, right?

Rob Church

Gmane