Plugin Directory

Changeset 752882


Ignore:
Timestamp:
08/07/2013 11:03:54 AM (13 years ago)
Author:
EkAndreas
Message:

Minor update

Location:
flowboard
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • flowboard/tags/1.3/flowboard.php

    r624764 r752882  
    44Plugin URI: http://plugins.flowcom.se/flowboard
    55Description: Web development tool, agile whiteboard with sticky notes. Your notes are posts in WP!
    6 Version: 1.3
     6Version: 1.6
    77Author: Flowcom AB, Andreas Ek
    88Author URI: http://www.flowcom.se
     
    1212include 'includes/ajax.php';
    1313include 'includes/note.php';
    14 include 'includes/optionpage.php';
    1514include 'includes/main.php';
    1615include 'includes/shortcode.php';
     16include 'includes/board.php';
    1717
    1818$flowboard_ajax = new FlowBoard_Ajax();
    19 $flowboard_option = new FlowBoard_Option();
    2019$flowboard_main = new FlowBoard_Main();
    2120$flowboard_shortcode = new FlowBoard_Shortcode();
    2221
    2322function flowboard_metakey() {
    24     return 'FlowBoard_ID';
     23    return '_flowboard_board';
    2524}
    2625
    2726function flowboard_metadata() {
    28     return 'FlowBoard_Data';
     27    return '_flowboard_meta';
    2928}
    3029
     30function flowboard_activate() {
     31    flush_rewrite_rules();
     32}
     33register_activation_hook( __FILE__, 'flowboard_activate' );
    3134
     35function flowboard_deactivate() {
     36    flush_rewrite_rules();
     37}
     38register_deactivation_hook( __FILE__, 'flowboard_deactivate' );
    3239
    3340?>
  • flowboard/tags/1.3/includes/ajax.php

    r624764 r752882  
    5050        error_reporting(E_ALL^E_NOTICE);
    5151        // Checking whether all input variables are in place:
    52         if(!is_numeric($_POST['board']) || !is_numeric($_POST['zindex']) || !isset($_POST['author']) || !isset($_POST['body']) || !in_array($_POST['color'],array('yellow','green','blue','purple','orange','pink')))
     52        if(!is_numeric($_POST['zindex']) || !isset($_POST['author']) || !isset($_POST['body']) || !in_array($_POST['color'],array('yellow','green','blue','purple','orange','pink')))
    5353        {
    5454            echo 'Not valid input to save note!';
     
    6565
    6666        // Escaping the input data:
    67         $author = esc_attr($_POST['author']);
    68         $body = esc_html($_POST['body']);
    69         $color = esc_attr($_POST['color']);
    70         $id = (int)esc_attr($_POST['id']);
    71         $pos = (int)esc_attr($_POST['pos']);
    72         $zindex = (int)esc_attr($_POST['zindex']);
    73         $board = (int)esc_attr($_POST['board']);
    74         $estimate = (int)esc_attr($_POST['estimate']);
    75         $timeleft = (int)esc_attr($_POST['timeleft']);
    76 
    77         $dataArr = array('board'=>$board,'id'=>0,'author'=>$author,'color'=>$color,'zindex'=>$zindex,'estimate'=>$estimate,'timeleft'=>$timeleft,'xyz'=>$pos);
     67        $author         = esc_attr($_POST['author']);
     68        $body           = esc_html($_POST['body']);
     69        $color          = esc_attr($_POST['color']);
     70        $id             = (int)esc_attr($_POST['id']);
     71        $pos            = (int)esc_attr($_POST['pos']);
     72        $zindex         = (int)esc_attr($_POST['zindex']);
     73        $board          = (int)esc_attr($_POST['board']);
     74        $estimate       = (int)esc_attr($_POST['estimate']);
     75        $timeleft       = (int)esc_attr($_POST['timeleft']);
     76        $postcontent    = wp_kses_post($_POST['postcontent']);
     77                $add_link           = $_POST['add_link'] ? true : false;
     78
     79        $dataArr = array('id'=>0,'author'=>$author,'color'=>$color,'zindex'=>$zindex,'estimate'=>$estimate,'timeleft'=>$timeleft,'xyz'=>$pos,'add_link'=>$add_link);
    7880
    7981        if (is_numeric($id) && $id>0)
     
    8890            {
    8991                $my_post['post_title'] = $body;
     92                $my_post['post_content'] = $postcontent;
    9093            }
    9194
     
    9396            wp_update_post( $my_post );
    9497
    95             if (!update_post_meta($id, flowboard_metakey(), $board))
     98            /*if (!update_post_meta($id, flowboard_metakey(), $board))
    9699            {
    97100                add_post_meta($id, flowboard_metakey(), $board, true);
    98             }
     101            }*/
    99102
    100103            $dataString = get_post_meta($id,flowboard_metadata());
     
    113116        else
    114117        {
     118            if (!$board) {
     119                echo 'Unknown board ID';
     120                die(0);
     121            }
     122
    115123            global $user_ID;
    116124            $new_post = array(
    117125                'post_title' => $body,
    118                 'post_content' => '',
     126                'post_content' => $postcontent,
    119127                'post_status' => 'publish',
    120                 'post_date' => date('Y-m-d H:i:s'),
     128                'post_date' => current_time('mysql'),
    121129                'post_author' => $user_ID,
    122130                'post_type' => 'flowboard_note',
     
    128136
    129137            $dataArr['id'] = $id;
    130             $dataArr['xyz'] = '42x72x'.$zindex;
     138
     139            //If new check if other in the same place and increase pos and zindex!
     140            $posts = FlowBoard_Board::all_notes($board);
     141
     142            $xyz = "42x72x1";
     143            $xyz = $this->reverse_pos($xyz, $posts);
     144
     145            //Default status:
     146            $dataArr['status'] = $this->board_default_status($board);
     147
     148            $dataArr['xyz'] = $xyz;
    131149            add_post_meta($id, flowboard_metadata(), json_encode($dataArr), true);
    132150
     
    136154        die(0);
    137155    }
     156
     157    function board_default_status($board){
     158        $meta = get_post_meta($board, flowboard_metadata(), true);
     159        $meta = json_decode($meta);
     160        if (is_array($meta->zones)) return $meta->zones[0];
     161        return "";
     162    }
     163
     164    function reverse_pos($xyz, $posts){
     165
     166        $moved = false;
     167        list($left, $top, $zindex) = explode('x', $xyz);
     168        foreach($posts as $post){
     169            $meta = get_post_meta($post->ID, flowboard_metadata(), true);
     170            $meta = json_decode($meta);
     171            list( $l , $t , $z ) = explode('x', $meta->xyz);
     172            if ( $l == $left && $t == $top ) {
     173                $moved = true;
     174                $left += 4;
     175                $top += 4;
     176                $zindex = $z + 1;
     177            }
     178            if ($z>$zindex) $zindex = $z+1;
     179        }
     180        $result = $left . 'x' . $top . 'x' . $zindex;
     181
     182        if ($moved) {
     183            return $this->reverse_pos($result, $posts);
     184        }
     185        else
     186        {
     187            return $result;
     188        }
     189    }
     190
    138191
    139192    function update_position()
     
    150203        // Escaping:
    151204        $id = (int)$_GET['id'];
     205        $status = esc_attr($_GET['status']);
    152206        $x = (int)$_GET['x'];
    153207        $y = (int)$_GET['y'];
     
    165219
    166220        $dataArr->xyz = $pos;
     221
     222        if (!empty($status)) $dataArr->status = $status;
    167223
    168224        if (!update_post_meta($id, flowboard_metadata(), json_encode($dataArr)))
  • flowboard/tags/1.3/includes/main.php

    r624764 r752882  
    11<?php
    22
    3 class FlowBoard_Main{
     3class FlowBoard_Main
     4{
    45
    56    function __construct()
    67    {
    7         add_action('wp_print_styles', array(&$this, 'wp_print_styles'));
    8         add_action('init', array(&$this, 'init'));
     8        add_action( 'wp_print_styles', array( &$this, 'wp_print_styles' ) );
     9        add_action( 'init', array( &$this, 'init' ) );
     10        add_action( 'admin_init', array( &$this, 'admin_init' ) );
     11        add_action( 'admin_menu', array( &$this, 'admin_menu' ) );
     12        add_action( 'save_post', array( &$this, 'save_post' ) );
     13        add_action( 'admin_enqueue_scripts', array( &$this, 'admin_enqueue_scripts' ) );
     14    }
     15
     16    function save_post( $post_id )
     17    {
     18
     19        global $post;
     20
     21        if ( $post->post_type == 'flowboard_note' ) {
     22            $board = esc_attr( $_POST[ 'flowboard_board' ] );
     23            update_post_meta( $post->ID, flowboard_metakey(), $board );
     24        }
     25
     26        if ( $post->post_type == 'flowboard_board' ) {
     27
     28            $z = $_POST[ 'zone_ui_dynamic' ];
     29            if ( is_array( $z ) ) {
     30                foreach ( $z as $zone ) {
     31                    if ( !empty( $zone ) ) {
     32                        $store_zones[ ] = $zone;
     33                    }
     34                }
     35            } else {
     36                $store_zones = FlowBoard_Board::default_zones();
     37            }
     38
     39            $meta[ 'zones' ] = $store_zones;
     40            if ( !update_post_meta( $post->ID, flowboard_metadata(), json_encode( $meta ) ) ) {
     41                add_post_meta( $post->ID, flowboard_metadata(), json_encode( $meta ), true );
     42            }
     43        }
     44
     45        return $post_id;
     46
     47    }
     48
     49    function admin_menu()
     50    {
     51        add_menu_page( 'Flowboard', 'Flowboard', 'edit_posts', 'flowboard', array( &$this, 'display_flowboard_page' ), plugins_url( 'flowboard/img/notes.png' ) );
     52
     53        // remove submenu 'add new'
     54        global $submenu;
     55        unset( $submenu[ 'edit.php?post_type=flowboard_note' ][ 10 ] ); // Removes 'Add New'.
     56    }
     57
     58    function admin_init()
     59    {
     60
     61        add_meta_box(
     62            'flowboard_board_zones', __( 'FlowBoard Zones', 'flowboard' ), array( &$this, 'show_zones' ),
     63            'flowboard_board', 'normal', 'default'
     64        );
     65        add_meta_box(
     66            'flowboard_note_board', __( 'Flowboard properties', 'flowboard' ), array( &$this, 'show_note_properties' ),
     67            'flowboard_note', 'side', 'default'
     68        );
     69
     70    }
     71
     72    function admin_enqueue_scripts()
     73    {
     74
     75        wp_enqueue_script( array( 'jquery', 'editor', 'thickbox', 'tinymce_editor' ) );
     76
     77        // Main jQuery
     78        $src = WP_PLUGIN_URL . '/flowboard/js/metabox.js';
     79        wp_deregister_script( 'flowboard_metabox' );
     80        wp_register_script( 'flowboard_metabox', $src );
     81        wp_enqueue_script( 'flowboard_metabox' );
     82    }
     83
     84    function show_note_properties()
     85    {
     86        global $post;
     87
     88        $board = get_post_meta( $post->ID, flowboard_metakey(), true );
     89
     90        ?>
     91        <strong><?php _e( 'Board', 'flowboard' ); ?>:</strong>
     92        (<a href="<?php echo admin_url( 'edit.php?post_type=flowboard_board' ); ?>"><?php _e(
     93            'manage boards here!', 'flowboard'
     94        ); ?></a>)
     95        <select name="flowboard_board" id="flowboard_board">
     96            <option value="0"><?php _e( '--- choose assigned board ---', 'flowboard' ); ?></option>
     97            <?php
     98            $args = array( 'post_type' => 'flowboard_board', 'numberposts' => '-1' );
     99            $posts = get_posts( $args );
     100            foreach ( $posts as $p ) {
     101                echo '<option value="' . $p->ID . '"';
     102                if ( $board == $p->ID ) {
     103                    echo ' selected';
     104                }
     105                echo '>' . $p->post_title . '</option>' . "\r\n";
     106            }
     107            ?>
     108        </select>
     109        </p>
     110    <?php
     111    }
     112
     113    function show_zones()
     114    {
     115        global $post;
     116
     117        echo '<p>';
     118
     119        $zones = FlowBoard_Board::get_zones( $post->ID );
     120
     121        ?>
     122        <div class="flowboard_zones_control">
     123
     124        <div style="margin-bottom: 4px;">
     125            <input type="button" class="button-secondary" value="<?php _e( 'Add', 'flowboard' ); ?>"
     126                   id="flowboard_zones_add"/>
     127            <input type="button" class="button-secondary" value="<?php _e( 'Remove', 'flowboard' ); ?>"
     128                   id="flowboard_zones_remove"/>
     129            <input type="button" class="button-secondary" value="<?php _e( 'Reset', 'flowboard' ); ?>"
     130                   id="flowboard_zones_reset"/>
     131        </div>
     132
     133        <div id="flowboard_zones_ui">
     134
     135            <?php
     136            foreach ( $zones as $key => $z ) {
     137                ?>
     138                <div class="zone_ui_div">
     139                    <input type="text" class="text zone_ui_dynamic" name="zone_ui_dynamic[]"
     140                           value="<?php echo $z; ?>"/>
     141                </div>
     142            <?php
     143            }
     144            ?>
     145
     146        </div>
     147        <?php
     148
     149        echo '</p>';
     150
     151        return true;
    9152    }
    10153
    11154    /*Required stylesheets */
    12     function wp_print_styles() {
     155    function wp_print_styles()
     156    {
    13157        $myStyleUrl = WP_PLUGIN_URL . '/flowboard/styles.css';
    14158        $myStyleFile = WP_PLUGIN_DIR . '/flowboard/styles.css';
    15159
    16         if ( file_exists($myStyleFile) ) {
    17             wp_register_style('FlowBoardStyleSheets', $myStyleUrl);
    18             wp_enqueue_style( 'FlowBoardStyleSheets');
    19         }
    20     }
    21 
    22     function init() {
    23 
    24         register_post_type('flowboard_note', array( 'label' => 'Notes','description' => 'FlowBoard custom post types','public' => true,'show_ui' => true,'show_in_menu' => true,'capability_type' => 'post','hierarchical' => false,'rewrite' => array('slug' => ''),'query_var' => true,'exclude_from_search' => false,'supports' => array('title','editor','custom-fields','comments',),'labels' => array (
    25             'name' => 'Notes',
    26             'singular_name' => 'Note',
    27             'menu_name' => 'Notes',
    28             'add_new' => 'Add Note',
    29             'add_new_item' => 'Add New Note',
    30             'edit' => 'Edit',
    31             'edit_item' => 'Edit Note',
    32             'new_item' => 'New Note',
    33             'view' => 'View Note',
    34             'view_item' => 'View Note',
    35             'search_items' => 'Search Notes',
    36             'not_found' => 'No Notes Found',
    37             'not_found_in_trash' => 'No Notes Found in Trash',
    38             'parent' => 'Parent Note',
    39         ),) );
    40 
    41         if (!is_admin()) {
    42 
    43             //Kolla av nu om användaren har access alternativt om Public Access är aktiverat.
    44             $options = get_option('flowboard_plugin_options');
    45 
    46             if (current_user_can('edit_posts') || $options['public_access'])
    47             {
    48 
    49             }
    50         }
    51     }
    52 
     160        if ( file_exists( $myStyleFile ) ) {
     161            wp_register_style( 'FlowBoardStyleSheets', $myStyleUrl );
     162            wp_enqueue_style( 'FlowBoardStyleSheets' );
     163        }
     164    }
     165
     166    function init()
     167    {
     168
     169        register_post_type(
     170            'flowboard_note', array(
     171                'label' => 'Notes', 'description' => 'FlowBoard custom post types', 'public' => true, 'show_ui' => true,
     172                'show_in_menu' => 'flowboard', 'capability_type' => 'post', 'hierarchical' => false,
     173                'rewrite' => array( 'slug' => '' ), 'query_var' => true, 'exclude_from_search' => false,
     174                'supports' => array( 'title', 'editor', 'comments', ), 'labels' => array(
     175                    'name' => 'Notes',
     176                    'singular_name' => 'Note',
     177                    'menu_name' => 'Notes',
     178                    'add_new' => 'Add Note',
     179                    'add_new_item' => 'Add New Note',
     180                    'edit' => 'Edit',
     181                    'edit_item' => 'Edit Note',
     182                    'new_item' => 'New Note',
     183                    'view' => 'View Note',
     184                    'view_item' => 'View Note',
     185                    'search_items' => 'Search Notes',
     186                    'not_found' => 'No Notes Found',
     187                    'not_found_in_trash' => 'No Notes Found in Trash',
     188                    'parent' => 'Parent Note',
     189                ),
     190            )
     191        );
     192
     193        register_post_type(
     194            'flowboard_board', array(
     195                'label' => 'Boards', 'description' => '', 'public' => false, 'show_ui' => true,
     196                'show_in_menu' => 'flowboard', 'capability_type' => 'post',
     197                'hierarchical' => false, 'rewrite' => array( 'slug' => '' ), 'query_var' => true,
     198                'exclude_from_search' => true, 'supports' => array( 'title', ), 'labels' => array(
     199                    'name' => 'Boards',
     200                    'singular_name' => 'Board',
     201                    'menu_name' => 'Boards',
     202                    'add_new' => 'Add Board',
     203                    'add_new_item' => 'Add New Board',
     204                    'edit' => 'Edit',
     205                    'edit_item' => 'Edit Board',
     206                    'new_item' => 'New Board',
     207                    'view' => 'View Board',
     208                    'view_item' => 'View Board',
     209                    'search_items' => 'Search Boards',
     210                    'not_found' => 'No Boards Found',
     211                    'not_found_in_trash' => 'No Boards Found in Trash',
     212                    'parent' => 'Parent Board',
     213                ),
     214            )
     215        );
     216
     217        if ( !is_admin() ) {
     218            $options = get_option( 'flowboard_plugin_options' );
     219            if ( current_user_can( 'edit_posts' ) || $options[ 'public_access' ] ) {
     220                //TODO actions!
     221            }
     222        }
     223    }
     224
     225    function display_flowboard_page(){
     226    }
    53227
    54228}
  • flowboard/tags/1.3/includes/note.php

    r624764 r752882  
    1414    public $top;
    1515    public $zindex;
     16    public $status;
     17    public $postcontent;
     18        public $add_link;
    1619
    1720    /**
     
    3235            $this->timeleft = $dataArr->timeleft;
    3336            $this->estimate = $dataArr->estimate;
     37            $this->status = $dataArr->status;
     38                        $this->add_link = $dataArr->add_link;
     39            $this->postcontent = $post->post_content;
    3440            list($this->left,$this->top,$this->zindex) = explode('x', $dataArr->xyz);
    3541            $this->board = $dataArr->board;
     
    4349            $this->timeleft = "0";
    4450            $this->estimate = "0";
    45             //$this->left = 10;
    46             //$this->top = 10;
    47             //$this->zindex = 1;
    48             $this->board = get_the_ID();
     51            $this->status = "";
     52            $this->postcontent = '';
     53            $this->board = 0;
    4954        }
    5055    }
     
    8388
    8489        $str .= '>
    85                     <div class="body">'.$this->body.'</div>
    86                     <div class="author">' . $this->author . '</div>
    87                     <span class="data hidden_field">'.$this->id.'</span>
    88                     <span class="color hidden_field">'.$this->color.'</span>
    89                     <div class="time">
    90                         <span class="timeleft">'.$this->timeleft.'</span>/<span class="estimate">'.$this->estimate.'</span>
    91                     </div>
    92                 </div>';
     90                            <div class="body">'.$this->body.'</div>
     91                            <div class="author">' . $this->author . '</div>
     92                            <span class="data hidden_field">'.$this->id.'</span>
     93                            <span class="status hidden_field">'.$this->status.'</span>
     94                            <span class="color hidden_field">'.$this->color.'</span>
     95                            <div class="time">
     96                                    <span class="timeleft">'.$this->timeleft.'</span>/<span class="estimate">'.$this->estimate.'</span>
     97                            </div>';
     98
     99                if ( $this->add_link ){
     100                    $str .= '<div class="readmore"><a href="' . get_permalink( $this->id ) . '">Read more</a></div>';
     101                }
     102
     103        $str .= '</div>';
    93104
    94105        return $str;
     
    96107
    97108    public function form(){
     109
     110        $board = get_post_meta($this->id, flowboard_metakey(), true);
     111        $zones = FlowBoard_Board::get_zones($board);
    98112
    99113        $str = '<div id="noteData"> <!-- Holds the form -->
     
    102116                <label for="note-body">Headline</label>
    103117                <textarea name="note-body" id="note-body" class="pr-body" cols="30" rows="6">'.$this->body.'</textarea>
    104                 <label for="note-estimate">Estimate</label>
    105                 <input type="text" name="note-estimate" id="note-estimate" class="pr-estimate numbersOnly" value="'.$this->timeleft.'" />
    106                 <label for="note-name">Time left</label>
    107                 <input type="text" name="note-timeleft" id="note-timeleft" class="pr-timeleft numbersOnly" value="'.$this->estimate.'" />
     118                <table cellspacing="0" cellpadding="0">
     119                    <tr>
     120                        <td>
     121                            <label for="note-name">Time left</label>
     122                            <input type="text" name="note-timeleft" id="note-timeleft" class="pr-timeleft numbersOnly" value="'.$this->timeleft.'" />
     123                        </td>
     124                        <td style="width:40px;">&nbsp;</td>
     125                        <td>
     126                            <label for="note-estimate">Estimate</label>
     127                            <input type="text" name="note-estimate" id="note-estimate" class="pr-estimate numbersOnly" value="'.$this->estimate.'" />
     128                        </td>
     129                    </tr>
     130                </table>
     131                <label for="note-status">Status</label>
     132                <select name="note-status" class="pr-status">
     133                ';
     134
     135        foreach($zones as $zone){
     136            $str .= '<option';
     137            if ($this->status==$zone) $str.=' selected';
     138            $str .= '>'.$zone.'</option>';
     139        }
     140
     141        $str .= '</select><br/><br/>
    108142                <label for="note-name">Responsible</label>
    109143                <input type="text" name="note-name" id="note-name" class="pr-author" value="'.$this->author.'" />
     
    116150                <div class="color pink"></div>
    117151                <input type="hidden" class="pr-board" name="board" id="note-board" value="'.$this->board.'" />
    118                 <div class="clear"></div>
     152                <br/><br/>
     153                <label>Text</label> <!-- Clicking one of the divs changes the color of the preview -->
     154                <textarea class="pr-postcontent" name="note-postcontent" id="note-postcontent">' . $this->postcontent . '</textarea>
     155                <br/>
     156                <input type="checkbox" class="pr-addlink" id="add_link" name="add_link" ';
     157
     158                if ( $this->add_link ) $str .= 'checked';
     159
     160                $str .= '/>Add hyperlink to the post in this note<div class="clear"></div>
    119161                <button id="note-submit" class="dialog_button button-primary">Save</button>';
    120162
    121163            if ($this->id && is_user_logged_in()){
    122                 $str .= '<button onclick="document.location=\'/wp-admin/post.php?post='.$this->id.'&action=edit\';" id="note-post" class="dialog_button">To Post</button>';
     164                $str .= '<button onclick="document.location=\''.admin_url('post.php?post='.$this->id.'&action=edit').'\';" id="note-post" class="dialog_button">To Post</button>';
    123165            }
    124166
     
    136178    /* getNotes generates a string with inline html notes from wpdb table */
    137179    static function board_notes($board_id, $override) {
    138         global $post; // required
    139180
    140181        $notes = "";
  • flowboard/tags/1.3/includes/shortcode.php

    r624764 r752882  
    2727        ), $atts ) );
    2828
    29         if (current_user_can('edit_posts') || $override){
     29        $meta = get_post_meta($id, flowboard_metadata());
     30        $meta = json_decode($meta[0]);
     31
     32        if ( current_user_can( 'edit_posts' ) || $override ){
     33
    3034            wp_enqueue_script('jquery');
     35            wp_admin_css('thickbox');
    3136            wp_enqueue_script('jquery-ui-draggable');
     37            wp_enqueue_script('jquery-ui-droppable');
    3238            add_thickbox();
    33             $myScriptUrl = WP_PLUGIN_URL . '/flowboard/script.js';
     39
     40            $myScriptUrl = WP_PLUGIN_URL . '/flowboard/js/script.js';
    3441            wp_deregister_script( 'flowboardjs' );
    3542            wp_register_script( 'flowboardjs', $myScriptUrl);
    3643            wp_enqueue_script( 'flowboardjs' );
    3744            wp_localize_script( 'flowboardjs', 'FlowBoardAjax', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) );
     45
     46            $myScriptUrl = WP_PLUGIN_URL . '/flowboard/js/jquery.ui.touch-punch.min.js';
     47            wp_deregister_script( 'touch-punch' );
     48            wp_register_script( 'touch-punch', $myScriptUrl );
     49            wp_enqueue_script( 'touch-punch' );
    3850        }
    3951
    4052        $board = "<!--FlowBoard-->";
    4153
    42         $board .= '<div id="flowboardmain_'.$id.'" class="flowboardmain" style="';
     54        /*$board .= '<div id="flowboardmain_'.$id.'" class="flowboardmain" style="';
    4355        $options = get_option('flowboard_plugin_options');
    4456        if ($options['board_background']!=NULL) {
     
    4860            $board = $board.'background-image: url('.WP_PLUGIN_URL.'/flowboard/img/flowboard_bg.jpg);';
    4961        }
     62        $board = $board.'">';
     63        */
    5064
    51         $board = $board.'">';
     65        $board .= '<div id="flowboardmain_'.$id.'" class="flowboardmain">';
    5266
    5367        if (current_user_can('edit_posts') || $override){
    54             $board = $board.'<a href="'.admin_url('admin-ajax.php').'?action=flowboard_note_form&id=0&board='.$id.'" class="thickbox add_new_note" title="Add new note">&nbsp;&nbsp;+&nbsp;&nbsp;</a>';
     68            $board = $board.'<a href="'.admin_url('admin-ajax.php').'?action=flowboard_note_form&id=0&height=550&width=600&board='.$id.'" class="thickbox" title="Add new note">';
     69            $board .= '<img src="'.WP_PLUGIN_URL.'/flowboard/img/button.png" alt="add new note" />';
     70            $board .= '</a><br/>';
    5571        }
     72
     73
     74        $zones = FlowBoard_Board::get_zones($id);
     75
     76        foreach($zones as $key => $zone){
     77            $board .= '<div id="flowboard_zone'.$key.'" name="'.$zone.'" class="flowboard_zone" style="width:'.round(95/sizeof($zones)).'%">'.$zone.'</div>';
     78        }
     79
    5680        $board .= FlowBoard_Note::board_notes($id, $override) . '</div>';
     81
     82        $board .= '<div style="clear: both;"></div>';
    5783
    5884        $board .= "<!--/FlowBoard-->\r\n";
     
    82108
    83109        <p>
     110            <select name="flowboard_board" id="flowboard_board">
     111                <option value="0"><?php _e('--- choose board to insert ---','flowboard'); ?></option>
     112                <?php
     113                    $args = array('post_type'=>'flowboard_board','numberposts'=>'-1');
     114                    $posts = get_posts($args);
     115                    foreach($posts as $post){
     116                        echo '<option value="'.$post->ID.'">' . $post->post_title . '</option>' . "\r\n";
     117                    }
     118                ?>
     119            </select> (<a href="<?php echo admin_url('edit.php?post_type=flowboard_board'); ?>"><?php _e('manage boards here!','flowboard'); ?></a>)
     120        </p>
     121
     122        <p>
    84123            <input id="flowboard_override" type="checkbox" value="0" /> <?php _e( 'Make the FlowBoard draggable for unauthorized visitors.', 'flowboard' ); ?>
    85124        </p>
     
    94133    </div>
    95134
    96         <script language="javascript">
     135        <script>
    97136            function flowboardSetShortCode() {
    98137
    99138                var override    = jQuery('#flowboard_override').is(':checked');
     139                var board       = parseInt(jQuery('#flowboard_board').val());
    100140                _boardkey = 0;
    101141
    102                 jQuery.ajaxSetup({async: false});
     142                if (!board) return '';
    103143
    104                 jQuery.get('<?php echo admin_url('admin-ajax.php'); ?>?action=flowboard_boardkey', function(data) {
    105                     _boardkey = data;
    106                 });
    107 
    108                 var shortcode = '[FlowBoard id=' + _boardkey;
     144                var shortcode = '[FlowBoard id=' + board;
    109145
    110146                if (override) shortcode += ' override=1';
  • flowboard/tags/1.3/readme.txt

    r624794 r752882  
    33Tags: agile, tools, whiteboard, project management, sticky notes, kanban, scrum
    44Requires at least: 3.4
    5 Tested up to: 3.5
    6 Stable tag: 1.3
     5Tested up to: 3.6
     6Stable tag: 1.6
    77
    88FlowBoard makes it easier for web development to visualize the agile process.
     
    28281. Download the plugin
    29292. Activate the plugin through the 'Plugins' menu in WordPress
    30 3. Open a post or a page and click the "note"-button to add a board to your page!
     303. Create a new board in wp-admin/Flowboard/Boards (just title is enough)
     314. Open a post or a page and click the "note"-button to add a board to your page!
    3132
    3233In the admin settings menu you can change the board background image for your purposes.
     
    3637= Does it fit into my theme? =
    3738Yes, you can choose your own background in the admin settings. The whiteboard takes full width.
    38 
    39 = Will you continue develop the plugin? =
    40 Yes, we use it our self in projects and new ideas will be implemented, se roadmap at the site!
    4139
    4240= Have ideas? =
     
    4947
    5048== Changelog ==
     49
     50= 1.6 =
     51* Admin menu moved
     52* Flush rewrite rules made in plugin activate/deactivate
     53* Removed some error_log messages
     54*
     55
     56= 1.5.5 =
     57* Flush rewrite rules after new registration of post types
     58
     59= 1.5.4 =
     60* Added a readmore link in the note if selected
     61
     62= 1.5.3 =
     63* Touch-Pounch added, support for ipad/iphone
     64
     65= 1.5.2 =
     66* Post date fixed thanks to "innerbot".
     67* Post content editable in popup (no html), thanks to "vlood".
     68* Some removal of fonts in css
     69
     70= 1.5.1 =
     71* New note didn't show until refresh, fixed.
     72* New note on top, fixed.
     73
     74= 1.5 =
     75* Added zones to board
     76
     77= 1.4 =
     78* Added Board as an entity / custom post type (preparing for properties, burndown, etc)
     79* Metabox added to Notes
     80* Cascade postition at new note
     81
     82= 1.3.1 =
     83* Quick fix, estimate and timeleft switched in edit note
     84* Admin url fixed in edit post from edit note
    5185
    5286= 1.3 =
     
    91125== Upgrade Notice ==
    92126
    93 -
     1271.3 to 1.4, You will have to recreate the board and reset all Note posts to the right board ID.
    94128
  • flowboard/tags/1.3/styles.css

    r624764 r752882  
    55
    66#noteDialog { display:none; background-color: #fff; }
     7
     8.flowboard_zone{
     9
     10    height: 700px;
     11    border: 1px solid #ccc;
     12    float:left;
     13    text-align: center;
     14    font-weight: bold;
     15    overflow: hidden;
     16
     17}
    718
    819.note{
     
    1930    font-size:12px;
    2031
    21     /* Adding a CSS3 shadow below the note, in the browsers which support it: */
    22     -moz-box-shadow:2px 2px 0 #DDDDDD;
    23     -webkit-box-shadow:2px 2px 0 #DDDDDD;
    24     box-shadow:2px 2px 0 #DDDDDD;
     32    -moz-box-shadow: 5px 5px 5px #aaa;
     33    -webkit-box-shadow: 5px 5px 5px #aaa;
     34    box-shadow: 5px 5px 5px #ccc;
     35}
     36
     37.note .readmore{
     38    font-size:  10px;
     39    color:#666666;
     40    font-family:Arial,Verdana,sans-serif;
     41    text-decoration: none;
    2542}
    2643
     
    109126}
    110127
     128.ui-state-active{
     129    background-color: #eee;
     130}
    111131
    112132.author{
     
    134154#noteData{
    135155    /* The input form in the pop-up: */
    136     height:200px;
     156    height:400px;
    137157    margin:0px 0px 0px 130px;
    138158    width:315px;
     
    155175    height:60px;
    156176    padding:5px;
    157     width:300px;
    158177    margin-bottom:10px;
    159178    line-height: 16px;
     179}
     180
     181.pr-body{
     182    width: 300px;
     183}
     184
     185.pr-timeleft{
     186    width:40px;
     187}
     188
     189.pr-estimate{
     190    width:40px;
     191}
     192
     193.pr-status{
     194    width:300px;
     195    height: auto;
     196}
     197
     198.pr-author{
     199    width:300px;
     200}
     201
     202.pr-postcontent{
     203    width:300px;
    160204}
    161205
     
    184228.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
    185229
    186 .ui-widget { font-family: Arial, sans-serif; font-size: 12px; }
    187 .ui-widget .ui-widget { font-size: 12px; }
    188 .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 12px; }
     230.ui-widget { }
     231.ui-widget .ui-widget { }
     232.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { }
    189233.ui-widget-content { border: 1px solid #dddddd; background: #eeeeee 50% top repeat-x; color: #333333; }
    190234.ui-widget-content a { color: #333333; }
  • flowboard/trunk/flowboard.php

    r685379 r752882  
    44Plugin URI: http://plugins.flowcom.se/flowboard
    55Description: Web development tool, agile whiteboard with sticky notes. Your notes are posts in WP!
    6 Version: 1.5.5
     6Version: 1.6
    77Author: Flowcom AB, Andreas Ek
    88Author URI: http://www.flowcom.se
     
    1212include 'includes/ajax.php';
    1313include 'includes/note.php';
    14 //include 'includes/optionpage.php';
    1514include 'includes/main.php';
    1615include 'includes/shortcode.php';
     
    1817
    1918$flowboard_ajax = new FlowBoard_Ajax();
    20 //$flowboard_option = new FlowBoard_Option();
    2119$flowboard_main = new FlowBoard_Main();
    2220$flowboard_shortcode = new FlowBoard_Shortcode();
     
    3028}
    3129
     30function flowboard_activate() {
     31    flush_rewrite_rules();
     32}
     33register_activation_hook( __FILE__, 'flowboard_activate' );
    3234
     35function flowboard_deactivate() {
     36    flush_rewrite_rules();
     37}
     38register_deactivation_hook( __FILE__, 'flowboard_deactivate' );
    3339
    3440?>
  • flowboard/trunk/includes/ajax.php

    r677035 r752882  
    170170            $meta = json_decode($meta);
    171171            list( $l , $t , $z ) = explode('x', $meta->xyz);
    172             error_log($xyz);
    173             error_log($meta->xyz);
    174172            if ( $l == $left && $t == $top ) {
    175173                $moved = true;
  • flowboard/trunk/includes/main.php

    r685379 r752882  
    11<?php
    22
    3 class FlowBoard_Main{
     3class FlowBoard_Main
     4{
    45
    56    function __construct()
    67    {
    7         add_action('wp_print_styles', array(&$this, 'wp_print_styles'));
    8         add_action('init', array(&$this, 'init'));
    9         add_action('admin_init', array(&$this, 'admin_init'));
    10         add_action('admin_menu', array(&$this, 'remove_submenus'));
     8        add_action( 'wp_print_styles', array( &$this, 'wp_print_styles' ) );
     9        add_action( 'init', array( &$this, 'init' ) );
     10        add_action( 'admin_init', array( &$this, 'admin_init' ) );
     11        add_action( 'admin_menu', array( &$this, 'admin_menu' ) );
    1112        add_action( 'save_post', array( &$this, 'save_post' ) );
    1213        add_action( 'admin_enqueue_scripts', array( &$this, 'admin_enqueue_scripts' ) );
    13 
    14     }
    15 
    16     function save_post( $post_id ){
     14    }
     15
     16    function save_post( $post_id )
     17    {
    1718
    1819        global $post;
    1920
    20         if ($post->post_type == 'flowboard_note'){
    21             //Get intro text from the postback
    22             $board = esc_attr( $_POST['flowboard_board'] );
     21        if ( $post->post_type == 'flowboard_note' ) {
     22            $board = esc_attr( $_POST[ 'flowboard_board' ] );
    2323            update_post_meta( $post->ID, flowboard_metakey(), $board );
    2424        }
    2525
    26         if ($post->post_type == 'flowboard_board'){
    27 
    28             $z = $_POST['zone_ui_dynamic'];
    29             if (is_array($z)){
     26        if ( $post->post_type == 'flowboard_board' ) {
     27
     28            $z = $_POST[ 'zone_ui_dynamic' ];
     29            if ( is_array( $z ) ) {
    3030                foreach ( $z as $zone ) {
    31                     if ( ! empty( $zone ) ) $store_zones[] = $zone;
     31                    if ( !empty( $zone ) ) {
     32                        $store_zones[ ] = $zone;
     33                    }
    3234                }
    33             }
    34             else
    35             {
     35            } else {
    3636                $store_zones = FlowBoard_Board::default_zones();
    3737            }
    3838
    39             $meta['zones'] = $store_zones;
    40             if (!update_post_meta($post->ID, flowboard_metadata(), json_encode($meta)))
    41             {
    42                 add_post_meta($post->ID, flowboard_metadata(), json_encode($meta),true);
     39            $meta[ 'zones' ] = $store_zones;
     40            if ( !update_post_meta( $post->ID, flowboard_metadata(), json_encode( $meta ) ) ) {
     41                add_post_meta( $post->ID, flowboard_metadata(), json_encode( $meta ), true );
    4342            }
    4443        }
     
    4847    }
    4948
    50     function remove_submenus(){
     49    function admin_menu()
     50    {
     51        add_menu_page( 'Flowboard', 'Flowboard', 'edit_posts', 'flowboard', array( &$this, 'display_flowboard_page' ), plugins_url( 'flowboard/img/notes.png' ) );
     52
     53        // remove submenu 'add new'
    5154        global $submenu;
    52         unset($submenu['edit.php?post_type=flowboard_note'][10]); // Removes 'Add New'.
    53     }
    54 
    55     function admin_init(){
    56 
    57         add_meta_box( 'flowboard_board_zones', __( 'FlowBoard Zones', 'flowboard' ), array( &$this, 'show_zones' ), 'flowboard_board', 'normal', 'default' );
    58         add_meta_box( 'flowboard_note_board', __( 'Flowboard properties', 'flowboard' ), array( &$this, 'show_note_properties' ), 'flowboard_note', 'side', 'default' );
    59 
    60     }
    61 
    62     function admin_enqueue_scripts() {
    63 
    64         wp_enqueue_script(array('jquery', 'editor', 'thickbox', 'tinymce_editor' ));
     55        unset( $submenu[ 'edit.php?post_type=flowboard_note' ][ 10 ] ); // Removes 'Add New'.
     56    }
     57
     58    function admin_init()
     59    {
     60
     61        add_meta_box(
     62            'flowboard_board_zones', __( 'FlowBoard Zones', 'flowboard' ), array( &$this, 'show_zones' ),
     63            'flowboard_board', 'normal', 'default'
     64        );
     65        add_meta_box(
     66            'flowboard_note_board', __( 'Flowboard properties', 'flowboard' ), array( &$this, 'show_note_properties' ),
     67            'flowboard_note', 'side', 'default'
     68        );
     69
     70    }
     71
     72    function admin_enqueue_scripts()
     73    {
     74
     75        wp_enqueue_script( array( 'jquery', 'editor', 'thickbox', 'tinymce_editor' ) );
    6576
    6677        // Main jQuery
     
    7182    }
    7283
    73     function show_note_properties(){
     84    function show_note_properties()
     85    {
    7486        global $post;
    7587
    76         $board = get_post_meta($post->ID, flowboard_metakey(), true);
     88        $board = get_post_meta( $post->ID, flowboard_metakey(), true );
    7789
    7890        ?>
    79             <strong><?php _e('Board','flowboard'); ?>:</strong>
    80             (<a href="<?php echo admin_url('edit.php?post_type=flowboard_board'); ?>"><?php _e('manage boards here!','flowboard'); ?></a>)
    81             <select name="flowboard_board" id="flowboard_board">
    82                 <option value="0"><?php _e('--- choose assigned board ---','flowboard'); ?></option>
    83                 <?php
    84                 $args = array('post_type'=>'flowboard_board','numberposts'=>'-1');
    85                 $posts = get_posts($args);
    86                 foreach($posts as $p){
    87                     echo '<option value="'.$p->ID.'"';
    88                     if ($board == $p->ID) echo ' selected';
    89                     echo '>' . $p->post_title . '</option>' . "\r\n";
     91        <strong><?php _e( 'Board', 'flowboard' ); ?>:</strong>
     92        (<a href="<?php echo admin_url( 'edit.php?post_type=flowboard_board' ); ?>"><?php _e(
     93            'manage boards here!', 'flowboard'
     94        ); ?></a>)
     95        <select name="flowboard_board" id="flowboard_board">
     96            <option value="0"><?php _e( '--- choose assigned board ---', 'flowboard' ); ?></option>
     97            <?php
     98            $args = array( 'post_type' => 'flowboard_board', 'numberposts' => '-1' );
     99            $posts = get_posts( $args );
     100            foreach ( $posts as $p ) {
     101                echo '<option value="' . $p->ID . '"';
     102                if ( $board == $p->ID ) {
     103                    echo ' selected';
    90104                }
    91                 ?>
    92             </select>
     105                echo '>' . $p->post_title . '</option>' . "\r\n";
     106            }
     107            ?>
     108        </select>
    93109        </p>
    94110    <?php
    95111    }
    96112
    97     function show_zones(){
     113    function show_zones()
     114    {
    98115        global $post;
    99116
    100117        echo '<p>';
    101118
    102         $zones = FlowBoard_Board::get_zones($post->ID);
     119        $zones = FlowBoard_Board::get_zones( $post->ID );
    103120
    104121        ?>
    105122        <div class="flowboard_zones_control">
    106123
    107           <div style="margin-bottom: 4px;">
    108               <input type="button" class="button-secondary" value="<?php _e( 'Add', 'flowboard' ); ?>"
    109                      id="flowboard_zones_add" />
    110               <input type="button" class="button-secondary" value="<?php _e( 'Remove', 'flowboard' ); ?>"
    111                      id="flowboard_zones_remove" />
    112               <input type="button" class="button-secondary" value="<?php _e( 'Reset', 'flowboard' ); ?>"
    113                      id="flowboard_zones_reset" />
    114           </div>
    115 
    116           <div id="flowboard_zones_ui">
    117 
    118               <?php
    119               foreach ( $zones as $key => $z ) {
    120                   ?>
    121                   <div class="zone_ui_div">
    122                       <input type="text" class="text zone_ui_dynamic" name="zone_ui_dynamic[]"
    123                              value="<?php echo $z; ?>" />
    124                   </div>
    125                   <?php
    126               }
    127               ?>
    128 
    129           </div>
     124        <div style="margin-bottom: 4px;">
     125            <input type="button" class="button-secondary" value="<?php _e( 'Add', 'flowboard' ); ?>"
     126                   id="flowboard_zones_add"/>
     127            <input type="button" class="button-secondary" value="<?php _e( 'Remove', 'flowboard' ); ?>"
     128                   id="flowboard_zones_remove"/>
     129            <input type="button" class="button-secondary" value="<?php _e( 'Reset', 'flowboard' ); ?>"
     130                   id="flowboard_zones_reset"/>
     131        </div>
     132
     133        <div id="flowboard_zones_ui">
     134
     135            <?php
     136            foreach ( $zones as $key => $z ) {
     137                ?>
     138                <div class="zone_ui_div">
     139                    <input type="text" class="text zone_ui_dynamic" name="zone_ui_dynamic[]"
     140                           value="<?php echo $z; ?>"/>
     141                </div>
     142            <?php
     143            }
     144            ?>
     145
     146        </div>
    130147        <?php
    131148
     
    136153
    137154    /*Required stylesheets */
    138     function wp_print_styles() {
     155    function wp_print_styles()
     156    {
    139157        $myStyleUrl = WP_PLUGIN_URL . '/flowboard/styles.css';
    140158        $myStyleFile = WP_PLUGIN_DIR . '/flowboard/styles.css';
    141159
    142         if ( file_exists($myStyleFile) ) {
    143             wp_register_style('FlowBoardStyleSheets', $myStyleUrl);
    144             wp_enqueue_style( 'FlowBoardStyleSheets');
    145         }
    146     }
    147 
    148     function init() {
    149 
    150         register_post_type('flowboard_note', array( 'label' => 'Notes','description' => 'FlowBoard custom post types','public' => true,'show_ui' => true,'show_in_menu' => true,'capability_type' => 'post','hierarchical' => false,'rewrite' => array('slug' => ''),'query_var' => true,'exclude_from_search' => false,'supports' => array('title','editor','comments',),'labels' => array (
    151             'name' => 'Notes',
    152             'singular_name' => 'Note',
    153             'menu_name' => 'Notes',
    154             'add_new' => 'Add Note',
    155             'add_new_item' => 'Add New Note',
    156             'edit' => 'Edit',
    157             'edit_item' => 'Edit Note',
    158             'new_item' => 'New Note',
    159             'view' => 'View Note',
    160             'view_item' => 'View Note',
    161             'search_items' => 'Search Notes',
    162             'not_found' => 'No Notes Found',
    163             'not_found_in_trash' => 'No Notes Found in Trash',
    164             'parent' => 'Parent Note',
    165         ),) );
    166 
    167         register_post_type('flowboard_board', array(    'label' => 'Boards','description' => '','public' => false,'show_ui' => true,'show_in_menu' => 'edit.php?post_type=flowboard_note','capability_type' => 'post','hierarchical' => false,'rewrite' => array('slug' => ''),'query_var' => true,'exclude_from_search' => true,'supports' => array('title',),'labels' => array (
    168             'name' => 'Boards',
    169             'singular_name' => 'Board',
    170             'menu_name' => 'Boards',
    171             'add_new' => 'Add Board',
    172             'add_new_item' => 'Add New Board',
    173             'edit' => 'Edit',
    174             'edit_item' => 'Edit Board',
    175             'new_item' => 'New Board',
    176             'view' => 'View Board',
    177             'view_item' => 'View Board',
    178             'search_items' => 'Search Boards',
    179             'not_found' => 'No Boards Found',
    180             'not_found_in_trash' => 'No Boards Found in Trash',
    181             'parent' => 'Parent Board',
    182         ),) );
    183 
    184                 flush_rewrite_rules();
    185 
    186         if (!is_admin()) {
    187 
    188             //Kolla av nu om användaren har access alternativt om Public Access är aktiverat.
    189             $options = get_option('flowboard_plugin_options');
    190 
    191             if (current_user_can('edit_posts') || $options['public_access'])
    192             {
    193 
    194             }
    195         }
    196     }
    197 
     160        if ( file_exists( $myStyleFile ) ) {
     161            wp_register_style( 'FlowBoardStyleSheets', $myStyleUrl );
     162            wp_enqueue_style( 'FlowBoardStyleSheets' );
     163        }
     164    }
     165
     166    function init()
     167    {
     168
     169        register_post_type(
     170            'flowboard_note', array(
     171                'label' => 'Notes', 'description' => 'FlowBoard custom post types', 'public' => true, 'show_ui' => true,
     172                'show_in_menu' => 'flowboard', 'capability_type' => 'post', 'hierarchical' => false,
     173                'rewrite' => array( 'slug' => '' ), 'query_var' => true, 'exclude_from_search' => false,
     174                'supports' => array( 'title', 'editor', 'comments', ), 'labels' => array(
     175                    'name' => 'Notes',
     176                    'singular_name' => 'Note',
     177                    'menu_name' => 'Notes',
     178                    'add_new' => 'Add Note',
     179                    'add_new_item' => 'Add New Note',
     180                    'edit' => 'Edit',
     181                    'edit_item' => 'Edit Note',
     182                    'new_item' => 'New Note',
     183                    'view' => 'View Note',
     184                    'view_item' => 'View Note',
     185                    'search_items' => 'Search Notes',
     186                    'not_found' => 'No Notes Found',
     187                    'not_found_in_trash' => 'No Notes Found in Trash',
     188                    'parent' => 'Parent Note',
     189                ),
     190            )
     191        );
     192
     193        register_post_type(
     194            'flowboard_board', array(
     195                'label' => 'Boards', 'description' => '', 'public' => false, 'show_ui' => true,
     196                'show_in_menu' => 'flowboard', 'capability_type' => 'post',
     197                'hierarchical' => false, 'rewrite' => array( 'slug' => '' ), 'query_var' => true,
     198                'exclude_from_search' => true, 'supports' => array( 'title', ), 'labels' => array(
     199                    'name' => 'Boards',
     200                    'singular_name' => 'Board',
     201                    'menu_name' => 'Boards',
     202                    'add_new' => 'Add Board',
     203                    'add_new_item' => 'Add New Board',
     204                    'edit' => 'Edit',
     205                    'edit_item' => 'Edit Board',
     206                    'new_item' => 'New Board',
     207                    'view' => 'View Board',
     208                    'view_item' => 'View Board',
     209                    'search_items' => 'Search Boards',
     210                    'not_found' => 'No Boards Found',
     211                    'not_found_in_trash' => 'No Boards Found in Trash',
     212                    'parent' => 'Parent Board',
     213                ),
     214            )
     215        );
     216
     217        if ( !is_admin() ) {
     218            $options = get_option( 'flowboard_plugin_options' );
     219            if ( current_user_can( 'edit_posts' ) || $options[ 'public_access' ] ) {
     220                //TODO actions!
     221            }
     222        }
     223    }
     224
     225    function display_flowboard_page(){
     226    }
    198227
    199228}
  • flowboard/trunk/includes/shortcode.php

    r646305 r752882  
    133133    </div>
    134134
    135         <script language="javascript">
     135        <script>
    136136            function flowboardSetShortCode() {
    137137
  • flowboard/trunk/readme.txt

    r685379 r752882  
    33Tags: agile, tools, whiteboard, project management, sticky notes, kanban, scrum
    44Requires at least: 3.4
    5 Tested up to: 3.5.1
    6 Stable tag: 1.5.5
     5Tested up to: 3.6
     6Stable tag: 1.6
    77
    88FlowBoard makes it easier for web development to visualize the agile process.
     
    28281. Download the plugin
    29292. Activate the plugin through the 'Plugins' menu in WordPress
    30 3. Create a new board in wp-admin/Notes/Boards (just title is enough)
     303. Create a new board in wp-admin/Flowboard/Boards (just title is enough)
    31314. Open a post or a page and click the "note"-button to add a board to your page!
    3232
     
    4747
    4848== Changelog ==
     49
     50= 1.6 =
     51* Admin menu moved
     52* Flush rewrite rules made in plugin activate/deactivate
     53* Removed some error_log messages
     54*
    4955
    5056= 1.5.5 =
Note: See TracChangeset for help on using the changeset viewer.