project_subdomain (@project_subdomain)

Forum Replies Created

Viewing 25 replies - 1 through 25 (of 50 total)
  • @project_subdomain

    Participant

    great, it’s fixing it.
    also thanks @gperez-tl

    @project_subdomain

    Participant

    thanks for your reply, pascal.
    i use the default twenty twelve theme. refreshing permalinks does not solve it, too.
    also it is not caused by caching plugins.

    @project_subdomain

    Participant

    @robkk thanks for your estimation!

    @project_subdomain

    Participant

    thanks @robkk. makes sense, think it’s not in the codex.
    I’ve got a navigation menu with links to specific topics (made with the backend’s customizer). Would like to add the correct count to each navigation menu link.

    Suppose that it would be easier to create a new custom navigation menu via functions as it’s not that easy to target the specific locations, right?

    But in case you have an idea how to target those customizer created links to add a count, this surely would help for many other things as well.

    @project_subdomain

    Participant

    solved it by commenting out my custom user role which I had added. everyone had keymaster as custom role then. removed the commenting brackets and changed it back in forums settings to my custom cole. admin still has keymaster.

    @project_subdomain

    Participant

    tested commenting out above part several times which gave me correct titles and wrong titles when active. Did a systematic check then by deactivating plugins one after one and custom codes one after one and reversed, also refreshed the page title via backend (no caching in use). Nothing found to make the titles correct except commenting out above part.
    I cannot reproduce it as well.

    @project_subdomain

    Participant

    just had the problem that on all not bbpress-related pages the title was ” ‘s “.
    When commenting out the part for “User is viewing someone else’s profile” it’s working correctly on all pages, also when viewing another profile:

    else {
    			$new_title['text'] = sprintf( esc_attr_x( "%s's", 'User viewing another users profile', 'bbpress' ), get_userdata( bbp_get_user_id() )->display_name );
           }

    fyi new occurred, just had a wordpress update recently

    @project_subdomain

    Participant

    UPDATE: sorry, thought code is causing the browser’s title as ” ‘s” on all non-bbpress-related pages. need to find the reason which does not seem to be in relation to this topic.

    @project_subdomain

    Participant

    to prevent showing all users’ replies in ‘my replies’ this code works instead, which robkk wrote:

    function custom_bbp_has_replies( $args ) { 
        if ( bbp_is_single_topic() && !bbp_is_single_user() ) { 
            $args['orderby'] .= 'post_modified';
            $args['order'] .= 'DESC';
        } 
        return $args; 
    } 
    add_filter('bbp_before_has_replies_parse_args', 'custom_bbp_has_replies' );

    @project_subdomain

    Participant

    great, it’s working! thank you so much – really saved my day (night already)! just had to change some brackets. so this is working:

    function custom_bbp_has_replies( $args ) { 
        if ( bbp_is_single_topic() && !bbp_is_single_user() ) { 
            $args['orderby'] .= 'post_modified';
            $args['order'] .= 'DESC';
        } 
        return $args; 
    } 
    add_filter('bbp_before_has_replies_parse_args', 'custom_bbp_has_replies' );

    @project_subdomain

    Participant

    @Robkk
    thanks again for your effort!
    Just had several tries after looking into the conditional tags also, it’s always saying that the user doesn’t have any replies to topics created yet.
    Also made sure now the code of the related topic-link is causing displaying all user’s replies.

    @project_subdomain

    Participant

    Solved it, maybe it’s helping others as well.
    It’s been caused by a custom code in my functions that did sort the replies and with which I had no problems so far. As bbpress now has this reply order feature integrated, it has not only become redundant but conflicting. First appearing when I star to use bbpress’ integrated reply order feature, resulting in showing all replies of a users as “my replies” instead of the user’s only.

    So without looking into the code I’m assuming it’s detected by the user’s ID as usual.

    @project_subdomain

    Participant

    ok found it, it’s caused by the GD bbPress Attachments plugin I’m using. sorry and thanks!

    @project_subdomain

    Participant

    Thanks, @robkk!
    This adds a vertical scrollbar only, same cut off width (have it at 320er query already).
    Hugging all elements of the forms (tested via form-reply.php) with a new, then styled div, as the form-legend shall be also responsive, also does not work.
    Just don’t find the reason, will have another look.

    @project_subdomain

    Participant

    okay sorry, mistook it to be less different by saving the values. I try to get a better first overview of it.

    @project_subdomain

    Participant

    thanks, it’s working.
    How is that different and to achieve with a checkbox and a selection menu as custom fields?

    @project_subdomain

    Participant

    Thanks again, that’s it!
    This is how it works finally for several topics with different divs and a custom action hook:

    /*Different divs for all topics of specific forums*/
    
    function add_different_div() {
        
    $topic_id = bbp_get_topic_forum_id(); 
        if (( $topic_id == 123) or ( $topic_id == 456)){
    ?>
           <div> this is some custom div text </div>
    <?php
        }
    
    elseif ( $topic_id == 789){?>
    <div> this is some OTHER custom div text </div>
    <?php
    }}  
        
    add_action( 'different_div', 'add_different_div' );

    Custom action hook to add in the template file where the div shall be displayed:

    <?php do_action( 'different_div' ); ?>

    @project_subdomain

    Participant

    @robkk I’m not sure why it’s not working proplerly (showing all divs in all forums). Could you give me a hint how the code has to look like, when I’d like to have
    forum id 1 echo div 1
    forum id 2 echo div 2
    forum id 3 echo div 3

    unforrtunately I’m not familiar with ternary operators which may be a option.

    @project_subdomain

    Participant
    <?php if ( bbp_is_single_forum('ID') ) :?>
    <div>…</div>
    <php endif;?>

    does not work (no div at all at forum with this ID).

    @project_subdomain

    Participant

    @Robkk:
    that’s great, thanks!
    How can I apply this to all topics for a specific forum?

    @project_subdomain

    Participant

    thanks @robkk, I’ll take account of this as performance should not suffer.

    @project_subdomain

    Participant

    thanks @robkk, I’ll have a look at it!

    @project_subdomain

    Participant

    just regular replies

    @project_subdomain

    Participant

    thanks, Robkk, this works!

    @project_subdomain

    Participant

    Thanks, Robkk. Changing “Your” to whatever is no problem. It’s just that the German language needs a singular translation of “Your” for the user’s home page and a plural translation of “Your” for all other user pages like subscriptions etc.
    It’s the same string of “Your” that’s used for Profile as well as for Topics, Replies, Subscriptions, Favorites.

Viewing 25 replies - 1 through 25 (of 50 total)