Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 5,976 through 6,000 (of 32,505 total)
  • Author
    Search Results
  • #177594
    Robin W
    Moderator

    ok, thanks for confirming.

    Without spending considerable time testing, why not just take out that entire section for bbpress (and if needed juts put back the bits you want) eg

    //* Hook social icons and click here widget areas
     add_action( ‘genesis_after_header’, ‘the_411_extras’, ‘genesis_after_sidebar_widget_area’ );
    
     function the_411_extras() {
    if (!is_bbpress {
    if ( is_active_sidebar( ‘social-icons’ ) || is_active_sidebar( ‘click-here’ ) || is_active_sidebar( ‘split-sidebar-left’ ) || is_active_sidebar( ‘split-sidebar-right’ )) {
    
    echo ‘<div class=”site-extras”>’;
    
    genesis_widget_area( ‘social-icons’, array(
     ‘before’ => ‘<div class=”social-icons”>’,
     ‘after’ => ‘</div>’
     ) );
    
    genesis_widget_area( ‘click-here’, array(
     ‘before’ => ‘<div class=”click-here”>’,
     ‘after’ => ‘</div>’
     ) );
     genesis_widget_area( ‘split-sidebar-left’, array(
     ‘before’ => ‘<div class=”split-sidebar-left”>’,
     ‘after’ => ‘</div>’,
     ) );
     genesis_widget_area( ‘split-sidebar-right’, array(
     ‘before’ => ‘<div class=”split-sidebar-right”>’,
     ‘after’ => ‘</div>’,
     ) );
    
    echo ‘</div>’;
    
    }
     
    
    }
    
    }

    I’m also not sure why your add action has two functions

    add_action( ‘genesis_after_header’, ‘the_411_extras’, ‘genesis_after_sidebar_widget_area’ );

    all the coding I have ever done has one, and then maybe some arguments on priority etc.

    #177580
    iliyan
    Participant

    and when I add this code to disable only visual editing everything works but I don’t want to do this:

    function bbp_enable_visual_editor( $args = array() ) {
        $args['tinymce'] = false;
        $args['quicktags'] = true;
        return $args;
    }
    add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor' );
    #177567
    Robin W
    Moderator

    I’ve just been digging further into the code

    There is a filter on topics and replies which looks at posts with a private status, but topics and replies on a private forum don’t have that status UNLESS it is manually set on the admin backend (or imported with that status). So in the normal process they are viewable unless set by a moderator/admin to private within the backend.

    So a standard participant should be able to see all topics and replies.

    For creating topics and replies the code just looks at ‘publish topics’ and ‘publish replies’ so allows registered users to do this for both public and private forums.

    This would then make great sense for then original poster who had imported the forum, so topics and replies were likely to have a post status of private so not viewable by participants.

    I don’t know if that helps you understand your circumstances, but hope it explains it better.

    #177566
    crayc
    Participant

    Hello, I am using genesis theme the-411 which has no sidebars just a fixed widget area to the right showing social icons. The site is forced full width but the container sit at about 800px I am trying to remove that from showing on the forums page and instead show a a login for bbpress. Not sure how to go about doing this. I tried the If conditional tag on there but it does not seem to work.

    here is the code
    //* Hook social icons and click here widget areas
    add_action( ‘genesis_after_header’, ‘the_411_extras’, ‘genesis_after_sidebar_widget_area’ );
    function the_411_extras() {

    if ( is_active_sidebar( ‘social-icons’ ) || is_active_sidebar( ‘click-here’ ) || is_active_sidebar( ‘split-sidebar-left’ ) || is_active_sidebar( ‘split-sidebar-right’ )) {

    echo ‘<div class=”site-extras”>’;

    genesis_widget_area( ‘social-icons’, array(
    ‘before’ => ‘<div class=”social-icons”>’,
    ‘after’ => ‘</div>’
    ) );

    genesis_widget_area( ‘click-here’, array(
    ‘before’ => ‘<div class=”click-here”>’,
    ‘after’ => ‘</div>’
    ) );
    genesis_widget_area( ‘split-sidebar-left’, array(
    ‘before’ => ‘<div class=”split-sidebar-left”>’,
    ‘after’ => ‘</div>’,
    ) );
    genesis_widget_area( ‘split-sidebar-right’, array(
    ‘before’ => ‘<div class=”split-sidebar-right”>’,
    ‘after’ => ‘</div>’,
    ) );

    echo ‘</div>’;

    if (is_bbpress( ‘forums’ ) ) {
    /** Remove default sidebar */
    remove_action( ‘genesis_after_sidebar_widget_area’ );
    }

    }

    }

    I added the split right and left, but I only use the right for search box. Thanks!

    #177562
    Robin W
    Moderator

    we’re probably both insane !

    It worked on my test site, but then I do have a lot cooking on there.

    back to my code above, can you try

    case bbp_get_participant_role() :

    in place of the line

    case 'bbp_participant':

    #177557

    In reply to: Translation German

    Robkk
    Moderator

    So in settings > General you have Deutsch as the Sprache der Website

    I am not sure why you are using files with pt_DE instead of de_DE, and wonder if that could be the issue, or you need a different kind of language file to use. Also the language file directory has changed. It is now /wp-content/languages/plugins

    #177554
    evanevans333
    Participant

    I don’t think so. According to this, those caps are not listed for Participant:

    bbPress User Roles and Capabilities

    But it makes sense they should be part of Participant caps right? I’m not insane? 🙂

    #177553
    evanevans333
    Participant

    Oh no kidding. Well yeah that makes sense right? On my install, even with all plugins off (except bbpress), the user Participant does not get Read Private Topics and Replies perms. Yes, I can confirm that.

    I am using the Thrive Community theme by Dunkahkdis, and he said that was not happening inside his Theme and to come over to bbPress and ask in here. He’s not irresponsible either. He’s an amazing coder, and excellent with tech support. But, you never know. You never know.

    So, just for clarity. You are saying, outright, that the Participant Role by default in bbPress is supposed to HAVE the caps: Read Private Topics and Replies
    ?

    #177545
    evanevans333
    Participant

    Well I still appreciate you sending over the code. I will fiddle with it, and see where it gets me. Thanks so much. AND I will report back findings, in case it does solve something, so that others will see at least one solution. Thanks!

    #177544
    Robin W
    Moderator

    ps

    I just cribbed this code from elsewhere, so the capabilities may not be the participant ones, you’ll need to check what they should be

    bbPress User Roles and Capabilities

    #177543
    Robin W
    Moderator

    untested, but this should in theory let you play with the capabilities of the participant role

    function add_role_caps_filter( $caps, $role )
    {
        /* Only filter for roles we are interested in! */
        if( $role == 'bbp_participant' )
            $caps = custom_capabilities( $role );
         return $caps;
    }
     
    add_filter( 'bbp_get_caps_for_role', 'add_role_caps_filter', 10, 2 );
     
    function custom_capabilities( $role )  {
        switch ( $role )
        { 
            /* Capabilities for 'participant' role */
            case 'bbp_participant':
                return array(
                    // Primary caps
                    'spectate'              => true,
                    'participate'           => true,
                    'moderate'              => false,
                    'throttle'              => false,
                    'view_trash'            => false,
     
                    // Forum caps
                    'publish_forums'        => false,
                    'edit_forums'           => false,
                    'edit_others_forums'    => false,
                    'delete_forums'         => false,
                    'delete_others_forums'  => false,
                    'read_private_forums'   => true,
                    'read_hidden_forums'    => false,
     
                    // Topic caps
                    'publish_topics'        => true,
                    'edit_topics'           => true,
                    'edit_others_topics'    => false,
                    'delete_topics'         => false,
                    'delete_others_topics'  => false,
                    'read_private_topics'   => true,
     
                    // Reply caps
                    'publish_replies'       => true,
                    'edit_replies'          => true,
                    'edit_others_replies'   => false,
                    'delete_replies'        => false,
                    'delete_others_replies' => false,
                    'read_private_replies'  => true,
     
                    // Topic tag caps
                    'manage_topic_tags'     => false,
                    'edit_topic_tags'       => false,
                    'delete_topic_tags'     => false,
                    'assign_topic_tags'     => true,
                );
     
               
     
                break;
     
            default :
                return $role;
        }
    }
    #177533
    evanevans333
    Participant

    Well I appreciate the fast answer. Thanks for that. And yeah, I tried all those plugins. They no longer can reach in there and modify the Participant role. That role’s caps are apparently hard coded into the bbPress plugin itself, somewhere. I sure would like to transfer the ability that Moderator has to Participator, just on those two issues, Read_Private_Topics, Read_Private_Replies. That just makes sense, is logical, and practical. A lot of people have been posting about this, trying to make this right, for years now. We need at least a solution that works moving forward.

    The concept is, that if you set a forum to Private, it’s because you don’t want anonymous users and search engines having access to those posts. It’s not because you want to restrict registered users from seeing the content, especially if they are Participants. And if to Participate means to just POST, not reply or see topics and replies in private forums, than there needs to be a User Role with those upgraded permissions, between Moderator and Participant. Because beyond Private, there is even the Hidden permission level. And that’s good for Moderator/Admin level access, but it’s too much if you just want users to be able to see and reply (Participate) in content that is not publicly accessible by anonymous website visitors and search engines.

    Well, very well, I hope some fix comes someday. Somebody who coded bbPress needs to come up with an idea here.

    r083r7
    Participant

    I noticed that when you go to the root forum it displays all the forums to the user. Not a desired effect. I am using shortcodes and spreading my forums on different pages and some are only available to certain user roles. BUT if someone goes to the root forum they see it all.

    How would I prevent this from happening? Is there a way to maybe hide the root forum or possibly some other way to go about this.

    #177525
    Arturo
    Participant

    When using a translated bbpress, some titles in the WordPress Admin Dashboard for “Right Now in Forums” are missing. Where can I check this in the code?

    Here is a screeshot http://prnt.sc/ccs85f

    Using bbPress 2.5.10-6063

    #177522
    Bingo Bongo
    Participant

    Hi –

    (For our forums here – http://www.zetaunit.com/forums/ – W.P. V 4.5.3, using Avada 4.02)

    I see in the documentation that it is possible to replace the default bbpress wordpress template for

    the Forum Root Slug ‘Forums’

    by adding a page in WordPress called /forums/

    and then inserting the bbpress shortcode for forum archives.

    I tried this also with ‘forum’ for individual forums, and I see other Slugs available in Settings > Forum

    Single Forum Slugs

    Custom slugs for single forums, topics, replies, tags, views, and search.

    Forum
    Topic
    Topic Tag
    Topic View
    Reply
    Search

    Am I missing something, or is there a simple way to replace each of the pages used by bbpress by default, just by creating pages named e.g. ‘topic’, ‘topic-view’ etc? And then insert the relevant shortcode for that content?

    It seems like ‘it should be there’ but can’t find documentation apart from customising my child theme etc.

    Thanks in advance 🙂

    #177518
    Robin W
    Moderator

    ok – that’s great – I think I now understand

    loop-single-topic is probably not the right/only place

    but within loop single topic, you can get the ID from bbp_topic_id() which will be itself, so no need to call post parent

    Replies – that is posts in response to a topic, which is I think what you are after, are handled by loop-single-reply.php

    There each reply has an id found by using bbp_reply_id, so you would use something like

    $postimage = wp_get_post_parent_id( bbp_reply_id() ); 
    

    in your code above

    #177517
    MalMac
    Participant

    Sorry,
    I have a featured image/thumbnail attached to each forum topic.
    I would like each post, in that topic, to call that featured image as well.
    I am assuming that each topic is the parent of each post?

    so I created this function in my functions.php file

    	add_action('bbp_template_before_post', 'pym_print_featured_image_on_topic()')
    	function pym_print_featured_image_on_topic() {	
    			//get the post id of the parent
    			//$postimage = get_post( 'post_parent' );
    		if (has_post_thumbnail()) {
    			echo '<div class="pym-bbp-topic-thumbnail">';
    			echo get_the_post_thumbnail('<strong>post_parent</strong>', 'thumbnail' );
    			echo '</div>';
    		}
    	}

    Which I am then calling in side of loop-single-topic.php

    <?php do_action( ‘bbp_template_before_post’ );?>

    Thanks for your help!

    Malcolm

    #177516
    Robin W
    Moderator

    still no clearer on where this code is going, and which thumbnail you are after.. sorry I’d love to help but I’m still not understanding what you are trying to achieve.

    #177515
    MalMac
    Participant

    I am trying to grab the $post_id from the parent
    something like this?

    	function pym_print_featured_image_on_topic() {
    		if (has_post_thumbnail()) {
    			echo '<div class="pym-bbp-topic-thumbnail">';
    			echo get_the_post_thumbnail('post_parent', 'thumbnail' );
    			echo '</div>';
    		}
    #177514
    Robin W
    Moderator

    depends exactly where you are putting that code, and which thumbnail you are wanting

    get_the_post_thumbnail( $reply_id, $size, $attr );

    may well be what you want.

    Otherwise come back with where the code is going.

    #177513
    MalMac
    Participant

    I am currently using the

    get_the_post_thumbnail( $post_id, $size, $attr );

    To create a thumbnail for each topic on my forum index page.
    I would like to be able add the same thumbnail to posts within that topic.
    Can I use $post_id to reference the post topic? Is this a parent/child relationship?

    Something like?
    get_the_post_thumbnail( $topic_thumbnail);

    or
    get_the_topic_thumbnail( $post_id, $size, $attr );

    #177508
    stall20080
    Participant

    my problem is I using a page called “forums” for index [bbp-forum-index] with sidebar left.
    it works great until I click the breadcrumbs home/forums/……. to goback to forums.
    then Im getting the url version with no sidebars.

    my page details:
    forums
    siteurl/forums/

    bbpress setting no changed still

    Forum Root = forums
    Forum Prefix =ticked
    Forum root should show =forum link

    #177506
    Robkk
    Moderator

    It should work as long as your using all the CSS code I used. You can try this instead if you want. It does away with the universal selector and the > because it wasn’t really needed, it includes text to know what this code is used for, and it I added !important for the heck of it.

    /*
    This removes the whole list item 
    for every recent topic in the widget,
    this includes the "by"
    */
    .widget_display_topics li {
      visibility: hidden !important;
    }
    
    /* 
    This will make every HTML tags content in the list item 
    for every recent topics in the widget to become visible,
    this does not include the "by",
    so the "by" stays hidden
    */
    .widget_display_topics li div,
    .widget_display_topics li span,
    .widget_display_topics li a {
      visibility: visible !important;
    }
    #177505
    MalMac
    Participant

    Continuing on….

    In my themes function.php file I have the following which creates my thumbnail:

    	// /bbpress/templates/default/content-single-forum
    	add_action('bbp_template_before_single_forum', 'pym_print_featured_image_single_forum', 11);
    	add_action('bbp_template_before_single_forum', 'pym_print_forum_description', 12);
    	
    	function pym_print_featured_image_single_forum() {
    		if (has_post_thumbnail()) {
    			echo '<div class="pym-bbp-topic-thumbnail">';
    			echo get_the_post_thumbnail(null, 'thumbnail' );
    			echo '</div>';
    		}
    	}

    I have been calling this elsewhere in my template using ”

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

    I am now trying to edit content-single-forum.php to call this thumbnail using the following:

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

    How do I go about getting the thumbnail to be called in the loop?

    Thanks, Malcolm

    #177499
    VeeLow
    Participant

    Yes, I did. (Sorry for this long delay.)

    They don’t solve the case where I am notified of my own activity, when I reply to a replier to my initial topic.

    They still fire: a new nunber 1 appears in the bubble.

    But your code does erase the text–I get a blank space where the content would appear, and if I click through the text is also invisible–in my list of notifications they appear as blank entries…

Viewing 25 results - 5,976 through 6,000 (of 32,505 total)
Skip to toolbar