Changeset 368060
- Timestamp:
- 04/02/2011 03:23:01 AM (15 years ago)
- Location:
- eventpress/trunk
- Files:
-
- 82 added
- 17 edited
-
build.xml (added)
-
controllers/bp.php (modified) (2 diffs)
-
controllers/main.php (modified) (1 diff)
-
controllers/register.php (modified) (1 diff)
-
controllers/unregister.php (added)
-
controllers/wp.php (modified) (5 diffs)
-
eventpress.php (modified) (1 diff)
-
eventpress.pot (modified) (4 diffs)
-
lang/eventpress-da_DK.mo (added)
-
lang/eventpress-da_DK.po (added)
-
lang/eventpress-es_ES.mo (added)
-
lang/eventpress-es_ES.po (added)
-
lang/eventpress-fr_CA.po (added)
-
lang/eventpress-fr_FR.po (added)
-
lang/eventpress-it_IT.mo (added)
-
lang/eventpress-it_IT.po (added)
-
lang/eventpress-nb_NO.mo (added)
-
lang/eventpress-nb_NO.po (added)
-
lang/eventpress-nl_NL.mo (added)
-
lang/eventpress-nl_NL.po (added)
-
models/events.php (modified) (1 diff)
-
models/registration.php (modified) (2 diffs)
-
mods/kb_utilities.php (modified) (3 diffs)
-
readme.txt (modified) (3 diffs)
-
themes/admin/assets/css/bp_edit.dev.css (added)
-
themes/admin/assets/css/ep_admin.dev.css (added)
-
themes/admin/assets/css/ep_main_admin.dev.css (added)
-
themes/admin/assets/css/smoothness/jquery-ui.css (added)
-
themes/admin/assets/css/smoothness/jquery.ui.accordion.css (added)
-
themes/admin/assets/css/smoothness/jquery.ui.all.dev.css (added)
-
themes/admin/assets/css/smoothness/jquery.ui.autocomplete.css (added)
-
themes/admin/assets/css/smoothness/jquery.ui.base.css (added)
-
themes/admin/assets/css/smoothness/jquery.ui.button.css (added)
-
themes/admin/assets/css/smoothness/jquery.ui.core.css (added)
-
themes/admin/assets/css/smoothness/jquery.ui.datepicker.css (added)
-
themes/admin/assets/css/smoothness/jquery.ui.dialog.css (added)
-
themes/admin/assets/css/smoothness/jquery.ui.progressbar.css (added)
-
themes/admin/assets/css/smoothness/jquery.ui.resizable.css (added)
-
themes/admin/assets/css/smoothness/jquery.ui.selectable.css (added)
-
themes/admin/assets/css/smoothness/jquery.ui.slider.css (added)
-
themes/admin/assets/css/smoothness/jquery.ui.tabs.css (added)
-
themes/admin/assets/css/smoothness/jquery.ui.theme.css (added)
-
themes/admin/assets/images/logo-40.png (added)
-
themes/admin/assets/images/logo-icon.png (added)
-
themes/admin/assets/js/ep_admin.dev.js (added)
-
themes/admin/assets/js/ep_bp_admin.dev.js (added)
-
themes/admin/assets/js/jquery-ui-timepicker-addon.dev.js (added)
-
themes/admin/assets/js/jquery.ui.datepicker.dev.js (added)
-
themes/admin/assets/js/jquery.ui.slider.dev.js (added)
-
themes/bp/assets/css/calendar.dev.css (added)
-
themes/bp/assets/css/events.dev.css (added)
-
themes/bp/assets/css/events.min.css (added)
-
themes/bp/assets/css/ui-lightness (added)
-
themes/bp/assets/css/ui-lightness/images (added)
-
themes/bp/assets/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png (added)
-
themes/bp/assets/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png (added)
-
themes/bp/assets/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png (added)
-
themes/bp/assets/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png (added)
-
themes/bp/assets/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png (added)
-
themes/bp/assets/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png (added)
-
themes/bp/assets/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png (added)
-
themes/bp/assets/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png (added)
-
themes/bp/assets/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png (added)
-
themes/bp/assets/css/ui-lightness/images/ui-icons_222222_256x240.png (added)
-
themes/bp/assets/css/ui-lightness/images/ui-icons_228ef1_256x240.png (added)
-
themes/bp/assets/css/ui-lightness/images/ui-icons_ef8c08_256x240.png (added)
-
themes/bp/assets/css/ui-lightness/images/ui-icons_ffd27a_256x240.png (added)
-
themes/bp/assets/css/ui-lightness/images/ui-icons_ffffff_256x240.png (added)
-
themes/bp/assets/css/ui-lightness/jquery-ui.css (added)
-
themes/bp/assets/css/ui-lightness/jquery.ui.accordion.css (added)
-
themes/bp/assets/css/ui-lightness/jquery.ui.all.dev.css (added)
-
themes/bp/assets/css/ui-lightness/jquery.ui.autocomplete.css (added)
-
themes/bp/assets/css/ui-lightness/jquery.ui.base.css (added)
-
themes/bp/assets/css/ui-lightness/jquery.ui.button.css (added)
-
themes/bp/assets/css/ui-lightness/jquery.ui.core.css (added)
-
themes/bp/assets/css/ui-lightness/jquery.ui.datepicker.css (added)
-
themes/bp/assets/css/ui-lightness/jquery.ui.dialog.css (added)
-
themes/bp/assets/css/ui-lightness/jquery.ui.progressbar.css (added)
-
themes/bp/assets/css/ui-lightness/jquery.ui.resizable.css (added)
-
themes/bp/assets/css/ui-lightness/jquery.ui.selectable.css (added)
-
themes/bp/assets/css/ui-lightness/jquery.ui.slider.css (added)
-
themes/bp/assets/css/ui-lightness/jquery.ui.tabs.css (added)
-
themes/bp/assets/css/ui-lightness/jquery.ui.theme.css (added)
-
themes/bp/assets/css/widget_calendar.dev.css (added)
-
themes/bp/assets/js/invites.dev.js (added)
-
themes/bp/page-events-calendar.php (modified) (1 diff)
-
themes/bp/registered.php (modified) (2 diffs)
-
themes/wp/assets/css/calendar.css (modified) (1 diff)
-
themes/wp/assets/css/calendar.dev.css (added)
-
themes/wp/assets/css/calendar.min.css (added)
-
themes/wp/assets/css/register.dev.css (added)
-
themes/wp/assets/css/widget_calendar.dev.css (added)
-
themes/wp/assets/css/widget_calendar.min.css (added)
-
views/admin.php (modified) (8 diffs)
-
views/class-ep-regs-list-table.php (added)
-
views/ep-calendar.php (added)
-
views/template.php (modified) (4 diffs)
-
views/wp-tags.php (modified) (3 diffs)
-
views/wp-widgets.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
eventpress/trunk/controllers/bp.php
r296624 r368060 59 59 //Register users controller 60 60 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' ) ); 61 64 62 65 //Register the member directory and invites directory for the event page … … 136 139 137 140 /** 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 /** 138 190 * Function called when a user tries to register in BuddyPress. 139 191 * -
eventpress/trunk/controllers/main.php
r280350 r368060 65 65 */ 66 66 require 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 */ 73 require EP_DIR . '/views/ep-calendar.php'; 67 74 68 75 /** -
eventpress/trunk/controllers/register.php
r280350 r368060 29 29 //Invalid user 30 30 if ( !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' ) ); 32 32 33 33 global $ep_models; -
eventpress/trunk/controllers/wp.php
r308066 r368060 68 68 //Add the init action to init if we're in the admin 69 69 if ( is_admin() ) 70 add_action( 'init', array( 'ep_admin_ menus', 'init' ) );70 add_action( 'init', array( 'ep_admin_view', 'init' ) ); 71 71 72 72 //Modify the page templates array … … 100 100 function register_widgets() { 101 101 register_widget( 'EP_Upcoming_Events' ); 102 register_widget( 'EP_Calendar ' );102 register_widget( 'EP_Calendar_Widget' ); 103 103 } 104 104 … … 236 236 237 237 //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': 240 241 case 'approve': 241 do_action( 'ep_approve_regs', $_POST['ep-reg s']['ids'] );242 foreach( $_POST['ep-reg s']['ids'] as $id )242 do_action( 'ep_approve_regs', $_POST['ep-reg-bulk']['post'] ); 243 foreach( $_POST['ep-reg-bulk']['post'] as $id ) 243 244 $ep_models['registration']->approve( $id ); 244 245 break; 246 case '1': 245 247 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 ) 248 264 $ep_models['registration']->cancel( $id ); 249 265 break; 250 266 } 251 267 } 252 unset( $_POST['ep-reg s'] );268 unset( $_POST['ep-reg-bulk'] ); 253 269 //Cleanup to avoid an infinite loop 254 270 … … 362 378 //Register translation support 363 379 load_plugin_textdomain( 'eventpress', false, basename( EP_DIR ) . '/lang' ); 380 381 //Register the shortcodes 382 add_shortcode( 'ep-calendar', 'ep_calendar' ); 364 383 } 365 384 … … 517 536 kb_extend_caps( $ep_models['events']->extend_capabilities() ); 518 537 kb_extend_caps( $ep_models['registration']->extend_capabilities() ); 519 520 //Create the custom pages521 ep_event_model::make_pages();522 538 523 539 //Add hook to flush permalinks -
eventpress/trunk/eventpress.php
r308066 r368060 3 3 Plugin Name: EventPress 4 4 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. 35 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 7 7 Author: Kunal Bhalla. 8 8 Author URI: http://kunal-b.in -
eventpress/trunk/eventpress.pot
r308066 r368060 1 # Translation of the WordPress plugin EventPress 0. 1.2.3by Kunal Bhalla..2 # Copyright (C) 201 0Kunal Bhalla.1 # Translation of the WordPress plugin EventPress 0.2-bleeding by Kunal Bhalla.. 2 # Copyright (C) 2011 Kunal Bhalla. 3 3 # This file is distributed under the same license as the EventPress package. 4 # FIRST AUTHOR <EMAIL@ADDRESS>, 201 0.4 # FIRST AUTHOR <EMAIL@ADDRESS>, 2011. 5 5 # 6 6 #, fuzzy 7 7 msgid "" 8 8 msgstr "" 9 "Project-Id-Version: EventPress 0. 1.2.3\n"9 "Project-Id-Version: EventPress 0.2-bleeding\n" 10 10 "Report-Msgid-Bugs-To: http://wordpress.org/tag/eventpress\n" 11 "POT-Creation-Date: 201 0-11-05 14:56+0530\n"12 "PO-Revision-Date: 201 0-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" 13 13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 14 14 "Language-Team: LANGUAGE <[email protected]>\n" … … 293 293 msgstr "" 294 294 295 #: models/events.php:167 views/admin.php: 496 views/admin.php:556295 #: models/events.php:167 views/admin.php:503 views/admin.php:563 296 296 msgid "Event" 297 297 msgstr "" … … 677 677 678 678 #: themes/wp/loop-event.php:50 themes/wp/single-event.php:55 679 #: views/admin.php:52 2679 #: views/admin.php:529 680 680 msgid "Edit" 681 681 msgstr "" … … 705 705 msgstr "" 706 706 707 #: views/admin.php: 87707 #: views/admin.php:21 708 708 msgid "<p>The format of the event's starting date cannot be recognized!</p>" 709 709 msgstr "" 710 710 711 #: views/admin.php: 88711 #: views/admin.php:22 712 712 msgid "<p>The format of the event's ending date cannot be recognized!</p>" 713 713 msgstr "" 714 714 715 #: views/admin.php: 89715 #: views/admin.php:23 716 716 msgid "<p>This event's end date has been set before the start date!</p>" 717 717 msgstr "" 718 718 719 #: views/admin.php: 90719 #: views/admin.php:24 720 720 msgid "<p>The format of the registration start date cannot be recognized!</p>" 721 721 msgstr "" 722 722 723 #: views/admin.php: 91723 #: views/admin.php:25 724 724 msgid "<p>The format of the registration stop date cannot be recognized!</p>" 725 725 msgstr "" 726 726 727 #: views/admin.php: 92727 #: views/admin.php:26 728 728 msgid "<p>The registration stop date has been set before the start date!</p>" 729 729 msgstr "" 730 730 731 #: views/admin.php: 93731 #: views/admin.php:27 732 732 msgid "<p>Registration starts after the event is over!</p>" 733 733 msgstr "" 734 734 735 #: views/admin.php: 94735 #: views/admin.php:28 736 736 msgid "<p>Please enter a valid registration limit!</p>" 737 737 msgstr "" 738 738 739 #: views/admin.php:1 51739 #: views/admin.php:172 740 740 msgid "JavaScript must be enabled for this feature to work." 741 741 msgstr "" 742 742 743 #: views/admin.php:1 58743 #: views/admin.php:179 744 744 msgid "Display Map?" 745 745 msgstr "" 746 746 747 #: views/admin.php:1 61747 #: views/admin.php:182 748 748 msgid "(Changing the venue will automatically update the map.)" 749 749 msgstr "" 750 750 751 #: views/admin.php:2 07751 #: views/admin.php:228 752 752 msgid "Label" 753 753 msgstr "" 754 754 755 #: views/admin.php:2 08755 #: views/admin.php:229 756 756 msgid "Textbox" 757 757 msgstr "" 758 758 759 #: views/admin.php:2 09759 #: views/admin.php:230 760 760 msgid "Checkbox" 761 761 msgstr "" 762 762 763 #: views/admin.php:2 10763 #: views/admin.php:231 764 764 msgid "Textarea" 765 765 msgstr "" 766 766 767 #: views/admin.php:2 11767 #: views/admin.php:232 768 768 msgid "Description" 769 769 msgstr "" 770 770 771 #: views/admin.php:2 12771 #: views/admin.php:233 772 772 msgid "Type" 773 773 msgstr "" 774 774 775 #: views/admin.php:2 13775 #: views/admin.php:234 776 776 msgid "Default Value" 777 777 msgstr "" 778 778 779 #: views/admin.php:2 14779 #: views/admin.php:235 780 780 msgid "Validation" 781 781 msgstr "" 782 782 783 #: views/admin.php:2 15783 #: views/admin.php:236 784 784 msgid "None" 785 785 msgstr "" 786 786 787 #: views/admin.php:2 16787 #: views/admin.php:237 788 788 msgid "Number" 789 789 msgstr "" 790 790 791 #: views/admin.php:2 17791 #: views/admin.php:238 792 792 msgid "Alphanumeric" 793 793 msgstr "" 794 794 795 #: views/admin.php:2 18795 #: views/admin.php:239 796 796 msgid "Email" 797 797 msgstr "" 798 798 799 #: views/admin.php:2 19799 #: views/admin.php:240 800 800 msgid "Other" 801 801 msgstr "" 802 802 803 #: views/admin.php:2 20803 #: views/admin.php:241 804 804 msgid "Regular Expression" 805 805 msgstr "" 806 806 807 #: views/admin.php:2 21807 #: views/admin.php:242 808 808 msgid "Delete this field" 809 809 msgstr "" 810 810 811 #: views/admin.php:2 73811 #: views/admin.php:294 812 812 msgid "Add a new field" 813 813 msgstr "" 814 814 815 #: views/admin.php: 288815 #: views/admin.php:309 816 816 msgid "When does the event start?" 817 817 msgstr "" 818 818 819 #: views/admin.php:3 04819 #: views/admin.php:325 820 820 msgid "When does the event end?" 821 821 msgstr "" 822 822 823 #: views/admin.php:3 19823 #: views/admin.php:340 824 824 msgid "Where will it be held?" 825 825 msgstr "" 826 826 827 #: views/admin.php:3 35827 #: views/admin.php:356 828 828 msgid "Registration opens at?" 829 829 msgstr "" 830 830 831 #: views/admin.php:3 51831 #: views/admin.php:372 832 832 msgid "Registration closes at?" 833 833 msgstr "" 834 834 835 #: views/admin.php:3 66835 #: views/admin.php:387 836 836 msgid "Maximum number of attendees?" 837 837 msgstr "" 838 838 839 #: views/admin.php: 383839 #: views/admin.php:404 840 840 msgid "Approve registrations automatically?" 841 841 msgstr "" 842 842 843 #: views/admin.php:475 844 msgid "Events Options" 845 msgstr "" 846 847 #: views/admin.php:497 843 #: views/admin.php:504 848 844 msgid "Registered User" 849 845 msgstr "" 850 846 851 #: views/admin.php: 498847 #: views/admin.php:505 852 848 msgid "Time" 853 849 msgstr "" 854 850 855 #: views/admin.php: 499851 #: views/admin.php:506 856 852 msgid "Status" 857 853 msgstr "" 858 854 859 #: views/admin.php:52 2855 #: views/admin.php:529 860 856 msgid "Edit this page" 861 857 msgstr "" 862 858 863 #: views/admin.php:5 23859 #: views/admin.php:530 864 860 msgid "Approve this registration." 865 861 msgstr "" 866 862 867 #: views/admin.php:5 23 views/admin.php:673863 #: views/admin.php:530 views/admin.php:680 868 864 msgid "Approve" 869 865 msgstr "" 870 866 871 #: views/admin.php:5 24867 #: views/admin.php:531 872 868 msgid "Cancel this registration." 873 869 msgstr "" 874 870 875 #: views/admin.php:5 24 views/admin.php:674871 #: views/admin.php:531 views/admin.php:681 876 872 msgid "Cancel" 877 873 msgstr "" 878 874 879 #: views/admin.php:5 57875 #: views/admin.php:564 880 876 msgid "Author" 881 877 msgstr "" 882 878 883 #: views/admin.php:5 58879 #: views/admin.php:565 884 880 msgid "Registrations (Pending, Cancelled)" 885 881 msgstr "" 886 882 887 #: views/admin.php:5 59883 #: views/admin.php:566 888 884 msgid "Starts" 889 885 msgstr "" 890 886 891 #: views/admin.php:56 0887 #: views/admin.php:567 892 888 msgid "Ends" 893 889 msgstr "" 894 890 895 #: views/admin.php:66 2891 #: views/admin.php:669 896 892 msgid "No registrations yet." 897 893 msgstr "" 898 894 899 #: views/admin.php:67 2895 #: views/admin.php:679 900 896 msgid "Bulk Actions" 901 897 msgstr "" 902 898 903 #: views/admin.php:6 77899 #: views/admin.php:684 904 900 msgid "Apply" 905 901 msgstr "" 906 902 907 #: views/admin.php:6 79903 #: views/admin.php:686 908 904 msgid "Export as .csv" 909 905 msgstr "" 910 906 911 #: views/admin.php:7 38907 #: views/admin.php:745 912 908 msgid "Repeat this event every" 913 909 msgstr "" 914 910 915 #: views/admin.php:74 1911 #: views/admin.php:748 916 912 msgid "days" 917 913 msgstr "" 918 914 919 #: views/admin.php:74 2915 #: views/admin.php:749 920 916 msgid "weeks" 921 917 msgstr "" 922 918 923 #: views/admin.php:7 43919 #: views/admin.php:750 924 920 msgid "months" 925 921 msgstr "" 926 922 927 #: views/admin.php:7 44923 #: views/admin.php:751 928 924 msgid "years" 929 925 msgstr "" 930 926 931 #: views/admin.php:7 45927 #: views/admin.php:752 932 928 msgid "hours" 933 929 msgstr "" 934 930 935 #: views/admin.php:7 46931 #: views/admin.php:753 936 932 msgctxt "continuing from \"Repeat this event every x units _until_\"" 937 933 msgid "until" 938 934 msgstr "" 939 935 940 #: views/admin.php:7 57936 #: views/admin.php:764 941 937 msgid "" 942 938 "Please install the plugin <a href ='http://wordpress.org/extend/plugins/" -
eventpress/trunk/models/events.php
r308066 r368060 467 467 468 468 /** 469 * Creates the calendar list and event list pages.470 *471 * Called on plugin initialization.472 *473 * @since 0.1474 */475 function make_pages() {476 //The calendar view477 $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 view488 $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.1505 */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 /**519 469 * Filter function for adding the custom part to the query. 520 470 * -
eventpress/trunk/models/registration.php
r296624 r368060 230 230 * userid Which user 231 231 * eventid which event 232 8approved Approved registration?232 * approved Approved registration? 233 233 * 234 234 * @param Array $args … … 280 280 281 281 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; 282 314 } 283 315 -
eventpress/trunk/mods/kb_utilities.php
r280350 r368060 21 21 } 22 22 23 /** 24 * Remove capabilities to arrays specified as: 25 * Array( 26 * 'type' => Array( 'cap1', 'cap2', ... ) 27 * ) 28 */ 23 29 function kb_remove_caps( $extend ) { 24 30 global $wp_roles; … … 31 37 } 32 38 39 /** 40 * Used to handle passing errors to be displayed on the final page in admin. 41 */ 33 42 class kb_errors { 34 43 var $error_codes; … … 77 86 } 78 87 } 88 89 /** 90 * Returns .dev when SCRIPT_DEBUG is enabled. 91 */ 92 if( !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 2 2 Contributors: kunalb 3 3 Tags: Events Management, Registration, Events Calendar, BuddyPress 4 Requires at least: 3.0.05 Tested up to: 3. 0.16 Stable tag: 0.1.2. 34 Requires at least: WordPress 3.1, BuddyPress 1.2.8 5 Tested up to: 3.1 6 Stable tag: 0.1.2.4 7 7 8 A buddypress aware events plugin for WordPress. 8 Create Events on WordPress and BuddyPress! 9 9 10 10 == Description == 11 11 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>. 12 Create 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 14 Project details, feature requests, the latest builds -- all available at <a href = 'http://goo.gl/8lN4v'>http://code.google.com/p/eventpress/</a>. 13 15 14 16 == Installation == … … 19 21 Note: For this plugin to work properly in BuddyPress, you need to install BuddyPress Custom Posts. 20 22 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 21 26 == 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.25 27 26 28 = Subscribers can't create events. = 27 29 If 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.31 30 32 31 = Why? = … … 34 33 35 34 == Changelog == 35 36 = 0.1.2.4 = 37 * Can now use short-tag ep-calendar. 38 * Compatible with WP3.1. 36 39 37 40 = 0.1.2.3 = -
eventpress/trunk/themes/bp/page-events-calendar.php
r280350 r368060 4 4 */ 5 5 6 wp_enqueue_style( 'ep-calendar-style', EP_REL_URL . '/themes/bp/assets/css/calendar .css' );6 wp_enqueue_style( 'ep-calendar-style', EP_REL_URL . '/themes/bp/assets/css/calendar' . kb_ext() . '.css' ); 7 7 8 8 ?> -
eventpress/trunk/themes/bp/registered.php
r280350 r368060 3 3 <ul id="member-list" class="item-list"> 4 4 <?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() ?>"> 8 7 <?php ep_registrant_avatar_thumb() ?> 9 8 </a> 9 </div> 10 <div class="item"> 11 <div class="item-title"> 10 12 <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> 12 16 </li> 13 14 17 <?php endwhile; ?> 15 16 18 </ul> 17 19 … … 19 21 20 22 <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> 22 24 </div> 23 25 -
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 3 3 define( 'EP_DATE_FORMAT', 'm/d/Y' ); 4 4 define( 'EP_TIME_FORMAT', 'H:i' ); 5 6 /**7 * Class responsible for adding some extra pizzazz to the custom post types8 *9 * @author John James Jacoby10 * @since 0.111 */12 class ep_admin_menus {13 14 /**15 * Add the menu creation functions to run with admin.16 *17 * @since 0.118 */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.128 */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 <?php53 }54 55 /**56 * Modifies the menu to add the separator.57 *58 * @since 0.159 *60 * @uses $menu61 */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 }71 5 72 6 /** … … 97 31 } 98 32 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 99 119 100 120 /** … … 105 125 function bp_edit_resources() { 106 126 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' ); 108 128 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' ); 113 135 } 114 136 … … 124 146 wp_enqueue_script( 'google-maps', 'http://maps.google.com/maps/api/js?sensor=false' ); 125 147 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' ); 134 157 } 158 135 159 } 136 160 … … 463 487 } 464 488 465 /**466 * Options page for events.467 *468 * Not actually used at this point.469 *470 * @since 0.1471 */472 function options_page() {473 ?>474 <div class = 'wrap'>475 <h2><?php _e( "Events Options" ); ?></h2>476 </div>477 <?php478 }479 489 480 490 /** … … 538 548 break; 539 549 case 'status': 540 $status = get_post_status_object( $p ost->post_status );550 $status = get_post_status_object( $page->post_status ); 541 551 echo $status->label; 542 552 break; … … 651 661 */ 652 662 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 653 668 global $post, $current_screen, $_wp_column_headers; 654 669 … … 668 683 ?> 669 684 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 687 685 <?php 686 $global_current_screen = $current_screen; 687 $current_screen = $screen; 688 688 $screen = convert_to_screen( 'edit' ); 689 689 $screen->post_type = 'ep_reg'; 690 690 $screen->base = 'edit'; 691 691 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(); 702 693 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 709 698 //Cleanup 710 699 remove_action( 'manage_posts_custom_column', Array( &$this, 'registration_column_values' ), 10, 2 ); -
eventpress/trunk/views/template.php
r308066 r368060 27 27 global $post; 28 28 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' ); 30 30 31 31 //Conditionally load map API if the map is going to be shown … … 91 91 */ 92 92 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' ); 94 94 } 95 95 … … 114 114 case 'reg_approved': 115 115 $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>"; 116 117 break; 117 118 case 'reg_pending': 118 119 $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>"; 119 121 break; 120 122 case 'reg_cancelled': … … 176 178 function bp_send_invites() { 177 179 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' ); 179 181 add_filter( 'bpcp_ep_event_single_home_template', Array( &$this, '_invite_template' ) ); 180 182 bp_core_load_template( 'type/single/home' ); -
eventpress/trunk/views/wp-tags.php
r308066 r368060 60 60 switch ( $user_status ) { 61 61 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; 64 68 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; 67 75 case 'reg_cancelled': 68 76 echo "<div class = 'ep-reg-status'>" . __( 'Your registration has been cancelled.', 'eventpress' ) . "</div>"; … … 466 474 } 467 475 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 481 476 if ( !function_exists( 'ep_render_event' ) ) { 482 477 function ep_render_event( $event = '' ) { … … 491 486 } 492 487 488 489 /** 490 * ep_calendar 491 * 492 * Wrapper for a call to EP_Calendar. 493 * 494 * @since 0.1 495 */ 493 496 if ( !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 ); 563 499 } 564 500 } -
eventpress/trunk/views/wp-widgets.php
r280350 r368060 62 62 * @since 0.1 63 63 */ 64 class EP_Calendar extends WP_Widget {64 class EP_Calendar_Widget extends WP_Widget { 65 65 /** 66 66 * Constructor. Initializes using parent class. … … 68 68 * @since 0.1 69 69 */ 70 function EP_Calendar () {70 function EP_Calendar_Widget() { 71 71 parent::WP_Widget( 'ep_calendar', __( 'Events Calendar', 'eventpress' ) ); 72 72 73 73 if( is_active_widget( false, false, 'ep_calendar' ) ) { 74 74 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' ); 76 76 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' ); 78 78 } 79 79 }
Note: See TracChangeset
for help on using the changeset viewer.