Recent Topics

1 Oct 16, 2013 21:30    

Hi

Is it possible to set as a page or in menu link Descending list public all blogs ? In case when there is f.eg 50 blogs. Or maybe there is another solution.

Regards

2 Oct 17, 2013 01:53

Hi @jardel,

Do you mean just a list of public blogs?

Maybe something like this:


<?php
    $blog = 1;
    $skin = '';
    $number_of_blogs = 10;
 
    require_once dirname(__FILE__).'/conf/_config.php';
 
    require_once $inc_path.'_blog_main.inc.php';
 
    $BlogCache = & get_BlogCache();
    
    for( $i = 1; $i <= $number_of_blogs; $i++ )
    {
        $varname = 'Blog_' . $i;
        if( $$varname = & $BlogCache->get_by_ID( $i, false ) && $$varname->in_bloglist )
        {?>
            <h3>#<?php echo $i; ?> : <a href="<?php $$varname->disp( 'blogurl', 'raw' );?>"> <?php $$varname->disp( 'name', 'htmlbody' )?></a></h3><?php
            
        }
    } 
?>

Copy / Paste the code above into a new file named bloglist.php and go to http://yourdomain.com/bloglist.php

I took the idea for that code from this manual page: http://b2evolution.net/man/advanced-customization/b2evolution-files/multiblogs-php

3 Oct 21, 2013 21:53

Thanks mgsolipa

It works perfectly !

Best Regards


Form is loading...