Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have searched and found a few plugins which help me offer appointment scheduler for the site owner. Is there something in existence which can offer the same functionality to all the users of the site instead of just the site owner?

Like a visitor can schedule an appointment with any user of the site? Do you know of such a plugin? If such a plugin doesn't exist, any options which can fill my cup up? Or I will have to write something of my own probably using code of some existing one but which one (any suggestions?)

share|improve this question

closed as not constructive by EAMann Aug 8 '12 at 2:40

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

up vote 1 down vote accepted

I've looked for something like that before and i found that its a pain to try and modify any of these plugins to work as a per user schedule, what i ended up doing is i created a custom post type 'user_events' with a few custom fields (start_time,end_time,location,user_status,...)and on each author profile I've created a grid view of all days in a month displaying all of the events that user had, at the button I added a custom form to create a new post (from user_events type), which had some major validation to prevent over booking by checking the start_time, end_time of events on that day. When a new post (user_event) is created i changed the post_author to the user ID and set the post status to pending or draft. then an email is dispatched to the user(author) and when the post(user_event) was changed to published another email is sent to the guest who requested the appointment.

all of that worked well and good but took some time to code and sadly have no access to this code anymore but i'll gladly help if needed.

Update

This is something i quickly coded (not been tested yet) to display the month grid view on an author page

if(isset($_GET['author_name'])){
    $curauth = get_userdatabylogin($author_name);
}else{
    $curauth = get_userdata(intval($author));
}
if (isset($_GET['c_mon']){
    $Month = $_GET['c_mon']
    $Year = $_GET['c_yea']
}else{
    $Month = date("m");
    $Year = date("y");
}
$day_in_month = cal_days_in_month(CAL_GREGORIAN, $Month, $Year);
$first_day =  date("l", mktime(0,0,0,$Month,1,$Year));
$last_day =  date("l", mktime(0,0,0,$Month,$day_in_month,$Year));

//print grid
//open the table
echo '<div class="current_month"><table><tr><td>Sunday</td><td>Monday</td><td>Tuesday</td><td>Wednesday</td><td>Thursday</td><td>Friday</td><td>Saturday</td></tr>';
//skip days til first day of month = day of week
switch ($first_day) {
    case 'Sunday':
        echo '<tr>';
        break;
    case 'Monday':
        echo '<tr><td>&nbsp;</td>';
        break;
    case 'Tuesday':
        echo '<tr><td>&nbsp;</td><td>&nbsp;</td>';
        break;
    case 'Wednesday':
        echo '<tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>';
        break;
    case 'Thursday':
        echo '<tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>';
        break;
    case 'Friday':
        echo '<tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>';
        break;
    case 'Saturday':
        echo '<tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>';
        break;
}

$count = 1;

while ($count < $day_in_month){
    //get all of says events
    $args = array(
        'posts_per_page' => -1,
        'post_type'=> 'user_events',
        'author' => $curauth->ID,
        'order' => 'ASC',
        'orderby' => 'meta_value',
        'meta_key' => 'user_events_start'
        'meta_query' => array(
        array(
            'key' => 'user_events_date',
            'value' => $Month.'/'.$count.'/'.$Year,
        )
    ));

    //open new week row
    if (date("l", mktime(0,0,0,$Month,$count,$Year)) == 'Sunday' && $count > 1){
            echo '</tr><tr>';
    }
    $events = New  WP_Query($args);
    if ($events->have_posts()){
        echo '<td><div class="day_container"><div class="day_date">'.$count.'</div><div class="day_events_container"><ul>';
            while ($events->have_posts()){
                $events->the_post();
                $out = '';
                $out = '<li class="event"><div class="evet_time">'.get_post_meta($post->ID,'user_events_start',true). ' - '. get_post_meta($post->ID,'user_events_end',true).'</div>';
                $out .= '<div class="event_name">'.get_the_title($post->ID).'</div>';
                $out .= '<div class="event_location">'.get_post_meta($post->ID,'user_events_location',true).'</div></div></li>';
                $echo $out;
            }

        echo '<ul></div></div></td>';
    }else{
        echo '<td><div class="day_container"><div class="day_date">'.$count.'</div></div></td>';
    }

$count = $count + 1;
}

//close extra days of week form next month
switch ($first_day) {
    case 'Sunday':
        echo '<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>';
        break;
    case 'Monday':
        echo '<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>';

        break;
    case 'Tuesday':
        echo '<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>';
        break;
    case 'Wednesday':
        echo '<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>';
        break;
    case 'Thursday':
        echo '<td>&nbsp;</td><td>&nbsp;</td></tr>';
        break;
    case 'Friday':
        echo '<td>&nbsp;</td></tr>';
        break;
    case 'Saturday':
        echo '</tr>';
        break;
}

//close table
echo '</table></div>';

Now this code assumes that you have:

  • a custom post type named: 'user_events'
  • all posts of user_events type post_author field is set to the desired user.
  • custom fileds:
    • user_events_date -> holds the event date in a month/day/year format ex: 5/29/2011
    • user_events_start -> holds the event start time in a 12:00 format
    • user_events_end -> holds the event end time in a 18:00 format
    • user_events_location -> holds the event location as string
share|improve this answer
    
Hmm.. How were you showing a calendar schedule to the visitor? I mean time along with date for the month? –  Ashfame May 29 '11 at 12:02
    
@Ashfame : i added a quick code example –  Bainternet May 29 '11 at 13:21
    
Cool! Thanks for that :) I will let you know if I face any difficulties in building the rest of this :) –  Ashfame May 29 '11 at 16:23

Not the answer you're looking for? Browse other questions tagged or ask your own question.