Plugin Directory

Changeset 368060


Ignore:
Timestamp:
04/02/2011 03:23:01 AM (15 years ago)
Author:
kunalb
Message:

Trunk for 0.1.2.4

Location:
eventpress/trunk
Files:
82 added
17 edited

Legend:

Unmodified
Added
Removed
  • eventpress/trunk/controllers/bp.php

    r296624 r368060  
    5959        //Register users controller
    6060        add_action( 'bpcp_ep_event_controller_single_register', Array( &$this, 'register_user' ) );
     61
     62        //Unregister users controller
     63        add_action( 'bpcp_ep_event_controller_single_unregister', Array( &$this, 'unregister_user' ) );
    6164
    6265        //Register the member directory and invites directory for the event page
     
    136139
    137140    /**
     141     * Function called when a user tries to unregister in BuddyPress.
     142     *
     143     * This is more or less a BuddyPress-ized replica of register.php from
     144     * the WordPress version.
     145     * Does not generate any activity at the moment.
     146     *
     147     * @since 0.1
     148     *
     149     * @uses $post
     150     * @uses $ep_models
     151     */
     152    function unregister_user() {
     153        global $post, $ep_models, $ep_views;
     154       
     155        $userid = bp_loggedin_user_id();
     156        $eventid = $post->ID;
     157
     158        if ( $eventid == null || $eventid == 0 )
     159            bp_core_add_message( __("This event doesn't exist.", "eventpress") );
     160   
     161        if ( $userid == 0 ) {
     162            bp_core_add_message( __("You must be logged in to unregister.", "eventpress") );
     163            bp_core_redirect( wp_get_referer() );
     164        }
     165   
     166        $event = $ep_models['events']->registration_status( $eventid );
     167
     168        if ( $event['status'] != 'open' ) {
     169            bp_core_add_message( __( "Cannot unregister for this event." ) );
     170            bp_core_redirect( wp_get_referer() );
     171        }
     172
     173
     174        do_action( 'ep_bp_user_unregister' );
     175        $result = $ep_models['registration']->unregister( Array( 'userid' => $userid, 'eventid' => $eventid ) );
     176
     177        if( $result ) {
     178            do_action( 'ep_bp_user_unregister_success' );
     179            bp_core_add_message( __("You have been succesfully unregistered.", "eventpress") );
     180        } else {
     181            do_action( 'ep_bp_user_unregister_failure' );
     182            bp_core_add_message( __("You could not be unregistered.", "eventpress") );
     183        }
     184
     185        bp_core_redirect( wp_get_referer() );
     186
     187    }
     188
     189    /**
    138190     * Function called when a user tries to register in BuddyPress.
    139191     *
  • eventpress/trunk/controllers/main.php

    r280350 r368060  
    6565 */
    6666require EP_DIR . '/views/kb-loop.php';
     67
     68/**
     69 * Calendar class definition, used to generate calendars anywhere.
     70 *
     71 * In other words, abstracted loopiness.
     72 */
     73require EP_DIR . '/views/ep-calendar.php';
    6774
    6875/**
  • eventpress/trunk/controllers/register.php

    r280350 r368060  
    2929//Invalid user
    3030if ( !isset( $current_user ) || !$current_user )
    31     wp_die( __( "Must be logged in to register for an event.", 'eventpress' ) );
     31    wp_die( __( "Must be logged in to register/unregister for an event.", 'eventpress' ) );
    3232
    3333global $ep_models;
  • eventpress/trunk/controllers/wp.php

    r308066 r368060  
    6868        //Add the init action to init if we're in the admin
    6969        if ( is_admin() )
    70             add_action( 'init', array( 'ep_admin_menus', 'init' ) );
     70            add_action( 'init', array( 'ep_admin_view', 'init' ) );
    7171
    7272        //Modify the page templates array
     
    100100    function register_widgets() {
    101101        register_widget( 'EP_Upcoming_Events' );
    102         register_widget( 'EP_Calendar' );
     102        register_widget( 'EP_Calendar_Widget' );
    103103    }
    104104
     
    236236
    237237            //Actions for bulk editing the registrations
    238             if( isset( $_POST['ep-regs']['ids'] ) ) {
    239                 switch( $_POST['ep-regs']['bulk'] ) {
     238            if( isset( $_POST['ep-reg-bulk']['post'] ) ) {
     239                switch( $_POST['ep-reg-bulk']['action'] ) {
     240                    case '0':
    240241                    case 'approve':
    241                         do_action( 'ep_approve_regs', $_POST['ep-regs']['ids'] );
    242                         foreach( $_POST['ep-regs']['ids'] as $id )
     242                        do_action( 'ep_approve_regs', $_POST['ep-reg-bulk']['post'] );
     243                        foreach( $_POST['ep-reg-bulk']['post'] as $id )
    243244                            $ep_models['registration']->approve( $id );
    244245                        break;
     246                    case '1':
    245247                    case 'cancel':
    246                         do_action( 'ep_cancel_regs', $_POST['ep-regs']['ids'] );
    247                         foreach( $_POST['ep-regs']['ids'] as $id )
     248                        do_action( 'ep_cancel_regs', $_POST['ep-reg-bulk']['post'] );
     249                        foreach( $_POST['ep-reg-bulk']['post'] as $id )
     250                            $ep_models['registration']->cancel( $id );
     251                        break;
     252                }
     253                switch( $_POST['ep-reg-bulk']['action2'] ) {
     254                    case '0':
     255                    case 'approve':
     256                        do_action( 'ep_approve_regs', $_POST['ep-reg-bulk']['post'] );
     257                        foreach( $_POST['ep-reg-bulk']['post'] as $id )
     258                            $ep_models['registration']->approve( $id );
     259                        break;
     260                    case '1':
     261                    case 'cancel':
     262                        do_action( 'ep_cancel_regs', $_POST['ep-reg-bulk']['post'] );
     263                        foreach( $_POST['ep-reg-bulk']['post'] as $id )
    248264                            $ep_models['registration']->cancel( $id );
    249265                        break;
    250266                }
    251267            }
    252             unset( $_POST['ep-regs'] );
     268            unset( $_POST['ep-reg-bulk'] );
    253269            //Cleanup to avoid an infinite loop
    254270
     
    362378        //Register translation support
    363379        load_plugin_textdomain( 'eventpress', false, basename( EP_DIR ) . '/lang' );
     380
     381        //Register the shortcodes
     382        add_shortcode( 'ep-calendar', 'ep_calendar' );
    364383    }
    365384
     
    517536        kb_extend_caps( $ep_models['events']->extend_capabilities() );
    518537        kb_extend_caps( $ep_models['registration']->extend_capabilities() );
    519 
    520         //Create the custom pages
    521         ep_event_model::make_pages();
    522538
    523539        //Add hook to flush permalinks
  • eventpress/trunk/eventpress.php

    r308066 r368060  
    33    Plugin Name: EventPress
    44    Plugin URI: http://code.google.com/p/eventpress/
    5     Description: A BuddyPress aware events plugin for WordPress. See more details, raise issues and contribute at <a href = 'http://code.google.com/p/eventpress/'>http://code.google.com/p/eventpress/</a>.
    6     Version: 0.1.2.3
     5    Description: A BuddyPress aware events plugin for WordPress. See more details, raise issues and contribute at <a href = 'http://goo.gl/8lN4v'>http://code.google.com/p/eventpress/</a>.
     6    Version: 0.1.2.4
    77    Author: Kunal Bhalla.
    88    Author URI: http://kunal-b.in
  • eventpress/trunk/eventpress.pot

    r308066 r368060  
    1 # Translation of the WordPress plugin EventPress 0.1.2.3 by Kunal Bhalla..
    2 # Copyright (C) 2010 Kunal Bhalla.
     1# Translation of the WordPress plugin EventPress 0.2-bleeding by Kunal Bhalla..
     2# Copyright (C) 2011 Kunal Bhalla.
    33# This file is distributed under the same license as the EventPress package.
    4 # FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
     4# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
    55#
    66#, fuzzy
    77msgid ""
    88msgstr ""
    9 "Project-Id-Version: EventPress 0.1.2.3\n"
     9"Project-Id-Version: EventPress 0.2-bleeding\n"
    1010"Report-Msgid-Bugs-To: http://wordpress.org/tag/eventpress\n"
    11 "POT-Creation-Date: 2010-11-05 14:56+0530\n"
    12 "PO-Revision-Date: 2010-MO-DA HO:MI+ZONE\n"
     11"POT-Creation-Date: 2011-01-14 18:50+0530\n"
     12"PO-Revision-Date: 2011-MO-DA HO:MI+ZONE\n"
    1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    1414"Language-Team: LANGUAGE <[email protected]>\n"
     
    293293msgstr ""
    294294
    295 #: models/events.php:167 views/admin.php:496 views/admin.php:556
     295#: models/events.php:167 views/admin.php:503 views/admin.php:563
    296296msgid "Event"
    297297msgstr ""
     
    677677
    678678#: themes/wp/loop-event.php:50 themes/wp/single-event.php:55
    679 #: views/admin.php:522
     679#: views/admin.php:529
    680680msgid "Edit"
    681681msgstr ""
     
    705705msgstr ""
    706706
    707 #: views/admin.php:87
     707#: views/admin.php:21
    708708msgid "<p>The format of the event's starting date cannot be recognized!</p>"
    709709msgstr ""
    710710
    711 #: views/admin.php:88
     711#: views/admin.php:22
    712712msgid "<p>The format of the event's ending date cannot be recognized!</p>"
    713713msgstr ""
    714714
    715 #: views/admin.php:89
     715#: views/admin.php:23
    716716msgid "<p>This event's end date has been set before the start date!</p>"
    717717msgstr ""
    718718
    719 #: views/admin.php:90
     719#: views/admin.php:24
    720720msgid "<p>The format of the registration start date cannot be recognized!</p>"
    721721msgstr ""
    722722
    723 #: views/admin.php:91
     723#: views/admin.php:25
    724724msgid "<p>The format of the registration stop date cannot be recognized!</p>"
    725725msgstr ""
    726726
    727 #: views/admin.php:92
     727#: views/admin.php:26
    728728msgid "<p>The registration stop date has been set before the start date!</p>"
    729729msgstr ""
    730730
    731 #: views/admin.php:93
     731#: views/admin.php:27
    732732msgid "<p>Registration starts after the event is over!</p>"
    733733msgstr ""
    734734
    735 #: views/admin.php:94
     735#: views/admin.php:28
    736736msgid "<p>Please enter a valid registration limit!</p>"
    737737msgstr ""
    738738
    739 #: views/admin.php:151
     739#: views/admin.php:172
    740740msgid "JavaScript must be enabled for this feature to work."
    741741msgstr ""
    742742
    743 #: views/admin.php:158
     743#: views/admin.php:179
    744744msgid "Display Map?"
    745745msgstr ""
    746746
    747 #: views/admin.php:161
     747#: views/admin.php:182
    748748msgid "(Changing the venue will automatically update the map.)"
    749749msgstr ""
    750750
    751 #: views/admin.php:207
     751#: views/admin.php:228
    752752msgid "Label"
    753753msgstr ""
    754754
    755 #: views/admin.php:208
     755#: views/admin.php:229
    756756msgid "Textbox"
    757757msgstr ""
    758758
    759 #: views/admin.php:209
     759#: views/admin.php:230
    760760msgid "Checkbox"
    761761msgstr ""
    762762
    763 #: views/admin.php:210
     763#: views/admin.php:231
    764764msgid "Textarea"
    765765msgstr ""
    766766
    767 #: views/admin.php:211
     767#: views/admin.php:232
    768768msgid "Description"
    769769msgstr ""
    770770
    771 #: views/admin.php:212
     771#: views/admin.php:233
    772772msgid "Type"
    773773msgstr ""
    774774
    775 #: views/admin.php:213
     775#: views/admin.php:234
    776776msgid "Default Value"
    777777msgstr ""
    778778
    779 #: views/admin.php:214
     779#: views/admin.php:235
    780780msgid "Validation"
    781781msgstr ""
    782782
    783 #: views/admin.php:215
     783#: views/admin.php:236
    784784msgid "None"
    785785msgstr ""
    786786
    787 #: views/admin.php:216
     787#: views/admin.php:237
    788788msgid "Number"
    789789msgstr ""
    790790
    791 #: views/admin.php:217
     791#: views/admin.php:238
    792792msgid "Alphanumeric"
    793793msgstr ""
    794794
    795 #: views/admin.php:218
     795#: views/admin.php:239
    796796msgid "Email"
    797797msgstr ""
    798798
    799 #: views/admin.php:219
     799#: views/admin.php:240
    800800msgid "Other"
    801801msgstr ""
    802802
    803 #: views/admin.php:220
     803#: views/admin.php:241
    804804msgid "Regular Expression"
    805805msgstr ""
    806806
    807 #: views/admin.php:221
     807#: views/admin.php:242
    808808msgid "Delete this field"
    809809msgstr ""
    810810
    811 #: views/admin.php:273
     811#: views/admin.php:294
    812812msgid "Add a new field"
    813813msgstr ""
    814814
    815 #: views/admin.php:288
     815#: views/admin.php:309
    816816msgid "When does the event start?"
    817817msgstr ""
    818818
    819 #: views/admin.php:304
     819#: views/admin.php:325
    820820msgid "When does the event end?"
    821821msgstr ""
    822822
    823 #: views/admin.php:319
     823#: views/admin.php:340
    824824msgid "Where will it be held?"
    825825msgstr ""
    826826
    827 #: views/admin.php:335
     827#: views/admin.php:356
    828828msgid "Registration opens at?"
    829829msgstr ""
    830830
    831 #: views/admin.php:351
     831#: views/admin.php:372
    832832msgid "Registration closes at?"
    833833msgstr ""
    834834
    835 #: views/admin.php:366
     835#: views/admin.php:387
    836836msgid "Maximum number of attendees?"
    837837msgstr ""
    838838
    839 #: views/admin.php:383
     839#: views/admin.php:404
    840840msgid "Approve registrations automatically?"
    841841msgstr ""
    842842
    843 #: views/admin.php:475
    844 msgid "Events Options"
    845 msgstr ""
    846 
    847 #: views/admin.php:497
     843#: views/admin.php:504
    848844msgid "Registered User"
    849845msgstr ""
    850846
    851 #: views/admin.php:498
     847#: views/admin.php:505
    852848msgid "Time"
    853849msgstr ""
    854850
    855 #: views/admin.php:499
     851#: views/admin.php:506
    856852msgid "Status"
    857853msgstr ""
    858854
    859 #: views/admin.php:522
     855#: views/admin.php:529
    860856msgid "Edit this page"
    861857msgstr ""
    862858
    863 #: views/admin.php:523
     859#: views/admin.php:530
    864860msgid "Approve this registration."
    865861msgstr ""
    866862
    867 #: views/admin.php:523 views/admin.php:673
     863#: views/admin.php:530 views/admin.php:680
    868864msgid "Approve"
    869865msgstr ""
    870866
    871 #: views/admin.php:524
     867#: views/admin.php:531
    872868msgid "Cancel this registration."
    873869msgstr ""
    874870
    875 #: views/admin.php:524 views/admin.php:674
     871#: views/admin.php:531 views/admin.php:681
    876872msgid "Cancel"
    877873msgstr ""
    878874
    879 #: views/admin.php:557
     875#: views/admin.php:564
    880876msgid "Author"
    881877msgstr ""
    882878
    883 #: views/admin.php:558
     879#: views/admin.php:565
    884880msgid "Registrations (Pending, Cancelled)"
    885881msgstr ""
    886882
    887 #: views/admin.php:559
     883#: views/admin.php:566
    888884msgid "Starts"
    889885msgstr ""
    890886
    891 #: views/admin.php:560
     887#: views/admin.php:567
    892888msgid "Ends"
    893889msgstr ""
    894890
    895 #: views/admin.php:662
     891#: views/admin.php:669
    896892msgid "No registrations yet."
    897893msgstr ""
    898894
    899 #: views/admin.php:672
     895#: views/admin.php:679
    900896msgid "Bulk Actions"
    901897msgstr ""
    902898
    903 #: views/admin.php:677
     899#: views/admin.php:684
    904900msgid "Apply"
    905901msgstr ""
    906902
    907 #: views/admin.php:679
     903#: views/admin.php:686
    908904msgid "Export as .csv"
    909905msgstr ""
    910906
    911 #: views/admin.php:738
     907#: views/admin.php:745
    912908msgid "Repeat this event every"
    913909msgstr ""
    914910
    915 #: views/admin.php:741
     911#: views/admin.php:748
    916912msgid "days"
    917913msgstr ""
    918914
    919 #: views/admin.php:742
     915#: views/admin.php:749
    920916msgid "weeks"
    921917msgstr ""
    922918
    923 #: views/admin.php:743
     919#: views/admin.php:750
    924920msgid "months"
    925921msgstr ""
    926922
    927 #: views/admin.php:744
     923#: views/admin.php:751
    928924msgid "years"
    929925msgstr ""
    930926
    931 #: views/admin.php:745
     927#: views/admin.php:752
    932928msgid "hours"
    933929msgstr ""
    934930
    935 #: views/admin.php:746
     931#: views/admin.php:753
    936932msgctxt "continuing from \"Repeat this event every x units _until_\""
    937933msgid "until"
    938934msgstr ""
    939935
    940 #: views/admin.php:757
     936#: views/admin.php:764
    941937msgid ""
    942938"Please install the plugin <a href ='http://wordpress.org/extend/plugins/"
  • eventpress/trunk/models/events.php

    r308066 r368060  
    467467
    468468    /**
    469      * Creates the calendar list and event list pages.
    470      *
    471      * Called on plugin initialization.
    472      *
    473      * @since 0.1
    474      */
    475     function make_pages() {
    476         //The calendar view
    477         $calendar_page = wp_insert_post( Array(
    478             'post_status' => 'draft',
    479             'post_type' => 'page',
    480             'post_content_filtered' => '',
    481             'post_name' => 'events-calendar',
    482             'post_title' => __( 'Events Calendar', 'eventpress' )
    483         ) );
    484 
    485         add_post_meta( $calendar_page, '_wp_page_template', 'events_calendar.php' );
    486 
    487         //The loop view
    488         $list_page = wp_insert_post( Array(
    489             'post_status' => 'draft',
    490             'post_type' => 'page',
    491             'post_content_filtered' => '',
    492             'post_name' => 'events-list',
    493             'post_title' => __( 'Events List', 'eventpress' )
    494             ) );
    495 
    496         add_post_meta( $list_page, '_wp_page_template', 'events_list.php' );
    497     }
    498 
    499     /**
    500      * Removes the pages created for events display.
    501      *
    502      * Called on plugin deactivation.
    503      *
    504      * @since 3.1
    505      */
    506     function delete_pages() {
    507 
    508         $pages = Array(
    509             get_page_by_path( 'events-list' ),
    510             get_page_by_path( 'events-calendar' )
    511         );
    512 
    513         foreach( $pages as $page )
    514             wp_delete_post( $page->ID );
    515 
    516     }
    517 
    518     /**
    519469     * Filter function for adding the custom part to the query.
    520470     *
  • eventpress/trunk/models/registration.php

    r296624 r368060  
    230230     *  userid Which user
    231231     *  eventid which event
    232      8  approved Approved registration?
     232     *  approved Approved registration?
    233233     *
    234234     * @param Array $args 
     
    280280
    281281        return $postid;
     282    }
     283
     284    /**
     285     * Unregister a user.
     286     *
     287     * Accepts arguments:
     288     *  userid Which user
     289     *  eventid which event
     290     *  approved Approved registration?
     291     *
     292     * @param Array $args 
     293     *
     294     * @since 0.1
     295     */
     296    function unregister( $args ) {
     297        global $ep_models;
     298       
     299        $defaults = Array(
     300            'userid' => 0,
     301            'eventid' => 0,
     302            'data' => Array()
     303        );
     304        extract( wp_parse_args( $args, $defaults ) );
     305
     306        $posts = query_posts( Array( 'post_parent' => $eventid, 'post_type' => 'ep_reg', 'post_author' => $userid ) );
     307
     308        if( isset( $posts[0] ) ) {
     309            wp_delete_post( $posts[0]->ID );
     310            return true;
     311        }
     312
     313        return false;
    282314    }
    283315
  • eventpress/trunk/mods/kb_utilities.php

    r280350 r368060  
    2121}
    2222
     23/**
     24 * Remove capabilities to arrays specified as:
     25 * Array(
     26 *  'type' => Array( 'cap1', 'cap2', ... )
     27 * )
     28 */
    2329function kb_remove_caps( $extend ) {
    2430    global $wp_roles;
     
    3137}
    3238
     39/**
     40 * Used to handle passing errors to be displayed on the final page in admin.
     41 */
    3342class kb_errors {
    3443    var $error_codes;
     
    7786    }
    7887}
     88
     89/**
     90 * Returns .dev when SCRIPT_DEBUG is enabled.
     91 */
     92if( !function_exists( 'kb_ext' ) ) {
     93    function kb_ext() {
     94        /* TODO Make this function behave as described once minification has been completed. */
     95        return ".dev";
     96
     97    /*
     98        if( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG )
     99            return ".dev";
     100
     101        return "";
     102    */
     103    }
     104}
  • eventpress/trunk/readme.txt

    r308066 r368060  
    22Contributors: kunalb
    33Tags: Events Management, Registration, Events Calendar, BuddyPress
    4 Requires at least: 3.0.0
    5 Tested up to: 3.0.1
    6 Stable tag: 0.1.2.3
     4Requires at least: WordPress 3.1, BuddyPress 1.2.8
     5Tested up to: 3.1
     6Stable tag: 0.1.2.4
    77
    8 A buddypress aware events plugin for WordPress.
     8Create Events on WordPress and BuddyPress!
    99
    1010== Description ==
    1111
    12 Project details, feature requests, the latest builds -- all available at <a href = 'http://code.google.com/p/eventpress/'>http://code.google.com/p/eventpress/</a>.
     12Create events on plain vanilla WordPress installs or on a BuddyPress install! EventPress provides support for creating & registering for events, setting venues, displaying a map, calendar, etc.
     13
     14Project details, feature requests, the latest builds -- all available at <a href = 'http://goo.gl/8lN4v'>http://code.google.com/p/eventpress/</a>.
    1315
    1416== Installation ==
     
    1921Note: For this plugin to work properly in BuddyPress, you need to install BuddyPress Custom Posts.
    2022
     23== Features ==
     24* Create Events—fully integrated with WordPress; on BuddyPress users can create events with a fully functional UI from the front end itself.
     25
    2126== Frequently Asked Questions ==
    22 
    23 = How do I add a list of all events? =
    24 For an events list, if you don't have pretty permalinks http://myurl.com/?post_type=ep_event or if you do have pretty permalinks http://myurl.com/events/ will display a complete list of the events (in WordPress). BuddyPress gets its own Events Directory by default. A page is also created automatically for a calendar and an events list, but not published by default. So you can publish those pages if you want to be able to add them to the menu by default.
    2527
    2628= Subscribers can't create events. =
    2729If you want the capabilities for users to create events, upgrade them to event creators.
    28 
    29 = The events page doesn't appear to load. ==
    30 Try re-saving the permalinks once to update the structure.
    3130
    3231= Why? =
     
    3433
    3534== Changelog ==
     35
     36= 0.1.2.4 =
     37 * Can now use short-tag ep-calendar.
     38 * Compatible with WP3.1.
    3639
    3740= 0.1.2.3 =
  • eventpress/trunk/themes/bp/page-events-calendar.php

    r280350 r368060  
    44*/
    55
    6 wp_enqueue_style( 'ep-calendar-style', EP_REL_URL . '/themes/bp/assets/css/calendar.css' );
     6wp_enqueue_style( 'ep-calendar-style', EP_REL_URL . '/themes/bp/assets/css/calendar' . kb_ext() . '.css' );
    77
    88?>
  • eventpress/trunk/themes/bp/registered.php

    r280350 r368060  
    33    <ul id="member-list" class="item-list">
    44        <?php while ( ep_have_registrants() ) : ep_the_registrant(); ?>
    5 
    6             <li>
    7                 <a href="<?php ep_registrant_domain() ?>">
     5            <li class="member">
     6                    <div class="item-avatar"><a href="<?php ep_registrant_domain() ?>">
    87                    <?php ep_registrant_avatar_thumb() ?>
    98                </a>
     9            </div>
     10            <div class="item">
     11                <div class="item-title">
    1012                <h5><a href = '<?php ep_registrant_domain(); ?>'><?php ep_the_author(); ?></a></h5>
    11                 <span class="activity"><?php ep_registered_since() ?></span>
     13                </div>
     14                <div class="item-meta"><span class="activity"><?php ep_registered_since() ?></span></div>
     15            </div>
    1216            </li>
    13 
    1417        <?php endwhile; ?>
    15 
    1618    </ul>
    1719
     
    1921
    2022    <div id="message" class="info">
    21         <p><?php _e( 'No one has registered yet.', 'buddypress' ); ?></p>
     23        <p><?php _e( 'No one has registered yet.', 'eventpress' ); ?></p>
    2224    </div>
    2325
  • eventpress/trunk/themes/wp/assets/css/calendar.css

    r308066 r368060  
    1 #container, #content {
    2     margin: 0;
    3 }
    4 
    5 table#ep-cal {
    6     border: solid 1px #eee;
    7     width: 98%;
    8     margin: 10px 1% 20px 1%;
    9     border-collapse: separate;
    10 }
    11 
    12 table#ep-cal th {
    13     background-color: #000;
    14     color: #fff;
    15     text-align: center;
    16     text-transform: uppercase;
    17 }
    18 
    19 #ep-cal tr {
    20     vertical-align: top;
    21 }
    22 
    23 #ep-cal tr td {
    24     background-color: #fefefe;
    25     border: solid 1px #eee;
    26     padding: 0 0 20px 0;
    27     width: 14%;
    28     vertical-align: top;
    29 }
    30 
    31 .ep-event-title {
    32     text-decoration: none;
    33 }
    34 
    35 .ep-date-title {
    36     background-color: #f5f5f5;
    37     color: #111;
    38     text-align: right;
    39     display: block;
    40     padding: 5px 20px 5px 0;
    41 }
  • eventpress/trunk/views/admin.php

    r296624 r368060  
    33define( 'EP_DATE_FORMAT', 'm/d/Y' );
    44define( 'EP_TIME_FORMAT', 'H:i' );
    5 
    6 /**
    7  * Class responsible for adding some extra pizzazz to the custom post types
    8  *
    9  * @author John James Jacoby
    10  * @since 0.1
    11  */
    12 class ep_admin_menus {
    13 
    14     /**
    15      * Add the menu creation functions to run with admin.
    16      *
    17      * @since 0.1
    18      */
    19     function init () {
    20         add_action ( 'admin_head', array( 'ep_admin_menus', 'admin_head' ) );
    21         add_action ( 'admin_menu', array( 'ep_admin_menus', 'admin_separator' ) );
    22     }
    23    
    24     /**
    25      * The CSS Required to style these.
    26      *
    27      * @since 0.1
    28      */
    29     function admin_head () {
    30         $event_icon_url     = EP_REL_URL . '/themes/admin/assets/images/admin-icon-events.png';
    31         $register_icon_url  = EP_REL_URL . '/themes/admin/assets/images/admin-icon-register.png';
    32 ?>
    33         <style type="text/css" media="screen">
    34         /*<![CDATA[*/
    35             #menu-posts-epevent .wp-menu-image {
    36                 background: url(<?php echo $event_icon_url; ?>) no-repeat 0px -32px !important;
    37             }
    38             #menu-posts-epevent:hover .wp-menu-image,
    39             #menu-posts-epevent.wp-has-current-submenu .wp-menu-image {
    40                 background: url(<?php echo $event_icon_url; ?>) no-repeat 0px 0px !important;
    41             }
    42 
    43             #menu-posts-epreg .wp-menu-image {
    44                 background: url(<?php echo $register_icon_url; ?>) no-repeat 0px -32px !important;
    45             }
    46             #menu-posts-epreg:hover .wp-menu-image,
    47             #menu-posts-epreg.wp-has-current-submenu .wp-menu-image {
    48                 background: url(<?php echo $register_icon_url; ?>) no-repeat 0px -1px !important;
    49             }
    50         /*]]>*/
    51         </style>
    52 <?php
    53     }
    54    
    55     /**
    56      * Modifies the menu to add the separator.
    57      *
    58      * @since 0.1
    59      *
    60      * @uses $menu
    61      */
    62     function admin_separator () {
    63         global $menu;
    64 
    65         if ( current_user_can( 'edit_events' ) ) {
    66             $menu[24] = $menu[25];
    67             $menu[25] = array( '', 'read', 'separator1', '', 'wp-menu-separator' );
    68         }
    69     }
    70 }
    715
    726/**
     
    9731    }
    9832
     33    /**
     34     * Add the menu creation functions to run with admin.
     35     *
     36     * @since 0.1
     37     */
     38    function init () {
     39        add_action ( 'admin_head', array( 'ep_admin_view', 'admin_head' ) );
     40        add_action ( 'admin_menu', array( 'ep_admin_view', 'admin_separator' ) );
     41        add_action ( 'admin_menu', array( 'ep_admin_view', 'add_to_menu' ) );
     42    }
     43
     44    function add_to_menu() {
     45        /* TODO Enable after constructing menu page. */
     46        //add_menu_page( 'EventPress', 'EventPress', 'manage_options', 'epmain', Array( 'ep_admin_view', 'main_page' ), 'x', 29 );
     47    }
     48   
     49    /**
     50     * The CSS Required to style these.
     51     *
     52     * @since 0.1
     53     */
     54    function admin_head () {
     55        $event_icon_url     = EP_REL_URL . '/themes/admin/assets/images/admin-icon-events.png';
     56        $register_icon_url  = EP_REL_URL . '/themes/admin/assets/images/admin-icon-register.png';
     57        $main_icon_url  = EP_REL_URL . '/themes/admin/assets/images/logo-icon.png';
     58?>
     59        <style type="text/css" media="screen">
     60        /*<![CDATA[*/
     61            #menu-posts-epevent .wp-menu-image {
     62                background: url(<?php echo $event_icon_url; ?>) no-repeat 0px -32px !important;
     63            }
     64            #menu-posts-epevent:hover .wp-menu-image,
     65            #menu-posts-epevent.wp-has-current-submenu .wp-menu-image {
     66                background: url(<?php echo $event_icon_url; ?>) no-repeat 0px 0px !important;
     67            }
     68
     69            #menu-posts-epreg .wp-menu-image {
     70                background: url(<?php echo $register_icon_url; ?>) no-repeat 0px -32px !important;
     71            }
     72            #menu-posts-epreg:hover .wp-menu-image,
     73            #menu-posts-epreg.wp-has-current-submenu .wp-menu-image {
     74                background: url(<?php echo $register_icon_url; ?>) no-repeat 0px -1px !important;
     75            }
     76            #toplevel_page_epmain .wp-menu-image {
     77                background: url(<?php echo $main_icon_url; ?>) no-repeat 2px -24px !important;
     78            }
     79            #toplevel_page_epmain:hover .wp-menu-image,
     80            #toplevel_page_epmain.wp-has-current-submenu .wp-menu-image {
     81                background: url(<?php echo $main_icon_url; ?>) no-repeat 2px 2px !important;
     82        /*]]>*/
     83        </style>
     84<?php
     85    }
     86   
     87    /**
     88     * Modifies the menu to add the separator.
     89     *
     90     * @since 0.1
     91     *
     92     * @uses $menu
     93     */
     94    function admin_separator () {
     95        global $menu;
     96
     97        if ( current_user_can( 'edit_events' ) ) {
     98            $menu[24] = $menu[25];
     99            $menu[25] = array( '', 'read', 'separator1', '', 'wp-menu-separator' );
     100        }
     101    }
     102
     103    /**
     104     * Displays the main configuration/about page for EventPress.
     105     *
     106     * @since 0.2
     107     */
     108
     109    function main_page() {
     110    ?>
     111        <div class = 'wrap'>
     112            <div id = 'ep-icon'><br /></div>
     113            <h2>EventPress</h2>
     114            <h3>Configuration</h3>
     115        </div>
     116    <?php
     117    }
     118
    99119
    100120    /**
     
    105125    function bp_edit_resources() {
    106126        wp_enqueue_script( 'google-maps', 'http://maps.google.com/maps/api/js?sensor=false' );
    107         wp_enqueue_script( 'ep-admin-script', EP_REL_URL . '/themes/admin/assets/js/ep_admin.js', 'google-maps' );
     127        wp_enqueue_script( 'ep-admin-script', EP_REL_URL . '/themes/admin/assets/js/ep_admin' . kb_ext() . '.js', 'google-maps' );
    108128        wp_enqueue_script( 'jquery' );
    109         wp_enqueue_script( 'jquery-ui-custom', EP_REL_URL . '/themes/admin/assets/js/jquery-ui.min.js', 'jquery' );
    110         wp_enqueue_script( 'timepicker', EP_REL_URL . '/themes/admin/assets/js/timepicker.js', 'jquery-ui-custom' );
    111         wp_enqueue_style( 'ep-edit', EP_REL_URL . '/themes/admin/assets/css/bp_edit.css' );
    112         wp_enqueue_style( 'ep-jquery-css', EP_REL_URL . '/themes/admin/assets/css/ui-lightness/jquery-ui-1.8.4.custom.css' );
     129        wp_enqueue_script( 'jquery-ui' );
     130        wp_enqueue_script( 'ep-jquery-ui-slider', EP_REL_URL . '/themes/admin/assets/js/jquery.ui.slider' . kb_ext() . '.js', 'jquery-ui' );
     131        wp_enqueue_script( 'ep-jquery-ui-datepicker', EP_REL_URL . '/themes/admin/assets/js/jquery.ui.datepicker' . kb_ext() . '.js', 'ep-jquery-ui-slider' );
     132        wp_enqueue_script( 'ep-jquery-ui-timepicker', EP_REL_URL . '/themes/admin/assets/js/jquery-ui-timepicker-addon' . kb_ext() . '.js', 'ep-jquery-ui-datepicker' );
     133        wp_enqueue_style( 'ep-edit', EP_REL_URL . '/themes/admin/assets/css/bp_edit' . kb_ext() . '.css' );
     134        wp_enqueue_style( 'ep-jquery-css', EP_REL_URL . '/themes/bp/assets/css/ui-lightness/jquery.ui.all' . kb_ext() . '.css' );
    113135    }
    114136
     
    124146            wp_enqueue_script( 'google-maps', 'http://maps.google.com/maps/api/js?sensor=false' );
    125147            wp_enqueue_script( 'jquery' );
    126             wp_enqueue_script( 'jquery-ui-ep-core', EP_REL_URL . '/themes/admin/assets/js/ui.core.js' );
    127             wp_enqueue_script( 'jquery-ui-slider', EP_REL_URL . '/themes/admin/assets/js/ui.slider.js', 'jquery-ui-ep-core' );
    128             wp_enqueue_script( 'jquery-ui-datepicker', EP_REL_URL . '/themes/admin/assets/js/ui.datepicker.js', 'jquery-ui-ep-core' );
    129             wp_enqueue_script( 'timepicker', EP_REL_URL . '/themes/admin/assets/js/timepicker.dev.js', 'jquery-ui-datepicker' );
    130             wp_enqueue_script( 'ep-admin-script', EP_REL_URL . '/themes/admin/assets/js/ep_admin.js', 'google-maps' );
    131             wp_enqueue_style( 'ep-admin-css', EP_REL_URL . '/themes/admin/assets/css/ep_admin.css' );
    132             wp_enqueue_style( 'ep-jquery-css', EP_REL_URL . '/themes/admin/assets/css/smoothness/jquery-ui-1.7.3.custom.css' );
    133             wp_enqueue_style( 'ep-datepicker-css', EP_REL_URL . '/themes/admin/assets/css/jquery.ui.datepicker.css' );
     148            wp_enqueue_script( 'jquery-ui' );
     149            wp_enqueue_script( 'ep-jquery-ui-slider', EP_REL_URL . '/themes/admin/assets/js/jquery.ui.slider' . kb_ext() . '.js', 'jquery-ui' );
     150            wp_enqueue_script( 'ep-jquery-ui-datepicker', EP_REL_URL . '/themes/admin/assets/js/jquery.ui.datepicker' . kb_ext() . '.js', 'ep-jquery-ui-slider' );
     151            wp_enqueue_script( 'ep-jquery-ui-timepicker', EP_REL_URL . '/themes/admin/assets/js/jquery-ui-timepicker-addon' . kb_ext() . '.js', 'ep-jquery-ui-datepicker' );
     152            wp_enqueue_script( 'ep-admin-script', EP_REL_URL . '/themes/admin/assets/js/ep_admin' . kb_ext() . '.js', 'google-maps' );
     153            wp_enqueue_style( 'ep-admin-css', EP_REL_URL . '/themes/admin/assets/css/ep_admin' . kb_ext() . '.css' );
     154            wp_enqueue_style( 'ep-jquery-css', EP_REL_URL . '/themes/admin/assets/css/smoothness/jquery.ui.all' . kb_ext() . '.css' );
     155        } else if( 'toplevel_page_epmain' == $var ) {
     156            wp_enqueue_style( 'ep-main-admin-css', EP_REL_URL . '/themes/admin/assets/css/ep_main_admin'. kb_ext() .'.css' );
    134157        }
     158
    135159    }
    136160
     
    463487    }
    464488
    465     /**
    466      * Options page for events.
    467      *
    468      * Not actually used at this point.
    469      *
    470      * @since 0.1
    471      */
    472     function options_page() {
    473         ?>
    474         <div class = 'wrap'>
    475             <h2><?php _e( "Events Options" ); ?></h2>
    476         </div>
    477         <?php
    478     }
    479489
    480490    /**
     
    538548                break;
    539549            case 'status':
    540                 $status = get_post_status_object( $post->post_status );
     550                $status = get_post_status_object( $page->post_status );
    541551                echo $status->label;
    542552                break; 
     
    651661     */
    652662    function metabox_registration_details() {
     663        if( !class_exists( 'WP_List_Table' ) )
     664            include ABSPATH . '/wp-admin/includes/class-wp-list-table.php';
     665
     666        include "class-ep-regs-list-table.php";
     667
    653668        global $post, $current_screen, $_wp_column_headers;
    654669
     
    668683        ?>
    669684
    670         <div class = 'ep-bulkreg-div'>
    671             <select name = 'ep-regs[bulk]'>
    672                 <option value = '-1'><?php _e( 'Bulk Actions', 'eventpress' ); ?></option>
    673                 <option value = 'approve'><?php _e( 'Approve', 'eventpress' ); ?></option>
    674                 <option value = 'cancel'><?php _e( 'Cancel', 'eventpress' ); ?></option>
    675             </select>
    676 
    677             <input type = 'submit' value = '<?php _e( 'Apply', 'eventpress' ); ?>' id = 'ep-bulk-regs' name = 'ep-regs[bulksubmit]' class = 'button secondary-action' />
    678 
    679             <a href = '<?php echo EP_REL_URL . '/controllers/csv.php?ep-eventid=' . $post->ID ; ?>' id = 'ep-reg-export' class = 'button secondary-action'><?php _e( 'Export as .csv', 'eventpress' ); ?></a>
    680         </div>
    681 
    682 
    683         <table class="widefat post fixed" cellspacing="0">
    684             <thead>
    685             <tr>
    686 
    687685        <?php
     686            $global_current_screen = $current_screen;
     687            $current_screen = $screen;
    688688            $screen = convert_to_screen( 'edit' );
    689689            $screen->post_type = 'ep_reg';
    690690            $screen->base = 'edit';
    691691
    692             add_filter( 'manage_posts_columns', Array( &$this, 'registration_column_headers' ) );
    693             print_column_headers( $screen );   
    694         ?>
    695             </tr>
    696             </thead>
    697 
    698             <tbody>
    699         <?php
    700             $global_current_screen = $current_screen;
    701             $current_screen = $screen;
     692            $reg_table = new EP_Regs_List_Table();
    702693            add_action( 'manage_posts_custom_column', Array( &$this, 'registration_column_values' ), 10, 2 );
    703             post_rows( $regs );
    704 
    705         ?>
    706             </tbody>
    707         </table>
    708         <?php
     694
     695            $reg_table->prepare_items();
     696            $reg_table->display();
     697
    709698            //Cleanup
    710699            remove_action( 'manage_posts_custom_column', Array( &$this, 'registration_column_values' ), 10, 2 );
  • eventpress/trunk/views/template.php

    r308066 r368060  
    2727        global $post;
    2828        if ( !defined( 'EP_BP' ) )
    29             wp_enqueue_style( 'registration-css', EP_REL_URL . '/themes/wp/assets/css/register.css' );
     29            wp_enqueue_style( 'registration-css', EP_REL_URL . '/themes/wp/assets/css/register'.kb_ext().'.css' );
    3030
    3131        //Conditionally load map API if the map is going to be shown
     
    9191     */
    9292    function bp_style() {
    93         wp_enqueue_style( 'ep-events-style', EP_REL_URL . '/themes/bp/assets/css/events.css' );
     93        wp_enqueue_style( 'ep-events-style', EP_REL_URL . '/themes/bp/assets/css/events'.kb_ext().'.css' );
    9494    }
    9595
     
    114114                    case 'reg_approved':
    115115                        $output = "<div id = 'message' class = 'ep-reg-status'><p>" . __( "You have signed up for this event.", 'eventpress' ) . "</p></div>";
     116                        $output .= "<a href = '" . get_permalink() . "unregister/' class = 'button'>" . __( 'Unregister', 'eventpress' ) . "</a>";
    116117                        break;
    117118                    case 'reg_pending':
    118119                        $output = "<div id = 'message' class = 'ep-reg-status'><p>" . __( "Your registration has not been approved yet.", 'eventpress' ) . "</p></div>";
     120                        $output .= "<a href = '" . get_permalink() . "unregister/' class = 'button'>" . __( 'Unregister', 'eventpress' ) . "</a>";
    119121                        break;
    120122                    case 'reg_cancelled':
     
    176178    function bp_send_invites() {
    177179        rewind_posts();
    178         wp_enqueue_script( 'ep-add-invites', EP_REL_URL . '/themes/bp/assets/js/invites.js' );
     180        wp_enqueue_script( 'ep-add-invites', EP_REL_URL . '/themes/bp/assets/js/invites' . kb_ext() . '.js' );
    179181        add_filter( 'bpcp_ep_event_single_home_template', Array( &$this, '_invite_template' ) );
    180182        bp_core_load_template( 'type/single/home' );
  • eventpress/trunk/views/wp-tags.php

    r308066 r368060  
    6060                switch ( $user_status ) {
    6161                    case 'reg_approved':
    62                         echo "<div class = 'ep-reg-status'>" . __( 'You have signed up for this event.', 'eventpress' ) . "</div>";
    63                         break;
     62                        echo "<div class = 'ep-reg-status'>" . __( 'You have signed up for this event.', 'eventpress' ) . "</div>"; ?>
     63                        <form action = '<?php echo EP_REL_URL . '/controllers/unregister.php'; ?>' method = 'post' id = 'ep-register-form'>
     64                            <input name="unregister" type="submit" id="ep-reg-submit" value="<?php _e( 'Unregister', 'eventpress' ); ?>" />
     65                            <?php ep_reg_id_fields(); ?>   
     66                        </form>
     67                        <?php break;
    6468                    case 'reg_pending':
    65                         echo "<div class = 'ep-reg-status'>" . __( 'Your registration has not been approved yet.', 'eventpress' ) . "</div>";
    66                         break;
     69                        echo "<div class = 'ep-reg-status'>" . __( 'Your registration has not been approved yet.', 'eventpress' ) . "</div>"; ?>
     70                        <form action = '<?php echo EP_REL_URL . '/controllers/unregister.php'; ?>' method = 'post' id = 'ep-register-form'>
     71                            <input name="unregister" type="submit" id="ep-reg-submit" value="<?php _e( 'Unregister', 'eventpress' ); ?>" />
     72                            <?php ep_reg_id_fields(); ?>   
     73                        </form>
     74                        <?php break;
    6775                    case 'reg_cancelled':
    6876                        echo "<div class = 'ep-reg-status'>" . __( 'Your registration has been cancelled.', 'eventpress' ) . "</div>";
     
    466474}
    467475
    468 if ( !function_exists( 'ep_calendar_query' ) ) {
    469     function ep_calendar_query( $month = '', $year = '' ) {
    470         if ( empty( $month ) )
    471             $month = date( 'n' );
    472         if ( empty( $year ) )
    473             $year = date( 'Y' );
    474 
    475         global $ep_models;
    476         $ep_models['events']->query_month( $month, $year );
    477        
    478     }
    479 }
    480 
    481476if ( !function_exists( 'ep_render_event' ) ) {
    482477    function ep_render_event( $event = '' ) {
     
    491486}
    492487
     488
     489/**
     490 * ep_calendar
     491 *
     492 * Wrapper for a call to EP_Calendar.
     493 *
     494 * @since 0.1
     495 */
    493496if ( !function_exists( 'ep_calendar' ) ) {
    494     function ep_calendar() {
    495     ?>
    496         <table id = 'ep-cal'>
    497             <tr>
    498             <?php
    499                 $days = Array(
    500                     __( 'Sun', 'eventpress' ),
    501                     __( 'Mon', 'eventpress' ),
    502                     __( 'Tue', 'eventpress' ),
    503                     __( 'Wed', 'eventpress' ),
    504                     __( 'Thu', 'eventpress' ),
    505                     __( 'Fri', 'eventpress' ),
    506                     __( 'Sat', 'eventpress' ),
    507                 );
    508            
    509                 for( $i = 0; $i < 7; $i++ )
    510                     echo "<th>{$days[$i]}</th>";
    511 
    512                 //Query for current month; get first post.
    513                 ep_calendar_query();
    514             ?>
    515             </tr>
    516             <?php
    517                 $today = getdate();
    518                 $first_day = getdate( strtotime( "01-{$today['mon']}-{$today['year']}" ) );
    519 
    520                 $day_counter = 0; $flag = true; $week_counter = 0;
    521 
    522                 global $post;
    523                 if ( have_posts() ) {
    524                     the_post();
    525                     $event_start = date( 'j', get_post_meta( $post->ID, '_ep_start', true ) );
    526                 } else $event_start = null;
    527 
    528                 while( $flag || $week_counter%7 != 0 ) {
    529                     if( $week_counter == 0 ) echo "<tr>";
    530                     echo "<td class = 'ep-cal-cell ep-cal-day-{$week_counter}'>";   
    531                         if ( $day_counter == 0 ) //Not started yet
    532                             if ( $week_counter == $first_day['wday'] )
    533                                 $day_counter = $first_day;
    534 
    535                         if ( $day_counter != 0 && $day_counter['month'] == $first_day['month'] ) {
    536                             echo "<span class = 'ep-date-title'>{$day_counter['mday']}</span>";
    537 
    538                             echo "<div class = 'ep-event-cal' id = 'ep-day-{$day_counter['mday']}'>";
    539                             //Show Event
    540                             while( isset( $event_start ) && $day_counter['mday'] == $event_start ) {
    541                                 ep_render_event( $post );
    542                                 if ( have_posts() ) { //Set to next event
    543                                     the_post();
    544                                     $event_start = date( 'j', get_post_meta( $post->ID, '_ep_start', true ) );
    545                                 } else $event_start = null;
    546                             }
    547                
    548 
    549                             echo "</div>";
    550 
    551                         } else if ( $week_counter > 6 ) $flag = false;
    552 
    553                         if ( $day_counter != 0 )
    554                             $day_counter = getdate( strtotime( "+1 day", $day_counter[0] ) );
    555                     echo "</td>";   
    556 
    557                     if( $week_counter%7 == 6 ) echo "</tr>";
    558                     $week_counter = ($week_counter + 1);
    559                 }
    560             ?>
    561         </table>
    562     <?php
     497    function ep_calendar( $args ) {
     498        $calendar = new EP_Calendar( $args );   
    563499    }
    564500}
  • eventpress/trunk/views/wp-widgets.php

    r280350 r368060  
    6262 * @since 0.1
    6363 */
    64 class EP_Calendar extends WP_Widget {
     64class EP_Calendar_Widget extends WP_Widget {
    6565    /**
    6666     * Constructor. Initializes using parent class.
     
    6868     * @since 0.1
    6969     */
    70     function EP_Calendar() {
     70    function EP_Calendar_Widget() {
    7171        parent::WP_Widget( 'ep_calendar', __( 'Events Calendar', 'eventpress' ) );
    7272
    7373        if( is_active_widget( false, false, 'ep_calendar' ) ) {
    7474            if( defined( 'EP_BP' ) )
    75                 wp_enqueue_style( 'ep_widget_calendar', EP_REL_URL .'/themes/bp/assets/css/widget_calendar.css' );
     75                wp_enqueue_style( 'ep_widget_calendar', EP_REL_URL .'/themes/bp/assets/css/widget_calendar'.kb_ext().'.css' );
    7676            else
    77                 wp_enqueue_style( 'ep_widget_calendar', EP_REL_URL .'/themes/wp/assets/css/widget_calendar.css' );
     77                wp_enqueue_style( 'ep_widget_calendar', EP_REL_URL .'/themes/wp/assets/css/widget_calendar'.kb_ext().'.css' );
    7878        }
    7979    }
Note: See TracChangeset for help on using the changeset viewer.