jessy (@jessy-marco)

Forum Replies Created

Viewing 15 replies - 1 through 15 (of 15 total)
  • @jessy-marco

    Participant

    1, Install plugin: WPFront User Role Editor
    2, Go to Roles => Settings and check “Override Edit Permissions” Save it.
    2, Go to Roles => All roles => and choose Participant, it has 8 or more capabilities
    3, You need uncheck publish_topics and edit_topics and assign_topic_tags and delete_topic_tags
    4, Save it.

    You do not need to change php code as above 🙂

    If you need my own participation, send me your e-mail address.

    @jessy-marco

    Participant

    You just forget provide a website link. Thank you.

    @jessy-marco

    Participant

    I am confused quite honestly.

    What is Main page for you, what are subtopics. Should you elaborate more and I will do my the best.

    Thank you.

    @jessy-marco

    Participant

    @cubeacid: You want this: Do not allow users to publish new topics, just replies on your topics. Correct?

    1, Install plugin: WPFront User Role Editor
    2, Go to Roles => All roles => and choose Participant, it has 8 capabilities
    3, You need uncheck publish_topics and edit_topics and assign_topic_tags and delete_topic_tags
    4, with this plugin you can do it because it is built in role from plugin bbPress
    5, But, we can customize it with filter function pasted below
    6, Jast paste it into function.php and refresh the page in admin plugin WPFront User Role Editor in Participate role how magicaly capabilities are removed 🙂
    7, If the participant or regular registered user will go on topics, they will be message “You cannot create new topics.” and if user click on your own created topic, he can reply 🙂

    Paste it into functions.php

    function my_custom_get_caps_for_role_filter($caps, $role)
    {
        /* Only filter for roles we are interested in! */
        if ($role == 'bbp_participant' )
            $caps = my_custom_get_caps_for_role($role);
    
        return $caps;
    }
    add_filter('bbp_get_caps_for_role', 'my_custom_get_caps_for_role_filter', 10, 2);
    
    function my_custom_get_caps_for_role($role)
    {
        switch ($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' => false,
                    'read_hidden_forums' => false,
                    
                    // Topic caps
                    'publish_topics' => false,
                    'edit_topics' => false,
                    'edit_others_topics' => false,
                    'delete_topics' => false,
                    'delete_others_topics' => false,
                    'read_private_topics' => false,
                    
                    // Reply caps
                    'publish_replies' => true,
                    'edit_replies' => true,
                    'edit_others_replies' => false,
                    'delete_replies' => false,
                    'delete_others_replies' => false,
                    'read_private_replies' => false,
                    
                    // Topic tag caps
                    'manage_topic_tags' => false,
                    'edit_topic_tags' => false,
                    'delete_topic_tags' => false,
                    'assign_topic_tags' => false
                );
                break;
            default:
                return $role;
        }
    }

    I have try that ad for me it works.

    @jessy-marco

    Participant

    You are using WordPress 4 and there is a bug for bbPress forum posts.

    Install plugins:
    http://www.rewweb.co.uk/bbpress-wp4-fix
    http://www.rewweb.co.uk/bbpress-wp4-fix2/

    @jessy-marco

    Participant

    Rewrite your theme styles with this, paste this on very bottom on style.css or into <head> tag section and wrap t with <style text/css></style>:

    #bbpress-forums p.bbp-topic-meta span {
       white-space: nowrap;
       background: none;
       border: none;
    }

    @jessy-marco

    Participant

    iframe tag is styled nicely, works for text content below and up.

    @jessy-marco

    Participant

    Do you really need this shortcode? I am sorry about this, but for many reasons it is enough to use just video from youtube, because, if you will use the video than you will need CDN also. And this shortcode in my opition do not have nice css stylesheet.

    @jessy-marco

    Participant

    You have to paste content – text and below video, above the video.

    @jessy-marco

    Participant

    Install plugin bbPress2 shortcode whitelist.

    just write string: video into that small text area

    @jessy-marco

    Participant

    Install plugin bbPress2 shortcode whitelist

    And to settings write video

    @jessy-marco

    Participant

    Into your function.php paste this code, you will allow to Custom Post Type forum – bbPress have featured images in admin.

    add_theme_support( 'post-thumbnails', array( 'forum' ) );
    add_post_type_support('forum', 'thumbnail');
    In reply to: Size font bbpress

    @jessy-marco

    Participant

    1, Go to Appearance => Editor => Style.css edit this file section Reset from mayer, and find there “font-size: 100%; font: inherit;” change it into font-size: 16px; remove font: inherit

    Reset section would look like this:

    /* ------------------------------------------------------------------------- *
     *  Reset - http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126
     * ------------------------------------------------------------------------- */
    html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, 
    pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, 
    samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, 
    fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, 
    canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, 
    section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 16px; vertical-align: baseline; }
    article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {	display: block; }
    ol, ul { list-style: none; }
    blockquote, q { quotes: none; }
    blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; }
    table { border-collapse: collapse; border-spacing: 0; }

    Let me know if you need help.

    @jessy-marco

    Participant

    If your theme support this shortcode on posts and pages we can assume your shortcode is working fine, but bbPress is for security reasons blocking.

    Place this code into functions.php

    function jm_bbp_shortcodes( $content, $reply_id ) {
    	return video( $content );
    }
    add_filter('bbp_get_reply_content', 'jm_bbp_shortcodes', 10, 2);
    add_filter('bbp_get_topic_content', 'jm_bbp_shortcodes', 10, 2);

    Let me know if you need help.

    @jessy-marco

    Participant

    Two solutions:

    1, Go to Settings => Forums it is settins for bbPress and just find Forum root should show and choose Topics by Freshness

    2, You need to use shortcode [bbp-single-forum id=2766]

    It is simple, create one forum and use your single forum ID, you can find it if you hover over the forum in the admin, check the bottom the link and there is the ID, replace it to your shortcode in custom page.

    If you need help, let me know.

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