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 ?
Including the blog into a site
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Including the blog into a site
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
Regards,
garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
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:
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';
?>-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
You cannot require the files in the subdir, you need to change your code to this:
Regards,
Garvin
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';
?>Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
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?garvinhicking wrote:You cannot require the files in the subdir, you need to change your code to this:
Regards,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'; ?>
Garvin
Code: Select all
<?php
echo $blog_data;
?>-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Yes. Just try it out 
Regards,
Garvin
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/