Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow selecting category In group #5

Open
sbrajesh opened this issue Jun 1, 2011 · 0 comments
Open

Allow selecting category In group #5

sbrajesh opened this issue Jun 1, 2011 · 0 comments

Comments

@sbrajesh
Copy link
Member

sbrajesh commented Jun 1, 2011

I think there is a missing feature to select a category in the group.
I have added this function with a category dropdown in the bcg theme directory home.php.
Just overwrite the div subnav with this one to make it work:

<div id="subnav" class="item-list-tabs no-ajax">

    <?php bcg_get_options_menu();
    $cats = bcg_get_categories(bp_get_group_id());
    $cats = implode(",", $cats);?>
    <select style="float:right;margin-right:20px;" name="event-dropdown" onchange='document.location.href=this.options[this.selectedIndex].value;'>
    <option value=""><?php echo attribute_escape(__('Kategorie')); ?></option>
    <?php
    $categories= get_categories('include='.$cats);
    foreach ($categories as $category) {
    $option = '<option value="'.bp_get_group_permalink().'blog/category/'.$category->term_id.'">';
    $option .= $category->cat_name;
    $option .= ' ('.$category->category_count.')';
    $option .= '</option>';
    echo $option;
    }
    ?>
    </select> 

</div>

reported by @ Sven

@ghost ghost assigned sbrajesh Jun 1, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant