BuddyDev

Search

Gallery Counter in the Groups since BuddyPress V12.x everytime “0”

  • Participant
    Level: Initiated
    Posts: 20
    Maurice on #52104

    hey .. since the buddypress v12.000 is the counter everytime on “0”.. have you an idea, what is the problem ?

    here is the code:
    Please open mediapress/modules/buddypress/groups/mpp-bp-groups-group-extension.php
    In that file, on line 29, just before args, please add the following code

    if ( bp_is_group() ) {
    $count = mpp_get_gallery_count( array(
    ‘component’ => ‘groups’,
    ‘component_id’ => groups_get_current_group()->id,
    ) );
    } else {
    $count = 0;
    }

    and then in the args, on line 29, Please change this

    ‘nav_item_name’ => __( ‘Gallery’, ‘mediapress’ ),
    to
    ‘nav_item_name’ => sprintf( __( ‘Gallery <span>%d</span>’, ‘mediapress’ ), $count ) ,

    thx for help…

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #52120

    Hello Maurice,

    Sorry for the inconvenience. Currently, MediaPress is not fully compatible with BP 12.0+ versions. Please install and activate the “BP Classic” plugin then give it a try. If the issue still persists please let me know.

    Regards
    Ravi

  • Participant
    Level: Initiated
    Posts: 20
    Maurice on #52136

    But BP Classic destroys existing group structures if you install it later … (The page would then no longer work)
    Is there perhaps a way to display the counter after all?

  • Keymaster
    (BuddyDev Team)
    Posts: 24593
    Brajesh Singh on #52152

    Hi Maurice,
    Sorry about that. The problem is BuddyPress 12.0 has messed up the routing leading to a lot of trouble. The official release specified using BP classic will keep back compat. It seems from your reply, that is not true either.

    Please allow us this week to work on MediaPress. @ravisharma will be back to work tomorrow and we are going to work on MediaPress for next couple of days.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 20
    Maurice on #52161

    thank you … very good 😉 … i love your plugin …

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #52180

    Hello Maurice,

    Thank you for your patience. Please let me know which template pack you are using i.e. BuddyPress Legacy or BuddyPress Nouveau. You can check this under Settings > BuddyPress > Options > BuddyPress Core > Template Pack in the backend.

    Regards
    Ravi

  • Participant
    Level: Initiated
    Posts: 20
    Maurice on #52227

    the Template Pack is Buddypress Nouveau.

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #52228

    Hello Maurice,

    Please revert the changes you have made in the code and use the code from the following gist repo.

    https://gist.github.com/raviousprime/df00ef5d45426c7766833d40c8bf34f6

    Please let me know if it helps or not.

    Regards
    Ravi

  • Participant
    Level: Initiated
    Posts: 20
    Maurice on #52234

    i have created the code as a snippet … unfortunately no counter is displayed in the groups in the gallery menu item

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #52237

    Hello Maurice,

    Thank you for the acknowledgement. I will try it in the evening and let you know.

    Regards
    Ravi

You must be logged in to reply to this topic.

This topic is: not resolved