Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 16 replies - 1 through 16 (of 16 total)

  • groston
    Participant

    @groston

    Thx


    groston
    Participant

    @groston

    shanebp,

    Thanks for the prompt reply.

    The fields that I see in wp-admin > users > edit are all xprofile fields and I do not know how to add usermeta fields. I did see several plugins that provide this functionality, but I am wondering if suchs plugin would play nice with BP.

    It would be easy enough to directly edit the database in the manner your suggested, but that is not the right way to handle this. Would you please provide a little more guidance?


    groston
    Participant

    @groston

    Short answer: Happens ‘every’ time

    Long answer: A user first noticed the issue. I was then able to recreate the problem on two more occasions, i.e., both times I tried sending to five or more users. I have no reason to think that this will not happen every time I try sending to five or more users.


    groston
    Participant

    @groston

    I stumbled across the solution to my own problem and am sharing in case others run into a similar problem.

    Noting that a) our WP/BP site has been customized and b) that I am not the author of the site: Our site has both of the following folders:
    …/wp-content/themes/social-portfolio
    …/wp-content/themes/social-portfolio-child

    and both folder have a functions.php file. My original posting, with the described problem, occurred when the quoted code was in functions.php in the social-portfolio-child folder. When I moved the code to the functions.php in the social-portfolio folder, it worked exactly as expected.


    groston
    Participant

    @groston

    r-a-y,

    This is blather to try to trick the ‘Duplicate reply detected’ nonsense.

    Thanks for the reply – seem like the right approach, but… Following is my code:

    function ec_filter_activity( $activity_object ) {
      $activity_object['action'] = array( 'item1', 'item2');
      return $activity_object;
    }
    add_filter( 'bp_after_has_activities_parse_args', 'ec_filter_activity');

    When I load the activity feed, I get this warning (in the debug.log file):

    PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'ec_filter_activity' not found or invalid function name in /var/www/html/wp-includes/class-wp-hook.php on line 286

    I do not understand why this error is appearing – can you offer some guidance?

    p.s. The site is the MVP for the company. If there is decent adoption, the next release will be a custom app, so moving the code into a plugin is not really needed.


    groston
    Participant

    @groston

    please help!


    groston
    Participant

    @groston

    Varun – thanks for pointing out this plugin. Sadly, it fails to provide the single most wanted capability – only showing certain types of activities. Honestly, I do not understand the purpose of this plugin…


    groston
    Participant

    @groston

    Timezone is correctly set – I believe that this is a bug.


    groston
    Participant

    @groston

    Ticket created on trac.


    groston
    Participant

    @groston

    Bug posted on trac


    groston
    Participant

    @groston

    Sorry about the slow reply – must have missed the notification email. I just checked and for the fields in question, autolink is set to disabled.


    groston
    Participant

    @groston

    shanebp – thanks for the reply. Since the data in question is a path to a file name (just looked in the database and confirmed this), there is clearly some filtering going on in order to convert said file path into an href tag. My assumption was that this filtering was happening within the bp_get_member_profile_data filter and that this filter was already defined.

    Per your reply, my assumption seems to be wrong. So, more directly: where/how is this file path being converted into an tag?


    groston
    Participant

    @groston

    Thanks again for the help! This post, https://buddypress.org/support/topic/how-to-customize-the-order-of-fields-of-registration/, led me to the answer: the function bp_get_the_profile_field_name() returns the ‘friendly’ name of the field, i.e., that which is defined in wp-content\plugins\<my-plugin>\include\users\profile.php as the label parameter for the field.


    groston
    Participant

    @groston

    Sorry for being slow…

    I looked at the source for the page and found that the ID for the field is field_821. I then inserted three lines of code into the edit.php file as shown below (the first line is existing code, at line 22, shown for reference)

    <div<?php bp_field_css_class( 'editfield' ); ?>>
     <?php if ( 'field_821' == bp_get_the_profile_field_name() ) : ?>
       <p>My label here</p>
     <?php endif ?>

    Note: I also tried with the

    And yes, I want this label to appear above the field name. I also realize that simply using <p> may not provide the desired formatting, but to goal now is simply to get the test to appear. What am I doing wrong?


    groston
    Participant

    @groston

    venutius – thank you.

    I am not a WordPress expert, so I need a little more guidance. My guess is that the call to bp_the_profile_field returns the current edit field and that I could create an if clause that would insert some HTML if the field ID (or label) matches the one where I want my label inserted. But this is just a guess – can you please point me in the right direction?


    groston
    Participant

    @groston

    We want to add a new label. The page would be the Edit Profile page.

Viewing 16 replies - 1 through 16 (of 16 total)
Skip to toolbar