Page 1 of 1
Including the blog into a site
Posted: Wed Oct 19, 2005 4:59 pm
by StarF
Hi
I am trying to set up this blog on my own site now (
www.evilsun.dk )
now i know the easiest way is to include the index.php onto my site, or make a wrapper my problem how ever is a bit diffrent..
i got my site layout prette strick, and i would like to keep it that way if possible.
i installed my blog in /blog
i then make my wrapper, to include /blog/index.php
but that results in, index.php starts to look for all its other files, in / and not /blog
is there a easy way to do this? so i could keep my blog in /blog and not on the root of the server ?
Re: Including the blog into a site
Posted: Wed Oct 19, 2005 5:04 pm
by garvinhicking
You should look at your s9y configuration and see which paths are configured there; if you put your blog into a subdirectory you need to specify that path, not the root path.
Regards,
garvin
Posted: Wed Oct 19, 2005 5:11 pm
by StarF
my path looks like this:
Full path : /home/www/evilsun.dk/blog/
Upload path : uploads/
Relative path : /blog/
Relative template path : templates/
Relative upload path : uploads/
URL to blog :
http://www.evilsun.dk/blog/
as far i can see that is corrent, how ever i do still get those problems..
http://www.evilsun.dk/wrapper.php it just redirects to the admin page?
my wrapper looks like this:
Code: Select all
<?php
$_REQUEST['page'] = 'blog';
ob_start();
require 'blog/index.php';
$blog_data = ob_get_contents();
ob_end_clean();
require 'index.php';
?>
Posted: Wed Oct 19, 2005 5:25 pm
by garvinhicking
You cannot require the files in the subdir, you need to change your code to this:
Code: Select all
<?php
$_REQUEST['page'] = 'blog';
ob_start();
chdir('blog');
require 'blog/index.php';
$blog_data = ob_get_contents();
chdir('..');
ob_end_clean();
require 'index.php';
?>
Regards,
Garvin
Posted: Wed Oct 19, 2005 5:45 pm
by StarF
garvinhicking wrote:You cannot require the files in the subdir, you need to change your code to this:
Code: Select all
<?php
$_REQUEST['page'] = 'blog';
ob_start();
chdir('blog');
require 'blog/index.php';
$blog_data = ob_get_contents();
chdir('..');
ob_end_clean();
require 'index.php';
?>
Regards,
Garvin
tnx that seems to work, and in order to show my blog, i just put this on the page i want to show my blog?
Posted: Wed Oct 19, 2005 5:49 pm
by garvinhicking
Yes. Just try it out
Regards,
Garvin
Posted: Wed Oct 19, 2005 5:55 pm
by StarF
tnx it works
now back to finish up those themes for ya
