[pmwiki-users] Re: include text from another wiki?

John Rankin john.rankin at affinity.co.nz
Thu Jul 7 17:43:53 CDT 2005


On Friday, 8 July 2005 9:50 AM, chr at home.se wrote:
>On 8 Jul 2005, John Rankin wrote:
>
>> Given that pmwiki can translate wiki markups other than 
>> PmWiki markup, is the following possible? If so, how 
>> might one do it:
>> 
>>     (:wikipedia PageName:)
>> 
>> This would return the text of PageName from wikipedia, 
>> with the markup translated into xhtml.
>
>All I know is that in PhP you can do a file open with a URI as argument? 
>So maybe it's simply of opening a suitable URI that gives you the source 
>of the wiki page. However, what about performance? Wouldn't you need 
>cacheing together with this somehow?  (For simplicity, I'd suggest a 
>separate action to refresh the cahce).

I see it as the middle ground between:

- a link to another place, and you can choose to go there or not

=> this information is important, it needs to be current, and we
   want our readers to see it

- here is a whole lot of stuff aggregated from other places,
  cached for fast access

So I think just pulling the page in dynamically is OK (of
course, a progress bar would be nice, too -- this could be
completely fake with randomly generated progress updates,
as we are only talking a few seconds not minutes)
>
>> I know that wikipedia supports an action to return raw
>> wiki page text, it's just a matter of dealing with it.
>
>*sigh* - wonder when I'll learn to read the whole post before starting to 
>answer.

But then all spontaneity would be lost...

The hard bit (which is probably an easy bit if you know how)
is to tell PmWiki: starting here, use this set of Markup
translation instructions -- ie

    Keep(AltMarkupToHTML('wikipedia page','translation rules'))

AFAIK PmWiki sets the Markup rules on a per-page request
basis, it's not clear how to switch rules, then switch back.
-- 
JR
--
John Rankin






More information about the pmwiki-users mailing list