Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 25 replies - 1 through 25 (of 122 total)

  • Renato Alves
    Participant

    @espellcaste

    You can try something like this:

    function yousite_filter_class( $class, $item_id, $object, $params ) {
    	if ( current_user_can( 'manage_options' ) ) {
    		$class = 'admin-account';
    	} elseif ( current_user_can( 'edit_published_posts' ) ) {
    		$class = 'Author-account';
    	} else {
    		$class = 'General-account';
    	}
    
    	return $class;
    }
    add_filter( 'bp_core_avatar_class', 'yousite_filter_class', 10, 4 );

    Renato Alves
    Participant

    @espellcaste

    BuddyPress has a API that you can use: https://codex.buddypress.org/component/private-messages/

    You can hook at the WooCommerce actions when sending the emails and send your private messages.

    Hope that helps! 🙂


    Renato Alves
    Participant

    @espellcaste

    I will have to be a custom work. No problem exists so far!


    Renato Alves
    Participant

    @espellcaste

    The BP REST API does not have support for users yet. My guess is that the version you are using if imcomplete, missing support for several components.

    Check the work here for more updates: https://github.com/buddypress/BP-REST


    Renato Alves
    Participant

    @espellcaste

    You can add as much options as you want:

    function more_users( $args ) {
    
    	if ( is_admin() && ! defined( 'DOING_AJAX' ) ) {
    		return $args;
    	}
    
    	$args['per_page'] = '50';
    
            $args['type'] = 'random';
    
    	return (array) $args;
    }
    add_filter( 'bp_after_has_members_parse_args', 	'more_users', 10 );

    Renato Alves
    Participant

    @espellcaste

    You can use the ‘bp_after_has_members_parse_args’ hook to filter for random users adding it to the bp-cuscom.php file.

    function random_users( $args ) {
    
    	if ( is_admin() && ! defined( 'DOING_AJAX' ) ) {
    		return $args;
    	}
    
    	$args['type'] = 'random';
    
    	return (array) $args;
    }
    add_filter( 'bp_after_has_members_parse_args', 	'random_users', 10 );

    Renato Alves
    Participant

    @espellcaste

    I’m working on something very similar to the scenario you just described. Here is an idea it might work for you:

    You could add/associate the contractors/user IDs with the WooCommerce cart. It would allow severals contractors to be associated with the same WooCommerce order/cart.

    Here is a possible workable model.

    – Add a project as a product;
    – Add BuddyPress profile users IDs to the product in the cart;
    – With the user IDs, you would fetch the users information to show their details;
    – Go to the cart/checkout process as normally you would;
    – Hook in WooCommerce to send the order but not charge it yet;
    – Send the job to the contractor/user;
    – Contractor accepts the job, hook in your payment gateway to perform the charge;
    – Contractor performs the job as suggested/described by you;
    – After job delivered by the contractor and accepted by the customer.

    A friend suggested I should consider using WooCommerce Pre-Orders.


    Renato Alves
    Participant

    @espellcaste

    I’d say the answer to this question lies in the LMS plugins out there… Each one has its own approach to integrate BuddyPress with them.

    Also you will be able to get a look at how the pieces integrate together.


    Renato Alves
    Participant

    @espellcaste

    I understand, but like I said, your requirements are very specific for your network. Good luck! =)


    Renato Alves
    Participant

    @espellcaste

    Those are very specific changes. I hardly think there is a plugin out of the box, able to apply these changes, but they are possible.

    I find it safe enough.


    Renato Alves
    Participant

    @espellcaste

    Congrats! =)


    Renato Alves
    Participant

    @espellcaste

    @julianprice +1

    @jgwolfensberger I disagree, best practice would be testing on a stage/dev site first and then, upgrade your installation when no problem are found.

    Consider for example custom plugins and functions you have in your theme/WP installation, there are not the same as the many other websites with BP out there in the web.


    Renato Alves
    Participant

    @espellcaste

    Or was using its own form version and was with bad programming?


    Renato Alves
    Participant

    @espellcaste

    @danbp I’m sorry, I think he expects only one URL.


    Renato Alves
    Participant

    @espellcaste

    Hi @ernest8888,

    I’ve never used Commons In a Box, so I couldn’t say what kind of theme compatibility is necessary to work with it.

    I do think you’re using two plugins that perform the same thing, as far as I know about it, CIAB does what BuddyPress does, am I wrong?

    Also, check if there has to be some sort of organization in the template structure for it to work. That must likely be the problem in your case.


    Renato Alves
    Participant

    @espellcaste

    Here are some suggestions and ideas:

    1. and 2. Here you would configure a bit to make the roles do whatever you want when you want it.

    3. It is possible to remove it and activate only the messaging component.

    4. Today this is easy with the Theme Compatibility and Template Files (https://codex.buddypress.org/themes/theme-compatibility-1-7/a-quick-look-at-1-7-theme-compatibility/)


    Renato Alves
    Participant

    @espellcaste

    Sorry, I misunderstood. I’m not sure if the above example would work in a plugin directory.


    Renato Alves
    Participant

    @espellcaste

    Try not to repeat all the file path. Just putting:

    themes/your-theme/buddypress/members/single/member-header.php


    Renato Alves
    Participant

    @espellcaste

    Great! Glad to help! =)


    Renato Alves
    Participant

    @espellcaste

    I personally doesn’t create like that. I bring the files to my themes folder and edit them. This is better for upgrades and I won’t need to create pages.

    Example: If I want to have a custom Profile page, I would do the following steps:

    1 – Create a folder in my theme called, BuddyPress (wp-content/themes/my-theme/buddypress).
    2 – I would copy the profile file from the bp-legacy template in the BP plugin folder and would put in this BuddyPress folder in my template.
    3 – Edit the way I liked.

    It depends much of what you are trying to do, but this approach solved my problems in a more secure and future-friendly way.


    Renato Alves
    Participant

    @espellcaste

    I personally could not say, because you’re showing one random example. In my opinion, and experience with a project that I’m working on, the Codex has been very helpful and with good and solid information. Probably you’re doing something wrong, neither you could say that everything is wrong, just because you’re not being able to accomplish one particular task.


    Renato Alves
    Participant

    @espellcaste

    @henrywright One question as this topic interests me a lot.

    To make it work, I should replace the html form tags in the bp-legacy/members/single/messages/compose.php with this function or am I missing something here?

    If possible, could you put an example, with code?

    Thanks in advance!


    Renato Alves
    Participant

    @espellcaste

    Also try to use in a test website before putting in your life one, in case something go wrong, as it just did.


    Renato Alves
    Participant

    @espellcaste

    I’m sure you can de-register the script and put your own autocomplete script.


    Renato Alves
    Participant

    @espellcaste

    I didn’t know there was a limit in the bulk delete. Is it right to have such a limit @henrywright?

Viewing 25 replies - 1 through 25 (of 122 total)
Skip to toolbar