Robin W (@robin-w)

Forum Replies Created

Viewing 25 replies - 11,676 through 11,700 (of 14,283 total)
  • @robin-w

    Moderator

    can you post lines 30-34 please

    @robin-w

    Moderator

    Slight problem is that I’m the plugin author of bbP Private Groups šŸ™‚

    Getting search to work with private groups drove me nearly mad – and I thought I’d cracked it, but clearly not šŸ™

    I’ll take another look at it – it was a while ago, and I’m always learning, so maybe a fresh look might fix any residual issues.

    When you say you get 174 results – are these all ones that someone logged in with restrictions would see? ie how may are you expecting based on only seeing some forums?

    In reply to: Custom Forum Layout

    @robin-w

    Moderator

    Thanks – glad you’re fixed and thanks for the kind donation

    @robin-w

    Moderator

    Hope you haven’t forgotten anything else !

    ok edit

    $last_active = strtotime( get_post_meta( $topic_id, '_bbp_last_active_time', true ) );
    			if ($last_active < strtotime( '-10 days') )
    				bbp_close_topic( $topic_id );
    
    

    to

    $topic_date = strtotime( get_post( $topic_id, 'post_date', true ) );
    $forum_id = bbp_get_topic_forum_id($topic_id);
    if ($topic_date < strtotime( '-10 days') && $forum_id == 210 )
    bbp_close_topic( $topic_id );
    

    the $forum_id == 210 needs the forum id of the forum you want to restrict.

    to find this, go into

    Dashboard>forums>all Forums and hover of edit of the forum you want – eg hover over edit ‘announcements’ and look in the bottom right of the screen. you’ll see the edit url that will include post=210 or whatever number.

    You’ll need to test that all the above works, and come back if you need further help

    @robin-w

    Moderator

    no problem

    Alter the lines

    $last_active = strtotime( get_post_meta( $topic_id, '_bbp_last_active_time', true ) );
    if ($last_active < strtotime( '-10 days') )
    

    to

    $topic_date = strtotime( get_post( $topic_id, 'post_date', true ) );
    if ($topic_date < strtotime( '-10 days') )
    

    should do it

    In reply to: Custom Forum Layout

    @robin-w

    Moderator

    ok, I’ve added it to my shortcode plugin

    bbp additional shortcodes

    you will want :

    [display-forum-index forum= ‘2932, 2921′ breadcrumb=’no’ search=’no’]

    You can see how to set this in

    Dashboard>settings>shortcodes

    @robin-w

    Moderator

    hmmm….hadn’t fully reads your original post

    ideally I’d like to get search results with pagination

    That’s what you should have ! Results should show the ‘replies per page’ setting together with full pagination.

    Are you sure there are more than 20 results to show?

    I suspect that something else is disturbing this

    If you haven’t amended bbpress code or added filters then :

    It could be a theme or plugin issue

    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.

    Come back when you have done that

    @robin-w

    Moderator

    no problem

    copy this code into a new notepad/notepad++ page

    <?php 
    
    /*
    Plugin Name: BBPress Close Old Posts
    Description: Close BBPress 2.0+ posts that haven't been updated in X days. 
    Author: Raygun
    Version: 0.1
    Author URI: http://madebyraygun.com
    
    This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
    You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
    */ 
    
    register_activation_hook(__FILE__, 'bbpress_topic_scheduler');
    
    add_action('bbpress_daily_event', 'bbpress_close_old_topics');
    
    function bbpress_topic_scheduler() {
     wp_schedule_event(time(), 'daily', 'bbpress_daily_event');
    }
    
    function bbpress_close_old_topics() {
    	// Auto close old topics
    	$topics_query = array(
    		'author' => 0,
    		'show_stickies' => false,
    		'parent_forum' => 'any',
    		'post_status' => 'publish',
    		'posts_per_page' => -1
    	);
    	if ( bbp_has_topics( $topics_query ) )
    		while( bbp_topics() ) {
    			bbp_the_topic();
    			$topic_id = bbp_get_topic_id();
    			$last_active = strtotime( get_post_meta( $topic_id, '_bbp_last_active_time', true ) );
    			if ($last_active < strtotime( '-10 days') )
    				bbp_close_topic( $topic_id );
    		}
    }
    ?>
    

    Change the -10 days right near the bottom to whatever number you want

    Save this file as ‘close_old_topics.php’

    Compress/zip this file, so you have a zipped version.

    then in worpress go to

    Dashboard>plugins>add new and click ‘upload’ and then upload the zipped file you saved above, and then activate.

    Come back if you have any issues, the code is not mine and I have not tested it, but others have used.

    In reply to: Custom Forum Layout

    @robin-w

    Moderator

    V. close to a solution – but supper calls, will finish it tomorrow and come back !

    @robin-w

    Moderator

    ok, so how tech savvy are you do you know

    1. how to create a notepad/notepad++ file and copy/paste code into it?
    2. FTP this to your wordpress site?

    Come back and let me know

    @robin-w

    Moderator

    bbpress uses custom post types of Forums, Topics, and Replies.

    Just use one of the many export plugins.

    I googled ‘wordpress export custom post types to excel’ and got lots of useful looking plugins

    @robin-w

    Moderator

    I think these issues are not bbpress related.

    I’d discuss these issues with the plugin authors and your host provider.

    @robin-w

    Moderator

    no problem – glad you’re fixed !

    In reply to: Hidden private forum

    @robin-w

    Moderator

    No leave it at 2.5.2 – might have been an issue with you mamp.

    The reference to php 5.4 being stricter I found seemed to indicate that there was an issue in certain circumstances, so unless it is a firm problem I don’t want to alter code.

    I know which files I changed (only 2) and will keep this as a reserve in case.

    Thanks for coming back ! much appreciated !

    @robin-w

    Moderator

    Hey no problem, glad you’re fixed

    I suspect that the plugin author would be better to sort you with tablepress eg

    https://wordpress.org/support/plugin/tablepress

    but you may hot the catch 22 that editing is in the backend and you need to disable this for the forums !

    In reply to: Notifications

    @robin-w

    Moderator

    but glad you’re fixed !

    In reply to: Notifications

    @robin-w

    Moderator

    probably because bbpress is sending them through subscriptions, as well as the notify plugin.

    @robin-w

    Moderator

    Try adding this to your functions file

    function change_search() {
    $args['posts_per_page'] = 50
    return $args;
    }
    
    add_filter('bbp_before_has_search_results_parse_args', 'change_search' );
    
    

    where 50 is the number you want displayed

    I haven’t tested, if it doesn’t work come back and I’ll fix it

    In reply to: Notifications

    @robin-w

    Moderator
    In reply to: Custom Forum Layout

    @robin-w

    Moderator

    this plugin might be what you need

    bbp additional shortcodes

    @robin-w

    Moderator

    Does uninstalling the wp4 fix correct this – albeit that you lose replies?

    We need to know if it is the fix that is the new problem, or whether you have the problem without the fix.

    @robin-w

    Moderator
    In reply to: Fix login widget

    @robin-w

    Moderator

    you’ll need to post the problem as well as the solution we need a url to a page within your site where this occurs

    @robin-w

    Moderator

    Great – welcome !

    @robin-w

    Moderator

    This isn’t showing as a wordpress site, and the post is not a bbpress one.

    In any event, this will either be a server, email or wordress theme issue. Talk to your host provider who is most able to help you.

Viewing 25 replies - 11,676 through 11,700 (of 14,283 total)