[pmwiki-users] Wiki Aggregation

V.Krishn vkrishn at insteps.net
Fri Feb 4 15:06:28 CST 2011

On Saturday 05 Feb 2011 12:40:37 am you wrote:
> On Fri, Feb 04, 2011 at 09:50:55PM +0530, V.Krishn wrote:
> > I was thinking if "Wiki Aggregation" with pmwiki would be possible.
> > By Wiki Aggregation - I mean,
> > A pmwiki site would  be able to pull wiki content from another
> > domain(pmwiki) site and display in its own page (kinda mashup)
> > [...]
> I don't know the status of this recipe, but you might look at
> http://www.pmwiki.org/wiki/Cookbook/IncludeWikiPage .
> Pm

I was able to make it work for Urls within the same domain.
For external Urls I guess most servers have set 
allow_url_fopen = Off,  for secuirity reasons
Maybe use curl to fetch the source?
----------------modified code-----------
Markup('includewikipage', 'directives',
\\)/e", "GetRemoteText('$1')");

function GetRemoteText ($text) {
 global $pagename;
 //return MarkupToHtml($pagename, file_get_contents(str_replace('&','&',
 return MarkupToHtml($pagename, implode('',file(str_replace('&','&',
$text)))); //or

I could not quite get 'PRR().' in the original markup at

For further expanding:
1. Maybe we can get $RecipeInfo[] array have more information like 
$RecipeInfo['download url']
$RecipeInfo['dependencies'][].. etc
I was thinking like exposing site or in particular wikipage, letting known to 
the site pulling the content about the modules installed in parent site.
eg by ?action=recipe&pagename=Test.Testpage&format=json
This way the site can know what needs to be installed before displaying the 
content properly, ofcourse there would be security check at parent site as 
which site gets to use ?action=recipe information.
2. Another approach would be, adding (:mashable:) directive in page which are 
considered sharable. Kinda simple way of exposing a service.
recipes_required: aaa, bbb
...some more info.....


More information about the pmwiki-users mailing list