Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 4,251 through 4,275 (of 32,482 total)
  • Author
    Search Results
  • #193604
    shagee
    Participant

    I get the error message “Oh bother! No topics were found here!”. I have installed bbpress and working on a divi theme. My shortcode for forum works but not my topics or index short code and I get this error. https://motionspecificrelease.ca/msr-community/

    #193602
    webmasterfreya
    Participant

    tools.php

    function bbp_admin_repair_user_favorites() {
    
    643		$values[]         = "('{$user->user_id}', '{$key}, '{$favorites_joined}')";

    Should be

    function bbp_admin_repair_user_favorites() {
    
    643		$values[]         = "('{$user->user_id}', '{$key}','{$favorites_joined}')";
    #193594
    u_Oi
    Participant

    You can put a default IP for all registered activity:

    add_filter( 'bbp_current_author_ip', function() {
     return '127.0.0.1';
    } );

    127.0.0.1 is the default ip in this case.

    #193587
    jameshogan03
    Participant

    @atmojones @slomeli79 @cjerrells

    Can one of you give me a bit more instruction on where and how to enter this code? I get a syntax error when checking this code…

    A little help would be hugely appreciated!

    #193583
    u_Oi
    Participant

    Code goes into the file functions.php that you can find on Appearance – Editor – Function.php. Open the file and paste it at the end. Just be careful because depending the theme code it can work fine or break your wordpress (if it breaks the wp just remove the code using cpanel or ftp).

    The code allow you to upload featured image for bbpress forums. Then you can give it css style for a better looking.

    To do this you need administrator access.

    #193582
    cclemens
    Participant

    Thanks, Arutam!

    I love Yoast. But, to be able to upload an image for sharing networks, doesn’t that require being able to access a URL in the Page editor? I think that’s the problem I’m having is there’s no way for me to do that. Does using this code supply that function?

    And, where does the code get installed? I’m not a dev at all, so most of my knowledge is plug-and-play.

    #193581
    u_Oi
    Participant

    With follow code you can upload a featured image for forums… But if you want a good looking image on social networks I recommend you install Yoast (for example) to upload a custom image for share options.

    /* Add Featured Image to bbPress Forums */
    add_post_type_support('forum', array('thumbnail'));
    function ks_forum_icons() {
    if ( 'forum' == get_post_type() ) {
    global $post;
    if ( has_post_thumbnail($post->ID) )
    echo get_the_post_thumbnail($post->ID,'thumbnail',array('class' => 'alignleft forum-icon'));
    }
    }
    add_action('bbp_theme_before_forum_title','ks_forum_icons');

    Source Link

    #193571
    Martin J
    Participant

    Thanks for the follow up. Here is what I did…

    1. Disabled all plugins except bbpress
    2. I switched to a WP default theme, ie: twentyfifteen and twentyseventeen
    3. Did the above with Chrome, Firefox, and MS Edge browsers

    Same thing still happens. So with the admin bar disabled, and logging in from the default WP login screen, and with bbpress enabled, I just get redirected to the site’s front page — no admin page. So I still have to add wp-admin/ at the end of the url address to get into the admin area. If I disable bbpress, then everything works normal. Enable it again, goes back to the issue.

    As mentioned, I’ve encountered this for at least a couple years. So based on testing, it’s not theme related and not plugin (other plugins) related. Something about bbpress is redirecting after logging in with the default WP login and not sending me directly into the admin.

    If there is something coded in bbpress for “Forum logging in” for front-end users, then I can see this being relevant. However, logging into the admin, is the problem.

    #193557
    webmasterfreya
    Participant

    Hi,

    I have the following code in my themes functions.php
    function bbp_reverse_reply_order( $query = array() ) { // bbp_has_replies_query is depricated ?
    $query['order']='DESC';
    return $query;
    }
    add_filter('bbp_has_replies_query','bbp_reverse_reply_order');

    This works fine except when a new reply is added, you get redirected to the page with the oldest replies instead of the page that contains the just added reply. This seems to be an old problem, have tried various plugins, but they all lead to the same outcome.

    So the question is how to force, after adding a new reply, to be directed to the right page.

    site freya.nl, latest versions WordPress and bbPress.

    #193531
    ohkevmanaol
    Participant

    I would love to know how to hide buttons like login or register when the user is logged in and vice versa for opposite scenarios.

    Im surprised that’s not how it functions by default. Why can i access the log in page when im logged in? There should be redirect options for this.

    Does anyone have any suggestions that does not involve a ton of code. Remember, that’s the whole point of WP and plugins.

    #193504
    favog
    Participant

    We have a BBPress forum that is behind a membership site, and we give them the capability of subscribing to threads. Our problem is that if a person stops subscribing they no longer have access to the site, and therefore have no way of unsubscribing from a topic.

    Is there a way that we can generate a script/link to force an automatic unsubscribe from all topics when removing the user? Even if we need to manually create the link, it would be an improvement.

    I can generate code if necessary-just don’t know where to start.

    Thanks,
    Bob

    #193496
    matty19901
    Participant

    FYI I’m using version 4.9.6 of wordpress and version 2.5.14 of bbPress.

    I added custom code to my theme functions.php page to add customized roles for bbPress. The roles show up when I edit users and want to change their roles, but when I go to save it, they just default back to a participant role. How can I fix this? Here is the code I used below:

    /* bbPress Custom Roles */
    function add_custom_role( $bbp_roles ) {
     
    
    $bbp_roles['my_custom_role2'] = array(
    'name' => 'Producer',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    );
    $bbp_roles['my_custom_role3'] = array(
    'name' => 'Engineer',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    );
    $bbp_roles['my_custom_role4'] = array(
    'name' => 'Songwriter',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    );
    $bbp_roles['my_custom_role5'] = array(
    'name' => 'Staff',
    'capabilities' => bbp_get_caps_for_role( bbp_get_moderator_role() ) // the same capabilities as keymaster
    );
    $moderator = bbp_get_moderator_role() ;
    $bbp_roles[$moderator] = array(
    'name' => 'Moderator',
    'capabilities' => bbp_get_caps_for_role( bbp_get_moderator_role() ) // the same capabilities as keymaster
    );
    $keymaster = bbp_get_keymaster_role() ;
    $bbp_roles[$keymaster] = array(
    'name' => 'Chief Executive Officer',
    'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() ) // the same capabilities as keymaster
    );
    $apprentice = bbp_get_participant_role() ;
    $bbp_roles[$apprentice] = array(
    'name' => 'Member',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    );
    return $bbp_roles;
    }
    add_filter( 'bbp_get_dynamic_roles', 'add_custom_role', 1 );
    #193491
    Helmuts
    Participant

    @michent1 – thank you – your updated version + the original shortcode by op works as a charm (had some issues with the original one).

    #193487
    pigpotato
    Participant

    I fixed it like this.

    1. make css folder in wordpress>wp-content>theme>[mytheme]
    2. cp wordpress>wp-content>plugins>bbpress>templates>default>css>bbpress.css wordpress>wp-content>theme>[mytheme]>css
    3. add these code lines in the css file.
    #bbpress-forums fieldset.bbp-form input[id=bbp_anonymous_email]{ display: none; }
    4. cp wordpress>wp-content>plugins>bbpress>templates>default>bbpress>form-anonymous.php wordpress>wp-content>theme>[mytheme]>bbpress
    5. fix any email address in email textfield. Edit the form-anonymous.php
    <input type=”text” id=”bbp_anonymous_email” value=”guest@guest.com” ….

    #193464
    Tradewind25
    Participant

    Robin,

    Apologies for the late response – I have been away for a while.

    I’m happy to say that your revised css code does that job nicely!

    Many thanks,
    Geoff

    #193443
    only4gamers
    Participant

    Is anyone know what is the code to display last reply by: username in topics?

    ohmygod88
    Participant

    Hi guys,

    May I know why is language code missing bbPress search page URL? I have a multi language website using Polylang and everything works except for the bbPress function. It only returns the English data instead of the Chinese data.

    Anyone know the solution to fix this?

    #193363
    AdventureRidingNZ
    Participant

    array(‘post’, ‘page’, 'release')

    #193362
    andreasyeah
    Participant

    ok got it! since i am not that much into codes,

    could you please tell me where i have to add the post type if the post type is “release” for example:

    /** Only process for post types we specify */
    if( !in_array( $post->post_type, apply_filters( ‘bbppt_eligible_post_types’, array( ‘post’, ‘page’ ) ) ) ) {
    return;

    thank you very much for your help 😉

    #193359
    AdventureRidingNZ
    Participant

    In one of the topics for posts files there is a statement that defines what post types it works for.

    Updated: in index.php look for

    /** Only process for post types we specify */
    		if( !in_array( $post->post_type

    and you can add your custom post types in there

    #193354
    jomo
    Participant

    after some difficulty I came up with a solution, which allows a standard menu item linking to eg:
    forums/users/current

    If a request is made to http://mysite/forums/users/current, the user name “current” is detected and replaced with the current user id, or, if the user is not logged in, redirect to login screen:

    
    /*
     * attempt to handle generic request for current user
     *
     * if the url is passed as forums/users/current/
     * this function detects that the permalink has been set to bbp_user=current
     * and
     *  - if the user is logged on, the query is changed to the current user
     *  - if the user is not logged on, the user is redirected to login screen
     *
     */
    function ink_bbp_request_current_user( $query_vars ) {
    	if ( isset( $query_vars[ 'bbp_user' ] ) ) {
    		switch ( $query_vars[ 'bbp_user' ] ) {
    			case 'current':
    				if ( get_current_user_id() ) {
    					$query_vars[ 'bbp_user' ] = bbp_get_current_user_name();
    				} else {
    					auth_redirect();
    				}
    		}
    	}
    	return $query_vars;
    }
    
    add_filter( 'bbp_request', 'ink_bbp_request_current_user', 10, 1 );
    
    #193338
    MBV
    Participant

    So this is what I understand from this thread so far, to provide clarity moving forwards:

    1. Dynamic reply box that opens next to post replying to in forum is actually already a feature of bbpress, but not for BuddyPress group forums.
    2. Some themes seem to not engage this functionality and the way to fix that is to copy the reply.js file into a folder called js that is at the root of child theme.
    3. It works with visual editor

    So the only problem is that it does not work for Buddypress Group forums. However, @robkk mentioned, earlier in this thread, a patch he made. But he has not been active on these forums for over a year.

    https://bbpress.trac.wordpress.org/ticket/2974
    It is pretty easy to workaround this issue as well, since all you have to do is enqueue the javascript with a different conditional or enqueue it sitewide, but doing it sitewide might cause another issue somewhere.
    Here I just added a bbpress-functions.php file to a twentysixteen child theme. I edited out the conditional causing the issues with groups. You can test this on my test site as well.
    You would have to remove the file later if the trac tickets patch I linked to is committed and you are using version 2.6 of bbPress, so that you can have the file enqueued on the pages where it is needed.
    https://cloudup.com/czqFBqJE8TE

    The trac ticket he mention seems to be resolved yet it’s not working for BP group forums. The link to the code on cloudup is broken.

    So that’s the summary of where we are at on this thread… the big question is, does anyone have any insight or can help with enabling the dynamic reply box to BP group forums topics?

    #193332
    Tommy White
    Participant

    Where would I find information on changing the CODE /CODE button in bbpress to act like the wordpress CODE insert?

    In other words in bbpress clicking the CODE button gives you`
    in WordPress clicking the CODE button gives you < code > < /code >

    I’m having an issue with a plugin since it handles how my CODEs are displayed and one or the other is broke pending which settings I use.

    I hope that makes sense..

    #193257
    Robin W
    Moderator

    may or may not work – but try

    .avatar {
    display : none ;
    }
    
    #bbpress-forums div.bbp-topic-author img.avatar, #bbpress-forums div.bbp-reply-author img.avatar {
    	display : block !important
    }
    

    The original turns it off, and the second turns it on again for topics and replies

    #193255
    Robin W
    Moderator

    in your custom css area try adding

    .avatar {
    display : none ;
    }
Viewing 25 results - 4,251 through 4,275 (of 32,482 total)
Skip to toolbar