Tagged: MediaPress Buddypress PHP
Hi all,
Love the plugin MediaPress. Is there a way to modify where the media is injected in my buddypress activity?To be clear: Right now the media is placed just before comments on each activity item. But I think it would be nicer (more instagram style) if the media could be injected just after the activity entry-header… so before the activity body.
Is there a hook or filter to allow this? Can you think of another way?
Many thanks indeed,Matt
I’ve been trying to do it with different hooks in mpp-activity-hooks.php
For instance, replacing bp_activity_entry_content filter with other ones; but I either get the image appearing above the post, or below it, and never where I want it, which is right between activity-header and activity-inner divs. 🙁
Hi Matt,
Welcome to BuddyDev.As you have already discovered, we are hooking to ‘bp_activity_entry_content’
The problem is there are no action hook between activity header and the content in the BuddyPress default template packs.
Here is a way to do it though.
1. Please find out which template pack you are using(nouveau or legacy)
2. Copy the plugins/buddypress/bp-templates/your-template-pack(bp-nouveau or bp-legacy)/buddypress/activity/entry.phpto yourtheme/buddypress/activity/entry.php
3. Now, you can put an action hook betwene header in this file like
<?php do_action( 'bp_before_activity_entry_content' ); ?>
and then you can attach to this hook.
Regards
Brajesh
You must be logged in to reply to this topic.