Ok some more details on the embeding:
First create a wordpress Page called diving or any other name but make sure that the page slug is set to "divelog" if your phpdivinglog is located in
www.test.com/divelog so the phpdivinglog should be on the same level as your wordpress install.
This is a listing for my test wordpress at
http://rob.lensen.nu/testwordpress
Code: Select all
drwxr-xr-x 6 www www 1024 Apr 6 17:07 ./
drwxrwxr-x 28 robl www 1536 Apr 6 16:46 ../
drwxr-xr-x 13 www www 1024 Apr 6 17:10 divelog/
-rw-r--r-- 1 www 33 397 May 25 2008 index.php
-rw-r--r-- 1 www 33 15410 Dec 6 2008 license.txt
-rw-r--r-- 1 www 33 7644 Feb 13 20:35 readme.html
drwxr-xr-x 8 www 33 2560 Feb 15 17:52 wp-admin/
-rw-r--r-- 1 www 33 40400 Oct 25 11:32 wp-app.php
-rw-r--r-- 1 www 33 220 Oct 14 2008 wp-atom.php
-rw-r--r-- 1 www 33 274 May 25 2008 wp-blog-header.php
-rw-r--r-- 1 www 33 3928 Jan 7 20:38 wp-comments-post.php
-rw-r--r-- 1 www 33 238 Oct 14 2008 wp-commentsrss2.php
-rw-r--r-- 1 www 33 2616 Dec 8 20:59 wp-config-sample.php
-rw-r--r-- 1 www www 2530 Apr 6 16:49 wp-config.php
drwxr-xr-x 4 www 33 512 Feb 15 17:52 wp-content/
-rw-r--r-- 1 www 33 1253 Aug 16 2009 wp-cron.php
-rw-r--r-- 1 www 33 220 Oct 14 2008 wp-feed.php
drwxr-xr-x 6 www 33 2048 Feb 15 17:52 wp-includes/
-rw-r--r-- 1 www 33 1946 May 5 2009 wp-links-opml.php
-rw-r--r-- 1 www 33 2341 May 20 2009 wp-load.php
-rw-r--r-- 1 www 33 22721 Dec 14 23:09 wp-login.php
-rw-r--r-- 1 www 33 7578 Sep 18 2009 wp-mail.php
-rw-r--r-- 1 www 33 487 Apr 20 2009 wp-pass.php
-rw-r--r-- 1 www 33 218 Oct 14 2008 wp-rdf.php
-rw-r--r-- 1 www 33 316 May 25 2008 wp-register.php
-rw-r--r-- 1 www 33 218 Oct 14 2008 wp-rss.php
-rw-r--r-- 1 www 33 220 Oct 14 2008 wp-rss2.php
-rw-r--r-- 1 www 33 23097 Dec 14 01:38 wp-settings.php
-rw-r--r-- 1 www 33 3693 Nov 26 12:29 wp-trackback.php
-rw-r--r-- 1 www 33 93445 Dec 1 09:14 xmlrpc.php
You see divelog is in the root of my wordpress install!!
Next in wordpress set the permalinks to: Custom Structure: /%postname%/ so basiclly what we do is we let wordpress think there is a page a
www.test.com/divelog but in fact we display our phpdivinglog.
For your theme I changed header.php to:
Code: Select all
<?php
/**
* Some things that need to be in the header for phpDivinglog
*/
?>
<?php
/**
* Embedding for wordpress
*/
require_once('/usr/local/www/rob.lensen.nu/www/testwordpress/wp-blog-header.php');
require_once( ABSPATH . WPINC . '/registration-functions.php');
add_action('wp_head', 'get_divelog_header');
function get_divelog_header(){
global $t ;
//, $_config;
//$t->display('header_meta.tpl');
//$t->display('header_title.tpl');
$t->display('header_css.tpl');
$t->display('header_script.tpl');
}
get_header();
?>
<div class="contentArea">
<div class="post">
<?php
/**
* End emmbedding for wordpress
*/
?>
and footer.php to
Code: Select all
<?php
/**
* Footer for wordpress
*/
?>
</div>
</div> <!--div content ends-->
<?php //get_sidebar(); ?>
</div> <!--div main ends-->
<?php get_footer();
/**
* End of embedding for wordpress
*/
?>
Changed my config.inc.php to this:
Code: Select all
/**
* change this to your website url
*/
$_config['web_root'] = 'http://rob.lensen.nu/testwordpress/divelog';
/**
* Your path where divelog is located
* EXAMPLE: http://www.foo.com/users/j/jo/john
* abs_url_path = /users/j/jo/john
* Nothing todo where phpdivinglog is installed on your harddrive!
*/
$_config['abs_url_path'] = '/testwordpress/divelog';
/**
* Define if we need to embed phpDivinglog
* @todo make embedding possible
*/
$_config['embed_mode'] = true;
Result see this:
http://rob.lensen.nu/testwordpress/divelog/