Appointments+ Plug-in on a multisite buddypress installation.

I will allow users (community members) to blog if they choose to do so and also allow them to have their own appointments page. Currently I have to activate this plug-in on the buddypress site in order to see the appointments listed in the buddypress user profile (appointments), but this will only list the appointments in the buddypress blog. If the appointments page is on another blog on the multisite then these cannot be shown on the buddypress site. I would like to create a link in user's buddypress profile to the appointments page which is on their blog on a multisite, and I don't want to use the apppointments plug-in on the buddypress site. How can I achieve this?

  • ozgurpolat

    Cok Selamlar Hakan, :slight_smile:

    I wanted the bloggers to run their own appointments page in their own blog. Because a blogger could be an instructor with clients. Running the appointments page in the community site would not be very useful. Because the services will be offered by members of the community, and they will be all independent people. But it would be very good if a member who has a blog could see their appointments/bookings listed in their buddypress profile page.

    I set up a test site with the following configuration:

    Current site: http://kooksjournal.net

    Buddypress on a secondary blog: http://community.kooksjournal.net

    example blog where appointments plug-in is running and make an appointment page is created:
    wpmudev blog: http://wpmudev.community.kooksjournal.net/

    User and Blog registrations were allowed when wpmudev was registered but turned off after the registration of wpmudev:

    Login:wpmudev
    Pass:wpmudev

    I would like a bloger (a user) who is also a member of "community.kooksjournal.net" to have their own appointments page in their own blog for example: "wpmudev.community.kooksjournal.net/". Then show their appointments list in their buddypress profile page.

    Cok tesekkürler,

    Özgür Polat

  • Hakan

    Hi,

    Display appointments schedules and making appointments on BP profile tabs are not supported as there is no editor or standard display for that. I mean, every theme will have its own look, so we cannot solve this in plugin concept. But I have provided sample codes on this and at least one member already successfully implemented that:

    Please see that post:
    https://premium.wpmudev.org/forums/topic/schedule-calendar-on-the-buddypress-user-profile-page

    An easier and supported solution is creating a regular page (not profile tab) for each instructor just using the shortcodes and using "worker" parameter.

    Cheers,
    Hakan

  • ozgurpolat

    Hi Hakan,

    I put the following code into my functions.php. But I could not see any different behavior. I also noticed that the plug-in allows double booking. I make the booking and the plug-in doesn't show the booking time as busy, and when I make another booking for the same time slot, it allows the double booking and shows the time as busy. If you log in as wpmudev and go into appointments, you will see four bookings for the two same time slots.

    function my_setup_nav() {
    	global $appointments, $bp;
    	$a = $appointments;
    	if ( !is_object($a) || !$a->is_worker( bp_loggedin_user_id() ) )
    		return;
    
    	bp_core_new_subnav_item( array(
    		'name' => __( 'My Schedule', 'appointments' ),
    		'slug' => 'my-schedule',
    		'parent_url' => $bp->loggedin_user->domain . 'appointments/',
    		'parent_slug' => 'appointments',
    		'screen_function' => 'tab_template_app_schedule'
    	) );
    }
    
    function tab_template_app_schedule() {
    	add_action( 'bp_template_content', 'screen_content_app_schedule' );
    	bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
    
    }
    function screen_content_app_schedule(){
    echo do_shortcode( '[app_schedule worker="'.bp_loggedin_user_id().'" logged=" " title="My Schedule from START to END"]' );
    echo do_shortcode( '[app_pagination]' );
    }
    add_action( 'bp_setup_nav', 'my_setup_nav', 25 );
  • ozgurpolat

    Hi Hakan,

    My Appointments+ plugin is network activated. And I run buddy press on a secondary blog (http://community.kooksjournal.net)

    1. I noticed the warning that the tab is only visible to service providers. I created one service "test" and I assigned wpmudev as a "general" provider and a "test" provider. I created two appointments in:

    wpmudev blog: http://wpmudev.community.kooksjournal.net/

    When I login as wpmudev and go into my profile -> appintments in "http://community.kooksjournal.net" I don't see any appointments listed. I made sure that wpmudev is a service provider. I am not sure what is wrong. I also tried to deactivate the plug-in network wide and only activate it for buddypress blog and wpmudev blog.

    The functions.php file is in the buddypress corporate theme folder, maybe I need to modify the default buddypress functions.php file.

    2. You are right, I deleted the second provider and it works fine now.

  • ozgurpolat

    Hi Hakan,

    I set up two different test sites. kooksjournal.org and kooksjournal.net. I created a subscriber account wpmudev for both sites with the same password as the account name so that you could login and see what happenes in both sites.

    1. In the Kooksjournal.org the buddypress blog is the main blog and your code that goes into the functions.php file works. But not without problems. I can see "My Schedules" tab but it shows the time slots as free even if there is an appointment booked for a particular time slot.

    2. In the Kooksjournal.net the buddypress blog is the secondary blog and the code that goes into the functions.php does not work. I also put the same code into must use plugins directory but could not get it working.

    Kooksjournal.org:

    Current site: http://kooksjournal.org
    Buddypress installed on: http://kooksjournal.org
    User and Blog registrations were allowed when wpmudev was registered but turned off after the registration of wpmudev:
    wpmudev Blog: http://wpmudev.kooksjournal.org/

    Login: xxx
    Pass: xxx

    Wp-config.php:
    define('WP_DEBUG', false);
    define('WP_ALLOW_MULTISITE', true);
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', true);
    define('DOMAIN_CURRENT_SITE', 'kooksjournal.org');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
    /* That's all, stop editing! Happy blogging. */

    Kooksjournal.net:

    Current site: http://kooksjournal.net
    Buddypress on a secondary blog: http://community.kooksjournal.net
    wpmudev blog: http://wpmudev.community.kooksjournal.net/

    User and Blog registrations were allowed when wpmudev was registered but turned off after the registration of wpmudev:

    Login: xxx
    Pass: xxx

    Wp-config.php:
    define('WP_DEBUG', false);
    define('WP_ALLOW_MULTISITE', true);
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', true);
    define('DOMAIN_CURRENT_SITE', 'kooksjournal.net');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
    define('BP_ROOT_BLOG', 2);
    /* That's all, stop editing! Happy blogging. */

    Best regards.

    Özgür Polat

  • ozgurpolat

    I just could not help adding this:

    I used to be a member of a community called "http://perlmonks.org/". If you have a question, a piece of code that doesn't work, or you need an algorithm, you just ask these guys and you get an answer like lightning speed. Your speed is more like speed of sound compared to their speed. It is really amazing because they are completely free and they don't charge 79$ per month like you do. You (WPMU DEV) can learn a lot from these guys.

    Here in this link (Join), WPMU DEV says:

    https://premium.wpmudev.org/join/

    It's like having your own personal WordPress development team

    And you say:

    Unfortunately I cannot help you in this matter further, as this is a deep customization. I have already provided examples to adapt it to your needs. From now on you should create your functions yourself or you may also consider hiring a dedicated developer.

    And Abraham Lincoln says:

    You can fool some of the people all of the time, and all of the people some of the time, but you can not fool all of the people all of the time.

    Abraham Lincoln, (attributed)

    As I am leaving this useless community, I wish you all the best as you are my countryman, I hope it works out for you.

    I will certainly tell as many people as I can about my experience with WPMU DEV.

    Best Regards

    Özgür Polat

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.