Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 6,901 through 6,925 (of 32,505 total)
  • Author
    Search Results
  • #171914
    awal16
    Participant

    I added the custom capabilities to my functions.php in the child-theme. When I go to Users, in the back-end of WordPress, there are warning texts like, Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘add_new_roles’ not found or invalid function name in C:\xampp\htdocs\mnddb_nieuw\wp-includes\plugin.php on line 235.

    What did I do wrong?

    My code in the function.php looks like:

    <?php
    // Exit if accessed directly
    if ( !defined( 'ABSPATH' ) ) exit;
    
    // BEGIN ENQUEUE PARENT ACTION
    // AUTO GENERATED - Do not modify or remove comment markers above or below:
    
            
    if ( !function_exists( 'chld_thm_cfg_parent_css' ) ):
        function chld_thm_cfg_parent_css() {
            wp_enqueue_style( 'chld_thm_cfg_parent', trailingslashit( get_template_directory_uri() ) . 'style.css' );
        }
    endif;
    add_action( 'wp_enqueue_scripts', 'chld_thm_cfg_parent_css' );
    
    // END ENQUEUE PARENT ACTION
    
    // Nieuwe forumrolnaam toevoegen
    function add_custum_role($bbp_roles){
    	$bbp_roles['bbp_global_moderator'] = array(
    		'name' => 'Globale moderator',
    		'capabilities' => custom_capabilities( 'bbp_global_moderator' )
    	);
    	return $bbp_roles;
    }
    
    // Nieuwe forumregels toevoegen
    add_filter('bbp_get_dynamic_roles', 'add_new_roles', 1);
    
    function add_role_caps_filter($caps, $role) {
    	// Only filter for roles we are interested in!
    	if ($role == 'bbp_global_moderator')
    		$caps = custom_capabilities($role);
    	
    	return $caps;
    }
    
    add_filter('bbp_get_caps_for_role', 'add_role_caps_filter', 10, 2);
    
    function custom_capabilities($role) {
    	switch($role) {
    		// Capabilities for 'global_moderator' role
    		case 'bbp_global_moderator';
    			return array(
    				// Primary caps
    				'spectate'				=> true,
    				'participate'			=> true,
    				'moderator'				=> false,
    				'throttle'				=> false,
    				'view_trash'			=> true,
    				
    				// Forum caps
    				'publish_forums'		=> false,
    				'edit_forums'			=> false,
    				'edit_others_forums'	=> false,
    				'delete_forums'			=> false,
    				'delete_others_forums'	=> false,
    				'read_private_forums'	=> true,
    				'read_hidden_forums'	=> false,
    				
    				// Topic caps
    				'publish_topics'		=> true,
    				'edit_topics'			=> true,
    				'edit_others_topics'	=> false,
    				'delete_topics'			=> true,
    				'delete_others_topics'	=> false,
    				'read_private_topics'	=> true,
    				
    				// Reply caps
    				'publish_replies'		=> true,
    				'edit_replies'			=> true,
    				'edit_others_replies'	=> false,
    				'delete_replies'		=> true,
    				'delete_others_replies'	=> false,
    				'read_private_replies'	=> true,
    				
    				// Topic tag caps
    				'manage_topic_tags'		=> false,
    				'edit_topic_tags'		=> false,
    				'delete_topic_tags'		=> false,
    				'assign_topic_tags'		=> false,
    			);
    			break;
    		default :
    			return $role;
    	}
    }
    
    #171910
    cookavich
    Participant

    I created a test page with this as the content:

    [bbp-display-topic-index show=’5′]
    
    [display-newest-users show = ’10’]

    This was the result:

    screenshot

    #171903
    Pascal Casier
    Moderator

    The link is: https://codex.bbpress.org/custom-capabilities/

    Better to post a new topic for a new question with a specific title, so others can find it in the search …

    Pascal.

    #171889
    Robin W
    Moderator

    ok so for the roles, you should see and use

    Custom Capabilities

    loop_single_forum in your child theme is the right way to go

    If you need further help in doing this (or anything else!) – please feel free to ask, like all things it is a learning curve 🙂

    #171888
    Robin W
    Moderator

    your blogs.css line 1427

    has

    
    .single .commentmetadata, .single .reply {
      left: -15px;
      margin: 10px 0;
      opacity: 0.3;
      position: relative;
    }
    

    suggest you try adding

    #bbpress-forums .reply {
      opacity: 1;
    }
    

    to your css.

    come back if you need further help in doing this !

    #171883
    Stephen Edgar
    Keymaster

    You can also use bbp_create_initial_content() with some bbp_parse_args() to generate your content, bbPress uses this to crate some sample/initial content when installing on multisite installs.

    https://bbpress.trac.wordpress.org/browser/branches/2.5/includes/core/update.php#L174

    ying-sun
    Participant

    hi. i want new topics and replies to show up in the activity stream, but right now they are not.

    i added this to bp-custom.php:

    add_post_type_support( 'topic', 'buddypress-activity' );

    which works, but with a generic “UserName wrote a new item.” it seems like there must be a better, easier way to tie the two together. looking at the bbpress files, i see this:

    public function register_activity_actions() {
    
    // Sitewide activity stream items
    bp_activity_set_action( $this->component, $this->topic_create, esc_html__( 'New forum topic', 'bbpress' ) );
    bp_activity_set_action( $this->component, $this->reply_create, esc_html__( 'New forum reply', 'bbpress' ) );
    }

    i don’t know if they’re not getting called or they’re conflicting with something or what, but they aren’t doing what it seems like they should be doing. is there a setting i’m missing to activate this feature?

    little help?

    #171875
    Robin W
    Moderator

    no, core functions in bbpress cannot be put in other folders.

    Generally it is not recommended that you change bbpress itself. Rather almost all bbpress functionality can be filtered, so that the plugin remains complete and changes are put in your theme’s functions file using wordpress filering capability.

    What changes did you make? If small, let me know which lines in which file, and post the changes here, and I’ll try to help you with what you should put in your functions file.

    You should also make those changes (and the template files you copied ) in a child theme, so that theme updates donlt overwrite these

    https://codex.bbpress.org/functions-files-and-child-themes-explained/

    #171873
    Robin W
    Moderator

    can you tell me what you are putting as the shortcode?

    #171872
    Robin W
    Moderator

    https://codex.bbpress.org/themes/theme-compatibility/

    should answer your questions, but do come back if you need further help !

    #171867
    cookavich
    Participant

    That sounds workable, however, after installing the plugin the display topic shortcode doesn’t seem to be functional. The display newest users shortcode is working, odd.

    #171865
    Pascal Casier
    Moderator

    Hi,

    Is this want you are looking for : http://www.rewweb.co.uk/bbpress-additional-shortcodes/ from @robin-w

    It’s INcluding, not EXcluding …

    Pascal.

    #171861

    In reply to: Where to register?

    Pascal Casier
    Moderator
    #171835
    Adri Oosterwijk
    Participant

    Hi all,
    I think I got it worked out together with Otto and Tia over at WPML.
    You can have a look at it at those two topics:

    https://wpml.org/forums/topic/multiple-site-languages-but-just-a-bbpress-forum-in-english/
    https://wpml.org/forums/topic/bbpress-breadcrumbs-how-to-localize-and-point-to-the-right-page/

    BTW I hide the language switcher(s) on the topics pages by adding this piece of code in my header file

    <?php if (!is_bbpress()) {
    do_action('icl_language_selector'); 
    } ?>

    and this in my footer.php

    <?php if (!is_bbpress()) {
    do_action(‘wpml_footer_language_selector’);
    } ?>

    I hope it helps you as well.

    Regards,

    Adri

    #171834
    Pascal Casier
    Moderator

    Hi,
    I suppose you mean that you want to change the default page that you get when going on /forums ?
    If so, just create a page in WordPress and change the slug to ‘forums’, then put anything you want in that page.

    The standard page shown when going on /forums is content-archive-forum.php.

    You can customize all templates if you want, just read some pages of the bbPress Codex: https://codex.bbpress.org/themes/theme-compatibility/getting-started-in-modifying-the-main-bbpress-template/

    Pascal.

    #171825
    pazzaglia
    Participant

    How can I vary this code to include a default image for topics? I post new forum topics to facebook and at the moment they’re showing a TERRIBLE giant picture – when there are no profile pics or attachments to display. I don’t even know where it’s being pulled from.

    http://www.hippressurecooking.com/forum/

    pressure cooker forums

    Thanks!
    L

    #171812
    Robin W
    Moderator

    The problem is that wordpress was designed to work with templates that were different for each type eg template for page with sidebar, another template for page without sidebar.

    The trouble is that theme authors are getting too clever ,and nowadays write a single big page template that bbpress cannot easily react with.

    So your theme displays one template for the main page, but then bbpress can’t work with it for the other sub pages, as it doesn’t know how the theme is using the template.

    Ok, so that’s the explanation, but probably doesn’t help you at all.

    If you know some wp stuff then this might help

    https://codex.bbpress.org/themes/theme-compatibility/getting-started-in-modifying-the-main-bbpress-template/

    #171811
    stewmills
    Participant

    Sorry if this is a duplicate…seemed to get an odd behavior when attempting to submit previously.

    Facts:
    – WordPress 4.2.2
    – bbPress 2.5.8
    – Theme – Karma 3.0.3

    I have created the following forum on my site (currently hidden from the top menu but accessible via links provided): http://www.cytoviva.com/forum/

    In the above link I get the forum login and other options in the right sidebar as I prefer.

    However, when you get one layer deeper into the forums, topics, posts, etc. the sidebar is not visible as seen here: http://www.cytoviva.com/forums/forum/registration-instructions-and-forum-guidelines/

    I want the sidebar to be visible on all pages/posts/etc. so someone reading a post can login from that page or request new access from that page and as well logged in users will always have the sidebar details and option to logout from any page within the forum.

    Initially the sidebar was not visible at all and I finally realized that my forum page (using the shortcode [bbp-forum-index] on my “forum” page to display the forum) was using the right template and when I changed it to ‘Right Sidebar’ and selected the option at the bottom to display my newly created sidebar (User Forum Login Sidebar) I started seeing what I wanted to see on the main forums page.

    However, when I go to my individual forums in the WP control panel and make sure they are also set under the ‘Right Sidebar’ page template and as well have the option checked to display my sidebar, it seems to do nothing.

    I have read a host of other posts here today and it seems that the answers to getting the sidebar to display as I want vary per person/situation hence my additional post. I don’t want to have to create a new .css file as currently I don’t have access to our host and FTP to create new files so I was hoping to find a solution that is simple as me not having a button checked somewhere or something trivial.

    I am somewhat new to WP and bbPress so the more fundamental the advice the better. My goal is to try and solve this with a little troubleshooting versus new child .php pages, etc.

    Thanks in advance!

    #171808
    Pascal Casier
    Moderator

    To remove the ‘Forums’ title, you could do some CSS:

    .forum-archive h1 {
        display: none;
    }

    Pascal.

    #171806
    Pascal Casier
    Moderator

    Hi,

    Forum moderation is being reviewed and improved a lot for future versions of bbPress. For now there is standard moderation and blacklisting as described here: https://codex.bbpress.org/moderation-and-blacklisting/

    The above mentioned plugin is the only one that I found when I looked at it in the last months. Please note that it has a small bug with saving topic subscriptions from user before their post is approved, so the user might have to re-subscribe from the checkbox during the reply.

    Pascal.

    #171791
    Pascal Casier
    Moderator

    As Robin indicated, this is somewhere a conflict with a plugin or a theme.

    But I see your forums: http://www.finalfantasyrpg.com.br/forums/
    So I suppose that you found /wp-admin/edit.php?post_type=forum ?

    Pascal.

    #171790
    Pascal Casier
    Moderator

    Okay, maybe this then:

    CSS:

    .bbp-search-form {
     display:none !important;
     }

    Also check the option called ‘Search’ in your dashboard: ‘Settings > Forums > Forum Features’

    Pascal.

    #171780
    Pascal Casier
    Moderator

    Hi,
    Never edit bbpress templates directly in the bbpress folder, otherwise you will loose your changes when bbPress updates.
    There are several ways that I know of, but the most easy one would probably be by installing my ‘bbP Toolkit’ plugin.

    Or you play with CSS yourself:

    .bbp-template-notice {
    	display: none;
    }
    
    .bbp-template-notice.info,
    .bbp-template-notice.error,
    .bbp-template-notice.important,
    .bbp-template-notice.warning {
    	display: block;
    }

    Not that also other similar messages will disappear with the above.

    And if you want to modify bbPress files, please check the codex (https://codex.bbpress.org/themes/theme-compatibility/getting-started-in-modifying-the-main-bbpress-template/) and/or create a child theme
    Pascal.

    Jeff McNeill
    Participant

    Hahaha tags “sleeping pill store” tag should be a signal that someone is asleep at the tiller. Really folks, this place is asleep, and all Robin W. does is state that it is free software and you should be durned grateful, and not try and wake anybody up.

    Development is tediously slow, regardless of some $50k that was raised a few years ago. 2.6 should supposedly fix the issue with not being able to replace posts with forum discussions. Surely that is also why the plugin that actual does that hasn’t been updated in two years. And 2.6 was 4 months late in May 2014. So when will it ever be released?

    This is simply too long! Obviously this project is coasting on the coattails of integration (and requirement of use) in BuddyPress and that it is an anointed project of WordPress.org. Anything less would have near zero users already.

    So much functionality is needed to be reasonable. There appears to be a single active developer committing to the code: https://www.openhub.net/p/bbpress/commits/summary

    But really, this was a complaint over a year and a half ago, and it ain’t changed. Very sad as the potential is quite big. How else do you explain 16,000+ downloads of that plugin that has been abandoned: https://wordpress.org/plugins/bbpress-post-topics/

    #171760
    tech55541
    Participant

    Hello,
    Would it be possible to take the code that adds this functionality in with BuddyPress, create a separate plugin, and then make it work for BBPress? I can’t believe a forum software does not have this built in.

    Thanks 🙂

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