Robin W (@robin-w)

Forum Replies Created

Viewing 25 replies - 6,901 through 6,925 (of 7,345 total)
  • In reply to: How to filter an array

    Robin W
    Moderator

    @robin-w

    Thanks Stephen


    Robin W
    Moderator

    @robin-w

    Think you probably need to crack open the plugin, and see where GD bbPress Attachments is adding a filter, and exactly what code it is using. You might then be able to mod this in your loop to re-strip it out.


    Robin W
    Moderator

    @robin-w

    yes it’s always awkward when even two things don’t work together and both say it’s the other one.

    In practice there well maybe no “fault”. If X chooses a hammer and nail to join two bits of wood, and Y chooses a screw and screwdriver, it is neither’s fault that the screwdriver won’t remove the nail, and X can say that Y should have used a hammer, and Y can say that X should have used a screw !

    I may not be able to help, but can you post a link to your url and a sample, and I’ll take a look


    Robin W
    Moderator

    @robin-w

    No problem. Just a quick thought, as I might be able to solve it a different way.

    Are you using a page called forums and the shortcode [bbp-forum-index]

    or did it just come sup in your menu when you installed it?

    It’s Ok, neither is wrong, I just need to know which !

    ie which in section 3 of the attached did you do

    Step by step guide to setting up a bbPress forum – Part 1


    Robin W
    Moderator

    @robin-w

    The page you are using to display is a full width page.

    Since you are using a child theme of twenty twelve, I presume you still have the default template which has a sidebar.

    If so, then copy this file, and rename it to bbpress.php and put it into your theme’s root ie
    wp-content/themes/twentytwelve-Child/bbpress.php

    That will ensure that bbPress uses a template with a sidebar


    Robin W
    Moderator

    @robin-w

    great, glad you’re fixed !


    Robin W
    Moderator

    @robin-w

    suspect that there is a variable in loop-sinlge-reply that already exists, but is not there in loop posts, so you’re getting a nil return.

    I’d try hardcoding some to see if you can pinpoint.

    eg look up a bbp post and see who the author is, so if post is 1126 then try

    <?php bbp_author_link( array( ‘post_id’ => 1126, ‘size’ => 14 ) ); ?>

    and see if that produces a result.

    Or you could try

    echo “bbp_get_topic_last_active_id() is “. bbp_get_topic_last_active_id() ;

    to see what number that is producing at that point to know that it is doing something

    if so, then you can try


    Robin W
    Moderator

    @robin-w

    Not really sure what to suggest next!


    Robin W
    Moderator

    @robin-w

    @netweb Stephen, Thanks for this, and having now looked at the trac ticket and bbp_parse_args function I see how this works.

    @nicmare

    Wherever you see bbp_parse_args, there’s a filter for the function to do this.

    bbp_parse_args has the format

    function bbp_parse_args( $args, $defaults = array(), $filter_key = '' )
    

    The resultant filter name is made up of bbp_before_’ . $filter_key . ‘_parse_args’

    (there is an bbp_after one as well!)

    The filter key is the third argument in the bbp_parse_args

    $r = bbp_parse_args( $args, array(
    		'before'            => '<ul class="bbp-forums-list">',
    		'after'             => '</ul>',
    		'link_before'       => '',
    		'link_after'        => '',
    		'count_before'      => '<span>',
    		'count_after'       => '</span>',
    		'count_sep'         => '</span><span>',
    		'separator'         => '',
    		'forum_id'          => '',
    		'show_topic_count'  => true,
    		'show_reply_count'  => true,
    	), 'list_forums' );

    so ‘list_fourms’ in the last line is the third argument.

    This should help you for the other two functions, as filters will then be obvious !


    Robin W
    Moderator

    @robin-w

    I’ll let you know if it gets changed.

    Were the other two functions as bad?


    Robin W
    Moderator

    @robin-w

    Hey great, glad you’re fixed !


    Robin W
    Moderator

    @robin-w

    Ok, I’ve had a think, and another look.

    There is no easy way to do less than you’ve done.

    The problem is that by the time the “apply filters” has been applied, the $output variable has already been created using the input variables, so changing $r is too late.

    What this function needs is an earlier apply filters called say ‘bbp_list_forums_args’ for the $r variable, the you could add a simple filter along the lines of

    function hide_forum_counts ($r) {
    $r['show_topic_count'] = false ;
    $r['show_reply_count'] = false ;
    $r['separator']  = ' ';
    return $r ;
    }
    add_filter('bbp_list_forums_args','hide_forum_counts') ;
    

    I’ve have suggested this is a trac ticket


    Robin W
    Moderator

    @robin-w

    Thanks Stephen – I have added this list to the Codex step by step instructions, so I won’t forget it again !


    Robin W
    Moderator

    @robin-w

    You say you are using the widget

    So you see the username, password and submit boxes in the sidebar – yes?

    when I click mine, I see no change in the url, and just go back to te screen when it has logged me on.

    Are you seeing a wp-login url ?


    Robin W
    Moderator

    @robin-w

    Have you used the plugin bbP signature?

    It is really up to the developers what they spend time on developing. They do this software in their spare time and for free.

    If plugins are readily available, they’re seems little point in integrating them. A variety of plugins also gives user choice, and freedom for others to improve the code.

    And you would be very unhappy be the sounds of it if they integrated some of the current plugins into core code.

    So I repeat, if you don’t like the current plugins, then come back with a detailed critique of what they don’t do, and what they do wrong. That way the developers can see what could be better, and maybe then they would be fired up to add it into core.

    So come back with which plugins and detailed issues and feature requests.


    Robin W
    Moderator

    @robin-w

    Has this always happened, or has it just started, and how long have you been using bbPress?

    In reply to: Mirroring Forum Posts

    Robin W
    Moderator

    @robin-w

    Sorry, totally misread this – thought you had posts mirroring and wasted to get rid of them.

    I suspect that it would be very hard to get them to just replicate in the database, hits at core code.

    But you could re-do your forum templates to show them twice.

    Beyond my immediate knowledge, but start by looking at you forum page loop, and then the templates viz

    wp-content/plugins/bbpress/templats/default/bbpress


    Robin W
    Moderator

    @robin-w

    Most bbp functions have simple variables. Yes, there must be a shorter way, but this is an array not a simple variable, and it builds an unordered list using the array and a loop.

    It has an “apply filters” as part of the function, so they are expecting it to be able to be filtered, but hopefully not by having to do it all again !

    I am writing some codex guide for filtering in bbPress, and by co0incidence was just using this oen as an example, and have been trying to crack it.

    I can do it by amending the template –

    https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/ section 2, and save template into

    wp-content/themes/yourthemename/bbpress

    bbPress then uses that one.

    I have posted a fresh query to Stephen Edgar or JJJ to pick up, but it’s gone into moderation as I posted a whole lot of code. Hopefully one of the two will pick it up and answer.

    In the meantime yours is so far the best answer !

    In reply to: Forum messed up

    Robin W
    Moderator

    @robin-w

    More of a case that the Presswork theme doesn’t support bbPress!

    Since this is a premium theme and therefore you have paid for support, suggest you go on their support site and ask for their help.


    Robin W
    Moderator

    @robin-w

    BBpress uses your themes page.php file as default page template.

    If you copy this (or any other page template) into the root of your theme and call it bbpress.php, it will be used instead.

    ie

    wp-content/themes/yourtheme/bbpress.php

    If you are after individual templates, these are held in :

    bbpress/templates/default/bbpress

    If you want to alter these, create a bbpress folder under your theme

    ie

    wp-content/themes/yourtheme/bbpress

    then any of these templates that you copy to this folder will be used instead, and you can modify them there.


    Robin W
    Moderator

    @robin-w

    Mycelus – which plugins have you tried, and what issues have you had, or what is lacking in them.

    Because if the developers take up your suggestion, you won’t want them to make the same mistakes that you have found in these plugins!


    Robin W
    Moderator

    @robin-w

    ok, something’s caused it, so we need to try and resolve down. Can you run the following :

    If you just type on http://mysite.com/wp-login.php into your url, do you get the same problem ? [test if the issue is in executing the result, or issue before that]

    Create a new page and put [bbp-login] in it, and then run that page (either by url eg http://mysite.com/my-new-page-name, or from a menu, I’d try both) [see if it’s in the widget]

    What other plugins are you running?


    Robin W
    Moderator

    @robin-w

    Did they say which plugin was the issue, and how they knew it was a plugin issue?

    I’d never rule anything out, but if there was an issue with bbpress and buddypress running on themes, then the whole world would be shouting about it, there are tens of thousands of these installations.


    Robin W
    Moderator

    @robin-w

    you don’t actually need to change the permalinks eg is Kazza were user 15

    http://www.mysite.com/forums/users/15/edit/

    works just as well as

    http://www.mysite.com/fourms/users/kazza/edit

    so you’d need to change how the profile page is called so that it displays the no. in the url.

    Given that profile is called from

    any topic or reply display (click the avatar or author name)
    several widgets (click the avatar or author name)
    possibly other areas

    you’d need to re-code these areas.

    the function bbp_reply_author_link is used for topic and reply display, not sure if widgets use that as well.

    In reply to: User ranking system?

    Robin W
    Moderator

    @robin-w

    Great, glad you’re fixed.

    If you do some coding for ranking, can you post this back here, and maybe I’ll add it as a plugin for others benefit

Viewing 25 replies - 6,901 through 6,925 (of 7,345 total)