BuddyDev

Search

Replies

  • Participant
    Level: Enlightened
    Posts: 40
    Jaume Aragay on #27937

    Great! 😀

    I thought it would be something like that… What else! 😉

    Thanks for your fast answer!

    Best regards!

    Jaume.

  • Participant
    Level: Enlightened
    Posts: 40
    Jaume Aragay on #6230
    This reply has been marked as private.
  • Participant
    Level: Enlightened
    Posts: 40
    Jaume Aragay on #6229
    This reply has been marked as private.
  • Participant
    Level: Enlightened
    Posts: 40
    Jaume Aragay on #6228
    This reply has been marked as private.
  • Participant
    Level: Enlightened
    Posts: 40
    Jaume Aragay on #6207

    1.- I have hidden the waring using -> error_reporting(E_ERROR | E_PARSE); before the offending line. Temporary solution, but solution.

    2.- The problem is somewhere else: In line 33 of the group-header.php file (in groups/single/ ) we find this line:

    if ( bp_group_has_moderators() ) :

    where “bp_group_has_moderators()” is giving a false “true” value as I don’t have moderators in any group but the code is executed saying “there are no moderators” so it should not execute in the first place.

  • Participant
    Level: Enlightened
    Posts: 40
    Jaume Aragay on #6206

    Hi Brajesh. I’ve been busy. Sorry for the delay.

    Caching is OK. Flushed from server but still having the same problem.

    These are the versions I use:
    WordPress Version: 4.6.1
    PHP Version: 5.6.27
    MySQL Version: 5.6.28

    The message is: Warning: Creating default object from empty value in XXX/wp-content/plugins/buddypress/bp-groups/classes/class-bp-groups-member.php on line 1122

    This is the function on line 1122:

    /**
    * Get a list of all a given group’s moderators.
    *
    * @since 1.6.0
    *
    * @param int $group_id ID of the group.
    * @return array Info about group mods (user_id + date_modified).
    */
    public static function get_group_moderator_ids( $group_id ) {
    global $wpdb;

    $group_mods = wp_cache_get( $group_id, ‘bp_group_mods’ );

    if ( false === $group_mods ) {
    self::prime_group_admins_mods_cache( array( $group_id ) );
    $group_mods = wp_cache_get( $group_id, ‘bp_group_mods’ );
    }

    // Integer casting.
    foreach ( (array) $group_mods as $key => $data ) {
    $group_mods[ $key ]->user_id = (int) $group_mods[ $key ]->user_id;
    }

    return $group_mods;
    }

    /*************/

    Is this $group_mods new? How do I get rid of that warning? What has changed in this last update? I got the admin list but not a message saying there were no mods so, something has changed in the code.

  • Participant
    Level: Enlightened
    Posts: 40
    Jaume Aragay on #5742

    Thanks Brajesh!

    I’ll stay with the CSS solution by now, then.

    If I were to use the the functions you mentioned on a prior post, would it be something like

    add_action( ‘mpp_setup_globals’, ‘mpp_my_custom_setup_gallery_nav’, 40 );

    using mpp_remove_gallery_nav_item and mpp_remove_media_nav_item?

  • Participant
    Level: Enlightened
    Posts: 40
    Jaume Aragay on #5736

    (Ugly) CSS alternative:

    body.mpp-page-groups.mpp-page-gallery-list.mpp-page-gallery-list-groups #buddypress div#item-body div#subnav,
    body.mpp-page-groups.mpp-page-single-gallery #buddypress div#item-body div#subnav {
    display: none;
    }

    body.mpp-page-groups.mpp-page-gallery-list.mpp-page-gallery-list-groups #buddypress div#item-nav,
    body.mpp-page-groups.mpp-page-single-gallery #buddypress div#item-nav {
    margin-bottom: 20px; // to get some space between menu and next items
    }

    body.mpp-page-groups.mpp-page-single-gallery #buddypress div.mpp-single-gallery-media-list ul.mpp-item-list div.mpp-item-actions.mpp-media-actions a:not(.mpp-delete-media){
    display: none;
    }

    • This reply was modified 6 years, 2 months ago by Jaume Aragay.
  • Participant
    Level: Enlightened
    Posts: 40
    Jaume Aragay on #5709

    I want do disable 2 “Edits”:

    1.- The one for the gallery that brings the second level menu to See, Edit file, Add files, Reorder, etc…
    2.- The “Edit” related to the files inside the gallery where you can “tweak” the “metadata” related to that file. (The Title is shows, the Description, the Status and the “Upload new cover”).

    If this means “disable editing of the galleries” then YES, I want it. (But ALSO disabling the edit of the ITEMS inside the gallery).

    By the way… I think the last item in the breadcrumbs is FIXED. Not available in the translation files as I’ve translated all the EDIT items in the file and the last breadcrumb is still “Edit”.

    • This reply was modified 6 years, 2 months ago by Jaume Aragay.
  • Participant
    Level: Enlightened
    Posts: 40
    Jaume Aragay on #5703

    Great. Thanks. I’ll add the filter to my functions file for future releases and tweak the code by now! 😉