– When you “Add Media” from a Gallery Page it **DOES** create an activity item, but there’s no description.
– When you upload an image from the “Activity Form” it does add it to the gallery, but it **DOES NOT** create a new activity item.
– Pressing “Post Update” only uploads the words inside the textarea as an activity item, **skipping** attaching the currently uploaded image to the activity status.**_GAMEPLAN:_**
You can add shortcode support for activity statusesfunction oi_add_shortcodes_to_activity_stream() { add_filter( 'bp_get_activity_content_body', 'do_shortcode', 1 ); } add_action('bp_init', 'oi_add_shortcodes_to_activity_stream');
Going to code a way to automatically add
–[mpp-media id=XXX]
or
–[mpp-list-media id=XXX]
into the current activity item so that when you DO press ‘Post Update’ it also includes a shortcode to the just uploaded media.
Also it might be possible to implement a repost / reblog feature using this method? The same way Default Buddypress allows to @ people by clicking on a button on their profile page.
Is this a good way to approach it?
Hi Abe,
Thank you for posting here.1. Which theme are you using? Is it possible to provide me a tem,prary normal user account to test it. Are you usign any plugin like wall or wire/activity privacy?
About reblog, I suggest checking the BuddyPress Rechare plugin by imath
https://github.com/imath/bp-reshareThank you
BrajeshThank you.
I tested it and I am not sure why but it seems this code in mpp.js is not triggering on your site when we post update//filter ajax request but only if the activity post form is present if( jq( '#whats-new-form' ).get(0) ) { jQuery( document ).ajaxSend(function( event, jqxhr, settings ) { if( is_post_update( settings.data ) ) { var attached_media = mpp_get_attached_media(); if( attached_media ) { settings.data = settings.data+ '&mpp-attached-media='+attached_media; mpp_reset_attached_media(); } } });
The above code includes uploaded media ids in the post. I checked using mpp_get_attached_media() helper function in console and uploaded media ids are attached but the above code is not triggering and that is causing the problem.
Can you think of something on the site that might be causing it?
One thing I did notice that usually when I use Sublime Text Editor
and I put the | cursor near a {
it usually adds an underline to the { and the ending }
but in this case
the { on Line 1 doesn’t show an underline.
possibly because it isn’t there or because another function isn’t closed properly.
going to keep looking
Tested by putting this code
if( jq( '#whats-new-form' ).get(0) ) { console.log('#whats-new-form is available'); } else { console.log('#whats-new-form is unavailable'); }
right after the
var jq = jQuery;
and im getting a response, going to keep moving this down the line until i find where it breaks
- This reply was modified 8 years, 3 months ago by Abe.
You must be logged in to reply to this topic.