Skip to:
Content
Pages
Categories
Search
Top
Bottom

News Control

  • @alunsina

    Participant

    I’ve been fiddling around with WPMU and buddypress for about a week now. Can’t seem to find where to control what shows up in the News Page?

    Can someone point me to the right direction please?

    Thanks for your time.

    :D

Viewing 13 replies - 1 through 13 (of 13 total)
  • @gerbilo

    Participant

    Sidebar widgets: Design -> Widgets -> Blog-sidebar

    Left side and all other content: wp-content/themes/buddypress-home/single.php

    @alunsina

    Participant

    On my blog sidebar is the search which shows up on top of the site.

    the file you mentioned has this on the news part:

    ***

    <div class=”widget” id=”latest-news”>

    <h2 class=”widgettitle”>News</h2>

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <div class=”item-options”>

    <div class=”alignleft”><?php previous_post_link(‘« %link’) ?> </div>

    <div class=”alignright”> <?php next_post_link(‘%link »’) ?></div>

    </div>

    ***

    Sorry to be blaise but what should I do so that it shows the post of a certain blog only? as of now it shows a random post from a member blog.

    Thanks.

    @gerbilo

    Participant

    change function in bp-blogs/bp-blogs-classes.php ->

    function get_latest_posts( $blog_id = null, $limit = 5 ) {
    global $wpdb, $bp;
    if ( $blog_id )
    $blog_sql = $wpdb->prepare( " AND p.blog_id = %d", $blog_id );
    $post_ids = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT p.post_id, p.blog_id FROM " . $bp['blogs']['table_name_blog_posts'] . " p LEFT JOIN {$wpdb->base_prefix}blogs b ON p.blog_id = b.blog_id WHERE b.public = 1 AND b.deleted = 0 AND b.archived = '0' AND b.spam = 0 AND b.mature = 0 $blog_sql ORDER BY p.date_created DESC LIMIT $limit" ) );
    for ( $i = 0; $i < count($post_ids); $i++ ) {
    $posts[$i] = BP_Blogs_Post::fetch_post_content($post_ids[$i]);
    }

    return $posts;
    }

    to

    function get_latest_posts( $blog_id = null, $limit = 5 ) {
    global $wpdb, $bp;
    if ( $blog_id )
    $blog_sql = $wpdb->prepare( " AND p.blog_id = %d", $blog_id );
    $post_ids = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT p.post_id, p.blog_id FROM " . $bp['blogs']['table_name_blog_posts'] . " p LEFT JOIN {$wpdb->base_prefix}blogs b ON p.blog_id = 1 WHERE b.public = 1 AND b.deleted = 0 AND b.archived = '0' AND b.spam = 0 AND b.mature = 0 $blog_sql ORDER BY p.date_created DESC LIMIT $limit" ) );
    for ( $i = 0; $i < count($post_ids); $i++ ) {
    $posts[$i] = BP_Blogs_Post::fetch_post_content($post_ids[$i]);
    }

    return $posts;
    }

    Note this part ON p.blog_id = 1 – this is blog ID you want to see on your front page & news.

    @alunsina

    Participant

    I tried that by changing the blog id. It removed the recent blog post from front page but didn’t change the News Page.

    The news page I’m referring to is the one in between Home and Members page on the top right hand side of the default Buddy Press Theme.

    @burtadsit

    Participant

    All ‘news’ does is show the blog posts from the current blog in chronological order.

    @alunsina

    Participant

    which is the current blog? the one recently updated? the one on it has been there since last week.

    thanks.

    :)

    @alunsina

    Participant

    found the problem. :D it seems i was posting as another member of the blog. sorry. :D

    @alunsina

    Participant

    and now i’m back to the same concern, i’m so pissed i havent been very specific when i said i got it fixed. i know it was an option on posting. but i forgot where i found it. he he.

    every other post shows up on the blog (formerly news).

    i want it to show only posts by the admin, on the primary blog.

    @alunsina

    Participant

    i really hate to bump but its really bugging me.

    you can check the link here.

    http://upd8t.com/blog

    @burtadsit

    Participant

    alunsina, if you allow others to post to the main blog then then their posts will show up using the standard index.php template. When you select ‘blog’ from the home theme it runs a template called index.php. By default all posts in chronological order are displayed without any filtering by author. Whatever posts are most recent get displayed first. It doesn’t care who is the author.

    This really isn’t something that bp controls. It’s just normal blog behavior. You can change what index.php displays when it is run by modifying the index.php template. Or you can not allow other users to post to the main blog.

    @alunsina

    Participant

    okay, i give up, where do i find the setting not to allow other users to post on the main blog. i have searched every setting on there. :D

    @burtadsit

    Participant

    Users must be Authors on that blog to create posts and publish them. This is controlled by you. There is no setting that allows this or doesn’t.

    You’re using Community Blogs plugin. If you have this installed and activated on the main blog and have it set to allow any member or members of specific bp group to automatically become Authors then they will be able to post to your main blog.

    Disable Community Blogs on your main blog or take their member level down to Contributors. You can still have Community Blogs activated on other blogs.

    @alunsina

    Participant

    Marking closed. It has something to do with the sitewide tags plugin. Thanks burtadsit for helping figure it out.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘News Control’ is closed to new replies.
Skip to toolbar