
|
[dokuwiki]
||
[Date Prev]
[02-2008 Date Index]
[Date Next]
||
[Thread Prev]
[02-2008 Thread Index]
[Thread Next]
[dokuwiki] Re: DokuWiki Wordpress integration
- From: Christopher Smith <chris@xxxxxxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Thu, 7 Feb 2008 21:45:04 +0000
On 7 Feb 2008, at 20:40, Florian Feldhaus wrote:
I'm not sure, if this solution would work. The Wiki and the
Wordpress are on two different (virtual) machines and should stay
separate. I just want to include certain pages from the wiki into
Wordpress. If someone follows the internal wiki links, he should
still stay inside the Wordpress Theme. I could sync the DokuWiki
files between the two machines and then use your solution - setting
up a DokuWiki with the same theme as the one used in Wordpress. But
I hope, that there is a cleaner solution. Perhaps one of the
developers knows if there is a way to get rendered pages without the
template applied from a normal DokuWiki?
Create a custom template. It only needs <?php tpl_content(); ?>
For CSS purposes you may need to wrap the content in elements that
match the expected DW structure, so
<div class="dokuwiki">
<?php tpl_content(); ?>
</div>
DW dynamically generates its CSS. You would probably want to generate
the CSS on the wiki machine and copy it to the wordpress machine or
use some form of alias/redirect/link to hide the DW css url from the
user.
In your wordpress template, include('path/to/dokuwiki/doku.php');
If wordpress has left DW's system globals ($_GET, $_POST, $_REQUEST,
$_COOKIE) untouched you should be ok. You may need to close the
wordpress session to allow DW to reopen the session without an error.
If necessary you can reopen the wordpress session after DW has done
its stuff.
You will have to resolve any naming clashes.
Another option (which avoids the possibility of naming clashes) is to
use a cut down template similar to that described above and use a
remote file open to access the page. The remote file open will allow
the webserver and php to generate the page as normal. With this
method you will need to recreate the query string for DW.
e.g. readfile('http://www.wikisite.com/path/to/doku.php'.$reconstructed_query_string)
;
(or if allow_url_fopen is not permitted or not desired, the same thing
can be achieved using the curl functions).
You could get more sophisticated and have your template provide other
information (metadata, author, date) in a structure that will allow
you to extract the different information using preg_match() and then
place that information into the wordpress page at the appropriate
places.
- Chris
Besides that, it would be nice if one could use a search through the
content of both, DokuWiki and Wordpress...
I consider writing my own Wordpress plugin to achieve all this, but
therefore I would need to know a way to access the rendered DokuWiki
pages and search results.
Greetings,
Flo
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist
|

|