WordPress.org

Plugin Directory

Changeset 340822


Ignore:
Timestamp:
02/04/11 21:17:37 (3 years ago)
Author:
williamsba1
Message:

Committing v1.1.2

Location:
collabpress/trunk
Files:
2 added
10 edited

Legend:

Unmodified
Added
Removed
  • collabpress/trunk/cp-loader.php

    r336663 r340822  
    44Plugin URI: http://collabpress.org/ 
    55Description: A Project Management Plugin for WordPress 
    6 Version: 1.1.1 
     6Version: 1.1.2 
    77Author: WebDevStudios.com 
    88Author URI: http://webdevstudios.com/ 
     
    2727 
    2828// CollabPress Define(s) 
    29 define( 'CP_VERSION', '1.1.1' ); 
     29define( 'CP_VERSION', '1.1.2' ); 
    3030define( 'CP_BASENAME', plugin_basename(__FILE__) ); 
    3131define( 'CP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 
     
    4141// CollabPress Core 
    4242require_once( 'includes/cp-core.php' ); 
    43  
    4443 
    4544function cp_frontend_querystrings() { 
  • collabpress/trunk/includes/admin_init.php

    r336510 r340822  
    1919    wp_register_script('cp_fancybox', CP_PLUGIN_URL . 'includes/tools/fancybox/jquery.fancybox-1.3.4.pack.js', array('jquery'));     
    2020} 
     21 
     22// Add Translation 
     23add_action( 'init', 'cp_translation' ); 
     24function cp_translation() { 
     25    load_plugin_textdomain( 'collabpress', false, basename( dirname( dirname( __FILE__ ) ) ) . '/languages' ); 
     26} 
     27 
     28// Frontend Init 
    2129add_action( 'init', 'cp_frontend_init' ); 
    2230function cp_frontend_init() { 
     
    7482    // Projects 
    7583    $args_projects = array('label' => 'Projects', 
    76                             'description' => 'Custom Post Type for Collabpress Projects', 
    77                             'public' => $cp_debug_mode, 
    78                             'supports' => array('title','author','thumbnail','comments','custom-fields') 
    79                             ); 
     84                                'description' => 'Custom Post Type for CollabPress Projects', 
     85                                'public' => $cp_debug_mode, 
     86                                'supports' => array('title','author','thumbnail','comments','custom-fields'), 
     87                                'exclude_from_search' => true 
     88                                ); 
    8089    // Register Projects Custom Post Type 
    8190    register_post_type( 'cp-projects', $args_projects ); 
     
    8392    // Task Lists 
    8493    $args_task_lists = array('label' => 'Task Lists', 
    85                             'description' => 'Custom Post Type for Collabpress Task Lists', 
    86                             'public' => $cp_debug_mode, 
    87                             'supports' => array('title','author','thumbnail','comments','custom-fields') 
    88                             ); 
     94                                'description' => 'Custom Post Type for CollabPress Task Lists', 
     95                                'public' => $cp_debug_mode, 
     96                                'supports' => array('title','author','thumbnail','comments','custom-fields'), 
     97                                'exclude_from_search' => true 
     98                                ); 
    8999    // Register Projects Custom Post Type 
    90100    register_post_type( 'cp-task-lists', $args_task_lists ); 
     
    92102    // Tasks 
    93103    $args_tasks = array('label' => 'Tasks', 
    94                             'description' => 'Custom Post Type for Collabpress Tasks', 
     104                            'description' => 'Custom Post Type for CollabPress Tasks', 
    95105                            'public' => $cp_debug_mode, 
    96                             'supports' => array('title','author','thumbnail','comments','custom-fields') 
     106                            'supports' => array('title','author','thumbnail','comments','custom-fields'), 
     107                            'exclude_from_search' => true 
    97108                            ); 
    98109    // Register Projects Custom Post Type 
     
    101112    // Meta Data 
    102113    $args_tasks = array('label' => 'Meta Data', 
    103                             'description' => 'Custom Post Type for Collabpress Meta Data', 
     114                            'description' => 'Custom Post Type for CollabPress Meta Data', 
    104115                            'public' => $cp_debug_mode, 
    105                             'supports' => array('title','author','thumbnail','comments','custom-fields') 
     116                            'supports' => array('title','author','thumbnail','comments','custom-fields'), 
     117                            'exclude_from_search' => true 
    106118                            ); 
    107119    // Register CollabPress Meta Data 
  • collabpress/trunk/includes/css/admin.css

    r336510 r340822  
    103103div.day-number { background:#f1f1f1; padding:5px; color:#21759B; font-weight:bold; float:right; margin:-5px -5px 0 0; width:20px; text-align:center; } 
    104104td.calendar-day, td.calendar-day-np { width:120px; padding:5px; border-bottom:1px solid #f1f1f1; border-right:1px solid #f1f1f1; } 
     105 
     106/* View All Projects */ 
     107.cp-no-margin { 
     108    margin: 0; 
     109} 
    105110 
    106111/* Comments */ 
     
    232237    margin-left: -10px; 
    233238    } 
     239     
    234240/* Footer */ 
    235241.cp_about { 
  • collabpress/trunk/includes/functions.php

    r336510 r340822  
    1010    global $cp_user_page; 
    1111    global $cp_calendar_page; 
     12    global $cp_view_projects; 
    1213     
    1314    global $cp_project; 
     
    9495        $dashboardTitle = '<h2>'.cp_screen_icon('collabpress').__('Calendar', 'collabpress').'</h2>'; 
    9596         
     97    // View All Projects 
     98    elseif ( $cp_view_projects ) : 
     99        $dashboardTitle = '<h2>'.cp_screen_icon('collabpress').__('View All Projects', 'collabpress').'</h2>'; 
     100         
    96101    // Dashboard 
    97102    else : 
     
    111116    global $cp_user_page; 
    112117    global $cp_calendar_page; 
     118    global $cp_view_projects; 
    113119 
    114120    global $cp_project; 
     
    258264 
    259265    // Get Projects 
    260     $projects_args = array( 'post_type' => 'cp-projects' ); 
     266    $projects_args = array( 'post_type' => 'cp-projects', 'showposts' => '-1' ); 
    261267    $projects_query = new WP_Query( $projects_args ); 
    262268     
     
    286292        echo '<p>'.__( 'No Projects...', 'collabpress' ).'</p>'; 
    287293    endif; 
     294     
     295    echo '<p><a class="button" title="'.__('View All Projects', 'collabpress').'" href="'.CP_DASHBOARD.'&view-projects=1">'.__('View All Projects', 'collabpress').'</a></p>'; 
     296     
    288297} 
    289298 
     
    11521161} 
    11531162 
     1163// View All Projects 
     1164function cp_view_all_projects() { 
     1165     
     1166    // Get Current User 
     1167    global $current_user; 
     1168    get_currentuserinfo(); 
     1169 
     1170    echo '<h4 class="cp-no-margin">'.__('All Projects', 'collabpress').'</h4>'; 
     1171 
     1172    // Get Projects 
     1173    $projects_args = array( 'post_type' => 'cp-projects', 'showposts' => '-1' ); 
     1174    $projects_query = new WP_Query( $projects_args ); 
     1175     
     1176    // WP_Query(); 
     1177    if ( $projects_query->have_posts() ) : 
     1178        while( $projects_query->have_posts() ) : $projects_query->the_post(); 
     1179 
     1180        //generate delete project link 
     1181        $cp_del_link = CP_DASHBOARD .'&cp-delete-project-id='.get_the_ID(); 
     1182        $cp_del_link = ( function_exists('wp_nonce_url') ) ? wp_nonce_url( $cp_del_link, 'cp-action-delete_project' ) : $cp_del_link; 
     1183 
     1184        //generate edit project link 
     1185        $cp_edit_link = CP_DASHBOARD.'&project='.get_the_ID().'&view=edit'; 
     1186 
     1187        echo '<p><a href="'.CP_DASHBOARD.'&project='.get_the_ID().'">'.get_the_title().'</a>'; 
     1188 
     1189        //check if user can view edit/delete links 
     1190        if ( cp_check_permissions( 'settings_user_role' ) ) { 
     1191            echo ' - <a href="' .$cp_edit_link. '">' .__( 'edit', 'collabpress'). '</a> &middot; <a href="' .$cp_del_link. '" style="color:red;" onclick="javascript:check=confirm(\'' . __('WARNING: This will delete the selected project, including ALL task lists and tasks in the project.\n\nChoose [Cancel] to Stop, [OK] to delete.\n' ) .'\');if(check==false) return false;">delete</a></p>'; 
     1192        } 
     1193         
     1194        endwhile; 
     1195        wp_reset_query(); 
     1196     
     1197    // No Results 
     1198    else : 
     1199        echo '<p>'.__( 'No Projects...', 'collabpress' ).'</p>'; 
     1200    endif; 
     1201     
     1202} 
     1203 
    11541204// Display Icon 
    11551205function cp_screen_icon($screen = '') { 
  • collabpress/trunk/includes/menus/dashboard.php

    r336510 r340822  
    1414$cp_user_page = false; 
    1515$cp_calendar_page = false; 
     16$cp_view_projects = false; 
    1617$cp_all_users_page = false; 
    1718 
     
    7273        add_action('load-'.$this->pagehook, array(&$this, 'on_load_page')); 
    7374 
    74         //add settings submenu item 
     75        //add settings submenu item 
    7576        add_submenu_page( COLLABPRESS_DASHBOARD_PAGE, __( 'CollabPress Settings', 'collabpress' ), __( 'Settings', 'collabpress' ), $cp_settings_user_role, 'collabpress-settings', 'cp_settings_page' ); 
    76          
    77         //add help submenu item 
    78         add_submenu_page( COLLABPRESS_DASHBOARD_PAGE, __( 'CollabPress Help', 'collabpress' ), __( 'Help', 'collabpress' ), 'read', 'collabpress-help', 'cp_help_page' ); 
    79  
    80         if ($cp_debug_mode) 
    81             add_submenu_page(COLLABPRESS_DASHBOARD_PAGE, __('Debug', 'collabpress'), __('Debug', 'collabpress'), $cp_settings_user_role, 'collabpress-debug', 'cp_debug_page'); 
    82             add_action('admin_print_styles-' . $this->pagehook, array(&$this, 'cp_admin_styles')); 
    83             add_action('admin_print_scripts-' . $this->pagehook, array(&$this, 'cp_admin_scripts')); 
     77 
     78        //add help submenu item 
     79        add_submenu_page( COLLABPRESS_DASHBOARD_PAGE, __( 'CollabPress Help', 'collabpress' ), __( 'Help', 'collabpress' ), $cp_settings_user_role, 'collabpress-help', 'cp_help_page' ); 
     80 
     81        if ( $cp_debug_mode ) : 
     82            add_submenu_page(COLLABPRESS_DASHBOARD_PAGE, __('Debug', 'collabpress'), __('Debug', 'collabpress'), $cp_settings_user_role, 'collabpress-debug', 'cp_debug_page'); 
     83            add_action('admin_print_styles-' . $this->pagehook, array(&$this, 'cp_admin_styles')); 
     84            add_action('admin_print_scripts-' . $this->pagehook, array(&$this, 'cp_admin_scripts')); 
     85        endif; 
    8486    } 
    8587     
     
    102104        global $cp_user_page; 
    103105        global $cp_calendar_page; 
     106        global $cp_view_projects; 
    104107        global $cp_all_users_page; 
    105108         
     
    156159        elseif ( isset($_GET['calendar']) ) : 
    157160            $cp_calendar_page = true; 
     161             
     162        // View Projects 
     163        elseif ( isset($_GET['view-projects']) ) : 
     164            $cp_view_projects = true; 
    158165             
    159166        // Dashbaord 
  • collabpress/trunk/includes/menus/help.php

    r336510 r340822  
    11<?php 
    22//verify user has permission to view help 
    3 //if ( cp_check_permissions( 'settings_user_role' ) ) { //show to subscriber+ role for now 
     3if ( cp_check_permissions( 'settings_user_role' ) ) { 
    44?> 
    55    <div id="collabpress-wrap" class="wrap"> 
     
    3838    echo '<hr />'; 
    3939    cp_footer(); 
    40 //} 
     40} 
    4141?> 
  • collabpress/trunk/includes/menus/isset/show-core-meta-boxes.php

    r336510 r340822  
    77global $cp_user_page; 
    88global $cp_calendar_page; 
     9global $cp_view_projects; 
    910global $cp_all_users_page; 
    1011 
     
    5556elseif ( $cp_calendar_page ) : 
    5657    cp_draw_calendar(); 
     58     
     59// View All Projects Page 
     60elseif ( $cp_view_projects ) : 
     61    cp_view_all_projects(); 
    5762 
    5863// Dashboard Page    
  • collabpress/trunk/includes/menus/isset/show-side-meta-boxes.php

    r336510 r340822  
    77global $cp_user_page; 
    88global $cp_calendar_page; 
     9global $cp_view_projects; 
    910 
    1011global $cp_project; 
     
    5455elseif ( $cp_calendar_page ) : 
    5556    do_meta_boxes($this->pagehook, 'collabpress-side', NULL); 
     57     
     58// View All Projects Page 
     59elseif ( $cp_view_projects ) : 
     60    do_meta_boxes($this->pagehook, 'collabpress-side', NULL); 
    5661 
    5762// Dashboard Page    
  • collabpress/trunk/includes/shortcode.php

    r336510 r340822  
    172172 
    173173    // Get Projects 
    174     $projects_args = array( 'post_type' => 'cp-projects', 'p' => absint( $id ) ); 
     174    $projects_args = array( 'post_type' => 'cp-projects', 'p' => absint( $id ), 'showposts' => '-1' ); 
    175175    $projects_query = new WP_Query( $projects_args ); 
    176176 
  • collabpress/trunk/readme.txt

    r336677 r340822  
    55Requires at least: 2.9 
    66Tested up to: 3.1 
    7 Stable tag: 1.1.1 
     7Stable tag: 1.1.2 
    88 
    99Project management and task tracking software for WordPress 
     
    3535 
    3636== Changelog == 
     37 
     38= 1.1.2 = 
     39* Fixed bug showing help menu to all users 
     40* Exclude custom post type content from search 
     41* Fixed bug to only show recent five projects 
     42* Created a dedicated project page to view all projects 
     43* Added translation file for internationalization support 
    3744 
    3845= 1.1.1 = 
     
    9097== Upgrade Notice == 
    9198 
     99= 1.1.2 = 
     100* Various bug fixes 
     101 
    92102= 1.1.1 = 
    93103* Fixed front-end shortcode viewing bug 
Note: See TracChangeset for help on using the changeset viewer.