Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 9,901 through 9,925 (of 32,511 total)
  • Author
    Search Results
  • #155978
    chollyjung
    Participant

    I see css code in reply have display:none.
    How can I fix?

    #155976
    cyclesha
    Participant

    I guess the best way to illustrate this is:

    I installed, activated, etc. Forums. In the back end all seems to be well. In the front end I have nothing other than a 404 Error message. The Forums page on the menu came from bbPress and is not a page I created, published and added to the menu. Since bbPress added it to the menu the problem seems to be like this: You have a piece of paper with text in your left hand and a title in your right hand. How do you get the paper with text to appear under the title in your right hand?

    Is this a code issue, a permalink issue or what? Given my extreme lack of expertise I really need someone to give me step by step instruction.

    Please check the front end yourself:

    cycleshanty.com and click on Forums

    WP version 4.1

    Thanks in advance.

    #155971
    cyclesha
    Participant

    I tried using the short codes and they work on the backend.

    My problem is now getting rid of the 404 error on my front end. From the back end all seemswell.

    Lets focus on that error message. How do we eliminate it so when a person clicks forums the get forums?

    #155969
    melanie bund
    Participant

    Hi my forum appears in a part of the site that has a generic login. So what i need is that users have to type in email and name in order to post – is this possible? is there a shortcode for this or do i have to add something to the bbpress.php?
    thank you in advance
    Melanie

    #155960
    Bob1nz
    Participant

    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?

    #155951
    Robin W
    Moderator

    @tajender

    You’d need to modify

    wp-content/bbpress/templats/default/bbpress/form-reply.php

    create a directory on your theme called ‘bbpress’
    ie wp-content/%your-theme-name%/bbpress
    find
    wp-content/bbpress/templats/default/bbpress/form-reply.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/%your-theme-name%/bbpress/loop-single-reply.php
    bbPress will now use this template instead of the original

    you should really do this inside a child theme

    Functions files and child themes – explained !

    but if you do it in your main theme, keep a copy of what youb have done as updates are likely to overwrite

    The you would need to modify line 20

    <?php if ( bbp_current_user_can_access_create_reply_form() ) : ?>
    

    to put in a check to see if it’s current user

    It’s too near xmas, and I have too much else on to write and test the code but it will involve bbp_get_currect_user and the topic author $user_id

    #155945
    Bob1nz
    Participant

    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

    #155944
    Bob1nz
    Participant

    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.

    #155942
    sharongraylac
    Participant

    I’VE GOT IT!!!!! πŸ™‚

    This is what I did to create a title for my bbpress pages (when I had disabled my title-wrapper), in case it helps anyone else.

    I first called the title in, by adding the following code to my bbpress.php file (formerly page.php):

    <?php the_title();?>

    Then I wrapped it in a div like so:

    <div id= bbpressTitle>
    <?php the_title();?></div>

    Then I created CSS, based on this new class:

    #bbpressTitle {
    font-size: 32px;
    font-family: Roboto Slab;
    Font-weight: 200;
    display: block;
    color: #70908F;
    }

    And it actually worked. Please take this with a grain of salt… I’m an acupuncturist, not a coder. πŸ˜‰

    Thanks again for all of your help, Bob1nz!

    Goodnight,
    Sharon

    #155939
    cyclesha
    Participant

    First, I believe I do have permalinks enabled, however, I’m such a novice I don’t know where to look.

    4.1 isn’t much different than 4.0.1 and 4.0 wasn’t much different than 4.0.1. I’ve had all of them and everything else worked. Oh well, I research it further.

    I definitely want forums. I just need to clear (approve) topics before they appear and approve replies as well. Other so called motorcycle websites have real problems with their forums and and have found themselves deleting a lot of what users put in. It’s all about approval.

    I found bbPress shortcodes: https://codex.bbpress.org/shortcodes/ Would any of these help? and where would I put them?

    Between the two of us we’ll get this straightened out.

    #155929
    cyclesha
    Participant

    I also found the bbPress short codes: https://codex.bbpress.org/shortcodes/ . Would any of these help and where do I put them?

    #155923
    Hephaestus_Xii
    Participant

    Hi, I would like to know how to change the “forum” link in the breadcrumbs to link to another page I built the forums using the shortcodes and the “forum” link in the breadcrumbs takes me to the default forum page.

    I would like it to go to the page I created.

    #155920
    WilRC
    Participant

    Fixed, to everyone who it will be useful:

    / Verify the reply ID
    		$topic_id = bbp_get_topic_id($widget_query->post->ID);
    		$forum_id = bbp_get_reply_topic_id($topic_id); 
    		$reply_id   = bbp_get_reply_id( $widget_query->post->ID );
    		$topic_count       = bbp_get_forum_reply_count( $forum_id, false, true );
    		$total_reply_count = bbp_get_topic_reply_count($forum_id);
    
    					$reply_link = '<a class="bbp-reply-topic-title" href="' . esc_url( bbp_get_reply_url( $reply_id ) ) . '" title="' . esc_attr( bbp_get_reply_excerpt( $reply_id, 50 ) ) . '">' . bbp_get_reply_topic_title( $reply_id ) . '</a> ('.$total_reply_count.')<br />'. esc_attr( bbp_get_reply_excerpt( $reply_id, 40 ) ) . '';
    
    #155916
    sharongraylac
    Participant

    Ah, thanks for pointing that out, Bob1nz. I removed the code from a Custom CSS file, but didn’t realize it was in my style.css.

    Is there another way to add a custom title to the forum without removing this CSS?

    The reason it’s there is to avoid a different (bigger) problem between my theme and Woocommerce pages. In general, I’d rather not have titles at all- Just the forum and topics.

    Please let me know if you think I’m making a grave mistake though…

    Thanks!
    Sharon

    #155914
    Bob1nz
    Participant

    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();

    #155911
    Skisma
    Participant

    @robin-w Ahh ok I see, so basically they are only used for actual pages. That’s what I didn’t get before, I was wondering how I’d accomplish that using the shortcode for a widget. Now I understand this isn’t possible and shortcodes are only used for pages. Thanks man!

    #155910
    WilRC
    Participant

    Help!
    I’m trying to get replycounts after the the latest posttitle. (widget)
    e.g:
    Avatar – Name – date – title – (number of replies)
    I can’t get it working. This is sofar I have now:

    $forum_id = bbp_get_topic_forum_id($topic_id); 
    		$topic_id = bbp_get_topic_id($widget_query->post->ID);
    		$reply_id   = bbp_get_reply_id( $widget_query->post->ID );
    
    					$reply_link = '<a class="bbp-reply-topic-title" href="' . esc_url( bbp_get_reply_url( $reply_id ) ) . '" title="' . esc_attr( bbp_get_reply_excerpt( $reply_id, 50 ) ) . '">' . bbp_get_reply_topic_title( $reply_id ) . '</a> ('.bbp_get_topic_post_count($forum_id, $topic_id, $total_count).')<br />'. esc_attr( bbp_get_reply_excerpt( $reply_id, 40 ) ) . '';
    

    This is a snippet form the BBP latest post widget. It counts replies but not for separatly the latest post. It gives wrong results and those countresults are different on what page you’re visting. (index, forum, topicpage ect.)
    Could somebody put me in the wright direction?

    Many thanks in advance.

    #155909
    melanie bund
    Participant

    Hi my forum appears in a part of the site that has a generic login. So what i need is that users have to type in email and name in order to post – is this possible? is there a shortcode for this or do i have to add something to the bbpress.php?
    thank you in advance
    Melanie

    #155896
    Bob1nz
    Participant

    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?

    #155894
    Robin W
    Moderator

    ok, the software is held in files, the content (forums, topics etc) is held in the database.

    Please read

    https://codex.bbpress.org/creating-a-test-site/

    for a long explanation of how wordpress is structured.

    I believe you issue is as simple as that the level of user that you are does not permit you to se the ‘backend’ – that is the forum stuff in the dashboard – so deleting and recreating the plugin will not help you.

    The answer I think is to go into phpmyadmin, and edit your entry to give yourself permission as per previous answer.

    The link above should give you sufficient to be able to find your entry and edit it.

    #155869
    Bob1nz
    Participant

    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)

    #155867
    Robin W
    Moderator

    @skisma

    The shortcodes can be used on any wordpress page

    so if fro instance you wanted a menu item that display the most recent 15 topics across all your forums, so that when people selected this menu item that what they saw, then you would

    1. create a page – maybe called ‘latest topics’
    2. put the shortcode into the content section in this case

    [bbp-topic-index]
    

    3. add that page to the menu

    #155864
    Robin W
    Moderator

    Thanks for posting the code, which if needed I’ll delve into

    but firstly

    It doesn’t appear to be working as intended though as I cannot give myself the owner role
    

    Can you give a bit more detail here as to exactly what you are doing, and where what you expect to happen isn’t, and any error messages etc.

    That is fully explain what ‘I cannot give myself’ means

    Thanks

    #155861
    Robin W
    Moderator

    I think you mean breadcrumbs the following shows breadcrumbs

    Layout and functionality – Examples you can use

    They are still there, so you should see them, might be another plugin or your theme is hiding them

    try

    Plugins

    Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Themes

    If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentytwelve, and see if this fixes.

    #155848
    Hephaestus_Xii
    Participant

    Just in case it is not understood what i am looking to do. I want to be able to distinguish each forum as categories for example

    General discussions forum ————— Topics —————–Posts

    Topic 1
    Topic 2

    Funny Video Forum ———————— Topics ——————— Posts

    Topic 1
    Topic 2

    And so on …. so that it is broken into sections. I have made the forums and used the shortcode to display the forums.

Viewing 25 results - 9,901 through 9,925 (of 32,511 total)
Skip to toolbar