Replies
- ljmac on July 1, 2016 at 1:48 am in reply to: [Resolved] A very simple thing, but I can't find how to do it anywhere #4511
Hi Brajesh,
Assuming the function is correctly written and unique, are the numbers really necessary? Do they just help in the case of potentially competing functions, or do they pass useful information anyway? (The answer to this one may go over my head.) And most importantly, can the wrong number break an otherwise sound function?
- ljmac on June 30, 2016 at 11:06 am in reply to: [Resolved] A very simple thing, but I can't find how to do it anywhere #4489
Oh, I forgot to mention: it works perfectly. Thanks Brajesh, you’re a champion!
- ljmac on June 30, 2016 at 10:54 am in reply to: [Resolved] A very simple thing, but I can't find how to do it anywhere #4488
Oops, I made a mistake in my question! I meant the default activity tab, but your code allowed me to figure it out anyway:
function buddydev_custom_redirect() { if ( bp_is_user_activity() && bp_is_current_action( 'mentions' ) ) { $redirect_to = ( bp_core_get_user_domain( bp_displayed_user_id() ) . bp_get_activity_slug() . '/' ); bp_core_redirect( $redirect_to ); } } add_action( 'bp_actions', 'buddydev_custom_redirect', 0 );
One thing I’ve always wondered: why do some functions have a number at the end? What does it do?
- ljmac on June 29, 2016 at 11:02 am in reply to: Conflict Between Activity As Wire and BuddyPress Activity Plus #4466
No problem Brajesh – I can see you have a lot on your plate. 🙂
- ljmac on June 28, 2016 at 1:51 pm in reply to: Conflict Between Activity As Wire and BuddyPress Activity Plus #4450
Hi again Brajesh,
I’ve been giving this some thought, and I think maybe the easiest way to do it would be to leverage BuddyPress Activity Privacy’s Activity Plus integration code to insert Activity As Wire’s posting function. However, the above code is implemented in JavaScript. Can you tell me how I could insert Activity As Wire’s PHP posting function into this?
- ljmac on June 25, 2016 at 9:33 am in reply to: Conflict Between Activity As Wire and BuddyPress Activity Plus #4427
Hi again Brajesh.
Here’s some code that will probably help a lot – the BuddyPress Activity Privacy plug-in has a function to work around Activity Plus’ oddities. Here’s the code it uses (I hope back ticks preserve the code):
if( function_exists('bpfb_plugin_init') ) { add_action( 'wp_footer', 'bp_activity_privacy_fix_bp_activity_plus' ); function bp_activity_privacy_fix_bp_activity_plus() { ?> <script type="text/javascript"> if ( typeof jq == "undefined" ) var jq = jQuery; jq(document).ready( function() { form = jq("#whats-new-form"); text = form.find('textarea[name="whats-new"]'); //remove event handler previously attached to #bpfb_submit jq("#bpfb_submit").die( "click" ); jq(document).delegate("#bpfb_submit", 'click', function (event) { event.preventDefault(); var params = _bpfbActiveHandler.get(); var group_id = jq('#whats-new-post-in').length ?jq('#whats-new-post-in').val() : 0; jq.post(ajaxurl, { "action": "bpfb_update_activity_contents", "data": params, // add visibility level to the ajax post "visibility" : jq("select#activity-privacy").val(), "content": text.val(), "group_id": group_id }, function (data) { _bpfbActiveHandler.destroy(); text.val(''); jq('#activity-stream').prepend(data.activity); /** * Handle image scaling in previews. */ jq(".bpfb_final_link img").each(function () { jq(this).width(jq(this).parents('div').width()); }); //reset the privacy selection jq("select#activity-privacy option[selected]").prop('selected', true).trigger('change'); jq('select.bp-ap-selectbox').customStyle('2'); }); }); }); </script> <?php } }
Thanks for the rapid fix in 1.1.7 Brajesh
- ljmac on June 25, 2016 at 1:56 am in reply to: Conflict Between Activity As Wire and BuddyPress Activity Plus #4420
Hi Brajesh,
Yes, having looked at the code myself I can see it won’t be simple – Activity Plus is a very capable plug-in, but very non-standard. I should have mentioned that if it’s easier for me to hack Activity Plus itself, I’m happy to do that too.
Whatever the case, I greatly appreciate your help anyway.
- ljmac on June 25, 2016 at 1:51 am in reply to: [Resolved] Filter out groups from FB-liake user activity stream #4419
I confirm that friends plus following support now works out of the box, and there are no errors with BP 1.8. Thank you so much Brajesh!
- ljmac on June 25, 2016 at 1:10 am in reply to: [Resolved] Filter out groups from FB-liake user activity stream #4418
Thanks Brajesh, that’s totally awesome! Thanks for keeping this release BP 1.8 compatible. 🙂