Recent Topics

1 Nov 23, 2008 00:56    

My b2evolution Version: 2.x

I'm having a little issue with these two pages: index.main.php vs. posts.main.php

I have 3 blogs.
Blog 1 = aggregates blogs 2 and 3

All of these blogs share the same skin. and I have created an index.main.php, single.main.php, and a posts.main.php

Is there a way to make it so that blog 1 always uses index.main.php, and blog 2, and 3 use the posts.main.php?

Right now, posts.main.php is used for everything and is messing my layout. It looks like index.main.php gets skipped.

I really want index.main.php to serve as a customized entry web page (like [url=http://usatoday.com/]USAToday[/url]) but once you go to a single post, or to http://domain/index.php?blog=2, I want you to see a standard list of posts. This is where I thought posts.main.php would be used for.

Should I just create another skin for blog 2 and 3? I could do that but I wanted run by you guys to get your thoughts before I re-invent the wheel.

p.s. new skin is running on my local pc so you can't preview just yet...

2 Nov 23, 2008 03:10

I think it would be easier to create another skin for blogs 2 and 3, but you can do something like this also

global $blog;
switch( $blog )
{
    case '1':
        echo 'blog 1 content';
        break;

    case '2':
    case '3':
        echo 'blog 2,3 content';
        break;

    default:
        echo 'blog 4,5,6... etc. content';
}

3 Nov 23, 2008 04:16

sam2kb,

What file would I have to modify?

I'll give this a try. otherwise, i'll just copy the skin and make separate copies for each blog.

4 Nov 23, 2008 18:21

You can add the switch in any file to display blog-specified content.

posts.main.php for posts
single.main.php for single post
index.main.php for all other pages using disp=XXX (comments, msgform, catdir, arcdir etc.)


Form is loading...