Bob1nz (@bob1nz)

Forum Replies Created

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

  • Bob1nz
    Participant

    @bob1nz

    I see the permalinks has been activated on your site now so what I put would not work now.
    There are several ways to find the link to your forums for your menu.
    One is when you are creating or editing the forums it will show the link under the title to the forum you are creating.

    The other way is to look under Settings -> Forums then find the text that is in the field next to “Forum Root”
    The text in that field should be what is used after your domain name. The default is “forums” so in your case your menu link would need to be http://cycleshanty.com/forums/

    I have tried navigating to this on your website and it redirects back to the front page for some reason.
    I have sent you a message on your website.


    Bob1nz
    Participant

    @bob1nz

    If you want the reply to show then you need to remove or alter the css to not be display:none;
    You could do this by either commenting it out or deleting that line or setting it to another display value.


    Bob1nz
    Participant

    @bob1nz

    In your menus in the dashboard does your forums link show like this?
    Specifically the highlighted parts
    (Right click and “Open image in a new tab”)
    Forum menu link


    Bob1nz
    Participant

    @bob1nz

    @robin-w
    Awesome I appreciate the help and time you have given so far and will most likely contact you after the silly season is over.
    I will continue to have a play around with this for now as I feel I am close but just one little thing is missing.

    If anyone else has any ideas or knowledge on this please feel free to contribute.
    From what can gather this used to be “easy” to do prior to bbPress 2.2 when the dynamic roles were implemented. I have seen mention of some filters being able to manipulate map in some way to allow custom bbpress roles to be assigned to wordpress roles.
    However as I am not a wizard on these things, I tend to blunder around trying to make sense of it.


    Bob1nz
    Participant

    @bob1nz

    Thanks for your reply @robin-w
    I tried that but it assigns the user the default role in bbpress.

    I gave a dummy user the admin role in wordpress and what I want is for the user to be automatically given the admin role in bbpress as well.
    Using the code you supplied it leaves the user with the default role.

    How can I assign non-standard bbpress roles with custom capabilities to non standard wordpress roles also with custom capabilities using the map so this is performed dynamically?


    Bob1nz
    Participant

    @bob1nz

    Great 🙂

    Pleased to hear you got it sorted.


    Bob1nz
    Participant

    @bob1nz

    Next one is on the shortcodes you mentioned. https://codex.wordpress.org/Shortcode
    The bbpress codes work in a similar fashion to wordpress’s shortcodes and there are a few examples on that page as to how they work.
    While they are useful I’m not entirely convinced you need them at this stage.

    They can be used to put features of the forums on other pages that are not your main forums such as login, one category of your forums, tag clouds etc. You can use the [bbp-forum-index] on a page if you have created one but I’m pretty sure you shouldn’t need to unless that what you want.

    I believe that plugin would still be fine with your current version of WP and bbP.

    Had to split the reply as I don’t seem to be able to post more than one link per reply


    Bob1nz
    Participant

    @bob1nz

    Ok no worries.

    Im going to give you some links to look at as they have some potentially useful info.

    First one is for the permalinks https://codex.wordpress.org/Using_Permalinks
    I normally have these setup with post name checked in the settings but you are free to choose your own.
    It also makes it easier to find posts and topics etc with “pretty” names in your url bar. My websites forums for example are at myurl/forums <– easy peasy. I never setup a page for bbpress and this worked out fine.


    Bob1nz
    Participant

    @bob1nz

    Adding a image in place of your existing title?
    I believe that would be done via css and if you wanted it only on your bbpress pages by modifying the template files as with the titles.

    Just did a bit of a google for ya and found this https://bbpress.org/forums/topic/descriptionintro-text-on-top-of-forum-page/ which could be another solution possibly?


    Bob1nz
    Participant

    @bob1nz

    When using the “Forums” link from your home page it points to /?forum=forums
    When pointing to the forums link from the 404 page it points to /forums/forum/forums which is another 404.

    Do you have permalinks enabled on your website?

    The plugin reviews shows a user having success using WP4.0 but as its not something I have used I cant say yay or nay on that sorry.

    It sounds more like you are looking for a blog rather than a forums. eg you post something and others reply.


    Bob1nz
    Participant

    @bob1nz

    Im not sure on exactly what template you will be using( my theme has about 6 different page templates). I see you are using the kickstarter theme as your parent?
    I dont have access to this theme to have a deeper dig for you myself.
    As this is more of a theme question maybe it would be better asking the author on what files need to be altered to achieve the goal.


    Bob1nz
    Participant

    @bob1nz

    sorry make a copy of your default template (possibly page.php?) and rename it to bbpress.php

    There should be a <div class=”title-wrapper”> in it already just add add in the style.


    Bob1nz
    Participant

    @bob1nz

    You could try making a copy of the page template in your child theme and renaming it to bbpress.php then specifying in it to show the title (unhide the css for the forums only.)

    You would need to find the part on the page that calls the title-wrapper and specify an inline style of something like <div class=”title-wrapper” style=”display:block;”> as the inline style will over ride the css but only when the bbpress page is called (when you are looking at your bbpress forum)


    Bob1nz
    Participant

    @bob1nz

    ok so I have made some small progress

    add_filter('bbp_get_user_role_map','custom_bbp_get_user_role_map');
    function custom_bbp_get_user_role_map($role_map){
        $role_map['admin'] = bbp_get_admin_role();
        $role_map['guest'] = bbp_get_guest_role();
        return $role_map;
    }

    Works if I use the built in bbpress roles eg where is says bbp_get_admin_role(); have bbp_get_keymaster_role(); , bbp_get_moderator_role(); , bbp_get_admin_role(); bbp_get_participant_role();.

    I seem to be stuck on getting the custom roles that I have created in bbpress to be picked up in the map.

    The error I get is Fatal error: Call to undefined function bbp_get_admin_role() in [pathtomyfunctions.php] on line 550 which is $role_map[‘admin’] = bbp_get_admin_role();


    Bob1nz
    Participant

    @bob1nz

    On line 30 of your css there is #title-wrapper { display:none } which is hiding the page titles.
    Is this the titles you are looking for?


    Bob1nz
    Participant

    @bob1nz

    I’m not an expert on these things but I just setup bbPress and I never setup a page for it.
    To add it to my menu I got the page url for it and added a custom menu item pointing to that url.

    I had a quick look at your website and the forums link in the menu appears to point to yourwebsite/?forum=forums which points to a page not found.

    Try using this link instead yourwebsite/?post_type=forum as it seems to show the forums page at least, although I cannot see any categories or forums on it.

    I do not want topics created from the front end

    Do you mean you don’t want anyone else to start topics?

    I will need to approve and post all replies to a topic

    there is a plugin for bbPress although I haven’t used it. https://wordpress.org/plugins/bbpressmoderation/

    To allow users to register on your website you need to enable that feature. Its in the dashboard under Settings->General-> Membership.


    Bob1nz
    Participant

    @bob1nz

    I found this

    /**
     * Return a map of WordPress roles to bbPress roles. Used to automatically grant
     * appropriate bbPress roles to WordPress users that wouldn't already have a
     * role in the forums. Also guarantees WordPress admins get the Keymaster role.
     *
     * @since bbPress (r4334)
     *
     * @return array Filtered array of WordPress roles to bbPress roles
     */
    function bbp_get_user_role_map() {
    
    	// Get the default role once here
    	$default_role = bbp_get_default_role();
    
    	// Return filtered results, forcing admins to keymasters.
    	return (array) apply_filters( 'bbp_get_user_role_map', array (
    		'administrator' => bbp_get_keymaster_role(),
    		'editor'        => $default_role,
    		'author'        => $default_role,
    		'contributor'   => $default_role,
    		'subscriber'    => $default_role
    	) );
    }

    Is there any way to add extra roles in that without editing the plugin files directly?


    Bob1nz
    Participant

    @bob1nz

    Hi 🙂

    Well I am setting up a small community for a minecraft server and we have a plugin for minecraft that will sync the ranks in game to the website http://www.spigotmc.org/resources/communitybridge.2232/

    So I am trying to replicate the ranks in game on the wordpress website.

    The end goal is
    InGameRank -> WordPressRole -> bbPressRole
    Owner -> Owner -> Owner
    Co-Owner -> Co-Owner -> Co-Owner
    Admin -> Admin -> Admin
    Moderator -> Moderator -> Moderator
    Member -> Member -> Member
    Guest -> Guest -> Guest

    The owner would essentially be bbPress’s keymaster but I would like to define the capabilities of each role.

    Using the code I posted I am unable to change my forum role.
    I am currently still set as Administrator in the Site Role.
    When I select my user in the dashboard and select change the forum role to the owner rank I created and click change it just reloads the page and my forum role is still keymaster.
    I am able to change other users forum roles correctly.

    My main question is how to get the wordpress roles to sync to the bbPress roles effectively making it so if i change the wordpress role the bbpress role will also change.

    (what is up with the tag changes I did not put those)


    Bob1nz
    Participant

    @bob1nz

    @palmdoc

    Check out the files i have in my pastebin http://pastebin.com/u/Bob1nz
    these were what I used with buddyboss a wee while ago using @kaliceos code

    Just make the four files and drop them into \buddybosschildtheme\bbpress\


    Bob1nz
    Participant

    @bob1nz

    hmm seems the formatting for that code in 14 is not quite right

    $bbp_roles['my_custom_role1'] = array(
    'name' => 'name 1',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
     
    );

    is => supposed to be => (just from other examples I’v seen in other posts)
    it also spat errors at me with the extra empty lines between the lines of code.

    Either way here is the code that works might be worth updating the codex thing

    function add_custom_role( $bbp_roles ) {
    
    $bbp_roles['my_custom_role1'] = array(
    'name' => 'name 1',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants 
    );
    $bbp_roles['my_custom_role2'] = array(
    'name' => 'name 2',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    );
    $bbp_roles['my_custom_role3'] = array(
    'name' => 'name 3',
    'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() ) // the same capabilities as keymaster 
    );
    return $bbp_roles;
    }
    add_filter( 'bbp_get_dynamic_roles', 'add_custom_role', 1 );

    Thanks heaps for your help 🙂
    Now to play around with this and the capabilities.


    Bob1nz
    Participant

    @bob1nz

    @kaliceos You are a legend!! thank you so much for sharing this. Finally my bbpress resembles a somewhat “normal” layout

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