Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to increase avatar size in bbpress recent replies widget


  • Robkk
    Moderator

    @robkk

    without css.

    in the template it defines the image as 14px X 14px and making it bigger with css makes the image blurry.

    Copy and create a new widget??

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

  • Robin W
    Moderator

    @robin-w

    you could do, but since you’re into code, I’d just amend line 1157 on bbpress/includes/common/widgets.php, and make a note to change it again on upgrades

    Not the recommended way, but practical !


    Robkk
    Moderator

    @robkk

    Yeah I’ll just do that


    Robkk
    Moderator

    @robkk

    ok i think i have found an alternative to styling the recent replies widget better.

    your topic archive shortcode plugin, i bet i can edit that to create a new recent replies widget

    but the only thing i need help on is how to not show topics that have no replies at all.

    what would i need to add to your plugin to do that?


    Robin W
    Moderator

    @robin-w

    you’d do better to just steal the replies widget I wrote for private groups

    download

    https://wordpress.org/plugins/bbp-private-groups/

    and then open up and edit

    includes/pg_forum_widgets.php

    line 464 onwards has the replies widget, I’m pretty sure that lines 539 to 542

    //PRIVATE GROUPS Get an array of IDs which the current user has permissions to view
            $allowed_posts = private_groups_get_permitted_post_ids(new WP_Query($query_data));
            // The default forum query with allowed forum ids array added
            $query_data['post__in'] = $allowed_posts;
    

    is all that’s added to the orginal code, so remove those lines.

    and line 574 contains the size

    you can just fork all that to the end of the file into your functions file


    Robkk
    Moderator

    @robkk

    no i dont want to do that , its harder for me to design the look of the widget.

    here let me explain a little bit more on why i want to hack your shortcodes plugin to show recent replies.

    well first i want my recent replies (and also recent topics) to look sort of like any recent comments widget. im going to use jetpacks recent comments on their website as an example.

    jetpack website example

    I have already pretty much made a copy of your shortcode plugin , edited it and threw it in my functions.php and put the shortcode in the visual editor widget by blackstudio

    heres what it looks like vs the default recent topics widget.

    my recent topics vs default

    now to make a replies widget with your shortcode all i have to do is rearrange code and use css to style everything together.

    to make it look like its showing recent replies, i just show the latest reply authors avatar , their name and what topic they replied on and im done.

    The only problem when doing this is if there is no replies on a topic , it would just show the topic author instead.

    Plus if you can figure this out i can also make a hack to make a replies archive. Which would be cool for something else i might do and ILL share it all when im done.

    i just need help on only showing topics with replies instead of all topics. if that is possible.


    Robkk
    Moderator

    @robkk

    yeah your way of using your private groups widgets were alot better than what i had said earlier .

    i got it all set up fine now.

    And i can probably create a cool looking replies archive this way too.


    Robin W
    Moderator

    @robin-w

    Great glad you fine now Robkk, been a bit busy earning money, so haven’t been on here as much as I should 🙂


    Robkk
    Moderator

    @robkk

    its all good

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Skip to toolbar