Recent Topics

1 Apr 01, 2015 17:12    

I need guidance with how to set up b2evolution to run like so. It's pretty straightforward, just not sure how to get it done:

1. Blogs 2 & 3 as regular content blogs, open to the public.

domain.com/blogstub2/ <-- nice clean urls
domain.com/blogstub3/

2. Blog 4 as a linkblog, closed to the public, but its links displayed on Blog 2 & 3 via linkblog widget.

3A. Blog 1 on domain.com/ showing combined posts from Blog 2 and Blog 3 by default. I think what I need is the "ALL" blog or aggregate blog that used to exist in b2evo years ago. Is this still available?

3B. The option in the future to change Point #3A above, and replace the "ALL" blog on domain.com with a static html / bootstrap site with hardcoded links to /blogname2/ and /blogname3/.

I understand the general idea here, but it's the specifics of the backend config that I'm not sure about.

In this setup, does b2evo have to be installed in the siteroot or can it be installed in a subfolder? To replace the "ALL" blog sometime in the future, do I simply replace b2evolution's index.php with my own html or php page? Will the rest of the blog still work if I do that?

I've only ever run b2evolution from a completely separate folder or subdomain in the past, and I'm not sure of the particulars / caveats of a mixed site with static html in the root and blogstubs as subfolders.

2 Apr 02, 2015 00:23

Ok, I found the "aggregation" option in Structure \ BlogName \ Advanced, so now multiple blogs can be shown in one. Given that info, is it possible to have:

-blog 1 as an aggregation blog on domain.com
-blog 2 and blog 3 as domain.com/blogname2/ and domain.com/blogname3/
-blog 4 acting as non-public linkblog
-blog 1, blog 2, and blog 3 all displaying linkblog links via linkblog widget

-at some time in the future, eliminating the blog1 aggregate blog and replacing domain.com with a static html site while the remaining blogs continue to run as usual?

3 Apr 02, 2015 23:50

Yes b2evolution is designed to do all this.

CAVEATS:

  • You should definitely run b2evolution at the root of your site. It will be much easier to configure.
  • With older versions you would need a little bit of .htaccess magic to handle your URLs. With version 6.1.2 (released today) you just enter your URLs and b2evolution takes care of everything.
  • You should definitely NOT delete index.php. But you can make a static homepage with index.html. (Otherwise, you can again do what you want if you edit the .htaccess rules but it's not as easy)

4 Apr 06, 2015 16:26

@fplanque
Thanks for the reply, it helps to clarify some of my questions. Do I understand correctly that:

1. the blog1 / aggregate blog would be set up as "Absolute URL" set to domain.com/ or should it be "Relative to baseURL" and left empty ?
2. the secondary blogs and the linkblog would be set up as "Relative to baseURL" pointing to folders corresponding to the stub names?
3. When it comes time to replace the blog 1 area with a static html site, I would leave the blog in the root and leave index.php as you mentioned, but would edit htaccess to remove index.php from index handlers and leave only index.html, so the html index would be displayed rather than the blog index, or do I leave both so that the blog stubs will still work, but just make sure that index.html is listed first and index.php second?

5 Apr 06, 2015 20:07

1. "Default blog on index.php would be even better" but absolute url should also work.
2. Yes you can do that. (Many other possibilities also exist.)
3.leave both and list index.html before index.php

6 Apr 07, 2015 02:19

Got it working properly now and am finally understanding better how stubs work. Thanks!

7 Apr 09, 2015 20:44

Hmm, something is still not right with how the stubs are set up.

I have blog1 running on the site root, configured as absolute url.
I have blog2 set up as 'relative to baseurl' /blog2name/

Per the suggestion from @mgsolipa here: http://forums.b2evolution.net/new-522-install-backend-icons-not-displaying
I created a subfolder on the filesystem named 'blog2name' containing a copy of blog2.php renamed to index.php
Inside that stubfile I changed:
<code>require_once dirname(__FILE__).'/conf/_config.php';</code>
to
<code>require_once dirname(dirname(__FILE__)).'/conf/_config.php';</code>

Now, when I load the site root, Blog 1 displays, with the Blog 1 Title and Tagline, so that's fine.
When I click the menu link for Blog 2, Blog 2 displays with the Blog 2 Title and Tagline, and the url is domain.com/blog2name/, so that's also fine.
On the Blog 2 page, if I click a category link, the URL changes to domain.com/blog2name/category-name so that's fine, BUT the Title and Tagline are from Blog 1 instead of Blog 2.

8 Apr 10, 2015 01:32

please copy paste the contents of /blog2name/index.php here

9 Apr 10, 2015 02:01

I had to strip out all the commented-out lines. It wouldn't let me post with them intact.

<?php
$blog = 2;
$show_statuses = array();
require_once dirname(dirname(__FILE__)).'/conf/_config.php';
require $inc_path.'_blog_main.inc.php';
?>

10 Apr 10, 2015 04:47

Sorry @jibberjab, I skipped one step in the comment I made here: http://forums.b2evolution.net/new-522-install-backend-icons-not-displaying#c103990.

You need to create an .htaccess inside your new folder blog2name. The content of that file should be the following:


<IfModule mod_rewrite.c>
RewriteEngine On
# Redirect anything that's not an existing directory or file to index.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^  index.php
</IfModule>

You can also find more information in this manual page: http://b2evolution.net/man/blog-url-settings

Regards!

11 Apr 10, 2015 23:42

This worked and the categories now display the proper blog's title.

So this means that if you want clean URLs, you can't just create a new blog and start working. You have to manually create a subfolder with a matching name, create a stubfile with corresponding blog ID, and an htaccess before the blog becomes usable.

12 Apr 12, 2015 05:20

Yes, but note that in version 6 you don't need to do any of this anymore. Just create a blog an start blogging.


Form is loading...