Robin W (@robin-w)

Forum Replies Created

Viewing 25 replies - 6,801 through 6,825 (of 14,141 total)
  • @robin-w

    Moderator

    sorry, not sure what to suggest next

    @robin-w

    Moderator

    I’m running 5.2.2 and version 2.5.14 with no problems, and 5.2.1 was fine as well on twentyten theme

    The main thing I notice as well as the Forums link on the dashboard sidebar has disappeared, but Iโ€™d assume itโ€™s due to this permissions issue.

    This is usually a theme or plugin conflict as per above.

    @robin-w

    Moderator

    sorry, I only do live code, so don’t know what rc7 does

    @robin-w

    Moderator

    great – glad you are fixed

    @robin-w

    Moderator

    untested, and probably from a purist view not the most elegant solution, but this should work

    add_filter( 'bbp_current_user_can_access_create_topic_form' , 'rew_only_mods' , 10 , 1) ;
    
    function rew_only_mods ($retval) {
    	// Users need to earn access
    	$retval = false;
    	//check if admin
    	if ( bbp_is_user_keymaster() ) {
    		$retval = true;
    	}
    		//check if moderator
    	$role = bbp_get_user_role( get_current_user_id());
    	if ($role == 'bbp_moderator') {
    		$retval = true;
    	}
    // Allow access to be filtered
    	return (bool) apply_filters( 'rew_current_user_can_access_create_topic_form', (bool) $retval );
    }
    

    Also allows keymasters, but I presume you want that.

    Put this in your child theme’s function file – or use

    Code Snippets

    In reply to: Edit Pagination Range

    @robin-w

    Moderator

    great – glad you are fixed, I learnt some stuff as well about how wordpress does pagination, so win-win !!

    @robin-w

    Moderator

    no problem !!

    @robin-w

    Moderator

    link to an example on your site please

    @robin-w

    Moderator

    suspect that modern events calander has had an update.

    I agree that ‘adding extra server code without need’ is a good policy, but unless you get modern events calendar to understand the issue and then fix, then the answer is that you need the fix ๐Ÿ™‚

    I suspect they will simply say it is a bbpress issue, which in a way it is

    @robin-w

    Moderator

    but if you really want to debug

    It could be a theme or plugin issue

    Themes

    As a test switch to a default theme such as twentyfifteen, and see if this fixes.

    Plugins

    If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Then come back

    @robin-w

    Moderator

    I’m author of that fix.

    It may well be something that coincided with you installing that plugin – maybe a theme or another plugin update, updating wordpress, or even your host updating versions of php.

    The error you quote is a function in your THEME affecting a bbpress function. Your theme author has decided to re-write some bbpress functions by the look of it. So looks like that error (which may or may not be the issue – I suspect not) is one to take up with your theme author

    You could spend days working out what the issue is, if the fix works, then I’d tend to just use it.

    In reply to: Edit Pagination Range

    @robin-w

    Moderator

    ok, the code I gave you was topics in a forum, not replies in a topic.

    try this instead

    add_filter( 'bbp_replies_pagination', 'rew_change_shown' ) ;
    
    function rew_change_shown ($args) {
    	$args['mid_size'] = 8 ;
    return $args ;
    }

    @robin-w

    Moderator

    It could be a theme or plugin issue

    Themes

    As a test switch to a default theme such as twentyfifteen, and see if this fixes.

    Plugins

    If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Then come back

    In reply to: Edit Pagination Range

    @robin-w

    Moderator

    hmmm….not sure I can help without visiting the site – is it private ?

    @robin-w

    Moderator

    bbp style pack

    once activated go to

    dashboard>settings>bbp style pack>forum templates

    In reply to: Edit Pagination Range

    @robin-w

    Moderator

    Right now, It display 1,2,3โ€ฆ722,723,724

    so is this EXACTLY what it displayed without the code ?

    In reply to: Edit Pagination Range

    @robin-w

    Moderator

    you want ‘snippets’ that is the php code bit

    In reply to: Edit Pagination Range

    @robin-w

    Moderator

    Additional CSS panel

    ah, this is not css, this is php code, it needs to go in the functions file of your child theme or the code snippets plugin. If it is the latter, that should also give you what then error is – I need to know what that say if it doesn’t work

    In reply to: Edit Pagination Range

    @robin-w

    Moderator

    when you say it gives errors – can you say exactly what these are?

    In reply to: Edit Pagination Range

    @robin-w

    Moderator

    I can’t remember it ever being asked ๐Ÿ™‚

    However after a bit of digging, this will change it

    add_filter( 'bbp_topic_pagination', 'rew_change_shown' ) ;
    
    function rew_change_shown ($args) {
    	$args['mid_size'] = 8 ;
    return $args ;
    }

    8 shows ‘8 +previous and next’ – so 10 – amend the number to whatever you want

    Put this in your child theme’s function file – or use

    Code Snippets

    @robin-w

    Moderator

    This is because in the bbpress plugin there is a template called content-search.php. Many themes also now have a template file called content-search.php. Since the bbPress templates donโ€™t necessarily need to be in a bbPress folder, the bbPress plugin is choosing the template from your theme before the template that is actually in bbPress.

    To fix copy content-search.php from the bbPress plugin templates and place it in a child theme in a folder called bbpress.

    Functions files and child themes – explained !

    So create a directory on your child theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

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

    find
    wp-content/plugins/bbpress/templates/default/bbpress/content-search.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/themes/%your-theme-name%/bbpress/content-search.php
    bbPress will now use this template instead of the original

    @robin-w

    Moderator

    written by me for free, and having no idea quite how your site is set up, or what settings within each plugin you are using, I cannot possibly say whether it will conflict. There are thousands of themes and tens of thousands of plugins – you will need to test. That’s kinda the deal with OSF software – sorry ๐Ÿ™‚

    @robin-w

    Moderator

    your choice

    @robin-w

    Moderator

    thanks for posting your solution

    @robin-w

    Moderator

    hmmm…not sure what is happening – suspect it is theme related. But it would require extensive investigation to work out what is happening

Viewing 25 replies - 6,801 through 6,825 (of 14,141 total)