Search Results for 'display users posts'
-
Search Results
-
Using the Post-to-Posts plugin, I’m trying to display all the posts connected to the user on the buddypress member profile. The custom post-type is named, “badges.”
The loop shows all of the connected posts to all users or none at all, but I want it to display only the posts connected to User A on User A’s profile page.
Am I using bp->displayed_user correctly or is there something else I should use?
Here’s the code,
// Assign badge to user meta using Post-to-Posts Plugin
function my_connection_types() {
p2p_register_connection_type( array(
'name' => 'multiple_authors',
'from' => 'badge',
'to' => 'user',
//'to_query_vars' => array( 'role' => 'editor, author' )
) );
}
add_action( 'p2p_init', 'my_connection_types' );
function display_custom_usermeta() { ?>displayed_user->id, 'level', true); $period = get_user_meta($bp->displayed_user->id, 'period', true);
$painting = get_user_meta($bp->displayed_user->id, 'painting', true);
?>has reached status.
Badges:
displayed_user->id);
$connected = new WP_Query( array(
'connected_type' => 'multiple_authors',
'connected_items' => $user,
'suppress_filters' => false,
'nopaging' => true,
) );// Display connected badges
if ( $connected->have_posts() ) :
?>
Badges:have_posts() ) : $connected->the_post(); ?>
<a href=""><?php
}I’m using the posts2posts plugin to create relationships between users but bp_has_members() isn’t taking it’s custom parameters. Instead I get a list of all users so how do I make this work together? Here’s my loop…
$followed_user = $bp->displayed_user->id; $number = 25; $args = array( 'connected_type' => 'user_followers', 'connected_items' => $followed_user, 'suppress_filters' => false, 'per_page' => $number ); if ( bp_has_members($args) ) : echo '<ul>'; while ( bp_members() ) : bp_the_member(); echo '<li>'; ?> <a href=""> <?php bp_member_avatar(); bp_member_name(); echo '</a></li>'; endwhile; echo '</ul>'; endif; echo '<div class="infinitescroll">'; bp_members_pagination_links(); echo '</div>';I’ve set up an extra nav item we’ll call “articles” using
bp_core_new_nav_item()adding a screen to the profile that shows a loop of the articles. Now I’v done this for a few extra nav items aswell all which show a loop. My issue is that I only want to display the “articles” nav item to a user if they have actually posted one. I’d of course run a check on the count of that loop like so…$profile_user = get_current_user_id( ); $args = array( 'post_type' => 'articles', 'author' => $profile_user, 'posts_per_page' => -1 ); $articles_query = new WP_Query($args); $articles_count = $articles_query->post_count; if ($articles_count > 0) {But then how do I use this to display the nav item conditionally?
Hi, please can you help me with a code to create the “create site” link under sites> next to “My sites” in buddypress member profile area.
right now I can only see it under site.com/blog
http://www.site.com/blogs/create/
I was able to modify the code in bp-blogs-loader.php however
I don’t know how to create the link to create my site ‘slug’ => ‘create-your-sites’,to http://www.site.com/blogs/create/
below is an example coder.
Also how to add it in bp-custom to work, thank you
/**
* Setup BuddyBar navigation
*
* @global BuddyPress $bp The one true BuddyPress instance
*/
function setup_nav() {
global $bp;/**
* Blog/post/comment menus should not appear on single WordPress setups.
* Although comments and posts made by users will still show on their
* activity stream.
*/
if ( !is_multisite() )
return false;$sub_nav = array();
// Add ‘Sites’ to the main navigation
$main_nav = array(
‘name’ => sprintf( __( ‘Sites %d‘, ‘buddypress’ ), bp_blogs_total_blogs_for_user() ),
‘slug’ => $this->slug,
‘position’ => 30,
‘screen_function’ => ‘bp_blogs_screen_my_blogs’,
‘default_subnav_slug’ => ‘my-sites’,
‘item_css_id’ => $this->id
);$parent_url = trailingslashit( bp_displayed_user_domain() . bp_get_blogs_slug() );
$sub_nav[] = array(
‘name’ => __( ‘My Sites’, ‘buddypress’ ),
‘slug’ => ‘my-sites’,
‘parent_url’ => $parent_url,
‘parent_slug’ => $bp->blogs->slug,
‘screen_function’ => ‘bp_blogs_screen_my_blogs’,
‘position’ => 10
);$sub_nav[] = array(
‘name’ => __( ‘Create Site’, ‘buddypress’ ),
‘slug’ => ‘your-sites’,
‘parent_url’ => $parent_url,
‘parent_slug’ => $bp->blogs->slug,
‘screen_function’ => ‘bp_blogs_screen_my_blogs’,
‘position’ => 50
);// Setup navigation
parent::setup_nav( $main_nav, $sub_nav );
}Hello,
BuddyPress is awesome, I use it at battlecity.org. The only issue I have is a constant battle with spam.
Askimet is awesome at finding and clearing out spam comments. The problem is, with BuddyPress, I get spam user registration and Askimet doesn’t remove spam accounts.
To try and fight the spam accounts I use two plugins:
– BP Humanity (users have to answer a question like five plus two)
– SI Captcha (users have to type in sequence of characters displayed in image)However, even with these two plugins, 10-20 spam user accounts are created daily. If I don’t login for a week, it can be very difficult to delete 100+ accounts. And if I don’t delete them, they’ll eventually all start posting about viagra, credit cards and magic ponies.
So, after some searching I found a plugin called User Spam Remover (http://wordpress.org/extend/plugins/user-spam-remover/). This plugin lets me delete all the spam users with a single click, rather than having to go through each profile in BuddyPress or try to sort through them on the WordPress users page. The only problem is that it does not play nice with BuddyPress, since it was designed for WordPress (it will leave behind remnant information, such as “Bob became a registered member” on the activity page).
I have two feature requests:
1 – A nice option would be the ability to hide the “became a registered member” message from the Activity page. I get enough spam user registrations that the activity page becomes a useless blurb of new users that aren’t actually new users. Once I delete all these spam accounts, the Activity page is awesome, showing useful things like new forum posts, groups and comments. I want it to always be like this, I don’t need it to ever display messages about new users even if they are legitimate.
2 – Built in function to detect and remove spam user accounts. In fact, this can just be a page that lets me sort and select users in ways that would bring spam accounts to the forefront. If I can sort by date registered, I can get a list of all new accounts on one page where I can select and delete about 95% of them (now I can get an alphabetical list which takes forever to sort through). Or if I could pull up a list of all accounts with no activity that would help too (if I can delete them all from the same page). I’ll never be able to block all spam registrations, so anything that makes it easier (less clicks) to clean up is awesome.
Another option for anybody in the mood for plugin development, is to make spam-user-remover compatible with BuddyPress or fork it to be a BuddyPress plugin.
Just some thoughts! I’d also love to hear any feedback on how others are fighting off spam.
I have a site that runs WordPress 3.4.1 with Buddypress 1.5.6
It has the Group forums turned on but they just mess me about and here is why:
1. The editor will format a forum page quite nicely yet the formatting disappears when the forum post is displayed
2. I put in standard double quotes and it decides to change them to something different. Took me ages to solve that one today when that messed up an html snippet that I had posted.
3. I post a snippet of html to demonstrate something which gets displayed as html. I go i to correct a typo and then it decides to decipher it as a link. I use the actual codes around the link then edit the post again cos I still had something wrong. It has decided to replace the codes yet again. Basically I am unable to edit a post for fear that it will change something
4. There is no easy way to add images to forum posts yet I can do it in the actual group. Now I may just be missing a plugin for this one but I cannot tell users to type in the html to include something. They dont know html so I increase my support loadI need forums to work for some things but the way they are is causing me immense frustration. I may be missing something obvious. If so What?
Note that I wont change core files because I have enough of an IT background to know that causes many problems with upgrades. Child theme might be the solution although I would prefer to wait for BP 1.6 to do that
I respected professors
I have a big problem in this activity
When the page comes up a lot of posts with comments
The whole page is too much for the rest of the site free users DhndstI want a button beside every post so that user with a concrete post comments Bbndh
And also for any post and I think this feature by default for all comments is closed
And when the user clicks on the button to display the comments will be displayed post commentsTopic: if else php statements
We are trying to get our head around a complex problem. We are trying to write an if/else statement in PHP (we are learning).
When a logged in user posts anything, we do not want them to have the option of clicking “favorite/unfavorite” on their own posts – only “delete” is displayed.
While when the logged in user visits another users page, or reads another users posts – we want them to be able to “favorite/unfavorite” but the “delete” button is not displayed.
We are trying to figure out the proper structure for this to make it work.
any help would be appreciated! Thanks!
Hey Guys,
I am using WordPress 3.3.2 and BuddyPress 1.5.5. I have created custom Group’s pages with the Buddypress Group Extension API and am allowing users to post from the front end on one of these pages and am having trouble saving custom field data when I do this. Everything else (title, content, and image saves to data base perfectly.) You can see example here: http://liveitupsocial.com/groups/san-fran-adventure/add-adventure/I am allowing user’s to essentially post activities that they think the group should participate in that weekend. I am querying these posts on another custom group page and I want these posts to be group specific. To do this I am sending a hidden field with value equal to the group ID when users add an activity to that group. Through displaying POST values I know the group ID is being sent and posted to my form validation, but not being saved as metadata.
I have placed the form validation in the group’s plugins.php, and the form in the display() in my custom Buddypress Group Extension API. Using that technique all fields save perfectly except for my post metadata which I’m sending as a hidden field (Group ID): Before the code is there a better way to do this?
In my Group Extension API my funciton display() holds the form: ( I will summarize and only show the hidden field not to bloat this post with code)
`funtion display(){
}
`Then I have form validation on the top of my Group’s plugin.php (Again summarized with the only part, the custom field, I’m having trouble with).
`
groups/single/plugins.php
<PHPif (isset ($_POST)) {
$group_id = $_POST;// Insert Custom Fields
add_post_meta($post_id, ‘group_id’, $group_id, true);do_action(‘wp_insert_post’, ‘wp_insert_post’);
PHP>
`Again,my title, content, image all save perfectly, the hidden field is posting just not saving to the database. Am I missing something? Is there a better way to structure the whole posting from the front end on custom group pages using the Group Extension API? Thanks in advance.
People are used to Facebook and go for the quick default: Posting onto the group’s wall. They do that even if I’ve asked them a question in the forum. -_-
QUICK AND DIRTY: The easy quick solution is: Disable the forum. (though I’ve heard in other posts that some have had trouble uninstalling a group’s forum recently…)
But that doesn’t always work. Sometimes a group just needs a forum. (although the straight-up stream is pretty nice)
At that point, what do I do?
LESS QUICK, STILL DIRTY: A somewhat lame solution is to use BP group extras to make FORUMS the landing page for the group on a group-by group basis.
Ideally, I’d like people to see the activity stream, but not be able to post directly onto it, but rather to be simply directed (like on BuddyPress.org) to the various forum topics.
HALF THE ANNOUNCE-GROUP PLUGIN: Any thoughts on how to do this? Someone suggested commenting out parts of the “announcements-only” plugin to block posting to the stream but allow forum participation. Would that work? @dwenaus
HALF THE BP-GROUP EXTRAS PLUGIN: If I was going to go the BP-group-extras route and just diminish the activity stream via navigation rather than privilege, I’d want to comment out the “custom fields” part of the group, since my groups don’t need that and it would just confuse users. Thoughts on how I would do that? @slaFFik Or is there some more simple way of reordering the group’s tabs / landing page?
FINALLY, is there some simple and/or creative way I’m failing to think about this?
All I know is that this is a SIGNIFICANT issue for me. In my experience so far, forum discussions and activity stream discussions DO NOT play nice with each other from a user experience standpoint, and sites like buddypress.org and facebook.com understand that and don’t allow it. I’m just wondering what “the common person” can do to avoid that same conflict.
Thanks much,
In a custom user tab I’m trying to display that users posts. (displayed user, not logged in user).
I found this code on a forum but it’s not working for me. It should pull the ‘displayed users’ posts only, instead it shows all posts. How Can I make it pull only posts by the “displayed user”?
`query_posts( ‘author=’ . $bp->displayed_user->id );
// the Loop
while (have_posts()) : the_post();
the_content( ‘Read the full post »’ );
endwhile;
`What am I doing wrong?
Thanks a ton!
Topic: Buddypress query_posts
In a custom user tab I’m trying to display that users posts. (displayed user, not logged in user).
I found this code on a forum but it’s not working for me. It should pull the ‘displayed users’ posts only, instead it shows all posts. How Can I make it pull only posts by the “displayed user”?
`query_posts( ‘author=’ . $bp->displayed_user->id );
// the Loop
while (have_posts()) : the_post();
the_content( ‘Read the full post »’ );
endwhile;
`What am I doing wrong?
Thanks a ton!
Topic: Privacy
Hi everyone,
This post is somewhat related to the privacy.. i.e in my Buddypress Insatllation when ever a user logs in, he is able to see posts/updates from all the other users of the site.
What I am trying to do is to display only the status and updates related to that particular user only.i.e updates from his friends or from the persons he is following…
Can you suggest me a way to get around this.
Waiting for a reply.
Thanks in advance.I installed a new instance of WordPress 3.3.1 at bookclub.skycor.net and then installed the buddypress plugin. Prior to installing the buddypress plugin, I was able to access all the admin menus in wp-admin. I was able to create new users, add posts, images, etc. After completing the installation of the buddypress plugin and activating it, I completed the process of configuring buddypress. At the end of that process, access to anything in wp-admin disappeared. There was no error message of any kind displayed on the screen. The screen was just white. I was able to go back to the main site at bookclub.skycor.net and navigate just fine with the exception of anything in the “dashboard” dropdown menu. Accessing anything in that menu caused the screen to go blank without any error messages.
My host is ixwebhosting.com
Is this something that other users have experienced?
My efforts to troubleshoot were to remove the buddypress directory under plugins to see if access to the wp-admin would return. It did not. I then dropped all the tables and reinstalled wordpress. I confirmed that wordpress was working properly and then reinstalled and configured the buddypress plugin. I experienced the same results I previously described.At my website http://quotten.com . Problem I am facing is with the permalinks settings and domain name change. If i change my permalink structure from http://quotten.com/archives/%post_id% to something else like http://quotten.com/posts/%post_id% , wordpress parts works well but in the buddypress pages, links displayed are the old ones only, for a new posts though links are according to the new structure but for the old one which were from the time before making the change stay the old link only (in the post though permalink shown is new only). This happens for all kinds of associated old links, like users profile, posts, groups and all, with new its fine according to new structure.
Now real problem occured when I changed domain name, for the wordpress part it is fine, for the new post made after change it is fine, but for the old links in buddypress are same as they were before domain change. How do I change this?I never used Buddypress.
I’m working at a wordpress project that is structured as follows in a multisite configuration:1) main site, single language, heavily customized with post types, loads of content, no forum, one webshop
2) secondary site, simpler setup, relatively little content, no forum, no webshop, multilanguage (WPML)
3) third site hosting a forum only and no other content; forum interface will be multilanguage (like site #2)
4) fourth site, reserved to admins only, single language, possibly a forum, to manage content and carry on project management tasks and discussions, etc.– all sites would be in the same domain (ie http://www.domain.com/ = 1, http://www.domain.com/2, http://www.domain.com/3 etc)
– sites #1, #2, #3 would be seamlessly integrated in the frontend. However content displayed changes, since #1 has very different contents meant for users in the main language, while #3 is just a forum. Site #2 is intended to provide information and basic contents to international users, while the forum would provide a common space for discussion, being the interface translated.
I want a multisite setup so users can keep their logins, cookies, across the sites, yet at the same time make some order to admin the different areas.
Now… it is clear to me that WPML I can take care of the translation part. However, what I’m really clueless about is how to seamlessly integrate the forum part. Since mine is a community-type website, I want to have community features… Buddypress seems to offer a more complete solution for this than bare bbpress. I don’t want users to create their blogs or groups. But it would be nice to have better profile pages, private messaging, set their own display pic, and so on. Features that bbpress lacks or are not natively integrated (I come from a bbpress 1.0 experience and while I love it for the theming possibilities, plugin wise was badly supported).
So what I would really like to know… Does it make sense to run BuddyPress on site #3, activate only modules for member profiles, forums and activity streams?
Will the activity streams report activity of these users on sites #1 and #2? (would that include creation of new articles, posts and content by admins and authors? or just comments?)
Will the users be able to login from site #1 or #2 or #3 and kept logged in without any weirdness happening when navigating through the sites and performing actions?
Can authors from #1 and #2 link their profiles to profiles found in #3 Buddypress rather than using author.php? Same for registered users that post a comment on #1 or #2, can they have a link directing to their Buddypress member profile page/activity stream?
Being site #1 only in one language for both content and interface, what if user jumps from #2 or #3 to #1 and then back to #2 or #3, would his languages preference being persistent?
Thank you!
Hi
Our site is going to be a community of members who are either ‘academic’ or ‘professional’/ We capture this information on sign up and know if a user is either one or the other.
The site will display members ‘posts’ in various places and we filter by most recent, most comments, featured, etc.
What I want to do is allow the visitor to filter between ‘academic’ or ‘professional’ at any point, to only show users of one or the other.
Is there some PHP or a plugin to help me show/hide users with these profile fields?
Any help appreciated, going mad with this one.
Thanks,
Ian

