Forum Replies Created
-
In reply to: [Resolved] New users can’t login
Nope. They have a history of going to spam boxes, so you might check there.
In reply to: how do you ban spam users?The links are nonced, so I can’t recreate the link for you. It looks like http://example.com/members/username/admin/delete-user/?_wpnonce={random string} or http://example.com/members/username/admin/mark-spammer/?_wpnonce={random string}. You could create widget that shows up when an admin visits a user page.
In reply to: [Resolved] New users can’t loginWhen a user registers, an email is sent out with an activation link. The user must visit this link to activate their account before they can log in. I’m in a hurry, so I can’t do it right now, but there are a few plugins, and even some code snippets on this forum that will allow you to bypass activation. It’s not recommended on a live site to help block spam users.
In reply to: How to display when the User Edited His postTry changing `bp_format_time( $last_edited_date )` to `bp_format_time( strtotime( $last_edited_date ) )`
In reply to: how do you ban spam users?Yes there is. As long as you are a super admin, just visit the spam user’s profile page, and you’ll see “Admin Options” show up in the buddybar (the toolbar at the top of the page). In the drop-down you’ll see the options to delete/spam.
In reply to: How to display when the User Edited His postWell that could be the reason. Do you have `do_action( ‘bp_group_forum_post_meta’ );` anywhere in your template in the meta section? My guess is no, which is why nothing is displaying. You can try adding `my_display_forum_post_last_edited()` where you’d like the “Last edited…” text to appear.
In reply to: How to display when the User Edited His postTheoretically it should show up at the top of the post that was edited, right beside the #. Are you using the bp-default theme?
In reply to: hide from source codeYou can’t do that. You can use one of WP’s constants to change the wp-content folder name (https://codex.wordpress.org/Editing_wp-config.php#Moving_wp-content), but those folders will still show in source code. That’s just the nature of the internet.
In reply to: How to display when the User Edited His postApparently I have an issue today with fat fingers or bad copy/paste-itus. Try this:
`my_update_forum_post_last_edited( $post_id ) {
global $bp;do_action( ‘bbpress_init’ );
$post_id = (int) $post_id;
if ( empty( $post_id ) )
return;bb_update_postmeta( $post_id, ‘last_edited_date’, bp_core_current_time() );
bb_update_postmeta( $post_id, ‘last_edited_user’, $bp->loggedin_user->id );
}
add_action( ‘groups_edit_forum_post’, ‘my_update_forum_post_last_edited’ );`In reply to: Send private message autofill unpredictableTry adding `define( ‘BP_ENABLE_USERNAME_COMPATIBILITY_MODE’, true );` to your wp-config.php or bp-custom.php file.
In reply to: How to display when the User Edited His postYeah, that’s because I put in the wrong variable so nothing was saving. Replace the first function with this, and then see what happens. You’ll need to edit a post again.
`my_update_forum_post_last_edited( $post_id ) {
global $bp;do_action( ‘bbpress_init’ );
$post_id = (int) $post_id;
if ( empty( $post_id ) )
return;bb_update_postmeta( $post_id, ‘last_edited_date’, bp_core_current_time() );
bb_update_postmeta( $post_id, ‘last_edited_user’, $bp->loggedin_user->id );
}
add_action( ‘groups_edit_forum_post’, ‘my_update_post_lasted_edited’ );`In reply to: How to display when the User Edited His postAlso, I haven’t tested any of this, so you may need to play around a little more to make it functional.
In reply to: How to display when the User Edited His postYou’ll also need to edit a post before anything will show.
In reply to: How to display when the User Edited His postNo, the code goes in your functions.php file. You won’t need to make any other changes.
In reply to: Child copy of Child copy?Nope. Just make the changes @aces gave you, and you’ll be ready to edit how you please
You’ll only to change the css in your new my_columns theme.In reply to: How to display when the User Edited His postTry it. I should do everything for you. “Get you started” means just that. It will get you started, and then you can tweak it to your needs.
In reply to: Users can’t change passwordsYeah, but there’s talk of a 1.2.9, so we might be able to slip it in.
In reply to: How to display when the User Edited His postThis would take some code work, because neither bbPress or BuddyPress store this information. You would need to hook into ‘groups_edit_forum_post’ and the use bb_update_postmeta() and bb_get_postmeta() to save/retrieve the information. The following will get you started:
`my_update_forum_post_last_edited( $post_id ) {
global $bp;do_action( ‘bbpress_init’ );
$post_id = (int) $post_id;
if ( empty( $post_id ) )
return;bb_update_postmeta( $post_meta, ‘last_edited_date’, bp_core_current_time() );
bb_update_postmeta( $post_meta, ‘last_edited_user’, $bp->loggedin_user->id );
}
add_action( ‘groups_edit_forum_post’, ‘my_update_post_lasted_edited’ );function my_display_forum_post_last_edited() {
do_action( ‘bbpress_init’ );$last_edited_user = bb_get_postmeta( bp_get_the_topic_post_id(), ‘last_edited_user’ );
$last_edited_date = bb_get_postmeta( bp_get_the_topic_post_id(), ‘last_edited_date’ );if ( empty( $last_edited_user ) || empty( $last_edited_date ) )
return;echo ‘Last edited by ‘ . bp_core_get_user_display_name( $last_edited_user ) . ‘ on ‘ . bp_format_time( $last_edited_date ) . ‘ ‘;
}
add_action( ‘bp_group_forum_post_meta’, ‘my_display_forum_post_last_edited’ );`In reply to: Need help with PM function in forumsNo problem. Glad it works now
In reply to: Users can’t change passwordsCould you post a bug report on Trac for this? Reference this topic. You can use the same username/password as you did to log in here. http://trac.buddypress.org
In reply to: Need help with PM function in forumsWell that’s why I asked. Right now the logic tranlates to this:
“If this topic is not mine, or the user is not logged in, don’t show a link.”
You want it to say:
“If this post is mine, or the user is not logged in, don’t show a link.”
Here’s your new code:
`function bp_forum_send_private_message_link() {
echo bp_forum_get_send_private_message_link();
}
function bp_forum_get_send_private_message_link() {
global $bp, $topic_template;if ( bp_get_the_topic_post_is_mine() || !is_user_logged_in() )
return false;return apply_filters( ‘bp_forum_get_send_private_message_link’, wp_nonce_url( $bp->loggedin_user->domain . $bp->messages->slug . ‘/compose/?r=’ . bp_core_get_username( $topic_template->post->poster_id, $topic_template->post->poster_nicename, $topic_template->post->poster_login ) ) );
}`In reply to: Need help with PM function in forumsQuestion… Are you trying to put the link on every post as long as it’s not your own post?
In reply to: Need help with PM function in forumsInstead of clicking the link, right-click and choose “copy shortcut” or “copy url” or “copy link”… whatever the text may be. I would change your web domain to example.com before posting the link if you don’t want people poking around your site.
In reply to: Need help with PM function in forumsWhat is the link it’s producing?
In reply to: Need help with PM function in forumsYeah, that’s why. Try this:
`bp_core_get_username( $topic_template->post->poster_id, $topic_template->post->poster_nicename, $topic_template->post->poster_login )`