How can I syndicate wiki pages from other PmWiki 2.0 sites on my site and have them formatted using my site's CSS?
First, be sure you're aware of the possible copyright risks of letting the content of other wiki pages appear in your pages.
Once you've gotten past that hurdle, the following code in your config.php adds the (:includewikipage http://...:) markup that lets you embed the contents of other wiki pages into your wiki page.
Markup('includewikipage', 'directives', "/\\(:includewikipage\\s+(http:[^$UrlExcludeChars]*?)\\s*:\\)/e", "PRR().implode('',file(str_replace('&','&','$1')))");
(:includewikipage http://www.milwaukeedept.org/pmwiki.php/Main/HomePage?action=source :)
A working example can be viewed at: http://www.milwiki.org/Test/WikiIncludes.
- For this script to work, you must append ?action=source to the requested URL.
- The included page's markup will be evaluated by your installation of PmWiki. This means that if the included page has cookbook markup not supported by your installation, it will not render properly.
- Jeff Barke -> mailto:jbarke [snail] milwaukeedept [period] org, 20051218
See discussion at IncludeWikiPage-Talk