Plugin Directory

Changeset 586927


Ignore:
Timestamp:
08/17/2012 06:16:01 PM (13 years ago)
Author:
jascott
Message:

0.1.8 Alpha

Location:
kickpress/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • kickpress/trunk/elements/class-datetime.php

    r583190 r586927  
    11<?php
    22
     3require_once dirname( __FILE__ ) . '/class-time.php';
     4
    35class kickpress_datetime extends kickpress_form_elements {
     6    public function __construct( $args = array() ) {
     7        parent::__construct( $args );
     8       
     9        wp_enqueue_style( 'jquery-ui-datepicker', plugins_url( 'kickpress/includes/css/ui.datepicker.css' ) );
     10        wp_enqueue_script( 'jquery-ui-datepicker' );
     11    }
     12   
    413    public function element($params) {
    514        // kickpress_auto_version('/css/ui.datepicker.css'
    6         wp_enqueue_style( 'jquery-ui-datepicker', plugins_url( 'kickpress/includes/css/ui.datepicker.css' ) );
    7         wp_enqueue_script( 'jquery-ui-datepicker' );
    8 
     15       
    916        $date_params = array();
     17       
    1018        if ( in_array( $params['caption'], array( 'Birthdate', 'Birthday' ) ) )
    1119            $date_params['yearRange'] = '-99:+00';
    1220       
    13         $hour_options   = array();
    14         $minute_options = array();
     21        $time = strtotime( $params['value'] );
    1522       
    16         for ( $i = 0; $i < 24; $i++ ) {
    17             $hour = sprintf( '%02d', $i );
    18             $hour_options[$hour] = sprintf( '%02d %s',
    19                 (($i + 11) % 12 + 1),
    20                 $i < 12 ? 'AM' : 'PM'
    21             );
     23        $hour_name   = 'hour_'   . $params['name'];
     24        $minute_name = 'minute_' . $params['name'];
     25       
     26        if ( 0 == $time ) {
     27            $date = '';
     28           
     29            $hour_value   = '00';
     30            $minute_value = '00';
     31        } else {
     32            $date = date( 'm/d/Y', $time );
     33           
     34            $hour_value   = date( 'H', $time );
     35            $minute_value = date( 'i', $time );
    2236        }
    2337       
    24         for ( $i = 0; $i < 60; $i += 15 ) {
    25             $minute = sprintf( '%02d', $i );
    26             $minute_options[$minute] = $minute;
    27         }
     38        $attr = $params['properties'];
     39        $attr['style'] = $this->style;
    2840       
    29         $time = strtotime( $params['value'] );
    30        
    31         if ( 0 == $time ) {
    32             $date   = '';
    33             $hour   = '00';
    34             $minute = '00';
    35         } else {
    36             $date   = date( 'm/d/Y', $time );
    37             $hour   = date( 'H',     $time );
    38             $minute = date( 'i',     $time );
    39         }
    40 
    41         $hour   = $this->simple_select( 'hour_'   . $params['name'], $hour,   $hour_options,   $params['properties'], $this->style );
    42         $minute = $this->simple_select( 'minute_' . $params['name'], $minute, $minute_options, $params['properties'], $this->style );
     41        $hour   = self::_html_select( $hour_name,   $hour_value,   kickpress_time::$hours,   $attr );
     42        $minute = self::_html_select( $minute_name, $minute_value, kickpress_time::$minutes, $attr );
    4343
    4444        $html = sprintf('
     
    7272        return $html;
    7373    }
     74   
     75    /* public function input( $params ) {
     76        $date_params = array();
     77       
     78        if ( in_array( $params['caption'], array( 'Birthdate', 'Birthday' ) ) )
     79            $date_params['yearRange'] = '-99:+00';
     80               
     81        '<input type="text" id="%1$s" name="%2$s" value="%3$s" class="datepicker%5$s"%6$s />
     82        %9$s
     83        %10$s
     84        <br class="grid-break" />
     85        <div>Format: (MM/DD/YYYY)</div>'
     86       
     87        $time = new kickpress_time()->input( $params );
     88    } */
    7489}
    7590
  • kickpress/trunk/elements/class-time.php

    r583190 r586927  
    1616        '15' => '15', '30' => '30', '45' => '45' );
    1717   
    18     public function element( $params ) {
     18    /* public function element( $params ) {
    1919        if ( ! isset( $params['value'] ) && ! strstr( $params['value'], ':') )
    2020            $params['value'] = isset( $_POST['selected_time'] )
     
    2222
    2323        $time = explode( ':', $params['value'] );
    24 
    25         //$properties = array("style"=>"width:70px");
    26         $hour = $this->simple_select( 'hour_' . $params['name'], $time[0],
    27             self::$hours, $params['properties'], $this->style );
    2824       
    29         //$properties = array("style"=>"width:50px");
    30         $minute = $this->simple_select( 'minute_' . $params['name'], $time[1],
    31             self::$minutes, $params['properties'], $this->style );
     25        $hour_name   = 'hour_'   . $params['name'];
     26        $minute_name = 'minute_' . $params['name'];
     27       
     28        $time = strtotime( $params['value'] );
     29       
     30        if ( 0 == $time ) {
     31            $date = '';
     32           
     33            $hour_value   = '00';
     34            $minute_value = '00';
     35        } else {
     36            $date = date( 'm/d/Y', $time );
     37           
     38            $hour_value   = date( 'H', $time );
     39            $minute_value = date( 'i', $time );
     40        }
     41       
     42        $attr = $params['properties'];
     43        $attr['style'] = $this->style;
     44       
     45        $hour   = self::_html_select( $hour_name,   $time[0], self::$hours,   $attr );
     46        $minute = self::_html_select( $minute_name, $time[1], self::$minutes, $attr );
    3247       
    3348        $html = sprintf('
     
    4964
    5065        return $html;
     66    } */
     67   
     68    public function input( $params ) {
     69        $hour_name   = 'hour_'   . $params['name'];
     70        $minute_name = 'minute_' . $params['name'];
     71       
     72        $time = strtotime( $params['value'] );
     73       
     74        if ( 0 == $time ) {
     75            $hour_value   = '00';
     76            $minute_value = '00';
     77        } else {
     78            $hour_value   = date( 'H', $time );
     79            $minute_value = date( 'i', $time );
     80        }
     81       
     82        $attr = $params['properties'];
     83        $attr['style'] = $this->style;
     84       
     85        $hour   = self::_html_select( $hour_name,
     86            $hour_value, self::$hours, $attr );
     87       
     88        $minute = self::_html_select( $minute_name,
     89            $minute_value, self::$minutes, $attr );
     90       
     91        return $hour . $minute;
    5192    }
    5293}
  • kickpress/trunk/kickpress-form-elements.php

    r584904 r586927  
    9595   
    9696    public function simple_select( $name, $value, $options = array(), $properties, $style = '', $first = '' ) {
    97         if ( ! is_array( $properties ) ) $properties = array();
    98        
    99         $properties['id']    = $name;
    100         $properties['name']  = $name;
    101         $properties['style'] = $style;
    102        
    10397        if ( ! empty( $first ) ) {
    104             $options[] = self::_html_tag( 'option', $first, array(
     98            $options = array( '' => $first ) + $option;
     99            /* $options[] = self::_html_tag( 'option', $first, array(
    105100                'value' => null
    106             ) );
    107         }
    108        
    109         foreach ( (array) $options as $set_value => $option ) {
     101            ) ); */
     102        }
     103       
     104        /* foreach ( (array) $options as $set_value => $option ) {
    110105            $options[] = self::_html_tag( 'option', $option, array(
    111106                'value'    => $set_value,
     
    114109        }
    115110       
    116         $options = implode( PHP_EOL, (array) $options );
    117        
    118         return self::_html_tag( 'select', $options, $properties );
     111        $options = implode( PHP_EOL, (array) $options ); */
     112       
     113        if ( ! is_array( $properties ) ) $properties = array();
     114       
     115        $properties['id']    = $name;
     116        $properties['style'] = $style;
     117       
     118        return self::_html_select( 'select', $value, $options, $properties );
    119119    }
    120120
     
    135135        $attr['class'] = $class;
    136136       
    137         return self::_html_select( $name, $options, $value, $attr );
     137        return self::_html_select( $name, $value, $options, $attr );
    138138    }
    139139   
     
    182182    }
    183183   
    184     protected static function _html_select( $name, $options = array(), $value = null, $attr = array() ) {
    185         foreach ( (array) $options as $opt_value => $opt_label ) {
     184    /**
     185     * Convenience method for generating select boxes
     186     */
     187    protected static function _html_select( $name, $value = null, $opts = array(), $attr = array() ) {
     188        foreach ( (array) $opts as $opt_value => $opt_label ) {
    186189            $opt_tags[] = self::_html_tag( 'option', $opt_label, array(
    187190                'value'    => $opt_value,
  • kickpress/trunk/kickpress.php

    r571417 r586927  
    44Plugin URI: http://kickpress.org/
    55Description: Allows for apps, themes, and APIs to be built using WordPress as a php framework
    6 Version: 0.1.7
     6Version: 0.1.8
    77Author: David S. Tufts
    88Author URI: http://kickpress.org
  • kickpress/trunk/readme.txt

    r543578 r586927  
    33Donate link: http://kickpress.org/
    44Tags: api, shortcodes, widgets, custom post types, php framework
    5 Requires at least: 3.3.2
    6 Tested up to: 3.3.2
    7 Stable tag: 0.1.7
     5Requires at least: 3.2
     6Tested up to: 3.4.1
     7Stable tag: 0.1.8
    88
    99KickPress turns your WordPress install into an API
     
    1111== Description ==
    1212
    13 This version is a beta pre-release, do not expect it to work yet.
     13This version is a beta pre-release, all functions and variables are subject to change without notice. Please report any issues to help make this a better product.
    1414
    15 This plugin addresses many features that WordPress does not have out-of-the-box but that are interrelated in some way
    16 and should be included in one plugin as these features need to play well together.  Here is a list of some
    17 features:
     15This plugin addresses many features that WordPress does not have out-of-the-box but that are interrelated in some way and should be included in one plugin as these features need to play well together. Here is a list of some features:
    1816
    19 1. Allows admins to create custom post types
    20 2. Turns your WordPress install into an public API
    21 3. comes with advanced filtering and searches
    22 4. Allows for view switching: e.g. For Events, "Day View", "Week View", "Month View", "List View"
     17**For Administrators**
    2318
    24 A few notes about the sections above:
     191. Allows for point-and-click post type management
     202. Adds user roles and capabilities control
     213. Adds content publication workflow
    2522
    26 *   "Contributors" is a comma separated list of wp.org/wp-plugins.org usernames
    27 *   "Tags" is a comma separated list of tags that apply to the plugin
    28 *   "Requires at least" is the lowest version that the plugin will work on
    29 *   "Tested up to" is the highest version that you've *successfully used to test the plugin*. Note that it might work on
    30 higher versions... this is just the highest one you've verified.
    31 *   Stable tag should indicate the Subversion "tag" of the latest stable version, or "trunk," if you use `/trunk/` for
    32 stable.
     23**For Designers**
    3324
    34     Note that the `readme.txt` of the stable tag is the one that is considered the defining one for the plugin, so
    35 if the `/trunk/readme.txt` file says that the stable tag is `4.3`, then it is `/tags/4.3/readme.txt` that'll be used
    36 for displaying information about the plugin.  In this situation, the only thing considered from the trunk `readme.txt`
    37 is the stable tag pointer.  Thus, if you develop in trunk, you can update the trunk `readme.txt` to reflect changes in
    38 your in-development version, without having that information incorrectly disclosed about the current stable version
    39 that lacks those changes -- as long as the trunk's `readme.txt` points to the correct stable tag.
     251. Has an expanded multi-view template architecture, e.g. For Events, "Day View", "Week View", "Month View", "List View"
     262. Adds robust navigation, pagination, and taxonomy widgets
     273. Adds advanced filtering and sorting
    4028
    41     If no stable tag is provided, it is assumed that trunk is stable, but you should specify "trunk" if that's where
    42 you put the stable version, in order to eliminate any doubt.
     29**For Developers**
     30
     311. Uses session-based data storage
     322. Has object relationships (a la group-members, user-favorites, etc)
     333. Turns your WordPress install into an public API
     34
     35* Uses a pseudo-ReSTful API to WordPress
     36* OpenID-style authentication
     37* Object-oriented resource controllers (post type modules)
     38* Post meta-types: people, items, locations, events
    4339
    4440== Installation ==
    4541
    46 This section describes how to install the plugin and get it working.
    47 
    48 e.g.
    49 
    50421. Upload the `kickpress` folder to the `/wp-content/plugins/` directory
    51432. Activate the plugin through the 'Plugins' menu in WordPress
    52 3. Place `<?php do_action('plugin_name_hook'); ?>` in your templates
    53 
    54 == Frequently Asked Questions ==
    55 
    56 = A question that someone might have =
    57 
    58 An answer to that question.
    5944
    6045== Screenshots ==
    6146
    62 1. This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from
    63 the directory of the stable readme.txt, so in this case, `/tags/4.3/screenshot-1.png` (or jpg, jpeg, gif)
    64 2. This is the second screen shot
     471. Adding new Post Types through the WordPress admin interface.
    6548
    6649== Changelog ==
    6750
     51= 0.1.8 =
     52* Added entensible form elements
     53* Added activating/deactivating of modules
     54* Added admin interface for managin custom taxonomies
     55* Expanded capabilities of URL filtering
     56= 0.1.7 =
     57* Added front end image uploads for post thumbnails
     58* Fixed some bugs
     59= 0.1.6 =
     60* Fixed issue with permissions
     61* Added the wysiwyg editor as a form element with calls the internal WordPress wp_editor
     62= 0.1.5 =
     63* Added JSON API responses for remote api calls
     64* Added Roles and Capabilities
     65* Added Workfklows
     66* General code cleanup
     67= 0.1.4 =
     68* Fixed issues with Adding new custom post types and a fatal error
     69* General code cleanup
     70= 0.1.3 =
     71* Cleaned up API authentication
     72* General code cleanup
     73= 0.1.2 =
     74* Added API authentication for remote access through the KickPress API by means of a token, signature, and timestamp
     75* General code cleanup
     76* Switched directory name back from 'components' to 'modules' for the directory that holds files that extend the API
     77= 0.1.1 =
     78* Fixed issue with errors when no custom post types exist
     79* Fixed issue with permalinks not working with newly registered post types
     80* Added rule to only allow users with permissions to edit options to create custom post types
    6881= 0.1 =
    6982* First upload to WordPress Plugin SVN.
    70 
    71 == Upgrade Notice ==
    72 
    73 = 0.1 =
    74 This is the first version of this plugin.
    75 
    76 == Arbitrary section ==
    77 
    78 This plugin addresses many features that WordPress does not have out-of-the-box but that are interrelated in some way
    79 and should be included in one plugin as these features need to play well together.  Here is a complete list of these
    80 features:
    81 
    82 == A brief Markdown Example ==
    83 
    84 Ordered list:
    85 
    86 1. Some feature
    87 2. Another feature
    88 3. Something else about the plugin
    89 
    90 Unordered list:
    91 
    92 * something
    93 * something else
    94 * third thing
    95 
    96 Here's a link to [WordPress](http://wordpress.org/ "Your favorite software") and one to [Markdown's Syntax Documentation][markdown syntax].
    97 Titles are optional, naturally.
    98 
    99 [markdown syntax]: http://daringfireball.net/projects/markdown/syntax
    100             "Markdown is what the parser uses to process much of the readme file"
    101 
    102 Markdown uses email style notation for blockquotes and I've been told:
    103 > Asterisks for *emphasis*. Double it up  for **strong**.
    104 
    105 `<?php code(); // goes in backticks ?>`
Note: See TracChangeset for help on using the changeset viewer.