Recent Topics

1 Mar 12, 2008 17:34    

My b2evolution Version: Not Entered

Hello,
My blog id in a directory called /blog/ I have an index blog there that starts it. But I would like to make that the home page is there a way to make an index page in the root directory that goes strait to the blog directory?

3 Mar 12, 2008 17:37

With my wordpress blog they give you an index.php file with about 5 lines in it that takes you straigt to the blog

4 Mar 12, 2008 18:09

On top of my head you only need to adjust this line in a copy of the index.php file:

require_once dirname(__FILE__).'/conf/_config.php';


make that:

require_once dirname(__FILE__).'/blog/conf/_config.php';

Good luck

*edit*
Or take a stub file like blog1.php and change the last two lines. This is like the five line WP thing.

5 Mar 13, 2008 00:32

So this is what I would have to do in order for the url to change? Instead of people having to type in http://www.thathalosite.com/blog, all they could do was leave out the blog and it still reaches the same destination?

6 Mar 13, 2008 01:03

scruss wrote:

So this is what I would have to do in order for the url to change? Instead of people having to type in http://www.thathalosite.com/blog, all they could do was leave out the blog and it still reaches the same destination?

Hi scruss,

Welcome to the forums.
The above is basically true.

Good luck

7 Mar 13, 2008 01:21

Afwas thanks for trying to help, however the attempt to implement something like you have suggested above has made the situation much worse.

I took the page that does this from wordpress as follows:
<?php
/* Short and sweet */
define('WP_USE_THEMES', true);
require('./articles/wp-blog-header.php');
?>

I changed it to

<?php
PHP:
require_once dirname(__FILE__).'/blogs/conf/_config.php';

?>

It gave the following error:

Parse error: syntax error, unexpected ':' in /home/giftware/public_html/index.php on line 2

So I took the index.php from the /blogs/ folder and put it in the root directory.
it gives this error message
Warning: require_once(/home/giftware/public_html/conf/_config.php) [function.require-once]: failed to open stream: No such file or directory in /home/giftware/public_html/index.php on line 21

Fatal error: require_once() [function.require]: Failed opening required '/home/giftware/public_html/conf/_config.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/giftware/public_html/index.php on line 21

It has also stuffed me up somehow as (after reverting back to my original index page, I now cant use the uriginal URL to get to the Blogs which was
http://www.giftware.net.au/blogs/

This gives an error message:

Notice: Undefined variable: BlogCache in /home/giftware/public_html/blogs/index.php on line 53

Fatal error: Call to a member function get_by_url() on a non-object in /home/giftware/public_html/blogs/index.php on line 53

So I am now really stuffed.

I am totally surprised that B2evo does not have a manual page that says "How to make the blog index page your home page".
Really it should come with it as part of the installation?

8 Mar 13, 2008 01:33

That link did not resolve to an actual web page, so the following might not be applicable depending on what you're trying to do, but generally speaking it is easier to install b2evo in the root and let the CMS nature of b2evo take care of your entire web. Or at least that is true in my limited experience. There are many different needs out there so "your mileage may vary" ;)

9 Mar 13, 2008 01:33

Follow up

Ok Afwas Thanks again . I have now tried the second option in your advice. I found a file called blog1.php and edited the pathe to
require_once dirname(__FILE__).'/blogs/conf/_config.php'; and YOOO

My site is back up.


Form is loading...