updated to collabpress 0.5

This commit is contained in:
Kenneth Reitz
2010-02-19 16:25:02 -05:00
parent 4dcc42714c
commit dc2a40568c
14 changed files with 923 additions and 267 deletions
+105 -85
View File
@@ -1,86 +1,106 @@
<?php
// Avoid direct calls to this page
if (!function_exists ('add_action')) {
header('Status: 403 Forbidden');
header('HTTP/1.1 403 Forbidden');
exit();
}
/***
* Define the path and url of the CollabPress plugins directory.
* It is important to use plugins_url() core function to obtain
* the correct scheme used (http or https).
*/
define( 'CP_PLUGIN_DIR', WP_PLUGIN_DIR . '/collabpress' );
define( 'CP_PLUGIN_URL', plugins_url( $path = '/collabpress' ) );
/***
* Install or upgrade
*/
require ( CP_PLUGIN_DIR . '/cp-core/cp-core-install.php' );
define( 'CP_MINIMUM_USER', get_option('cp_user_level'));
/***
* Include core functions
*/
// Activities
require ( CP_PLUGIN_DIR . '/cp-functions/cp-functions-activity.php' );
// Calendar
require ( CP_PLUGIN_DIR . '/cp-functions/cp-functions-calendar.php' );
// Projects
require ( CP_PLUGIN_DIR . '/cp-functions/cp-functions-projects.php' );
// Tasks
require ( CP_PLUGIN_DIR . '/cp-functions/cp-functions-tasks.php' );
// Users
require ( CP_PLUGIN_DIR . '/cp-functions/cp-functions-users.php' );
/***
* Include Core Pages
*/
// Dashboard
require ( CP_PLUGIN_DIR . '/cp-core/cp-core-dashboard.php' );
$show_cp_core_dashboard = new cp_core_dashboard();
// Projects
require ( CP_PLUGIN_DIR . '/cp-core/cp-core-projects.php' );
$show_cp_core_projects = new cp_core_projects();
// Settings
require ( CP_PLUGIN_DIR . '/cp-core/cp-core-settings.php' );
/***
* Hook into main dashboard to display widget
*/
// Hook into 'wp_dashboard_setup' to add dashboard widget
add_action('wp_dashboard_setup', 'cp_wp_add_dashboard_widgets' );
// Function: Add dashboard widget
function cp_wp_add_dashboard_widgets() {
wp_add_dashboard_widget('cp_wp_dashboard_widget', 'CollabPress - Recent Activity', 'cp_wp_dashboard_widget_function');
}
// Function: Display dashboard widget
function cp_wp_dashboard_widget_function() {
list_cp_activity();
}
// Add CollabPress CSS
function cp_wp_add_stylesheet() {
$url = get_settings('siteurl');
$url = $url . '/wp-content/plugins/collabpress/style/cp-admin.css';
echo '<link rel="stylesheet" type="text/css" href="' . $url . '" />';
}
add_action('admin_head', 'cp_wp_add_stylesheet');
<?php
// Avoid direct calls to this page
if (!function_exists ('add_action')) {
header('Status: 403 Forbidden');
header('HTTP/1.1 403 Forbidden');
exit();
}
/***
* Define the path and url of the CollabPress plugins directory.
* It is important to use plugins_url() core function to obtain
* the correct scheme used (http or https).
*/
define( 'CP_PLUGIN_DIR', WP_PLUGIN_DIR . '/collabpress' );
define( 'CP_PLUGIN_URL', plugins_url( $path = '/collabpress' ) );
$cp_email_footer = "\n\nPowered by CollabPress for WordPress\nhttp://wordpress.org/extend/plugins/collabpress/";
/***
* Install or upgrade
*/
require ( CP_PLUGIN_DIR . '/cp-core/cp-core-install.php' );
define( 'CP_MINIMUM_USER', get_option('cp_user_level'));
/***
* Include core functions
*/
// Activities
require ( CP_PLUGIN_DIR . '/cp-functions/cp-functions-activity.php' );
// Calendar
require ( CP_PLUGIN_DIR . '/cp-functions/cp-functions-calendar.php' );
// Projects
require ( CP_PLUGIN_DIR . '/cp-functions/cp-functions-projects.php' );
// Tasks
require ( CP_PLUGIN_DIR . '/cp-functions/cp-functions-tasks.php' );
// Users
require ( CP_PLUGIN_DIR . '/cp-functions/cp-functions-users.php' );
/***
* Include Core Pages
*/
// Dashboard
require ( CP_PLUGIN_DIR . '/cp-core/cp-core-dashboard.php' );
$show_cp_core_dashboard = new cp_core_dashboard();
// Projects
require ( CP_PLUGIN_DIR . '/cp-core/cp-core-projects.php' );
$show_cp_core_projects = new cp_core_projects();
// Settings
require ( CP_PLUGIN_DIR . '/cp-core/cp-core-settings.php' );
/***
* Hook into main dashboard to display widget
*/
// Hook into 'wp_dashboard_setup' to add dashboard widget
add_action('wp_dashboard_setup', 'cp_wp_add_dashboard_widgets' );
// Function: Add dashboard widget
function cp_wp_add_dashboard_widgets() {
wp_add_dashboard_widget('cp_wp_dashboard_widget', 'CollabPress - Recent Activity', 'cp_wp_dashboard_widget_function');
}
// Function: Display dashboard widget
function cp_wp_dashboard_widget_function() {
list_cp_activity();
}
// Add CollabPress CSS
function cp_wp_add_stylesheet() {
$url = get_option('siteurl');
$url = $url . '/wp-content/plugins/collabpress/style/cp-admin.css';
echo '<link rel="stylesheet" type="text/css" href="' . $url . '" />';
?>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js">
</script>
<script type="text/javascript" >
$(document).ready(function()
{
$(".comment_button").click(function(){
var element = $(this);
var I = element.attr("id");
$("#slidepanel"+I).slideToggle(300);
$(this).toggleClass("active");
return false;
});
});
</script>
<?php
}
add_action('admin_head', 'cp_wp_add_stylesheet');
?>
@@ -0,0 +1,37 @@
<?php
// Add/View comments links
echo '<p><a href="#" class="comment_button" id="'.$my_task_count.'">Add Comment</a>';
// Don't display on single
if ($task_data->id) {
echo '&nbsp;&middot;&nbsp;<a href="admin.php?page=cp-dashboard-page&view=task&task_id='.$task_data->id.'">View Comments (' . get_cp_comment_count($task_data->id) . ')</a></p>';
} else {
echo '</p>';
}
?>
<!-- Add comment form -->
<div style="display:none; width:640px;" id="slidepanel<?php echo $my_task_count; ?>">
<form method="post" action="">
<?php wp_nonce_field('cp-add-task-comment'); ?>
<input type="hidden" name="cp_task_id" value="<?php echo $task_data->id; ?>" />
<input type="hidden" name="cp_author_id" value="<?php echo $task_data->users; ?>" />
<textarea style="width:640px;height:150px" name="cp_task_comment"></textarea><br />
<?php
//check if email option is enabled
if (get_option('cp_email_config')) {
$checked = 'checked="checked"';
}
?>
<span style="float:left; margin:16px 0;"><?php _e('Notify via Email?', 'collabpress'); ?> <input type="checkbox" name="notify" <?php echo $checked; ?> /></span>
<span style="float:right; margin:10px 0;"><input type="submit" name="cp_add_comment_button" value="<?php _e('Add Comment', 'collabpress'); ?>" /></span>
</form>
<div style="clear:both"></div>
</div>
@@ -60,35 +60,46 @@ class cp_core_dashboard {
wp_enqueue_script('postbox');
// Add several metaboxes now, all metaboxes registered during load page can be switched off/on at "Screen Options" automatically, nothing special to do therefore
add_meta_box('cp-dashboard-metaboxes-sidebox-1', __( 'Calendar', 'collabpress' ), array(&$this, 'cp_onsidebox_1_content'), $this->pagehook, 'side', 'core');
add_meta_box('cp-dashboard-metaboxes-sidebox-2', __( 'Projects', 'collabpress' ), array(&$this, 'cp_onsidebox_2_content'), $this->pagehook, 'side', 'core');
add_meta_box('cp-dashboard-metaboxes-sidebox-3', __( 'Users', 'collabpress' ), array(&$this, 'cp_onsidebox_3_content'), $this->pagehook, 'side', 'core');
add_meta_box('cp-dashboard-metaboxes-sidebox-1', __( 'Calendar', 'collabpress' ), array(&$this, 'cp_dashboard_onsidebox_1_content'), $this->pagehook, 'side', 'core');
add_meta_box('cp-dashboard-metaboxes-sidebox-2', __( 'Projects', 'collabpress' ), array(&$this, 'cp_dashboard_onsidebox_2_content'), $this->pagehook, 'side', 'core');
add_meta_box('cp-dashboard-metaboxes-sidebox-3', __( 'Users', 'collabpress' ), array(&$this, 'cp_dashboard_onsidebox_3_content'), $this->pagehook, 'side', 'core');
// Toggle dashboard view
if ($_GET['view'] == 'allactivity') {
// All activity
if (isset($_GET['view']) && $_GET['view'] == 'allactivity') {
add_meta_box('cp-dashboard-metaboxes-contentbox-3', __( 'Activity', 'collabpress' ), array(&$this, 'cp_oncontentbox_3_content'), $this->pagehook, 'normal', 'core');
add_meta_box('cp-dashboard-metaboxes-contentbox-3', __( 'Activity', 'collabpress' ), array(&$this, 'cp_dashboard_oncontentbox_3_content'), $this->pagehook, 'normal', 'core');
// All my tasks
} else if (isset($_GET['view']) && $_GET['view'] == 'allmytasks') {
} else if ($_GET['view'] == 'allmytasks') {
add_meta_box('cp-dashboard-metaboxes-contentbox-4', __( 'My Tasks', 'collabpress' ), array(&$this, 'cp_oncontentbox_4_content'), $this->pagehook, 'normal', 'core');
} else if ($_GET['view'] == 'alltasks') {
add_meta_box('cp-dashboard-metaboxes-contentbox-4', __( 'My Tasks', 'collabpress' ), array(&$this, 'cp_dashboard_oncontentbox_4_content'), $this->pagehook, 'normal', 'core');
// All tasks
} else if (isset($_GET['view']) && $_GET['view'] == 'alltasks') {
add_meta_box('cp-dashboard-metaboxes-contentbox-5', __( 'Tasks', 'collabpress' ), array(&$this, 'cp_oncontentbox_5_content'), $this->pagehook, 'normal', 'core');
} else if ($_GET['view'] == 'userpage') {
add_meta_box('cp-dashboard-metaboxes-contentbox-5', __( 'Tasks', 'collabpress' ), array(&$this, 'cp_dashboard_oncontentbox_5_content'), $this->pagehook, 'normal', 'core');
// User page
} else if (isset($_GET['view']) && $_GET['view'] == 'userpage') {
$user_info = get_userdata($_GET['user']);
$user_info = get_userdata($_GET['user']);
add_meta_box('cp-dashboard-metaboxes-contentbox-6', 'Tasks for ' . $user_info->user_nicename, array(&$this, 'cp_oncontentbox_6_content'), $this->pagehook, 'normal', 'core');
} else {
add_meta_box('cp-dashboard-metaboxes-contentbox-1', __( 'Recent Activity', 'collabpress' ), array(&$this, 'cp_oncontentbox_1_content'), $this->pagehook, 'normal', 'core');
add_meta_box('cp-dashboard-metaboxes-contentbox-2', __( 'My Tasks', 'collabpress' ), array(&$this, 'cp_oncontentbox_2_content'), $this->pagehook, 'normal', 'core');
add_meta_box('cp-dashboard-metaboxes-contentbox-additional-2', __( 'About', 'collabpress' ), array(&$this, 'cp_oncontentbox_additional_2_content'), $this->pagehook, 'additional', 'core');
add_meta_box('cp-dashboard-metaboxes-contentbox-6', 'Tasks for ' . $user_info->user_nicename, array(&$this, 'cp_dashboard_oncontentbox_6_content'), $this->pagehook, 'normal', 'core');
// Task page
} else if (isset($_GET['view']) && $_GET['view'] == 'task') {
$task_data = get_taskdata(intval($_GET['task_id']));
add_meta_box('cp-dashboard-metaboxes-contentbox-7', 'Task: ' .stripslashes($task_data->title), array(&$this, 'cp_dashboard_oncontentbox_7_content'), $this->pagehook, 'normal', 'core');
// Dashboard
} else {
add_meta_box('cp-dashboard-metaboxes-contentbox-1', __( 'Recent Activity', 'collabpress' ), array(&$this, 'cp_dashboard_oncontentbox_1_content'), $this->pagehook, 'normal', 'core');
add_meta_box('cp-dashboard-metaboxes-contentbox-2', __( 'My Tasks', 'collabpress' ), array(&$this, 'cp_dashboard_oncontentbox_2_content'), $this->pagehook, 'normal', 'core');
add_meta_box('cp-dashboard-metaboxes-contentbox-additional-2', __( 'About', 'collabpress' ), array(&$this, 'cp_dashboard_oncontentbox_additional_2_content'), $this->pagehook, 'additional', 'core');
}
}
@@ -120,13 +131,8 @@ class cp_core_dashboard {
<?php // screen_icon('options-general'); ?>
<p><h2>CollabPress<?php if ($_GET['view']) { echo ' - <a href="admin.php?page=cp-dashboard-page">'.__('Back', 'collabpress').'</a>';}?></h2></p>
<p><h2>CollabPress<?php if (isset($_GET['view'])) { echo ' - <a href="admin.php?page=cp-dashboard-page">'.__('Back', 'collabpress').'</a>';}?></h2></p>
<form action="admin-post.php" method="post">
<?php wp_nonce_field('cp-dashboard-metaboxes-general'); ?>
<?php wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false ); ?>
<?php wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false ); ?>
<input type="hidden" name="action" value="save_cp_dashboard_metaboxes_general" />
<div id="poststuff" class="metabox-holder<?php echo 2 == $screen_layout_columns ? ' has-right-sidebar' : ''; ?>">
<div id="side-info-column" class="inner-sidebar">
@@ -137,16 +143,25 @@ class cp_core_dashboard {
<div id="post-body-content" class="has-sidebar-content">
<?php do_meta_boxes($this->pagehook, 'normal', $data); ?>
<?php do_meta_boxes($this->pagehook, 'additional', $data); ?>
</div>
<form action="admin-post.php" method="post">
<?php wp_nonce_field('cp-dashboard-metaboxes-general'); ?>
<?php wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false ); ?>
<?php wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false ); ?>
<input type="hidden" name="action" value="save_cp_dashboard_metaboxes_general" />
<p style="display:none">
<input type="submit" value="<?php _e( 'Save Changes', 'collabpress' ) ?>" class="button-primary" name="Submit"/>
</p>
</div>
</p>
</form>
</div>
<br class="clear"/>
</div>
</form>
</div>
<script type="text/javascript">
@@ -180,7 +195,7 @@ class cp_core_dashboard {
}
// Below you will find for each registered metabox the callback method, that produces the content inside the boxes
function cp_onsidebox_1_content($data) {
function cp_dashboard_onsidebox_1_content($data) {
?><center><?php
$time = time();
echo cp_generate_small_calendar(date('Y', $time), date('n', $time));
@@ -188,40 +203,46 @@ class cp_core_dashboard {
?></center><?php
}
function cp_onsidebox_2_content($data) {
function cp_dashboard_onsidebox_2_content($data) {
list_cp_projects();
echo '<p><a style="text-decoration:none; color:#D54E21" href="admin.php?page=cp-projects-page">' . __('Add New', 'collabpress') . '</a></p>';
}
function cp_onsidebox_3_content($data) {
function cp_dashboard_onsidebox_3_content($data) {
list_cp_users();
}
function cp_oncontentbox_1_content($data) {
function cp_dashboard_oncontentbox_1_content($data) {
list_cp_activity();
}
function cp_oncontentbox_2_content($data) {
function cp_dashboard_oncontentbox_2_content($data) {
list_cp_my_tasks(NULL, CP_DASHBOARD_METABOX_PAGE_NAME);
}
function cp_oncontentbox_3_content($data) {
function cp_dashboard_oncontentbox_3_content($data) {
list_cp_activity($view_more = 1);
}
function cp_oncontentbox_4_content($data) {
function cp_dashboard_oncontentbox_4_content($data) {
list_cp_my_tasks(NULL, CP_DASHBOARD_METABOX_PAGE_NAME);
}
function cp_oncontentbox_5_content($data) {
function cp_dashboard_oncontentbox_5_content($data) {
list_cp_tasks(NULL, CP_DASHBOARD_METABOX_PAGE_NAME);
}
function cp_oncontentbox_6_content($data) {
function cp_dashboard_oncontentbox_6_content($data) {
list_cp_users_tasks($_GET['user'], CP_DASHBOARD_METABOX_PAGE_NAME);
}
function cp_oncontentbox_additional_2_content($data) {
// Function to display individual task page
function cp_dashboard_oncontentbox_7_content($data) {
list_cp_task($_GET['task_id']);
get_cp_task_comments($_GET['task_id']);
}
function cp_dashboard_oncontentbox_additional_2_content($data) {
?>
<p class="cp_about"><a target="_blank" href="http://webdevstudios.com/support/forum/collabpress/">CollabPress</a> v<?php echo CP_VERSION; ?> - <?php _e( 'Copyright', 'collabpress' ) ?> &copy; 2010 - <a href="http://webdevstudios.com/support/forum/collabpress/" target="_blank">Please Report Bugs</a> &middot; Follow us on Twitter: <a href="http://twitter.com/scottbasgaard" target="_blank">Scott</a> &middot; <a href="http://twitter.com/williamsba" target="_blank">Brad</a> &middot; <a href="http://twitter.com/webdevstudios" target="_blank">WDS</a></p>
<?php
@@ -17,7 +17,12 @@ $cp_db_version = "0.1";
function cp_install () {
global $wpdb, $cp_db_version;
if ( ! empty($wpdb->charset) )
$charset_collate = "DEFAULT CHARACTER SET $wpdb->charset";
if ( ! empty($wpdb->collate) )
$charset_collate .= " COLLATE $wpdb->collate";
// Add activities table
$activity_table_name = $wpdb->prefix . "cp_activity";
if($wpdb->get_var("show tables like '$activity_table_name'") != $activity_table_name) {
@@ -31,7 +36,7 @@ function cp_install () {
title text NOT NULL,
type text NOT NULL,
PRIMARY KEY id (id)
);";
)$charset_collate;";
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
dbDelta($sql);
@@ -49,7 +54,7 @@ function cp_install () {
title text NOT NULL,
details longtext NOT NULL,
PRIMARY KEY id (id)
);";
)$charset_collate;";
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
dbDelta($sql);
@@ -71,13 +76,35 @@ function cp_install () {
due_date text NOT NULL,
status mediumint(9) DEFAULT '0' NOT NULL,
PRIMARY KEY id (id)
);";
)$charset_collate;";
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
dbDelta($sql);
}
// Add tasks meta table
$tasks_table_name = $wpdb->prefix . "cp_tasksmeta";
if($wpdb->get_var("show tables like '$tasks_table_name'") != $tasks_table_name) {
$sql = "CREATE TABLE " . $tasks_table_name . " (
id mediumint(9) NOT NULL AUTO_INCREMENT,
task_id bigint(20) DEFAULT '0' NOT NULL,
auth bigint(20) DEFAULT '0' NOT NULL,
meta_key varchar(255) DEFAULT NULL,
meta_value longtext,
date datetime NOT NULL,
PRIMARY KEY id (id)
)$charset_collate;";
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
dbDelta($sql);
}
// Update DB Version
update_option("cp_db_version", $cp_db_version);
}
?>
@@ -2,8 +2,9 @@
// Add Task
if ( isset($_POST['cp_add_task_button']) ) {
check_admin_referer('cp-add-task');
global $wpdb, $current_user;
global $wpdb, $current_user, $cp_email_footer;
$cp_auth = $current_user->ID;
$cp_users = esc_html($_POST['user']);
@@ -39,7 +40,8 @@ if ( isset($_POST['cp_add_task_button']) ) {
$cp_message .= "Details: " .$cp_details ."\n\n";
$cp_message .= "To view this task visit:\n";
$cp_message .= get_bloginfo('siteurl') . '/wp-admin/admin.php?page=cp-projects-page&view=project&project='.$cp_add_tasks_project;
$cp_message .= $cp_email_footer;
// WP_Mail()
wp_mail($cp_email, $cp_subject, $cp_message);
@@ -166,6 +168,35 @@ if ( isset($_POST['cp_edit_project_submit']) ) {
<?php
}
// Edit Task
if ( isset($_POST['cp_edit_task_button']) ) {
check_admin_referer('cp-edit-task');
global $wpdb, $current_user;
$cp_edit_task_id = esc_html($_POST['cp_edit_task_id']);
$cp_auth = $current_user->ID;
$cp_users = esc_html($_POST['user']);
$cp_date = date("Y-m-d H:m:s");
$cp_title = esc_html($_POST['cp_title']);
$cp_details = esc_html($_POST['cp_details']);
$cp_due_date = $_POST['cp_tasks_due_month'] ."-". $_POST['cp_tasks_due_day'] ."-". $_POST['cp_tasks_due_year'];
$cp_add_tasks_project = esc_html($_POST['cp_add_tasks_project']);
$table_name = $wpdb->prefix . "cp_tasks";
$results = $wpdb->query("UPDATE $table_name SET proj_id = '".$cp_add_tasks_project."', auth = '".$cp_auth."', users = '".$cp_users."', date = '".$cp_date."', title = '".$cp_title."', details = '".$cp_details."', due_date = '".$cp_due_date."' WHERE id = '".$cp_edit_task_id."'");
// Add activity log record
insert_cp_activity($cp_auth, $cp_date, 'edited', $cp_title, 'task', $cp_edit_task_id);
?>
<div class="updated">
<p><strong><?php _e('Task Edited. <a href="admin.php?page=cp-projects-page&view=project&project=' . $cp_add_tasks_project . '">back</a>', 'collabpress'); ?></strong></p>
</div>
<?php
}
// Delete Project
if(isset($_GET['delete-project']))
{
@@ -178,4 +209,93 @@ if(isset($_GET['delete-project']))
<?php
}
// Add a comment
if ( isset($_POST['cp_add_comment_button']) ) {
check_admin_referer('cp-add-task-comment');
global $wpdb, $current_user, $cp_email_footer;
// Load task data
$cp_task_id = intval($_POST['cp_task_id']);
$task_data = get_taskdata($cp_task_id);
// Load project data
$cp_project_id = get_cp_task_project_id($cp_task_id);
$project_data = get_projectdata($cp_project_id);
$cp_task_comment = esc_html($_POST['cp_task_comment']);
$cp_task_title = $task_data->title;
$cp_project_title = $project_data->title;
$cp_date = date("Y-m-d H:m:s");
$cp_auth = $current_user->ID;
$cp_users = esc_html($_POST['cp_author_id']);
$table_name = $wpdb->prefix . "cp_tasksmeta";
$results = $wpdb->insert($table_name, array('task_id' => $cp_task_id, 'auth' => $cp_auth, 'meta_key' => 'comment', 'meta_value' => $cp_task_comment, 'date' => $cp_date ) );
// Add activity log record
insert_cp_activity($cp_auth, $cp_date, 'added', $cp_task_title, 'comment', $cp_task_id);
// Check if email notifications is enabled
if (isset($_POST['notify'])) {
// Send email to user assigned to task
$user_info = get_userdata($cp_users);
$cp_email = $user_info->user_email;
$cp_subject = 'CollabPress: New comment on task';
$cp_message = "Project: " .$cp_project_title."\n";
$cp_message .= "Task: " .$cp_task_title."\n\n";
$cp_message .= $current_user->display_name." commented on a task:\n";
$cp_message .= $cp_task_comment ."\n\n";
$cp_message .= "To view this task visit:\n";
$cp_message .= get_bloginfo('siteurl') . '/wp-admin/admin.php?page=cp-dashboard-page&view=task&task_id='.$cp_task_id;
$cp_message .= $cp_email_footer;
// WP_Mail()
wp_mail($cp_email, $cp_subject, $cp_message);
}
?>
<div class="updated">
<p><strong><?php _e('Comment Added', 'collabpress'); ?></strong></p>
</div>
<?php
}
// Uninstall CollabPress
if ( isset($_POST['cp_uninstall_task_button']) ) {
check_admin_referer('cp-uninstall');
global $wpdb;
// Delete Options
delete_option('cp_db_version');
delete_option('cp_email_config');
delete_option('cp_user_level');
// Delete Tables
$cp_activity = $wpdb->prefix."cp_activity";
$wpdb->query("DROP TABLE IF EXISTS $cp_activity");
$cp_projects = $wpdb->prefix."cp_projects";
$wpdb->query("DROP TABLE IF EXISTS $cp_projects");
$cp_tasks = $wpdb->prefix."cp_tasks";
$wpdb->query("DROP TABLE IF EXISTS $cp_tasks");
$cp_tasksmeta = $wpdb->prefix."cp_tasksmeta";
$wpdb->query("DROP TABLE IF EXISTS $cp_tasksmeta");
?>
<div class="updated">
<p><strong><?php _e('CollabPress has been successfully uninstalled. Visit <a href="plugins.php">here</a> to deactivate this plugin.', 'collabpress'); ?></strong></p>
</div>
<?php
}
?>
@@ -61,22 +61,30 @@ class cp_core_projects {
add_meta_box('cp-projects-metaboxes-sidebox-2', __( 'Projects', 'collabpress' ), array(&$this, 'cp_projects_onsidebox_2_content'), $this->pagehook, 'side', 'core');
add_meta_box('cp-projects-metaboxes-sidebox-3', __( 'Users', 'collabpress' ), array(&$this, 'cp_projects_onsidebox_3_content'), $this->pagehook, 'side', 'core');
if ($_GET['view'] == 'project') {
add_meta_box('cp-projects-metaboxes-contentbox-2', 'Tasks', array(&$this, 'cp_oncontentbox_2_content'), $this->pagehook, 'normal', 'core');
add_meta_box('cp-projects-metaboxes-contentbox-3', 'Add A New Task', array(&$this, 'cp_oncontentbox_3_content'), $this->pagehook, 'normal', 'core');
} else if ($_GET['view'] == 'edit-project') {
add_meta_box('cp-projects-metaboxes-contentbox-4', 'Edit Project', array(&$this, 'cp_oncontentbox_4_content'), $this->pagehook, 'normal', 'core');
// Project page
if (isset($_GET['view']) && $_GET['view'] == 'project') {
add_meta_box('cp-projects-metaboxes-contentbox-2', 'Tasks', array(&$this, 'cp_projects_oncontentbox_2_content'), $this->pagehook, 'normal', 'core');
add_meta_box('cp-projects-metaboxes-contentbox-3', 'Add A New Task', array(&$this, 'cp_projects_oncontentbox_3_content'), $this->pagehook, 'normal', 'core');
// Edit project
} else if (isset($_GET['view']) && $_GET['view'] == 'edit-project') {
add_meta_box('cp-projects-metaboxes-contentbox-4', 'Edit Project', array(&$this, 'cp_projects_oncontentbox_4_content'), $this->pagehook, 'normal', 'core');
// Edit task
} else if (isset($_GET['view']) && $_GET['view'] == 'edit-task') {
add_meta_box('cp-projects-metaboxes-contentbox-5', 'Edit Task', array(&$this, 'cp_projects_oncontentbox_5_content'), $this->pagehook, 'normal', 'core');
// Add project
} else {
add_meta_box('cp-projects-metaboxes-contentbox-1', 'Create New Project', array(&$this, 'cp_oncontentbox_1_content'), $this->pagehook, 'normal', 'core');
add_meta_box('cp-projects-metaboxes-contentbox-1', 'Create New Project', array(&$this, 'cp_projects_oncontentbox_1_content'), $this->pagehook, 'normal', 'core');
add_meta_box('cp-projects-metaboxes-contentbox-additional-2', __( 'About', 'collabpress' ), array(&$this, 'cp_projects_oncontentbox_additional_2_content'), $this->pagehook, 'additional', 'core');
}
add_meta_box('cp-projects-metaboxes-contentbox-additional-2', __( 'About', 'collabpress' ), array(&$this, 'cp_oncontentbox_additional_2_content'), $this->pagehook, 'additional', 'core');
}
@@ -99,26 +107,31 @@ class cp_core_projects {
<?php
// Get Project Title
$cp_project_title = get_cp_project_title(esc_html($_GET['project']));
// Get Project Description
$cp_project_details = get_cp_project_details(esc_html($_GET['project']));
// If we have a project ID
if (isset($_GET['project'])) {
// Get Project Title
$cp_project_title = get_cp_project_title(esc_html($_GET['project']));
// Get Project Description
$cp_project_details = get_cp_project_details(esc_html($_GET['project']));
}
?>
<?php if($cp_project_title && $_GET['view'] != 'edit-project') { ?>
<?php if(isset($cp_project_title) && isset($_GET['view']) && isset($_GET['project']) && $_GET['view'] != 'edit-project') { ?>
<?php
$link = 'admin.php?page=cp-dashboard-page&delete-project='.esc_html($_GET['project']).'&project='.esc_html($_GET['project']);
$link = ( function_exists('wp_nonce_url') ) ? wp_nonce_url($link, 'cp-action-delete_project') : $link;
?>
<p><h2><?php echo $cp_project_title; ?> - <a href="admin.php?page=cp-projects-page&view=edit-project&project=<?php echo esc_html($_GET['project']); ?>"><?php _e('edit', 'collabpress'); ?></a> <a style="color:#D54E21" href="<?php echo $link; ?>" onclick="javascript:check=confirm('<?php _e('WARNING: This will delete this project and all project tasks.\n\nChoose [Cancel] to Stop, [OK] to delete.\n'); ?>');if(check==false) return false;"><?php _e('delete', 'collabpress'); ?></a></h2></p>
<p><h2><?php echo stripslashes($cp_project_title); ?> - <a href="admin.php?page=cp-projects-page&view=edit-project&project=<?php echo esc_html($_GET['project']); ?>"><?php _e('edit', 'collabpress'); ?></a> <a style="color:#D54E21" href="<?php echo $link; ?>" onclick="javascript:check=confirm('<?php _e('WARNING: This will delete this project and all project tasks.\n\nChoose [Cancel] to Stop, [OK] to delete.\n'); ?>');if(check==false) return false;"><?php _e('delete', 'collabpress'); ?></a></h2></p>
<?php if($cp_project_details) { ?>
<p><strong><?php _e('Description: ', 'collabpress'); ?></strong><?php echo $cp_project_details; ?></p>
<p><strong><?php _e('Description: ', 'collabpress'); ?></strong><?php echo stripslashes($cp_project_details); ?></p>
<?php } ?>
<?php } else if($_GET['view'] == 'edit-project') { ?>
<?php } else if(isset($_GET['view']) && $_GET['view'] == 'edit-project') { ?>
<p><h2>Edit Project</h2></p>
<?php } else if(isset($_GET['view']) && $_GET['view'] == 'edit-task') { ?>
<p><h2>Edit Task</h2></p>
<?php } else { ?>
<p><h2>Create New Project</h2></p>
<?php } ?>
@@ -138,10 +151,10 @@ class cp_core_projects {
</div>
<form action="admin-post.php" method="post">
<?php wp_nonce_field('cp-dashboard-metaboxes-general'); ?>
<?php wp_nonce_field('cp-projects-metaboxes-general'); ?>
<?php wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false ); ?>
<?php wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false ); ?>
<input type="hidden" name="action" value="save_cp_dashboard_metaboxes_general" />
<input type="hidden" name="action" value="save_cp_projects_metaboxes_general" />
<p style="display:none">
<input type="submit" value="<?php _e( 'Save Changes', 'collabpress' ) ?>" class="button-primary" name="Submit"/>
@@ -205,7 +218,7 @@ class cp_core_projects {
list_cp_users();
}
function cp_oncontentbox_1_content($data) {
function cp_projects_oncontentbox_1_content($data) {
?>
<form method="post" action="">
<?php wp_nonce_field('cp-add-project'); ?>
@@ -231,7 +244,7 @@ class cp_core_projects {
<?php
}
function cp_oncontentbox_2_content($data) {
function cp_projects_oncontentbox_2_content($data) {
$project_id = $_GET['project'];
@@ -239,7 +252,7 @@ class cp_core_projects {
}
function cp_oncontentbox_3_content($data) {
function cp_projects_oncontentbox_3_content($data) {
?>
<form method="post" action="" enctype="multipart/form-data">
<?php wp_nonce_field('cp-add-task'); ?>
@@ -340,15 +353,15 @@ class cp_core_projects {
<?php
}
function cp_oncontentbox_4_content($data) {
function cp_projects_oncontentbox_4_content($data) {
if (check_cp_project_exists(esc_html($_GET['project']))) {
if (check_cp_project_exists(esc_html($_GET['project']))) {
// Get Edit Project Title
$cp_edit_project_title = get_cp_project_title(esc_html($_GET['project']));
// Get Edit Project Description
$cp_edit_project_details = get_cp_project_details(esc_html($_GET['project']));
?>
<form method="post" action="">
<?php wp_nonce_field('cp-edit-project'); ?>
@@ -356,11 +369,11 @@ class cp_core_projects {
<table class="form-table">
<tr class="form-field form-required">
<th scope="row"><label for="cp_edit_project_title"><?php _e('Title', 'collabpress'); ?> <span class="description"><?php _e('(required)', 'collabpress'); ?></span></label></th>
<td><input name="cp_edit_project_title" type="text" id="cp_edit_project_title" value="<?php echo $cp_edit_project_title; ?>" aria-required="true" /></td>
<td><input name="cp_edit_project_title" type="text" id="cp_edit_project_title" value="<?php echo stripslashes($cp_edit_project_title); ?>" aria-required="true" /></td>
</tr>
<tr class="form-field">
<th scope="row"><label for="cp_edit_project_details"><?php _e('Details', 'collabpress'); ?></label></th>
<td><input name="cp_edit_project_details" type="text" id="cp_edit_project_details" value="<?php echo $cp_edit_project_details; ?>" /></td>
<td><input name="cp_edit_project_details" type="text" id="cp_edit_project_details" value="<?php echo stripslashes($cp_edit_project_details); ?>" /></td>
</tr>
</table>
@@ -372,17 +385,125 @@ class cp_core_projects {
</p>
</form>
<?php
<?php
} else {
echo "Project doesn't exist...";
echo "<p>" . __("Project doesn't exist...", "collabpress") . "</p>";
}
}
function cp_oncontentbox_additional_2_content($data) {
function cp_projects_oncontentbox_5_content($data) {
if (check_cp_task_exists(esc_html($_GET['task']))) {
$edit_task = get_taskdata(esc_html($_GET['task']));
?>
<form method="post" action="" enctype="multipart/form-data">
<?php wp_nonce_field('cp-edit-task'); ?>
<table class="form-table">
<tr class="form-field form-required">
<th scope="row"><label for="cp_title"><?php _e('Title: ', 'collabpress'); ?> <span class="description"><?php _e('(required)'); ?></span></label></th>
<td><input name="cp_title" type="text" id="cp_title" value="<?php echo stripslashes($edit_task->title); ?>" aria-required="true" /></td>
</tr>
<tr class="form-field">
<th scope="row"><label for="cp_details"><?php _e('Details: ', 'collabpress'); ?></label></th>
<td><textarea name="cp_details" id="cp_details" rows="10" cols="20" /><?php echo stripslashes($edit_task->details); ?></textarea></td>
</tr>
<tr class="form-field">
<th scope="row"><label for="cp_users"><?php _e('Assign to: ', 'collabpress'); ?></label></th>
<td><?php wp_dropdown_users('selected=' . $edit_task->users); ?><td>
</tr>
<?php
$edit_task_due_date = explode("-", $edit_task->due_date);
?>
<tr class="form-field">
<th scope="row"><label for="cp_tasks_due"><?php _e('Due: ', 'collabpress'); ?></label></th>
<td>
<?php
$months = array (1 => 'January', 'February', 'March', 'April', 'May', 'June','July', 'August', 'September', 'October', 'November', 'December');
$days = range (1, 31);
$years = range (date('Y'), 2025);
// Month
echo __('Month', 'collabpress') . ": <select name='cp_tasks_due_month'>";
$cp_month_count = 1;
foreach ($months as $value) {
if ($cp_month_count == $edit_task_due_date[0]) {
$month_selected = "SELECTED";
} else {
$month_selected = '';
}
echo '<option ' . $month_selected . ' value="'.$cp_month_count.'">'.$value.'</option>\n';
$cp_month_count++;
} echo '</select>';
// Day
echo __('Day', 'collabpress') . ": <select name='cp_tasks_due_day'>";
foreach ($days as $value) {
if ($value == $edit_task_due_date[1]) {
$day_selected = "SELECTED";
} else {
$day_selected = '';
}
echo '<option ' . $day_selected . ' value="'.$value.'">'.$value.'</option>\n';
} echo '</select>';
// Year
echo __('Year', 'collabpress') . ": <select name='cp_tasks_due_year'>";
foreach ($years as $value) {
if ($value == $edit_task_due_date[2]) {
$year_selected = "SELECTED";
} else {
$year_selected = '';
}
echo '<option ' . $year_selected . ' value="'.$value.'">'.$value.'</option>\n';
}
echo '</select>';
?>
</td>
</tr>
</table>
<input type="hidden" name="cp_edit_task_id" value="<?php echo esc_html($_GET['task']); ?>">
<input type="hidden" name="cp_add_tasks_project" value="<?php echo $edit_task->proj_id; ?>">
<input type="hidden" name="page_options" value="user, cp_title, cp_details, cp_users, cp_tasks_due_month, cp_tasks_due_day, cp_tasks_due_year, cp_add_tasks_project" />
<p>
<input type="submit" class="button-primary" name="cp_edit_task_button" value="<?php _e('Edit Task', 'collabpress') ?>" />
</p>
</form>
<?php
} else {
echo "<p>" . __("Task doesn't exist...", "collabpress") . "</p>";
}
}
function cp_projects_oncontentbox_additional_2_content($data) {
?>
<p class="cp_about"><a target="_blank" href="http://webdevstudios.com/support/forum/collabpress/">CollabPress</a> v<?php echo CP_VERSION; ?> - <?php _e( 'Copyright', 'collabpress' ) ?> &copy; 2010 - <a href="http://webdevstudios.com/support/forum/collabpress/" target="_blank">Please Report Bugs</a> &middot; Follow us on Twitter: <a href="http://twitter.com/scottbasgaard" target="_blank">Scott</a> &middot; <a href="http://twitter.com/williamsba" target="_blank">Brad</a> &middot; <a href="http://twitter.com/webdevstudios" target="_blank">WDS</a></p>
<?php
@@ -28,7 +28,11 @@ function cp_register_settings() {
function cp_show_settings_page() {
?>
<?php require ( CP_PLUGIN_DIR . '/cp-core/cp-core-isset.php' ); ?>
<div class="wrap">
<p><h2><?php _e('CollabPress Settings', 'collabpress') ?></h2></p>
<form method="post" action="options.php">
@@ -36,7 +40,7 @@ function cp_show_settings_page() {
<table class="form-table">
<tr valign="top">
<th scope="row"><?php _e('Email Notifications:', 'collabpress') ?></th>
<th scope="row"><?php _e('Email Notifications', 'collabpress') ?></th>
<td>
<select name="cp_email_config">
<option <?php if (get_option('cp_email_config') == 1) echo "selected"; ?> value="1">Enabled</option>
@@ -46,7 +50,7 @@ function cp_show_settings_page() {
</tr>
<tr valign="top">
<th scope="row"><?php _e('User Level:', 'collabpress') ?></th>
<th scope="row"><?php _e('User Level', 'collabpress') ?></th>
<td>
<select name="cp_user_level">
<option <?php if (get_option('cp_user_level') == 10) echo "selected"; ?> value="10">Administrator</option>
@@ -65,7 +69,22 @@ function cp_show_settings_page() {
</p>
</form>
<hr />
<form method="post" action="">
<?php wp_nonce_field('cp-uninstall'); ?>
<p class="submit">
<strong><?php _e('Uninstall CollabPress', 'collabpress'); ?></strong><br /><br />
<input type="submit" class="button-primary" name="cp_uninstall_task_button" value="<?php _e('Uninstall', 'collabpress') ?>" onclick="javascript:check=confirm('<?php _e('WARNING: This will uninstall CollabPress.\n\nChoose [Cancel] to Stop, [OK] to proceed.\n'); ?>');if(check==false) return false;" />
</p>
</form>
<hr />
<p><a target="_blank" href="http://webdevstudios.com/support/forum/collabpress/">CollabPress</a> v<?php echo CP_VERSION; ?> - <?php _e( 'Copyright', 'collabpress' ) ?> &copy; 2010 - <a href="http://webdevstudios.com/support/forum/collabpress/" target="_blank">Please Report Bugs</a> &middot; Follow us on Twitter: <a href="http://twitter.com/scottbasgaard" target="_blank">Scott</a> &middot; <a href="http://twitter.com/williamsba" target="_blank">Brad</a> &middot; <a href="http://twitter.com/webdevstudios" target="_blank">WDS</a></p>
</div>
<?php
@@ -69,7 +69,7 @@ function list_cp_activity($view_more = NULL) {
if ($cp_list_activity->action == 'created' || $cp_list_activity->action == 'added' || $cp_list_activity->action == 'completed') {
$activity_color = 'green';
} else if ($cp_list_activity->action == 'edited') {
$activity_color = 'yellow';
$activity_color = 'orange';
} else if ($cp_list_activity->action == 'deleted') {
$activity_color = 'red';
} else if ($cp_list_activity->action == 'reopened') {
@@ -83,7 +83,7 @@ function list_cp_activity($view_more = NULL) {
echo '<p><strong>Date:</strong> ' . $cp_list_activity->date . '</p>';
// If this is a task
if ($cp_list_activity->type == 'task' || $cp_list_activity->type == 'completed' || $cp_list_activity->type == 'reopened' && $cp_list_activity->cp_id != 0 ) {
if ($cp_list_activity->type == 'task' || $cp_list_activity->type == 'comment' || $cp_list_activity->type == 'completed' || $cp_list_activity->type == 'reopened' && $cp_list_activity->cp_id != 0 ) {
$task_project_id = get_cp_task_project_id($cp_list_activity->cp_id);
@@ -91,14 +91,14 @@ function list_cp_activity($view_more = NULL) {
echo '<p><strong>Project:</strong> ' . $task_project_title;
echo '<p><strong>Summary: </strong><a href="admin.php?page=cp-dashboard-page&view=userpage&user=' . $user_info->ID . '">' . $user_info->user_nicename . '</a></strong> <span style="color:'.$activity_color.';">' . $cp_list_activity->action . '</span> new ' . $cp_list_activity->type . ' "<a href="admin.php?page=cp-projects-page&view=project&project='.$task_project_id.'">' . $cp_list_activity->title . '</a>".</p>';
echo '<p><strong>Summary: </strong><a href="admin.php?page=cp-dashboard-page&view=userpage&user=' . $user_info->ID . '">' . $user_info->user_nicename . '</a></strong> <span style="color:'.$activity_color.';">' . $cp_list_activity->action . '</span> ' . $cp_list_activity->type . ' "<a href="admin.php?page=cp-projects-page&view=project&project='.$task_project_id.'">' . $cp_list_activity->title . '</a>".</p>';
// If this is a project
} else if ($cp_list_activity->type == 'project' && $cp_list_activity->cp_id != 0) {
$activity_project_id = $cp_list_activity->cp_id;
echo '<p><strong>Summary: </strong><a href="admin.php?page=cp-dashboard-page&view=userpage&user=' . $user_info->ID . '">' . $user_info->user_nicename . '</a></strong> <span style="color:'.$activity_color.';">' . $cp_list_activity->action . '</span> new ' . $cp_list_activity->type . ' "<a href="admin.php?page=cp-projects-page&view=project&project='.$activity_project_id.'">' . $cp_list_activity->title . '</a>".</p>';
echo '<p><strong>Summary: </strong><a href="admin.php?page=cp-dashboard-page&view=userpage&user=' . $user_info->ID . '">' . $user_info->user_nicename . '</a></strong> <span style="color:'.$activity_color.';">' . $cp_list_activity->action . '</span> ' . $cp_list_activity->type . ' "<a href="admin.php?page=cp-projects-page&view=project&project='.$activity_project_id.'">' . $cp_list_activity->title . '</a>".</p>';
// If it's neither then it's been deleted and don't display link
} else {
@@ -12,18 +12,19 @@ function insert_cp_project() {
}
// Delete a project
function delete_cp_project($project_id) {
function delete_cp_project($project_id) {
global $wpdb, $current_user;
$cp_auth = $current_user->ID;
$cp_date = date("Y-m-d H:m:s");
$title = get_cp_project_title($project_id);
//delete project
// Delete project
$table_name = $wpdb->prefix . "cp_projects";
$wpdb->query("DELETE FROM $table_name WHERE id = $project_id");
//delete all tasks for project
// Delete all tasks for project
$table_name = $wpdb->prefix . "cp_tasks";
$wpdb->query("DELETE FROM $table_name WHERE proj_id = $project_id");
@@ -31,6 +32,22 @@ function delete_cp_project($project_id) {
}
// Get all project data
function get_projectdata( $id ) {
global $wpdb;
$id = absint($id);
if ( $id == 0 ) { return false; }
$table_name = $wpdb->prefix . "cp_projects";
if ( !$project = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $table_name ." WHERE ID = %d LIMIT 1", $id)) )
return false;
return $project;
}
// Get project id by title
function get_cp_project_id($title) {
@@ -117,7 +134,7 @@ function list_cp_projects() {
} else {
echo "<p>No projects...</p>";
echo "<p>" . __('No projects...', 'collabpress') . "</p>";
}
@@ -7,10 +7,6 @@ if (!function_exists ('add_action')) {
exit();
}
// Insert a task
function insert_cp_task() {
}
// Delete a task
function delete_cp_task($task, $title = NULL) {
@@ -29,7 +25,6 @@ function delete_cp_task($task, $title = NULL) {
}
// Update task status
function update_cp_task($task, $status) {
global $wpdb;
@@ -42,6 +37,21 @@ function update_cp_task($task, $status) {
}
// Get all task data
function get_taskdata( $id ) {
global $wpdb;
$id = absint($id);
if ( $id == 0 ) { return false; }
$table_name = $wpdb->prefix . "cp_tasks";
if ( !$task = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $table_name ." WHERE ID = %d LIMIT 1", $id)) ) { return false; }
return $task;
}
// Get tasks project id
function get_cp_task_project_id($id) {
@@ -84,6 +94,91 @@ function get_cp_task_title($id) {
}
// List comments for a specific task
function get_cp_task_comments($id) {
global $wpdb;
$table_name = $wpdb->prefix . "cp_tasksmeta";
$get_cp_task_comments = $wpdb->get_results("SELECT * FROM $table_name WHERE task_id = $id AND meta_key = 'comment' ORDER BY date ASC");
$cp_task_comments_count = 1;
if ($get_cp_task_comments) {
foreach ($get_cp_task_comments as $get_cp_task_comment) {
$user_info = get_userdata($get_cp_task_comment->auth);
$user_comment_link = '<a href="admin.php?page=cp-dashboard-page&view=userpage&user=' . $user_info->ID . '">';
echo '<p>' . $cp_task_comments_count . ': ' . $user_comment_link . '<strong>' . $user_info->user_nicename . '</strong></a>&nbsp;&nbsp;';
echo $get_cp_task_comment->date .'</p><div style="clear:both"></div>';
echo '<p>' . stripslashes(nl2br($get_cp_task_comment->meta_value)) . '</p>';
$cp_task_comments_count++;
}
} else {
echo '<p>No comments...</p>';
}
}
// Check if specific task exists
function check_cp_task_exists($id) {
global $wpdb;
$table_name = $wpdb->prefix . "cp_tasks";
$cp_check_tasks = $wpdb->get_results("SELECT id FROM $table_name WHERE id = '".$id."' ");
if ($cp_check_tasks) {
return true;
} else {
return false;
}
}
// Get comment count
function get_cp_comment_count($id) {
global $wpdb;
$table_name = $wpdb->prefix . "cp_tasksmeta";
if($id) {
$cp_comment_count = $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM $table_name WHERE meta_key = 'comment' and task_id = $id;"));
} else {
$cp_comment_count = $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM $table_name WHERE meta_key = 'comment'"));
}
if ($cp_comment_count) {
return $cp_comment_count;
} else {
return 0;
}
}
// List tasks
function list_cp_tasks($project_id=NULL, $page_name=NULL) {
@@ -113,12 +208,14 @@ function list_cp_tasks($project_id=NULL, $page_name=NULL) {
}
if ($cp_list_my_tasks) {
$my_task_count = '';
foreach ($cp_list_my_tasks as $cp_list_my_task) {
foreach ($cp_list_my_tasks as $task_data) {
$user_info = get_userdata($cp_list_my_task->users);
$user_info = get_userdata($task_data->users);
if ($cp_list_my_task->status != 1) {
if ($task_data->status != 1) {
echo '<div style="height:auto">';
@@ -132,7 +229,7 @@ function list_cp_tasks($project_id=NULL, $page_name=NULL) {
echo '</div>';
if ($cp_list_my_task->users == $current_user->ID) {
if ($task_data->users == $current_user->ID) {
echo '<div style="background:#FFFFCC" id="cp-task-summary">';
@@ -141,34 +238,40 @@ function list_cp_tasks($project_id=NULL, $page_name=NULL) {
echo '<div id="cp-task-summary">';
}
echo '<div style="margin-left:75px">';
if ($cp_list_my_task->status != 1) {
if ($task_data->status != 1) {
$link = 'admin.php?page='.$page_name.'&completed-task=' .$cp_list_my_task->id;
$link = 'admin.php?page='.$page_name.'&completed-task=' .$task_data->id;
$link = ( function_exists('wp_nonce_url') ) ? wp_nonce_url($link, 'cp-action-complete_task') : $link;
?><p><input onclick="window.location='<?php echo $link; ?>'; return true;" type='checkbox' name='option1' value='1'><?php
} else {
// This should never get executed / remove in future version
$link = 'admin.php?page='.$page_name.'&reopened-task=' .$cp_list_my_task->id;
$link = 'admin.php?page='.$page_name.'&reopened-task=' .$task_data->id;
$link = ( function_exists('wp_nonce_url') ) ? wp_nonce_url($link, 'cp-action-uncomplete_task') : $link;
?><p><input onclick="window.location='<?php echo $link; ?>'; return true;" type='checkbox' name='option1' value='1'><?php
}
if ($cp_list_my_task->status == 1) {
if ($task_data->status == 1) {
echo ' <span style="text-decoration:line-through">';
}
echo "<strong>". $cp_list_my_task->title . "</strong>";
echo "<strong>". stripslashes($task_data->title) . "</strong>";
$today = date("n-d-Y", mktime(date("n"), date("d"), date("Y")));
if ($cp_list_my_task->due_date < $today) {
$today_totime = strtotime($today);
$date_color = "#CC3333";
$duedate_totime = strtotime($task_data->due_date);
if ($duedate_totime > $today_totime) {
$date_color = "#DB4D4D";
} else {
@@ -176,39 +279,45 @@ function list_cp_tasks($project_id=NULL, $page_name=NULL) {
}
echo " <code style='background:".$date_color."'>" . __('Due', 'collabpress') . ": " . $cp_list_my_task->due_date . "</code>";
echo " <code style='background:".$date_color."'>" . __('Due', 'collabpress') . ": " . $task_data->due_date . "</code>";
if ($cp_list_my_task->status == 1) {
if ($task_data->status == 1) {
echo '</span>';
}
$link = 'admin.php?page='.$page_name.'&delete-task=' . $cp_list_my_task->id . '&task-title=' . $cp_list_my_task->title;
$link = 'admin.php?page='.$page_name.'&delete-task=' . $task_data->id . '&task-title=' . $task_data->title;
$link = ( function_exists('wp_nonce_url') ) ? wp_nonce_url($link, 'cp-action-delete_task') : $link;
echo '<a style="color:#D54E21" href="'.$link.'">delete</a></p>';
echo ' <a href="admin.php?page=cp-projects-page&view=edit-task&task='.$task_data->id.'">edit</a>';
echo ' <a style="color:#D54E21" href="'.$link.'" >delete</a></p>';
// If there is a description
if ($cp_list_my_task->details) {
if ($task_data->details) {
echo '<p><strong>Description:</strong> ' . $cp_list_my_task->details . '</p>';
echo '<p><strong>Description:</strong> ' . stripslashes(nl2br($task_data->details)) . '</p>';
}
require (CP_PLUGIN_DIR .'/cp-core/cp-core-comments.php');
$my_task_count++;
echo '</div>';
echo '</div>';
echo '</div>';
} else {
$cp_completed_tasks[] = $cp_list_my_task;
$cp_completed_tasks[] = $task_data;
}
}
if ($cp_completed_tasks) {
if (isset($cp_completed_tasks)) {
foreach ($cp_completed_tasks as $cp_completed_task) {
@@ -235,7 +344,8 @@ function list_cp_tasks($project_id=NULL, $page_name=NULL) {
echo '<div style="background:#EEEEEE" id="cp-task-summary">';
}
echo '<div style="margin-left:75px">';
if ($cp_completed_task->status != 1) {
// This should never get executed - remove in future version
@@ -255,7 +365,7 @@ function list_cp_tasks($project_id=NULL, $page_name=NULL) {
}
echo "<strong>". $cp_completed_task->title . "</strong>";
echo "<strong>". stripslashes($cp_completed_task->title) . "</strong>";
echo " <code>" . __('Due', 'collabpress') . ": " . $cp_completed_task->due_date . "</code>";
if ($cp_completed_task->status == 1) {
@@ -265,27 +375,134 @@ function list_cp_tasks($project_id=NULL, $page_name=NULL) {
$link = 'admin.php?page='.$page_name.'&delete-task=' . $cp_completed_task->id . '&task-title=' . $cp_completed_task->title;
$link = ( function_exists('wp_nonce_url') ) ? wp_nonce_url($link, 'cp-action-delete_task') : $link;
echo '<a style="color:#D54E21" href="'.$link.'">delete</a></p>';
echo ' <a href="admin.php?page=cp-projects-page&view=edit-task&task='.$cp_completed_task->id.'">edit</a>';
echo ' <a style="color:#D54E21" href="'.$link.'" >delete</a></p>';
// If there is a description
if ($cp_list_my_task->details) {
if ($cp_completed_task->details) {
echo '<p><strong>Description:</strong> ' . $cp_list_my_task->details . '</p>';
echo '<p><strong>Description:</strong> ' . stripslashes(nl2br($cp_completed_task->details)) . '</p>';
}
require (CP_PLUGIN_DIR .'/cp-core/cp-core-comments.php');
$my_task_count++;
echo '</div>';
echo '</div>';
echo '</div>';
}
}
} else {
// View more
// echo '<p><a style="text-decoration:none; color:#D54E21" href="admin.php?page=cp-dashboard-page&view=alltasks">' . __('View More', 'collabpress') . '</a></p>';
echo "<p>No tasks......</p>";
}
}
// List single task page
function list_cp_task($task_id=NULL) {
global $wpdb, $current_user;
$my_task_count = '';
$task_id = intval($task_id);
$task_data = get_taskdata($task_id);
if ($task_data) {
$user_info = get_userdata($task_data->users);
if ($task_data->status != 1) {
echo '<div style="height:auto">';
echo '<div id="cp-gravatar" style="height:62px;width:62px;background:#F0F0F0;">';
// Default gravatar
$def_gravatar = "http://www.gravatar.com/avatar/c11f04eee71dfd0f49132786c34ea4ff?s=50&d=&r=G&forcedefault=1";
// Get gravatar
echo get_avatar( $user_info->user_email, $size = '50', $default = $def_gravatar );
echo '</div>';
if ($task_data->users == $current_user->ID) {
echo '<div style="background:#FFFFCC" id="cp-task-summary">';
} else {
echo '<div id="cp-task-summary">';
}
echo '<div style="margin-left:75px">';
if ($task_data->status == 1) {
echo ' <span style="text-decoration:line-through">';
}
echo "<strong>". stripslashes($task_data->title) . "</strong>";
$today = date("n-d-Y", mktime(date("n"), date("d"), date("Y")));
$today_totime = strtotime($today);
$duedate_totime = strtotime($task_data->due_date);
if ($duedate_totime > $today_totime) {
$date_color = "#DB4D4D";
} else {
$date_color = "#33FF99";
}
echo " <code style='background:".$date_color."'>" . __('Due', 'collabpress') . ": " . $task_data->due_date . "</code>";
if ($task_data->status == 1) {
echo '</span>';
}
//$link = 'admin.php?page='.$page_name.'&delete-task=' . $task_data->id . '&task-title=' . $task_data->title;
//$link = ( function_exists('wp_nonce_url') ) ? wp_nonce_url($link, 'cp-action-delete_task') : $link;
echo ' <a href="admin.php?page=cp-projects-page&view=edit-task&task='.$task_data->id.'">edit</a>';
//echo ' <a style="color:#D54E21" href="'.$link.'">delete</a></p>';
// If there is a description
if ($task_data->details) {
echo '<p><strong>Description:</strong> ' . stripslashes(nl2br($task_data->details)) . '</p>';
}
require (CP_PLUGIN_DIR .'/cp-core/cp-core-comments.php');
$my_task_count++;
echo '</div>';
echo '</div>';
echo '</div>';
}
} else {
@@ -314,11 +531,13 @@ function list_cp_my_tasks($project_id=NULL, $page_name=NULL) {
if ($cp_list_my_tasks) {
foreach ($cp_list_my_tasks as $cp_list_my_task) {
$my_task_count='';
foreach ($cp_list_my_tasks as $task_data) {
$user_info = get_userdata($cp_list_my_task->users);
$user_info = get_userdata($task_data->users);
if ($cp_list_my_task->status != 1) {
if ($task_data->status != 1) {
echo '<div style="height:auto">';
@@ -338,34 +557,40 @@ function list_cp_my_tasks($project_id=NULL, $page_name=NULL) {
echo '</div>';
echo '<div id="cp-task-summary">';
echo '<div style="margin-left:75px">';
if ($cp_list_my_task->status != 1) {
if ($task_data->status != 1) {
$link = 'admin.php?page='.$page_name.'&completed-task=' .$cp_list_my_task->id;
$link = 'admin.php?page='.$page_name.'&completed-task=' .$task_data->id;
$link = ( function_exists('wp_nonce_url') ) ? wp_nonce_url($link, 'cp-action-complete_task') : $link;
?><p><input onclick="window.location='<?php echo $link; ?>'; return true;" type='checkbox' name='option1' value='1'><?php
} else {
// This should never get executed / remove in future version
$link = 'admin.php?page='.$page_name.'&reopened-task=' .$cp_list_my_task->id;
$link = 'admin.php?page='.$page_name.'&reopened-task=' .$task_data->id;
$link = ( function_exists('wp_nonce_url') ) ? wp_nonce_url($link, 'cp-action-uncomplete_task') : $link;
?><p><input onclick="window.location='<?php echo $link; ?>'; return true;" type='checkbox' name='option1' value='1'><?php
}
if ($cp_list_my_task->status == 1) {
if ($task_data->status == 1) {
echo ' <span style="text-decoration:line-through">';
}
echo "<strong>". $cp_list_my_task->title . "</strong>";
echo "<strong>". stripslashes($task_data->title) . "</strong>";
$today = date("n-d-Y", mktime(date("n"), date("d"), date("Y")));
if ($cp_list_my_task->due_date < $today) {
$today_totime = strtotime($today);
$date_color = "#CC3333";
$duedate_totime = strtotime($task_data->due_date);
if ($duedate_totime > $today_totime) {
$date_color = "#DB4D4D";
} else {
@@ -373,46 +598,52 @@ function list_cp_my_tasks($project_id=NULL, $page_name=NULL) {
}
echo " <code style='background:".$date_color."'>" . __('Due', 'collabpress') . ": " . $cp_list_my_task->due_date . "</code>";
echo " <code style='background:".$date_color."'>" . __('Due', 'collabpress') . ": " . $task_data->due_date . "</code>";
if ($cp_list_my_task->status == 1) {
if ($task_data->status == 1) {
echo '</span>';
}
$link = 'admin.php?page='.$page_name.'&delete-task=' . $cp_list_my_task->id . '&task-title=' . $cp_list_my_task->title;
$link = 'admin.php?page='.$page_name.'&delete-task=' . $task_data->id . '&task-title=' . $task_data->title;
$link = ( function_exists('wp_nonce_url') ) ? wp_nonce_url($link, 'cp-action-delete_task') : $link;
echo '<a style="color:#D54E21" href="'.$link.'">delete</a></p>';
echo ' <a href="admin.php?page=cp-projects-page&view=edit-task&task='.$task_data->id.'">edit</a>';
echo ' <a style="color:#D54E21" href="'.$link.'">delete</a></p>';
// Display project title
if ($cp_list_my_task->proj_id) {
if ($task_data->proj_id) {
echo '<p><strong>' . __('Project:', 'collabpress') . '</strong> ' . get_cp_project_title($cp_list_my_task->proj_id) . '</p>';
echo '<p><strong>' . __('Project:', 'collabpress') . '</strong> ' . get_cp_project_title($task_data->proj_id) . '</p>';
}
// If there is a description
if ($cp_list_my_task->details) {
if ($task_data->details) {
echo '<p><strong>' . __('Description:', 'collabpress') . '</strong> ' . $cp_list_my_task->details . '</p>';
echo '<p><strong>' . __('Description:', 'collabpress') . '</strong> ' . stripslashes(nl2br($task_data->details)) . '</p>';
}
require (CP_PLUGIN_DIR .'/cp-core/cp-core-comments.php');
$my_task_count++;
echo '</div>';
echo '</div>';
echo '</div>';
} else {
$cp_completed_tasks[] = $cp_list_my_task;
$cp_completed_tasks[] = $task_data;
}
}
if ($cp_completed_tasks) {
if (isset($cp_completed_tasks)) {
foreach ($cp_completed_tasks as $cp_completed_task) {
@@ -436,6 +667,8 @@ function list_cp_my_tasks($project_id=NULL, $page_name=NULL) {
echo '</div>';
echo '<div style="background:#eeeeee" id="cp-task-summary">';
echo '<div style="margin-left:75px">';
if ($cp_completed_task->status != 1) {
// This should never get executed - remove in future version
@@ -455,7 +688,7 @@ function list_cp_my_tasks($project_id=NULL, $page_name=NULL) {
}
echo "<strong>". $cp_completed_task->title . "</strong>";
echo "<strong>". stripslashes($cp_completed_task->title) . "</strong>";
echo " <code>" . __('Due', 'collabpress') . ": " . $cp_completed_task->due_date . "</code>";
if ($cp_completed_task->status == 1) {
@@ -465,34 +698,37 @@ function list_cp_my_tasks($project_id=NULL, $page_name=NULL) {
$link = 'admin.php?page='.$page_name.'&delete-task=' . $cp_completed_task->id . '&task-title=' . $cp_completed_task->title;
$link = ( function_exists('wp_nonce_url') ) ? wp_nonce_url($link, 'cp-action-delete_task') : $link;
echo '<a style="color:#D54E21" href="'.$link.'">delete</a></p>';
echo ' <a href="admin.php?page=cp-projects-page&view=edit-task&task='.$cp_completed_task->id.'">edit</a>';
echo ' <a style="color:#D54E21" href="'.$link.'">delete</a></p>';
// Display project title
if ($cp_list_my_task->proj_id) {
if (isset($cp_list_my_task->proj_id)) {
echo '<p><strong>' . __('Project:', 'collabpress') . '</strong> ' . get_cp_project_title($cp_list_my_task->proj_id) . '</p>';
}
// If there is a description
if ($cp_list_my_task->details) {
if ($cp_completed_task->details) {
echo '<p><strong>' . __('Description:', 'collabpress') . '</strong> ' . $cp_list_my_task->details . '</p>';
echo '<p><strong>' . __('Description:', 'collabpress') . '</strong> ' . stripslashes(nl2br($cp_completed_task->details)) . '</p>';
}
require (CP_PLUGIN_DIR .'/cp-core/cp-core-comments.php');
$my_task_count++;
echo '</div>';
echo '</div>';
echo '</div>';
}
}
// View more
// echo '<p><a style="text-decoration:none; color:#D54E21" href="admin.php?page=cp-dashboard-page&view=allmytasks">' . __('View More', 'collabpress') . '</a></p>';
} else {
@@ -513,11 +749,13 @@ function list_cp_users_tasks($userid, $page_name) {
if ($cp_list_my_tasks) {
foreach ($cp_list_my_tasks as $cp_list_my_task) {
$my_task_count='';
foreach ($cp_list_my_tasks as $task_data) {
$user_info = get_userdata($userid);
if ($cp_list_my_task->status != 1) {
if ($task_data->status != 1) {
echo '<div style="height:auto">';
@@ -537,34 +775,40 @@ function list_cp_users_tasks($userid, $page_name) {
echo '</div>';
echo '<div id="cp-task-summary">';
echo '<div style="margin-left:75px">';
if ($cp_list_my_task->status != 1) {
if ($task_data->status != 1) {
$link = 'admin.php?page='.$page_name.'&view=userpage&user=' . $user_info->ID . '&completed-task=' .$cp_list_my_task->id;
$link = 'admin.php?page='.$page_name.'&view=userpage&user=' . $user_info->ID . '&completed-task=' .$task_data->id;
$link = ( function_exists('wp_nonce_url') ) ? wp_nonce_url($link, 'cp-action-complete_task') : $link;
?><p><input onclick="window.location='<?php echo $link; ?>'; return true;" type='checkbox' name='option1' value='1'><?php
} else {
// This should never get executed / remove in future version
$link = 'admin.php?page='.$page_name.'&view=userpage&user=' . $user_info->ID . '&reopened-task=' .$cp_list_my_task->id;
$link = 'admin.php?page='.$page_name.'&view=userpage&user=' . $user_info->ID . '&reopened-task=' .$task_data->id;
$link = ( function_exists('wp_nonce_url') ) ? wp_nonce_url($link, 'cp-action-uncomplete_task') : $link;
?><p><input onclick="window.location='<?php echo $link; ?>'; return true;" type='checkbox' name='option1' value='1'><?php
}
if ($cp_list_my_task->status == 1) {
if ($task_data->status == 1) {
echo ' <span style="text-decoration:line-through">';
}
echo "<strong>". $cp_list_my_task->title . "</strong>";
echo "<strong>". stripslashes($task_data->title) . "</strong>";
$today = date("n-d-Y", mktime(date("n"), date("d"), date("Y")));
if ($cp_list_my_task->due_date < $today) {
$today_totime = strtotime($today);
$date_color = "#CC3333";
$duedate_totime = strtotime($task_data->due_date);
if ($duedate_totime > $today_totime) {
$date_color = "#DB4D4D";
} else {
@@ -572,46 +816,52 @@ function list_cp_users_tasks($userid, $page_name) {
}
echo " <code style='background:".$date_color."'>" . __('Due', 'collabpress') . ": " . $cp_list_my_task->due_date . "</code>";
echo " <code style='background:".$date_color."'>" . __('Due', 'collabpress') . ": " . $task_data->due_date . "</code>";
if ($cp_list_my_task->status == 1) {
if ($task_data->status == 1) {
echo '</span>';
}
$link = 'admin.php?page='.$page_name.'&view=userpage&user=' . $user_info->ID . '&delete-task=' . $cp_list_my_task->id . '&task-title=' . $cp_list_my_task->title;
$link = 'admin.php?page='.$page_name.'&view=userpage&user=' . $user_info->ID . '&delete-task=' . $task_data->id . '&task-title=' . $task_data->title;
$link = ( function_exists('wp_nonce_url') ) ? wp_nonce_url($link, 'cp-action-delete_task') : $link;
echo '<a style="color:#D54E21" href="'.$link.'">delete</a></p>';
echo ' <a href="admin.php?page=cp-projects-page&view=edit-task&task='.$task_data->id.'">edit</a>';
echo ' <a style="color:#D54E21" href="'.$link.'">delete</a></p>';
// Display project title
if ($cp_list_my_task->proj_id) {
if ($task_data->proj_id) {
echo '<p><strong>' . __('Project:', 'collabpress') . '</strong> ' . get_cp_project_title($cp_list_my_task->proj_id) . '</p>';
echo '<p><strong>' . __('Project:', 'collabpress') . '</strong> ' . get_cp_project_title($task_data->proj_id) . '</p>';
}
// If there is a description
if ($cp_list_my_task->details) {
if ($task_data->details) {
echo '<p><strong>' . __('Description:', 'collabpress') . '</strong> ' . $cp_list_my_task->details . '</p>';
echo '<p><strong>' . __('Description:', 'collabpress') . '</strong> ' . stripslashes(nl2br($task_data->details)) . '</p>';
}
require (CP_PLUGIN_DIR .'/cp-core/cp-core-comments.php');
$my_task_count++;
echo '</div>';
echo '</div>';
echo '</div>';
} else {
$cp_completed_tasks[] = $cp_list_my_task;
$cp_completed_tasks[] = $task_data;
}
}
if ($cp_completed_tasks) {
if (isset($cp_completed_tasks)) {
foreach ($cp_completed_tasks as $cp_completed_task) {
@@ -635,6 +885,8 @@ function list_cp_users_tasks($userid, $page_name) {
echo '</div>';
echo '<div style="background:#eeeeee" id="cp-task-summary">';
echo '<div style="margin-left:75px">';
if ($cp_completed_task->status != 1) {
// This should never get executed - remove in future version
@@ -654,7 +906,7 @@ function list_cp_users_tasks($userid, $page_name) {
}
echo "<strong>". $cp_completed_task->title . "</strong>";
echo "<strong>". stripslashes($cp_completed_task->title) . "</strong>";
echo " <code>" . __('Due', 'collabpress') . ": " . $cp_completed_task->due_date . "</code>";
if ($cp_completed_task->status == 1) {
@@ -664,34 +916,38 @@ function list_cp_users_tasks($userid, $page_name) {
$link = 'admin.php?page='.$page_name.'&view=userpage&user=' . $user_info->ID . '&delete-task=' . $cp_completed_task->id . '&task-title=' . $cp_completed_task->title;
$link = ( function_exists('wp_nonce_url') ) ? wp_nonce_url($link, 'cp-action-delete_task') : $link;
echo '<a style="color:#D54E21" href="'.$link.'">delete</a></p>';
echo ' <a href="admin.php?page=cp-projects-page&view=edit-task&task='.$cp_completed_task->id.'">edit</a>';
echo ' <a style="color:#D54E21" href="'.$link.'">delete</a></p>';
// Display project title
if ($cp_list_my_task->proj_id) {
if ($cp_completed_task->proj_id) {
echo '<p><strong>' . __('Project:', 'collabpress') . '</strong> ' . get_cp_project_title($cp_list_my_task->proj_id) . '</p>';
echo '<p><strong>' . __('Project:', 'collabpress') . '</strong> ' . get_cp_project_title($cp_completed_task->proj_id) . '</p>';
}
// If there is a description
if ($cp_list_my_task->details) {
if ($cp_completed_task->details) {
echo '<p><strong>' . __('Description:', 'collabpress') . '</strong> ' . $cp_list_my_task->details . '</p>';
echo '<p><strong>' . __('Description:', 'collabpress') . '</strong> ' . stripslashes(nl2br($cp_completed_task->details)) . '</p>';
}
require (CP_PLUGIN_DIR .'/cp-core/cp-core-comments.php');
$my_task_count++;
echo '</div>';
echo '</div>';
echo '</div>';
}
}
// View more
// echo '<p><a style="text-decoration:none; color:#D54E21" href="admin.php?page=cp-dashboard-page&view=allmytasks">' . __('View More', 'collabpress') . '</a></p>';
} else {
@@ -3,9 +3,9 @@
/*
Plugin Name: CollabPress
Plugin URI: http://wordpress.org/extend/plugins/collabpress/
Description: CollabPress will add project management, collaboration and task features to a new or existing WordPress installation.
Description: CollabPress adds project and task management to WordPress.
Author: WebDevStudios
Version: 0.4
Version: 0.5
Author URI: http://webdevstudios.com/
*/
@@ -17,7 +17,7 @@ if (!function_exists ('add_action')) {
}
// Define current version
define( 'CP_VERSION', '0.4' );
define( 'CP_VERSION', '0.5' );
// Add "View CollabPress Dashboard" link on plugins page
$cp_plugin = plugin_basename(__FILE__);
+20 -4
View File
@@ -3,8 +3,8 @@ Contributors: wds-scott, williamsba1
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3084056
Tags: task, management, basecamp, to do, projects, planning, tracking, reporting
Requires at least: 2.9
Tested up to: 2.9.1
Stable tag: 0.4
Tested up to: 2.9.2
Stable tag: 0.5
Project management and task tracking software for WordPress and WPMU
@@ -15,20 +15,29 @@ This plugin adds project and task management functionality to WordPress. Easily
Features include:
* Unlimited project and task creation
* Email notifications when new tasks are created
* Easily edit tasks and projects
* Email notifications for new tasks and comments
* Assign due dates to tasks
* Uses built-in WordPress user accounts
Works with WordPress and WordPress MU 2.9.1
Works with WordPress and WordPress MU
== Screenshots ==
1. CollabPress Dashboard showing recent activity, my tasks, and more
2. Project view showing active tasks and who is assigned to each
3. Easily add a new task to any project created
4. Add comments to individual tasks
== Changelog ==
= 0.5 =
* Add and view comments for tasks
* Edit tasks
* Added single task detail page
* Added uninstall script
* fixed various bugs
= 0.4 =
* Added ability to edit projects
* Added minimum user role setting
@@ -48,6 +57,11 @@ Works with WordPress and WordPress MU 2.9.1
= 0.1 =
* First beta release
== Upgrade Notice ==
= 0.5 =
* adds a bunch of new features including task editing, task comments, uninstallation script, and more
== Installation ==
1. Upload the CollabPress folder to the plugins directory in your WordPress or WPMU installation
@@ -56,6 +70,8 @@ Works with WordPress and WordPress MU 2.9.1
That's it! Now you can easily start adding new projects and tasks
If you are upgrading from a previous version of CollabPress be sure to deactivate and reactivate the plugin to verify all database tables are updated correctly.
== Frequently Asked Questions ==
= Why are some features not implemented? =
Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

@@ -7,6 +7,7 @@
#cp-gravatar {
float: left;
margin-right: 12px;
margin: 10px;
}
#cp-gravatar img {
@@ -18,6 +19,7 @@
height: auto;
border-bottom: 1px solid #F0F0F0;
margin-bottom: 6px;
padding: 6px;
word-wrap:break-word;
}