Forum Replies Created
-
OK! So Gravity forms guy gave me this part.
// apply only to form 5 because of this: _5 add_action( 'gform_after_submission_5', 'gf_add_to_activity_stream', 10, 2 ); function gf_add_to_activity_stream( $entry, $form ) { // log the $entry to see what you have to work with GFCommon::log_debug( __METHOD__ . '(): ENTRY => ' . print_r( $entry, true ) ); // reference https://codex.buddypress.org/developer/function-examples/bp_activity_add/ $success = bp_activity_add( array ( $args ) ); GFCommon::log_debug( __METHOD__ . "(): Database record {$success} was created." ); }
I’m assuming the GF common log stuff would be what calls the entry from Gravity forms, but I’m not sure where/what to put as far as the buddypress stuff he referenced!
Small bump! Maybe?
Thanks guys! So here’s what I got from the GF support guy.
add_action( 'gform_after_submission_5', 'gf_add_to_activity_stream', 10, 2 ); function gf_add_to_activity_stream( $entry, $form ) {
“Your custom PHP all needs to come after that, inside the new function gf_add_to_activity_stream”
I’m just not quite sure what to add after that. Can you guys help with this part, or should I bug the support guy again?
Ahh, I figured since it was the activity wall I was modifying that it’d be based here. Okay, thank you! I’ll share in this thread once I get how to do that thing if nobody minds 🙂
Thank you so much! This definitely worked. Now I have to worry about my users losing their edit post button in bbpress :’| the work never ends
Hi there! Yes, sorry. So for example:
http://i64.tinypic.com/212smx5.png
This is a shot of the page showing all site activity. The first one at the bottom shows I replied to the topic in the bbpress forum. This is standalone, I beleive, as I don’t have any group forums enabled. So anyway yes, I expected it to show up once here.
I immediately edited the post because I saw a typo. So the activity feed showed it again. I thought this was activity-only stream, but then a user emailed me this:
http://i66.tinypic.com/2vcwaqq.jpg
I had mentioned her in the post, and then edited immediately after, so it notified her again.
Hi there!
Thanks very much. Unfortunately, it doesn’t seem to be working. It’s just posting “$user” and it’s not linked.
I read somewhere that gravity forms itself struggles with links, but I don’t know what exactly to do to handle it. I know I can shove javascript into the “custom header” area on my template. Any ideas?
Update!
add_filter("gform_field_value_linkuser", "populate_linkuser"); function populate_linkuser($value) { $current_user = wp_get_current_user(); $user=$current_user->user_nicename ; $profilelink = '<a href="/members/$user">$user</a>'; return $profilelink; }
The above isn’t breaking anything, but it’s not working, either. Any ideas?