Search Results for 'bp_activity_entry_meta'
-
Search Results
-
Excuse me if this request is in the wrong place:
I have added a working custom date field to my activity page by editing the post-form.php and the the bp-custom.php. This is in my bp-custom.php:
// CUSTOM DATE FIELD function add_date_to_activity( $content, $user_id, $activity_id ) { bp_activity_update_meta( $activity_id,'thedate', $_POST['thedate'] ); } add_action( 'bp_activity_posted_update', 'add_date_to_activity', 10, 3 ); function my_datemeta() { $my_datemeta = bp_activity_get_meta( bp_get_activity_id(),'thedate' ); if (is_user_logged_in()) : { echo "<span class='datefont'>" . $my_datemeta . "</span></br>"; } endif; } add_action( 'bp_activity_entry_meta','my_datemeta' );Now I am trying to sort the posted activities by this date field instead of the standard sort by activity-id’s. Is there any way to override the standard sort function?
Thanks in advance, i’d be happy to share more information if necessary
Hello, I am trying to edit my theme to enclose the Delete button and Mark as Spam button into a custom drop-down box. How can I add these buttons into another area? Also, how do I remove these buttons from the do_action( ‘bp_activity_entry_meta’ ); ?> action? Thanks for any help!
I would like to show a new custom button in the activity stream’s entry page just beside delete button, which action hook should I use.
Topic: Extra line breaks on buttons
Hi!
I have a problem with extra line breaks appearing on the buttons which come after the delete button, namely Like, Spam and Edit buttons.
Some of the unwanted line breaks appear between the a href=”…” and /a tags, like this:
http://www.tuomaskarhunen.com/images/bp-linebreaks2.pngAlso, they appear in both Finnish and English language buttons, so I don’t think it’s the translation causing it. I’m trying to locate the problem but my limited knowledge about programming stops at this (at the entry.php file): bp_activity_entry_meta
ALSO, after loading the BP front page, when I press the “All members” tab under the status update textbox, the line breaks disappear and the buttons display correctly…
This problem / bug appears on all activity streams, not just the BP front page.
I’m at a total loss with this, so any help/insight would be greatly appreciated.
WordPress version: 4.4
BuddyPress version: 2.4.3Site: tuomaskarhunen.com/yhteiso
Since I’ve upgraded BP from 2.2 to 2.3, the functions i’ve used to format my activity stream no longer work (they don’t do anything, no errors or no effects whatsoever).
Function was taken from here(https://buddypress.org/support/topic/add-post-featured-image-in-activity-stream/)…
I’ve looked through the 2.3 release notes, but cant find anything that indicated that an action like below might no longer work?
function icondeposit_bp_activity_entry_meta() { if ( bp_get_activity_object_name() == 'blogs' && bp_get_activity_type() == 'new_blog_post' ) {?> <?php global $wpdb, $post, $bp; $theimg = wp_get_attachment_image_src( get_post_thumbnail_id( bp_get_activity_secondary_item_id() ) ); ?> <img src="<?php echo $theimg[0]; ?>" > <?php } } add_action('bp_activity_excerpt_append_text', 'icondeposit_bp_activity_entry_meta');Hi, I want replace some words in activity wall.
I use this code in bp-custom.php but doesn’t work.function replace_content($content) { global $bp, $activity_template; $wordlist = array("word1", "word2", "word3"); foreach ($wordlist as &$word) { $word = '/\b' . preg_quote($word, '/') . '\b/'; } $content = preg_replace($wordlist, 'censored', $content); return $content; } add_filter('bp_activity_entry_meta','replace_content', 9);Any suggestion for proper code?
Thank you.
My Site
ChristianiTees
This is the Problem
Here’s What I’m Using
- WordPress 3.6
- BuddyPress 1.8.1
- Gantry Theme for WordPress – By RocketTheme, LLCVersion 4.0.6 [Basic default Gantry theme for WordPress]
- Gantry BuddyPress – Version 1.3 | By RocketTheme, LLC
- Gantry Template Framework – Version 4.0.7 | By RocketTheme
Prior Issues With gantry-buddypress Plugin
<p>This Plugin has been responsible for all other issues with BuddyPress that I’ve had, e.g., [[Resolved] Registration/Activation Brokenand[Resolved] Duplicate Profile Meta Error]
I believe the present issue is within this plugin somewhere here, not sure.</p>
<p>
</p>
The entry.php file code is;
<p> </p><?php /** * @version 1.3 November 8, 2012 * @author RocketTheme, LLC http://www.rockettheme.com * @copyright Copyright © 2007 - 2012 RocketTheme, LLC * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only */ /** * BuddyPress - Activity Stream (Single Item) * * This template is used by activity-loop.php and AJAX functions to show * each activity. * * @package BuddyPress * @subpackage bp-default */ ?> <?php do_action( 'bp_before_activity_entry' ); ?> <li class="<?php bp_activity_css_class(); ?>" id="activity-<?php bp_activity_id(); ?>"> <div class="activity-avatar"> "> <?php bp_activity_avatar(); ?> </div> <div class="activity-content"> <div class="activity-header"> <?php bp_activity_action(); ?> </div> <?php if ( 'activity_comment' == bp_get_activity_type() ) : ?> <div class="activity-inreplyto"> <?php _e( 'In reply to: ', 'buddypress' ); ?><?php bp_activity_parent_content(); ?> " class="view" title="<?php _e( 'View Thread / Permalink', 'buddypress' ); ?>"><?php _e( 'View', 'buddypress' ); ?> </div> <?php endif; ?> <?php if ( bp_activity_has_content() ) : ?> <div class="activity-inner"> <?php bp_activity_content_body(); ?> </div> <?php endif; ?> <?php do_action( 'bp_activity_entry_content' ); ?> <?php if ( is_user_logged_in() ) : ?> <div class="activity-meta"> <?php if ( bp_activity_can_comment() ) : ?> " class="button acomment-reply bp-primary-action" id="acomment-comment-<?php bp_activity_id(); ?>"><?php printf( __( 'Comment <span>%s</span>', 'buddypress' ), bp_activity_get_comment_count() ); ?> <?php endif; ?> <?php if ( bp_activity_can_favorite() ) : ?> <?php if ( !bp_get_activity_is_favorite() ) : ?> " class="button fav bp-secondary-action" title="<?php esc_attr_e( 'Mark as Favorite', 'buddypress' ); ?>"><?php _e( 'Favorite', 'buddypress' ); ?> <?php else : ?> " class="button unfav bp-secondary-action" title="<?php esc_attr_e( 'Remove Favorite', 'buddypress' ); ?>"><?php _e( 'Remove Favorite', 'buddypress' ); ?> <?php endif; ?> <?php endif; ?> <?php if ( bp_activity_user_can_delete() ) bp_activity_delete_link(); ?> <?php do_action( 'bp_activity_entry_meta' ); ?> </div> <?php endif; ?> </div> <?php do_action( 'bp_before_activity_entry_comments' ); ?> <?php if ( ( is_user_logged_in() && bp_activity_can_comment() ) || bp_activity_get_comment_count() ) : ?> <div class="activity-comments"> <?php bp_activity_comments(); ?> <?php if ( is_user_logged_in() ) : ?> <form action="<?php bp_activity_comment_form_action(); ?>" method="post" id="ac-form-<?php bp_activity_id(); ?>" class="ac-form"<?php bp_activity_comment_form_nojs_display(); ?>> <div class="ac-reply-avatar"><?php bp_loggedin_user_avatar( 'width=' . BP_AVATAR_THUMB_WIDTH . '&height=' . BP_AVATAR_THUMB_HEIGHT ); ?></div> <div class="ac-reply-content"> <div class="ac-textarea"> <textarea id="ac-input-<?php bp_activity_id(); ?>" class="ac-input" name="ac_input_<?php bp_activity_id(); ?>"></textarea> </div> <input type="submit" name="ac_form_submit" value="<?php _e( 'Post', 'buddypress' ); ?>" /> <?php _e( 'or press esc to cancel.', 'buddypress' ); ?> <input type="hidden" name="comment_form_id" value="<?php bp_activity_id(); ?>" /> </div> <?php do_action( 'bp_activity_entry_comments' ); ?> <?php wp_nonce_field( 'new_activity_comment', '_wpnonce_new_activity_comment' ); ?> </form> <?php endif; ?> </div> <?php endif; ?> <?php do_action( 'bp_after_activity_entry_comments' ); ?> <?php do_action( 'bp_after_activity_entry' ); ?>The activity-loop.php file code is;
<?php /** * @version 1.3 November 8, 2012 * @author RocketTheme, LLC http://www.rockettheme.com * @copyright Copyright © 2007 - 2012 RocketTheme, LLC * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only */ /** * BuddyPress - Activity Loop * * Querystring is set via AJAX in _inc/ajax.php - bp_dtheme_object_filter() * * @package BuddyPress * @subpackage bp-default */ ?> <?php do_action( 'bp_before_activity_loop' ); ?> <?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) ) ) : ?> <?php /* Show pagination if JS is not enabled, since the "Load More" link will do nothing */ ?> <noscript> <div class="pagination"> <div class="pag-count"><?php bp_activity_pagination_count(); ?></div> <div class="pagination-links"><?php bp_activity_pagination_links(); ?></div> </div> </noscript> <?php if ( empty( $_POST['page'] ) ) : ?> <ul id="activity-stream" class="activity-list item-list"> <?php endif; ?> <?php while ( bp_activities() ) : bp_the_activity(); ?> <?php gantry_bp_locate_type( array( 'activity/entry.php' ), true, false ); ?> <?php endwhile; ?> <?php if ( bp_activity_has_more_items() ) : ?> <li class="load-more"> <?php _e( 'Load More', 'buddypress' ); ?> <?php endif; ?> <?php if ( empty( $_POST['page'] ) ) : ?> <?php endif; ?> <?php else : ?> <div id="message" class="info"> <p><?php _e( 'Sorry, there was no activity found. Please try a different filter.', 'buddypress' ); ?></p> </div> <?php endif; ?> <?php do_action( 'bp_after_activity_loop' ); ?> <form action="" name="activity-loop-form" id="activity-loop-form" method="post"> <?php wp_nonce_field( 'activity_filter', '_wpnonce_activity_filter' ); ?> </form>Any help resolving this issue is greatly appreciated, I will post the resolution here even if I recieve no response, so either BuddyPress Support or Users can benefit from these Gantry-BuddyPress Plugin Issues/Resolutions.
Thank you in advance for your time.
I’d like to add fields to the activity stream. I’m a relatively new coder so any help would be appreciated.
I have studied this post and copied it to a tee but can’t seem to get it to work properly.
What I am looking to do is to have 6 fields to every activity post: Post Title; Description; Make; Price; Model; and Location.
I have added the fields to the form in the post-form.php as so.
`
@
<input type="submit" name="aw-whats-new-submit" id="aw-whats-new-submit" value="” />`
It looks great. Next I added this to my functions.
`/**
* This captures additional info at update.
*/
function add_equipmentmeta_to_activity( $content, $user_id, $activity_id ) {
bp_activity_update_meta( $activity_id, ‘equip’, ($_POST) );
}add_action( ‘bp_activity_posted_update’, ‘add_equipmentmeta_to_activity’, 10, 3 );
function my_equipmentmeta() {
$my_equipmentmeta = bp_activity_get_meta( bp_get_activity_id(), ‘equip’ );
//if (is_user_logged_in()) : {
echo ‘(‘ . $my_equipmentmeta . ‘)‘;
//}
//endif;
}
add_action( ‘bp_activity_entry_meta’, ‘my_equipmentmeta’ );`Which was based on the previous post I mentioned above. I have been testing the ‘add_post_model’ to see if I could get just one to work.
Lastly I changed the global.js like this.
`/* Default POST values */
var object = ”;
var item_id = jq(“#whats-new-post-in”).val();
var content = jq(“textarea#whats-new”).val();
var title = jq(“input#add_post_title”).val();
var make = jq(“input#add_post_make”).val();
var model = jq(“input#add_post_model”).val();
var price = jq(“input#add_post_price”).val();
var location = jq(“input#add_post_location”).val();/* Set object for non-profile posts */
if ( item_id > 0 ) {
object = jq(“#whats-new-post-object”).val();
}jq.post( ajaxurl, {
action: ‘post_update’,
‘cookie’: encodeURIComponent(document.cookie),
‘_wpnonce_post_update’: jq(“input#_wpnonce_post_update”).val(),
‘content’: content,
‘title’: title,
‘make’: make,
‘model’: model,
‘price’: price,
‘location’: location,
‘object’: object,
‘item_id’: item_id
},
`I do not get any errors but I cannot get any data to show up. The holder for the meta tags shows up but it doesn’t contain any data. I’m not entirely sure where I am going wrong. Is this the best solution for my problem or is there something else I am missing?
Thanks ahead of time for any help…
