Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 5,951 through 5,975 (of 32,505 total)
  • Author
    Search Results
  • Robkk
    Moderator

    Is the TinyMCE editor showing in your regular topic forms as well?? If not then you would have to just enable Post Formatting in Settings > Forums.

    What specific code did you use to enable the visual editor.

    Does the forum form page work fine in a WordPress default theme like TwentySixteen. If not this could be plugin related. If it works fine then it is theme related and some function in your currently active theme could dequeuing bbPress scripts.

    If it is plugin related it could be a plugin that dequeue bbPress scripts unless its on forum pages.

    It might be possible to come across this issue while trying to minify or combining JavaScript files too.

    Anthony Carbon
    Participant

    Hi Guys,

    I create a page where I can create a new forum. I have several solutions on how to display the visual editor (WYSIWYG, Rich text editor) using this shortcode [bbp-forum-form] but it is not working. instead it gives me a plain textarea without visual editor (WYSIWYG, Rich text editor).

    Solution found but not working on my end

    #177708
    Robin W
    Moderator

    @Robkk

    I usually do not say use a “forums page” as it is not recommended during setup

    1. Can’t see where it is not recommended -Indeed in dashboard>settings>forums it says “Customise your Forums root. Partner with a WordPress Page and use Shortcodes for more flexibility.”

    2. There’s a massive difference between recommending something and saying ‘it is not recommended’ As far as I know bbPress is just neutral – either works fine.

    #177705
    Robkk
    Moderator

    I was just pointing out that its possible that you may need to use another conditional as well if you did create a “forum page”.

    So you would possibly need another conditional for a user created “forum page”. If you didn’t already make sure that the “forum page” was set to have the same page slug as the default forums slug in your site set in Settings > Forums.

    An example of the additional conditional you would use would be is_page{1} where “1” is the specific page ID of your “forums page”.

    if (!is_bbpress() || is_page(1) ) {

    You can also use is_page(‘forums’) as well instead.

    https://developer.wordpress.org/reference/functions/is_page/

    I usually do not say use a “forums page” as it is not recommended during setup, but it could be useful to workaround bugs that I think usually happens when using a Genesis theme, but I guess use it until the bug is fixed in bbPress/Genesis. Well if there is still a bug.

    I would contact your theme developers support since you have a paid theme, and they can help you better since they understand the code in that specific theme, and only if you really want to dig into the code and modify it like your trying to do, or you can just use a plugin like Widget Logic to use a conditional to hide/display widgets depending on certain conditionals like is_bbpress() and is_page{}.

    #177700
    Robkk
    Moderator

    Have you tried any plugin and theme troubleshooting??

    https://codex.bbpress.org/getting-started/troubleshooting/

    #177696

    In reply to: Threaded layout

    xmanca
    Participant

    OK so I’ve had some limited success thanks to your help, but I am stuck on where the replies are displayed. What I have now is the main topic on top and then the paginated replies below.

    I would like to get the replies to only be shown as links to the actual replies. I believe that I have isolated where this is in the code:
    line 45 of the includes/replies/function.php
    $reply_id = wp_insert_post( $reply_data );

    Am I on the right track here or totally off base?

    #177695

    In reply to: Threaded layout

    xmanca
    Participant

    OK so I’ve had some limited success thanks to your help, but I am stuck on where the replies are displayed. What I have now is the main topic on top and then the paginated replies below.

    I would like to get the replies to only be shown as links to the actual replies. I believe that I have isolated where this is in the code:
    line 45 of the includes/replies/function.php
    $reply_id = wp_insert_post( $reply_data );

    Am I on the right track here or totally off base?

    #177694
    evanevans333
    Participant

    Does this code still work? I tried it and am not seeing any results. I would like to be able to create sub-forums on the front end (as Admins/Mods).

    themichaelglenn
    Participant

    @siparker @natesirrah Thank you both for your work on this plugin! Any news on where the current project stands? I’ve just used siparker’s github plugin and it seems to be work, but if there’s a better, improved version, I’d love to know about it and/or help test it.

    I’m working on migrating a site that I’ve had up for just over a year, from Joomla 3.4 to the current version of WordPress. I use Kunena forums, and by making some slight modifications to siparker’s plugin on github, I was able to set my bbPress URLs to match the structure Kunena uses, namely:

    forum/forumName/topicID-topicName

    (I don’t think they actually use forumName, topicName, etc., that was just the easiest way for me to write it out)

    so that when my forums are set up like this:

    Forum = Final Fantasy VII
    Topic = Cloud’s Limit Break

    I have, for example:

    forum/final-fantasy-vii/143-cloud-s-limit-break

    I should tell you that the only experience I have with php is a couple of 4-hour courses on udemy (in other words, not that much…) Still, by very carefully changing or removing one line at a time, I was able to produce the desired result.

    One thing that didn’t quite work out, though, was forums within a top-level category. For example:

    Top Forum = Square Enix
    Child Forum = Final Fantasy VII
    etc.

    The URL for the child forum is now

    forum/square-enix/final-fantasy-vii

    and I want it to be

    forum/final-fantasy-vii

    The interesting thing is that the topic “Cloud’s Limit Break” still shows as

    forum/final-fantasy-vii/143-cloud-s-limit-break

    which is the URL structure that I want, when someone clicks on a topic, so I’m happy with that.

    But I can’t seem to figure out how to remove the parent or top level forum from the forum URL.

    Everything I’m doing is on localhost, as I don’t want to change my site over to WordPress until I’ve got all the details worked out, and I’m brand new to web development so I’m not sure exactly how to share my code with you guys, or if I need to share it all or perhaps just a part of it? So if you can help me with that, I’ll be happy to share.

    Meanwhile to any bbPress devs following the thread, I want to say thank you for all that you do, and please consider making this permalink option part of the bbPress core!

    I have been wanting to move from Joomla to WordPress for months, as I tend to believe that WordPress is overall easier and better for me and my users, and one of the few things that’s prevented me from making the move was the lack of options in bbPress permalinks. I strongly agree that the URL for a topic should include the name of the forum that topic resides in. (Or at least, admins should be able to choose that option, if they want it.)

    #177690
    crayc
    Participant

    Ah yes I did go the shortcode route. So what other ways are there, I did not see another option. thanks

    #177686
    Robin W
    Moderator

    I still can’t seem to mod the caps of Participant role.

    ok, I’ll bite once more – can you post EXACTLY what you have as code to fix that, and tell me where you have put it.

    and set the forums I wish to be private, to PUBLIC (ironic and backwards that is)

    Private groups is my plugin, and yes agree gthat public seems wrong, but I can only work with what bbpress gives me, and use code to improve !

    #177679

    In reply to: Threaded layout

    Stephen Edgar
    Keymaster

    I’m pretty sure you’d be able to get what you’re after 🙂

    Once bbPress is activated, enable “threaded replies” in the settings.

    Use bbp_show_lead_topic(), grab the snippet from https://codex.bbpress.org/bbp_show_lead_topic/ and create a custom plugin using that code snippet.

    Then I’d suggest hoping over to the docs and do some reading:

    Theme Compatibility

    #177667

    In reply to: text visibility

    Robin W
    Moderator

    That’s IE for you !

    For some reason that I can’t immediately see, IE is ignoring the background setting, so is just saying it has no background so showing white

    I’d suggest you try changing line 999 on dark.css from

    /*media all*/
    media screen #bbpress-forums fieldset.bbp-form p, #bbpress-forums fieldset.bbp-form textarea, #bbpress-forums fieldset.bbp-form select, #bbpress-forums fieldset.bbp-form input {
        background: rgba(18, 21, 24, 1);
        color: #fff !important;
        border: 0px !important;
    }

    to

    /*media all*/
    media screen #bbpress-forums fieldset.bbp-form p, #bbpress-forums fieldset.bbp-form textarea, #bbpress-forums fieldset.bbp-form select, #bbpress-forums fieldset.bbp-form input {
        background: rgba(18, 21, 24, 1) !important;
        color: #fff !important;
        border: 0px !important;
    }

    It may or may not work !

    #177663
    evanevans333
    Participant

    I got the white screen of death with that code. The following error message:

    Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘add_role_caps_filter’ not found or invalid function name in /home3/filmsco/public_html/testwebsite/wp-includes/plugin.php on line 235

    Had to add this to the top from your prior code:

    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;
    }

    P.S. Is this new code any different than the last code?

    #177654
    Robin W
    Moderator

    ok, I just did the following test.

    Forum private, topic public
    participant can read

    Forum private, topic private
    participant cannot read

    The following code then added :

    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_get_participant_role() :
                return array(
                    // Primary caps
    				// 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;
        }
    }
    

    Forum private, topic private
    participant can read !

    So the code works on my test site.

    Can you duplicate this and come back with results?

    #177645
    evanevans333
    Participant

    I came across this in a thread.
    https://wordpress.org/support/topic/not-working-for-bbpress-rolesWould that be somehow useful? Probably not.

    /**
     * FORUM - Role map
     * bbPress has its own internal ("dynamic") Roles, so we map our real wp roles to bbPress.
     */
    add_filter('bbp_get_user_role_map','my_bbPress_role_map');
    function my_bbPress_role_map($role_map){
    	$role_map['student'] = bbp_get_participant_role();
    	return $role_map;
    }
    #177637
    crzyhrse
    Participant

    Yes, that is where it goes, in functions.php… I can confirm that the code is still working here… Have you cleared caches…?

    #177636
    kkpb8084
    Participant

    I inputed Robin W’s code into functions.php in my child theme folder, and it didnt work. Should it go into a different file?
    thanks

    kkpb8084
    Participant

    Hi, can anyone help?
    I cannot find the answer to my query from searching this forum and google.
    At the moment, people need to enter a name and email to post a topic, or reply to a topic, on my forum (http://psychiatryadvice.com/).

    I would like to replace that with what they have at this forum: http://www.econjobrumors.com/
    They seem to generate a random 4-digit code for each person posting. I am aiming for anonymity in my forum too.

    Does anyone know how I can do this please?
    Thanks very much!

    I’m using:
    Wordpress v 4.5.3
    bbpress v 2.5.9-6017

    #177624
    Robkk
    Moderator

    Okay your topic is closed and stickied, so adjust this css. Use a custom css plugin, or modify and place this css into a style.css file in a child theme.

    #bbpress-forums .status-closed,
    #bbpress-forums .status-closed a {
     color: #ccc;
    }
    .bbp-topics-front ul.super-sticky,
    .bbp-topics ul.super-sticky,
    .bbp-topics ul.sticky,
    .bbp-forum-content ul.sticky {
     background-color: #ffffe0 !important;
     font-size: 1.1em;
    }
    #177622
    Robkk
    Moderator

    What theme are you using?

    EDIT: Forgot that I did make this guide for a user experiencing a similar issue.

    https://codex.bbpress.org/getting-started/troubleshooting/search-redirects-to-front-page/

    Although this might help, I would like to know your theme just in case it doesn’t so I could do some troubleshooting.

    If its not the theme, we have to do some plugin troubleshooting.

    #177613
    Robkk
    Moderator

    Its a customized forum archive layout in the sidebar. I think they just put the forum index shortcode in the sidebar. Then in Settings > Forums they set the forum archive to show topics by freshness.

    #177607
    Robkk
    Moderator

    I am trying to remove that from showing on the forums page and instead show a a login for bbpress.

    This forum page you say, is it just the original forum index page at /forums, or is this a page that you inserted the forum index shortcode to create “forum page”??

    The is_bbpress() conditional may not work if you went the shortcode in a page route.

    Well unless you made sure the pages slug was the same slug as the forum root, but even with that I feel like that odd procedure could cause issues.

    #177601
    Robin W
    Moderator

    ok, so you need to determine if it is the is_bbpress that is the issue. If you just have the other code does it work – ie is the issue with the other code or the conditional?

    #177595
    Robin W
    Moderator

    The file is form-topic.php

    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

    find
    wp-content/plugins/bbpress/templates/default/bbpress/form-topic.php
    Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/form-topic.php
    bbPress will now use this template instead of the original
    and you can amend this

    However the form has an action hook you can link to

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

Viewing 25 results - 5,951 through 5,975 (of 32,505 total)
Skip to toolbar