1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Examples that access buddypress core and component functions

<div class="wide-col">
	<h2>Forums</h2>
	<p>
		<a href="<?php echo get_blog_option( $blog->blog_id, 'siteurl' ) ?>/bbpress" title="Open Community Forums">Open Community Forums</a>
	</p>
	<?php	$forum = bp_forums_get_forum();	?>
	<?php if ( $forum ) { ?>
		<ul>
			<?php foreach ( $forum as $f ) { ?>		
				<li><a href="<?php echo $f['forum_uri'] ?>" title="<?php echo $f['forum_name'] ?>"><?php echo $f['forum_name'] ?></a></li>
			<?php } ?>
		</ul>
	<?php } ?>
</div>

<div class="wide-col">
	<h2><a href="<?php echo oci_get_community_blog_url() ?>/groups">Groups</a></h2>
	<?php	$groups = BP_Groups_Group::get_newest(); ?>	
	<?php if ( $groups['groups'] ) { ?>
		<ul>
			<?php foreach ( (array) $groups['groups'] as $group ) { ?>		
				<?php $group = new BP_Groups_Group( $group->group_id, false ) ?>
				<li><a href="<?php echo bp_group_permalink( $group ) ?>" title="<?php echo $group->name ?>"><?php echo $group->name ?></a></li>
			<?php } ?>
		</ul>
	<?php } ?>		
</div>

<div class="wide-col">
	<h2><a href="<?php echo oci_get_community_blog_url() ?>/blogs">Blogs</a></h2>
	<?php	$blogs = bp_blogs_get_all_blogs(); ?>	
	<?php if ( $blogs['blogs'] ) { ?>
		<ul>
			<?php foreach ( (array) $blogs['blogs'] as $blog ) { ?>		
				<li><a href="<?php echo get_blog_option( $blog->blog_id, 'siteurl' ) ?>" title="<?php echo get_blog_option( $blog->blog_id, 'blogname' ) ?>"><?php echo get_blog_option( $blog->blog_id, 'blogname' ) ?></a></li>
			<?php } ?>
		</ul>
	<?php } ?>		
</div>

<div class="wide-col">
	<h2><a href="<?php echo oci_get_community_blog_url() ?>/members">Members</a></h2>
	<?php $users = BP_Core_User::get_newest_users( 10 ) ?>
	<?php if ( $users['users'] ) { ?>
		<ul>
			<?php foreach ( (array) $users['users'] as $user ) { ?>
				<li><?php echo bp_core_get_userlink( $user->user_id ) ?></li>
			<?php } ?>
		</ul>
	<?php } ?>
</div>