-
Brandon Allen posted on the forum topic How to display when the User Edited His post in the group How-To and Troubleshooting: 13 years, 7 months ago
Apparently 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() );…[Read more]
-
Brandon Allen posted on the forum topic Send private message autofill unpredictable in the group How-To and Troubleshooting: 13 years, 7 months ago
Try adding
define( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE', true );
to your wp-config.php or bp-custom.php file. -
Brandon Allen posted on the forum topic How to display when the User Edited His post in the group How-To and Troubleshooting: 13 years, 7 months ago
Yeah, 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,…[Read more]
-
Brandon Allen posted on the forum topic How to display when the User Edited His post in the group How-To and Troubleshooting: 13 years, 7 months ago
Also, I haven’t tested any of this, so you may need to play around a little more to make it functional.
-
Brandon Allen posted on the forum topic How to display when the User Edited His post in the group How-To and Troubleshooting: 13 years, 7 months ago
You’ll also need to edit a post before anything will show.
-
Brandon Allen posted on the forum topic How to display when the User Edited His post in the group How-To and Troubleshooting: 13 years, 7 months ago
No, the code goes in your functions.php file. You won’t need to make any other changes.
-
Brandon Allen posted on the forum topic Child copy of Child copy? in the group Creating & Extending: 13 years, 7 months ago
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.
-
Brandon Allen posted on the forum topic How to display when the User Edited His post in the group How-To and Troubleshooting: 13 years, 7 months ago
Try 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.
-
Brandon Allen posted on the forum topic Users can't change passwords in the group How-To and Troubleshooting: 13 years, 7 months ago
Yeah, but there’s talk of a 1.2.9, so we might be able to slip it in.
-
Brandon Allen posted on the forum topic How to display when the User Edited His post in the group How-To and Troubleshooting: 13 years, 7 months ago
This 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(…[Read more]
-
Brandon Allen posted on the forum topic Need help with PM function in forums in the group How-To and Troubleshooting: 13 years, 7 months ago
No problem. Glad it works now
-
Brandon Allen posted on the forum topic Users can't change passwords in the group How-To and Troubleshooting: 13 years, 7 months ago
Could 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
-
Brandon Allen posted on the forum topic Need help with PM function in forums in the group How-To and Troubleshooting: 13 years, 7 months ago
Well 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(); […]
-
Brandon Allen posted on the forum topic Need help with PM function in forums in the group How-To and Troubleshooting: 13 years, 7 months ago
Question… Are you trying to put the link on every post as long as it’s not your own post?
-
Brandon Allen posted on the forum topic Need help with PM function in forums in the group How-To and Troubleshooting: 13 years, 7 months ago
Instead 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.
-
Brandon Allen posted on the forum topic Need help with PM function in forums in the group How-To and Troubleshooting: 13 years, 7 months ago
What is the link it’s producing?
-
Brandon Allen posted on the forum topic Need help with PM function in forums in the group How-To and Troubleshooting: 13 years, 7 months ago
Yeah, that’s why. Try this:
bp_core_get_username( $topic_template->post->poster_id, $topic_template->post->poster_nicename, $topic_template->post->poster_login )
-
Brandon Allen posted on the forum topic Need help with PM function in forums in the group How-To and Troubleshooting: 13 years, 7 months ago
Are you sure the globals are correct within
bp_core_get_username
? I’m going under the assumption that you did your homework and found the right globals. The code inside bp_core_get_username() is the only place things could go wrong. -
Brandon Allen posted on the forum topic Need help with PM function in forums in the group How-To and Troubleshooting: 13 years, 7 months ago
Yes, but you changed more than that. You changed the code in bp_core_get_username() from:
bp_core_get_username( $topic_template->post->poster_id, $topic_template->displayed_user->userdata->user_nicename, $topic_template->displayed_user->userdata->user_login )
,which was correct, to:
bp_core_get_username( $bp->topic_template->post->poster_id,…
[Read more] -
Brandon Allen posted on the forum topic Need help with PM function in forums in the group How-To and Troubleshooting: 13 years, 7 months ago
That’s be cause you changed too much. You only need to change the line I told you to change. Which was:
global $topic_template;
to
global $bp, $topic_template;
Nothing else should change.
- Load More
@cnorris23
Active 2 months, 2 weeks ago