Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 4,826 through 4,850 (of 32,481 total)
  • Author
    Search Results
  • #187334
    sbarkin
    Participant

    I created a custom page for the forum “home page”. bbPress has clickable breadcrumbs and “Forum” will load the default bbPress forum home, as such I added the following to my .htaccess to redirect the user to my custom page:

    RewriteEngine On
    RewriteRule /forums$ /the-forum

    This redirects the user:
    from: http://ok.thissiteworks.com/forums/ (bbPress forum home)
    to: http://ok.thissiteworks.com/the-forum/ (custom forum home)

    That works – but only for logged in users. When a user is not logged in the redirect does not work.

    1. Can someone advise why this would not work for not logged in users?
    2. Is there perhaps a better way to redirect the users to the custom page?
    #187326
    Robin W
    Moderator

    So I am trying your bbp style pack, it looks like I have a lot of options I’d like to use. Is there some particular short code I’m supposed to use? I tried:
    [bsp-display-forum-index forum= ‘46,50,52,54,56,59’]
    And in the bbp style pack settings -> Forum Templates, I changed it to “Alternative Forum Template 1” but I dont see any changes. Am I using the wrong shortcode?

    style pack will work against the standard forum code, so if you have a forum(s) displaying without style pack being activated, then it should work against that url with the changes

    ok, that is my plugin, and I’ll try to get to a resolution

    It may be as simple as closing and restarting your browser, so try this first !!

    If that doesn’t work…

    Style pack works with many/most sites, but it can fail due to a myriad of reasons, including (but no means limited to) site permissions, other plugins and most often site themes where the theme author has altered bbpress files.

    My plugin uses two different techniques to make changes.

    For some I change how bbpress sends information by changing or overwriting bbpress code, for some I change what is called css, which your browser uses to display information.

    Therefore some changes may take effect, whilst others don’t seem to.

    Additionally you may have :

    1. ‘caching’ software that speeds up the download of your site, but may not recognise and immediately make changes from my plugin
    Do you know if you are using caching software?
    2. Site permissions issues – you site might (quite validly for it) not allow my plugin to write code to certain areas
    Try
    Dashboard>settings>bbp style pack>css location
    check the activate box and set the location to
    wp-content/uploads/
    and save these changes

    For the template, are you able to look at the site files to see if your theme has a directory called bbpress ?

    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    #187321
    Robin W
    Moderator

    And it doesn’t end up the same, not really. Everytime bbpress is updated now I have to hope 20 different authors of 20 different plugins also update their code in a timely manner, and if any of them decide to stop the project I now lose functionality.

    not really here for a philosophical argument – that’s the way bbpress authors (which I am not) wrote it, and as free software they should be able to write what they want.

    I just write some additional plugins which again I do for free and yes I have to update for free, and provide some support here for free.

    #187319
    paladinbrewer
    Participant

    @robin-w
    So I am trying your bbp style pack, it looks like I have a lot of options I’d like to use. Is there some particular short code I’m supposed to use? I tried:
    [bsp-display-forum-index forum= ‘46,50,52,54,56,59’]
    And in the bbp style pack settings -> Forum Templates, I changed it to “Alternative Forum Template 1” but I dont see any changes. Am I using the wrong shortcode?

    #187318
    paladinbrewer
    Participant

    No answer to the other ones? 🙂

    And it doesn’t end up the same, not really. Everytime bbpress is updated now I have to hope 20 different authors of 20 different plugins also update their code in a timely manner, and if any of them decide to stop the project I now lose functionality.

    #187291

    In reply to: Forum Freshness

    Robin W
    Moderator

    correct place – I was guessing at whether the code will work, I’ll take a further look at it if I get a chance

    #187290
    roby80
    Participant

    Hi everybody, first post here! 😉

    I hope somebody can help me, since I’m having problems with the translation of a new bbPress installation… It’s kind of strange actually, because it seems to translate only part of the strings, but if I check my .mo & .po files they’re fully translated, just how it should be.

    I’ve been using WordPress for years but it’s the first time I used bbPress as well, so I followed these instructions religiously.
    (I actually only had to change the directory in which I put the .mo & .po files to wp-content/languages/plugins, since putting them in wp-content/languages/bbpress/ – I had to create this folder to try – like written in the documentation won’t work. After that I tried to put them in every other “logic” place that came to mind with no success)

    Here are a couple of screenshot to let me show my “half translated/half not” situation:
    EDIT: img’s won’t work so here are the links
    https://imgur.com/2PkKazk
    https://imgur.com/GHeexfT

    Thank you very much for any input!

    WordPress 4.8.2
    bbPress 2.5.14
    URL: http://www.guitarpub.it/forum/

    #187286
    rogerlridge
    Participant

    @robin-w I did a little digging and I found the piece of code responsible for logging the user’s visit based on the current page $page_url = sanitize_text_field($_SERVER['REQUEST_URI']);

    Would you know how to edit that to fit for bbp_forum_permalink(); so that it logs for each individual forum because I have the CBXUserOnline shortcode in the loop-single-forums.php file so I was hoping that it would recognise the views for each individual forum. Hopefully I’m making sense lol

    Please let me know if what I’ve said makes sense 🙂

    #187258

    In reply to: Echo Subscribe Link

    Robin W
    Moderator

    this should work

    add_filter ('bbp_before_get_user_subscribe_link_parse_args' , 'change_subscribe_link' ) ;
    
    function change_subscribe_link ($args) {
     $args ['subscribe'] = '<img src="http://www.mysite.com/image1.jpg" />' ;
     $args ['subscribe'] = '<img src="http://www.mysite.com/image1.jpg" />' ;
     
     return $args ;
    }
    #187254

    In reply to: Forum Freshness

    Robin W
    Moderator

    suggest you try this in your functions file

    add_filter ('bbp_convert_date', 'rew_convert_date', 10 , 3 ) ;
    
    function rew_convert_date ($time, $d, $translate) {
    $d = 'G' ;
    $time = mysql2date( $d, $time, $translate );
    return apply_filters( 'rew_convert_date', $time, $d, $translate );
    }

    may or may not work !

    vicky962
    Participant

    Dear team,

    I want to hide attachments and external Url’s for guest users, how can we do it, is there any plugin that can do it , or please send me code to achieve it.

    Thanks in Advance.

    Regards,
    Waqas

    #187252
    melodies
    Participant

    On my forum, the timestamp on the posts are 7 hours in the past.
    When a new post is made, it starts at “7 hours ago” rather than “just now,” “1 minute ago,” etc.

    The general time is set correctly in the WP > Dashboard > settings and all other timestamps displayed across the site are accurate (messages, notifications, etc). Only notifications relating to bbPress are off by 7 hours.

    This same issue can be found in an old thread post (Link below):

    The time zone is off by 7 hours in my bbpress plugin forums

    However, the solution in that post is outdated, since the code layout in has changed, and “line 178 in /wp-content/plugins/bbpress/bbp-includes/bbp-common-functions.php” no longer exists for manual alteration.

    Can you please tell me which file I can edit in bbPress to manually subtract 7 hours from the freshness output timestamp of all future forum posts?

    Thank you.

    #187213
    Robin W
    Moderator

    just had a quick look at what was in the free version, and looks like the pro version may have what you want – it claims

    Buddpress profile link integration (New in V1.0.4)
    BBpress profile link integration (New in V1.0.4)
    BBpress Online User Statistics (New in V1.0.5)

    maybe worth looking at

    CBX User Online for WordPress

    #187211
    Robin W
    Moderator

    not within free help – code digging would be needed.

    #187199

    In reply to: bbpress performance

    Fabian
    Participant

    Yes, BuddyPress registers its autoloader, but includes most files through BP_Component::includes() anyway. Thats only half-way implemented.

    #187196

    In reply to: bbpress performance

    Fabian
    Participant

    @johnjamesjacoby thats not true, WP has a “polyfill” for autoloading, and actively uses it on every request, even on legacy PHP 5.2. So autoloading is officially supported.

    These are first numbers about the impact of an unconfigured bbPress on a fresh WP server response time:

    PHP 5.6 + opcache : +35 % SRT
    PHP 7.0 + opcache : +28 % SRT
    PHP 7.1 no opcache: +28 % SRT

    As you can see bottleneck is loading and parsing. Note that the speedup of opcache in PHP 7 is about 6x.

    #187177
    rogerlridge
    Participant

    Thanks for the reply, I’m currently using that plugin but it doesn’t work the way I need it to. It tells me the number of users currently online but not currently viewing any particular thread, forum or page for that matter. But thank you for the suggestion. If you know of a way to maybe code it so that it does that please feel free to share whatever info you might have as it would be greatly appreciated! 😀

    #187168
    moejonet
    Participant

    because i cant edit my reply my correction:

    
    function bbp_update_reply_position( $reply_id = 0, $reply_position = 0 ) {
    
        global $wpdb;
        
    	// Bail if reply_id is empty
    	$reply_id = bbp_get_reply_id( $reply_id );
    	if ( empty( $reply_id ) )
    		return false;
    
    	// If no position was passed, get it from the db and update the menu_order
    	if ( empty( $reply_position ) ) {
    		$reply_position = bbp_get_reply_position_raw( $reply_id, bbp_get_reply_topic_id( $reply_id ) );
    	}
    	
    	$db_menu_order = $wpdb->get_var("select menu_order from {$wpdb->posts} where ID={$reply_id}");
    	
    	if($db_menu_order == $reply_position)
    	    return (int) $reply_position;
    
    	// Update the replies' 'menp_order' with the reply position
    	wp_update_post( array(
    		'ID'         => $reply_id,
    		'menu_order' => $reply_position
    	) );
    
    	return (int) $reply_position;
    }
    
    #187165
    moejonet
    Participant

    I would propose following changes in bbp_update_reply_position in bbpress/replies/functions.php:2128.

    
    function bbp_update_reply_position( $reply_id = 0, $reply_position = 0 ) {
    
    	// Bail if reply_id is empty
    	$reply_id = bbp_get_reply_id( $reply_id );
    	if ( empty( $reply_id ) )
    		return false;
    
    	// If no position was passed, get it from the db and update the menu_order
    	if ( empty( $reply_position ) ) {
    		$reply_position = bbp_get_reply_position_raw( $reply_id, bbp_get_reply_topic_id( $reply_id ) );
    	}
    	
    	$post = get_post($reply_id);
    	
    	if($post->menu_order == $reply_position)
    	    return (int) $reply_position;
    
    	// Update the replies' 'menp_order' with the reply position
    	wp_update_post( array(
    		'ID'         => $reply_id,
    		'menu_order' => $reply_position
    	) );
    
    	return (int) $reply_position;
    }
    
    #187164
    moejonet
    Participant

    There is an infite loop on reply update caused by buddypress activity from bbpress if bbp_thread_replies() is false.

    activity tries to get reply position, in this call position is updated for the reply but we are still in edit_post action so wp_update_post is called recursively until server gives up.

    stacktrace:

    
    var/www/clients/client1/web17/web/wp-content/plugins/bbpress/includes/replies/functions.php(2143): wp_update_post(Array)
    #2 /var/www/clients/client1/web17/web/wp-content/plugins/bbpress/includes/replies/template.php(1757): bbp_update_reply_position(508812, 1)
    #3 /var/www/clients/client1/web17/web/wp-content/plugins/bbpress/includes/replies/template.php(487): bbp_get_reply_position(508812, 508811)
    #4 /var/www/clients/client1/web17/web/wp-content/plugins/bbpress/includes/extend/buddypress/activity.php(552): bbp_get_reply_url(508812)
    #5 /var/www/clients/client1/web17/web/wp-content/plugins/bbpress/includes/extend/buddypress/activity.php(642): BBP_BuddyPress_Activity->reply_create(508812, 508811, 495076, Array, 47710)
    #6 /var/www/clients/client1/web17/web/wp-includes/class-wp-hook.php(298): BBP_BuddyPress_Activity->reply_update(508812, Object(WP_Post))
    #7 /var/www/clients/client1/web17/web/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array)
    #8 /var/www/clients/client1/web17/web/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
    #9 /var/www/clients/client1/web17/web/wp-includes/post.php(3480): do_action('edit_post', 508812, Object(WP_Post))
    #10 /var/www/clients/client1/web17/web/wp-includes/post.php(3591): wp_insert_post(Array, false)
    #11 /var/www/clients/client1/web17/web/wp-content/plugins/bbpress/includes/replies/functions.php(2143): wp_update_post(Array)
    #12 /var/www/clients/client1/web17/web/wp-content/plugins/bbpress/includes/replies/template.php(1757): bbp_update_reply_position(508812, 1)
    #13 /var/www/clients/client1/web17/web/wp-content/plugins/bbpress/includes/replies/template.php(487): bbp_get_reply_position(508812, 508811)
    #14 /var/www/clients/client1/web17/web/wp-content/plugins/bbpress/includes/extend/buddypress/activity.php(552): bbp_get_reply_url(508812)
    #15 /var/www/clients/client1/web17/web/wp-content/plugins/bbpress/includes/extend/buddypress/activity.php(642): BBP_BuddyPress_Activity->reply_create(508812, 508811, 495076, Array, 47710)
    #16 /var/www/clients/client1/web17/web/wp-includes/class-wp-hook.php(298): BBP_BuddyPress_Activity->reply_update(508812, Object(WP_Post))
    #17 /var/www/clients/client1/web17/web/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array)
    #18 /var/www/clients/client1/web17/web/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
    #19 /var/www/clients/client1/web17/web/wp-includes/post.php(3480): do_action('edit_post', 508812, Object(WP_Post))
    #20 /var/www/clients/client1/web17/web/wp-includes/post.php(3591): wp_insert_post(Array, false)
    #21 /var/www/clients/client1/web17/web/wp-content/plugins/bbpress/includes/replies/functions.php(2143): wp_update_post(Array)
    #22 /var/www/clients/client1/web17/web/wp-content/plugins/bbpress/includes/replies/template.php(1757): bbp_update_reply_position(508812, 1)
    #23 /var/www/clients/client1/web17/web/wp-content/plugins/bbpress/includes/replies/template.php(487): bbp_get_reply_position(508812, 508811)
    #24 /var/www/clients/client1/web17/web/wp-content/plugins/bbpress/includes/extend/buddypress/activity.php(552): bbp_get_reply_url(508812)
    #25 /var/www/clients/client1/web17/web/wp-content/plugins/bbpress/includes/extend/buddypress/activity.php(642): BBP_BuddyPress_Activity->reply_create(508812, 508811, 495076, Array, 47710)
    #26 /var/www/clients/client1/web17/web/wp-includes/class-wp-hook.php(298): BBP_BuddyPress_Activity->reply_update(508812, Object(WP_Post))
    #27 /var/www/clients/client1/web17/web/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array)
    #28 /var/www/clients/client1/web17/web/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
    #29 /var/www/clients/client1/web17/web/wp-includes/post.php(3480): do_action('edit_post', 508812, Object(WP_Post))
    #30 /var/www/clients/client1/web17/web/wp-content/plugins/bbpress/includes/replies/functions.php(45): wp_insert_post(Array)
    #31 /var/www/clients/client1/web17/web/wp-content/themes/mikmag-child/lib/core/MundrImportForums.php(663): bbp_insert_reply(Array, Array)
    #32 /var/www/clients/client1/web17/web/wp-includes/class-wp-hook.php(298): lib\core\MundrImportForums->post_import_forums_threads('')
    #33 /var/www/clients/client1/web17/web/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters('', Array)
    #34 /var/www/clients/client1/web17/web/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
    #35 /var/www/clients/client1/web17/web/wp-admin/admin-ajax.php(91): do_action('wp_ajax_post_im...')
    
    #187144
    vegetarianzen
    Participant

    Hello Team bbpress

    I am using the plugin bbpress. I want to customise that view of forum similar to http://www.veggieboards.com/forum/index.php this link.

    I have created the child theme and add the css folder and archive-forums.php file in the child theme. I am not able to customise plugin using css only because I want to change the structure. If I change plugin core file then future update overwrite my code and when I am place the complete plugin in child then its stop working and page become blank.

    Please give me the solution I am waiting your solutions.

    My bbpress plugin Version: 2.5.14

    Wordpress Version: 4.8.2

    Thanks

    #187141
    Robin W
    Moderator
    #187139
    rogerlridge
    Participant

    Does anyone know where I can edit or find the source code to edit the layout of the blockquote? I would like to add a little image on the side of the blockquote. Does anyone know where I can find the code to achieve this please? Thanks in advance

    #187137

    In reply to: Free BBPress Theme

    MakarkinPRO
    Participant

    thx. Yeah it’s working a bit what I want.

    Any idea of how to remove Name/Email registration fields from the ShortCode (which is generation login details on the page) ?

    2017-09-24_1652

    #187123
    Robin W
    Moderator
    if (bbp_is_topic_sticky( $topic_id )) {
    //do something 
    }
Viewing 25 results - 4,826 through 4,850 (of 32,481 total)
Skip to toolbar