Robin W (@robin-w)

Forum Replies Created

Viewing 25 replies - 5,051 through 5,075 (of 14,146 total)
  • In reply to: Splitting a topic

    @robin-w

    Moderator

    I’d just use the backend to create 2 topics, copy the relevant info into each one, and use the author information on the right hand side to change to the required author ID

    @robin-w

    Moderator

    oh, and I found a bit where we can do some string editing, so…

    This code reduces the last to 1 entry, and then looks for that entry and removes it…

    add_filter ('bbp_before_paginate_links_parse_args' , 'rew_pagintion' ) ;
    
    function rew_pagintion ($args) {
    	$args['end_size'] = 0 ;
    return $args;
    }
    
    add_filter ('bbp_make_first_page_canonical', 'rew_take_out_last', 10 ,2) ;
    
    function rew_take_out_last ($retval, $pagination_links) {
    	$posf = strrpos ($pagination_links, '<a class="page-numbers' ) ;
    	$posl = strpos ($pagination_links, '<a class="next page-numbers' ) ;
    	$start = substr ($pagination_links, 0 , $posf) ;
    	$end = substr ($pagination_links, $posl , strlen($pagination_links)) ;
    	$links = $start.$end ;
    return $links ;
    }

    you can get rid of the page number dots using css or some more str functions in the code above, but I’ll leave you to work that out 🙂

    @robin-w

    Moderator

    yes, find
    wp-content/plugins/bbpress/templates/default/bbpress/content-single-forum.php

    transfer this to your pc and edit

    you’ll see

    <?php bbp_get_template_part( 'pagination', 'topics'    ); ?>
    
    <?php bbp_get_template_part( 'loop',       'topics'    ); ?>
    
    <?php bbp_get_template_part( 'pagination', 'topics'    ); ?>

    change that to take out the first line and save

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    Then transfer the file you saved above and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/content-single-forum.php

    bbPress will now use this template instead of the original

    @robin-w

    Moderator

    great – glad you are fixed

    @robin-w

    Moderator

    hmm – that’s a core WordPress bug.

    It has a track ticket, but no date

    https://core.trac.wordpress.org/ticket/39251

    sorry, best I can do !!

    @robin-w

    Moderator

    then use this to allow participants to close or delete topics and delete replies

    bbp style pack

    once activated go to

    dashboard>settings>bbp style pack>Topic/Reply Display

    and look at items

    17, 18 & 19

    @robin-w

    Moderator

    so put this in the custom css are of your theme

    #bbpress-forums ul.bbp-forums li.bbp-body .reply .bbp-reply-header .bbp-admin-links,
    #bbpress-forums ul.bbp-forums li.bbp-body div.hentry .bbp-reply-header .bbp-admin-links,
    #bbpress-forums ul.bbp-replies li.bbp-body .reply .bbp-reply-header .bbp-admin-links,
    #bbpress-forums ul.bbp-replies li.bbp-body div.hentry .bbp-reply-header .bbp-admin-links,
    #bbpress-forums ul.bbp-topics li.bbp-body .reply .bbp-reply-header .bbp-admin-links,
    #bbpress-forums ul.bbp-topics li.bbp-body div.hentry .bbp-reply-header .bbp-admin-links {
    bottom:1px !important;
    }

    @robin-w

    Moderator

    ok, so did you try MY code on another site?

    @robin-w

    Moderator

    hmm end works with 0 on my test site !

    @robin-w

    Moderator

    if you change
    bottom:15px;

    to

    bottom:1px ;

    it works

    @robin-w

    Moderator

    yes your theme has a style sheet

    wplms/assets/css/bbpress.min.css

    which contains

    #bbpress-forums ul.bbp-forums li.bbp-body .reply .bbp-reply-header .bbp-admin-links,
    #bbpress-forums ul.bbp-forums li.bbp-body div.hentry .bbp-reply-header .bbp-admin-links,
    #bbpress-forums ul.bbp-replies li.bbp-body .reply .bbp-reply-header .bbp-admin-links,
    #bbpress-forums ul.bbp-replies li.bbp-body div.hentry .bbp-reply-header .bbp-admin-links,
    #bbpress-forums ul.bbp-topics li.bbp-body .reply .bbp-reply-header .bbp-admin-links,
    #bbpress-forums ul.bbp-topics li.bbp-body div.hentry .bbp-reply-header .bbp-admin-links {
     position:absolute;
     bottom:15px;
     right:0
    }

    which moves the links, and makes them unclickable

    @robin-w

    Moderator

    ok, you say you have admin rights, but what forum role do you have ?

    Participants are not by default allowed to delete or close.

    Your theme (or another plugin) is only letting you see any admin links when you focus on the content. This is I am pretty sure preventing you clicking the link to edit.

    @robin-w

    Moderator

    so the functions.php file that is in your child theme – yes ? (sorry but the obvious questions so often lead me to a solution!)

    and can you paste the code with say the function above or below it, so I can check that it is not erroring due to syntax.

    @robin-w

    Moderator

    in your functions file or code snippets ?

    @robin-w

    Moderator

    yes I see 🙂

    Put this in your child theme’s function file – or use

    Code Snippets

    add_filter ('bbp_before_paginate_links_parse_args' , 'rew_pagintion' ) ;
    
    function rew_pagintion ($args) {
    	$args['end_size'] = 0 ;
    return $args;
    }

    @robin-w

    Moderator

    what do you mean by

    Hi, i would like to use WordPress native posts as topics with bbpress.

    @robin-w

    Moderator

    🙂

    @robin-w

    Moderator

    that’s all fine and good, just checking 🙂

    so yes you will need to look at how to share WordPress users over two sites. Above link looks good to fix, but there were lots of answers when I googled ‘share WordPress users between 2 sites’

    I also saw this plugin

    Share Logins Across Multiple Sites

    @robin-w

    Moderator

    link to an example and I might be able to give you css to hide

    @robin-w

    Moderator

    thinking about it, putting this in the custom css part of your theme should work

    .dummy {
    	display: none;
    }

    @robin-w

    Moderator

    if you want a subdomain, you’ll need to look at how to bridge two domains eg

    https://stackoverflow.com/questions/30952936/sharing-user-on-2-wordpress-installs-in-2-sub-domains-on-same-server

    @robin-w

    Moderator

    bbpress just uses WordPress users, so if your members are WordPress users, they will be bbpress users as well.

    you main issue will be sharing users between two domains.

    Why do you want bbpress in a sub domain ?

    @robin-w

    Moderator

    this should get you somewhere, although does throw up some raw displays in the backend

    add_filter( 'bbp_get_forum_content', 'rew_show_paras' , 10 , 2 );
    
    function rew_show_paras ($content, $forum_id) {
    	$post = get_post($forum_id);
    	$the_content = apply_filters('the_content', $post->post_content);
    return $the_content ;
    }	

    @robin-w

    Moderator

    looks like same theme related issue – you need to raise with your theme provider

    @robin-w

    Moderator

    great – glad you are fixed !!

Viewing 25 replies - 5,051 through 5,075 (of 14,146 total)