Skip to:
Content
Pages
Categories
Search
Top
Bottom

BP functions, for DB access or listing sites/groups/users for theme site map?

  • @andrewbird

    Member

    Hello Everyone,

    I am having some difficulty getting the information I want for a theme (template page) I am writing. I was looking for something that would allow me to learn some bp methods, so I am trying to display a site map type page, which lists sites, blogs, groups users with some metrix, e.g. no. of posts or pages published in last 24hrs, 7 days… or number of activities in group feed etc, or number of updates from user.. this sort of thing.

    My first thought, been somewhat new to this is that I should look at the bddb and write some functions which take out of the tables the info I need (in php & mysql). However WP has a very well documented reference guide, and usually functions already exist for this type of thing. I see that BP has functions, but little documentation (that i have found) about the arguments or what they return, so I wondered if anyone knew of functions to do the above etc.

    So far I have found things like:

    ‘$bpGroup_count=$wpdb->get_var(“SELECT COUNT(*) FROM {$prefix}bp_groups;”);’
    are there any issues using this type of approach in functions.php?

    and then I have tried to use bp_has_groups, and a range of other functions, which I have not managed to echo the result of.
    And then there is $bp, which I have failed to understand.

    I’m not stupid, but it seems fairly difficult to get started. Any help is much appreciated. If I Can learn this stuff, I’d be more than happy to add to the documentation.

    Many Thanks, Andrew.

  • The topic ‘BP functions, for DB access or listing sites/groups/users for theme site map?’ is closed to new replies.
Skip to toolbar