function bp_get_directory_links_feed_link()
{
    global $bp;
    /*
    if ( !empty( $_POST['scope'] ) && $_POST['scope'] == 'mylinks' )
    	return $bp->loggedin_user->domain . bp_links_slug() . '/my-links/feed/';
    else
    */
    return apply_filters('bp_get_directory_links_feed_link', site_url(bp_links_root_slug() . '/feed'));
}
    function widget($args, $instance)
    {
        global $bp;
        extract($args);
        echo $before_widget;
        echo $before_title . $widget_name . $after_title;
        ?>

		<?php 
        if (bp_has_links('type=popular&per_page=' . $instance['max_links'] . '&max=' . $instance['max_links'])) {
            ?>
			<div class="item-options" id="links-list-options">
				<span class="ajax-loader" id="ajax-loader-links"></span>
				<a href="<?php 
            echo site_url() . '/' . bp_links_root_slug();
            ?>
" id="newest-links"><?php 
            _e("Newest", 'buddypress');
            ?>
</a> |
				<?php 
            if (bp_links_is_voting_enabled()) {
                ?>
				<a href="<?php 
                echo site_url() . '/' . bp_links_root_slug();
                ?>
" id="most-votes"><?php 
                _e("Votes", 'buddypress-links');
                ?>
</a> |
				<a href="<?php 
                echo site_url() . '/' . bp_links_root_slug();
                ?>
" id="high-votes"><?php 
                _e("Rating", 'buddypress-links');
                ?>
</a> |
				<a href="<?php 
                echo site_url() . '/' . bp_links_root_slug();
                ?>
" id="popular-links" class="selected"><?php 
                _e("Popular", 'buddypress');
                ?>
</a>
				<?php 
            } else {
                ?>
				<a href="<?php 
                echo site_url() . '/' . bp_links_root_slug();
                ?>
" id="active-links"><?php 
                _e("Active", 'buddypress');
                ?>
</a>
				<?php 
            }
            ?>
			</div>

			<ul id="links-list" class="item-list">
				<?php 
            while (bp_links()) {
                bp_the_link();
                ?>
					<li>
						<div class="item-avatar">
							<a href="<?php 
                bp_link_permalink();
                ?>
"><?php 
                bp_link_avatar(array('width' => bp_core_avatar_thumb_width(), 'height' => bp_core_avatar_thumb_height()));
                ?>
</a>
						</div>

						<div class="item">
							<div class="item-title"><a href="<?php 
                bp_link_permalink();
                ?>
" title="<?php 
                bp_link_name();
                ?>
"><?php 
                bp_link_name();
                ?>
</a></div>
							<?php 
                if (bp_links_is_voting_enabled()) {
                    ?>
							<div class="item-meta"><span class="activity"><?php 
                    printf(__('%+d rating', 'buddypress-links'), bp_get_link_vote_total());
                    ?>
</span></div>
							<?php 
                }
                ?>
						</div>
					</li>

				<?php 
            }
            ?>
			</ul>
			<?php 
            wp_nonce_field('bp_links_widget_links_list', '_wpnonce-links');
            ?>
			<input type="hidden" name="links_widget_max" id="links_widget_max" value="<?php 
            echo attribute_escape($instance['max_links']);
            ?>
" />

		<?php 
        } else {
            ?>

			<div class="widget-error">
				<?php 
            _e('There are no links to display.', 'buddypress-links');
            ?>
			</div>

		<?php 
        }
        ?>

		<?php 
        echo $after_widget;
        ?>
	<?php 
    }
Example #3
0
function bp_links_dtheme_directory_create_tab()
{
    if (true === is_user_logged_in()) {
        // render tab
        ?>
		<li id="links-create"><a href="<?php 
        echo bp_get_root_domain() . '/' . bp_links_root_slug() . '/create/';
        ?>
" class="no-ajax"><?php 
        _e('Create a Link', 'buddypress-links');
        ?>
</a></li><?php 
    }
}
Example #4
0
echo bp_site_name();
?>
 - <?php 
_e('Most Recent Links', 'buddypress-links');
?>
</title>
	<atom:link href="<?php 
self_link();
?>
" rel="self" type="application/rss+xml" />
	<atom:link href="<?php 
echo site_url() . '/' . bp_links_root_slug();
?>
" rel="alternate" type="text/html" />
	<link><?php 
echo site_url() . '/' . bp_links_root_slug();
?>
</link>
	<description><?php 
_e('Most Recent Links Feed', 'buddypress-links');
?>
</description>
	<pubDate><?php 
echo mysql2date('D, d M Y H:i:s O', bp_links_get_last_updated(), false);
?>
</pubDate>
	<generator>http://buddypress.org/?v=<?php 
echo BP_VERSION;
?>
</generator>
	<language><?php 
Example #5
0
<?php

get_header('buddypress');
?>

	<div id="content">
		<div class="padder">

		<form action="" method="post" id="links-directory-form" class="dir-form">

			<h3><?php 
_e('Links Directory', 'buddypress-links');
if (is_user_logged_in()) {
    ?>
 &nbsp;<a class="button" href="<?php 
    echo bp_get_root_domain() . '/' . bp_links_root_slug() . '/create/';
    ?>
"><?php 
    _e('Create a Link', 'buddypress-links');
    ?>
</a><?php 
}
?>
</h3>

			<?php 
do_action('bp_before_directory_links_content');
?>

			<div id="link-dir-search" class="dir-search">
				<?php 
function bp_links_dtheme_creation_tabs()
{
    global $bp;
    $href = sprintf('%s/%s/create/', $bp->root_domain, bp_links_root_slug());
    ?>

	<li class="current"><a href="<?php 
    echo $href;
    ?>
"><?php 
    _e('Create', 'buddypress-links');
    ?>
</a></li>
	<li><a href="<?php 
    echo $href;
    ?>
"><?php 
    _e('Start Over', 'buddypress-links');
    ?>
</a></li> <?php 
    do_action('bp_links_dtheme_creation_tabs');
}
Example #7
0
function bp_links_adminbar_random_menu_setup()
{
    global $bp;
    echo sprintf('<li><a href="%s/%s/?random-link">%s</a></li>', $bp->root_domain, bp_links_root_slug(), __('Random Link', 'buddypress-links'));
}