Advertisement
BakerMan

Untitled

Apr 23rd, 2013
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.26 KB | None | 0 0
  1. <?php
  2.  
  3. // Don't load directly
  4. if ( !defined( 'ABSPATH' ) ) {
  5.     die('-1');
  6. }
  7.  
  8.  
  9. /**
  10.  * The Submit and Edit event form
  11.  * You can customize this view by putting a replacement file of the same name (event-form.php) in the events/community/ directory of your theme.
  12.  *
  13.  * @package TribeCommunityEvents
  14.  * @since  1.0
  15.  * @author Modern Tribe Inc.
  16.  */
  17. ?>
  18. <script type="text/javascript">
  19. jQuery(document).ready(function() {
  20.     jQuery('#show_hidden_categories').click(function() {
  21.         //jQuery('#event-categories').css('overflow-y', 'scroll');
  22.         jQuery('.hidden_category').show('medium');
  23.         jQuery('#show_hidden_categories').hide();
  24.         return false;
  25.  
  26.     });
  27. });
  28.  
  29. </script>
  30.  
  31. <p> MY CUSTOM MESSAGE! </p>
  32. <form method="post" action="" enctype="multipart/form-data">
  33. <?php do_action( 'tribe_ce_event_submission_form_top' ); ?>
  34.     <?php $this->outputMessage(); ?>
  35.     <?php wp_nonce_field( 'ecp_event_submission' ); ?>
  36.  
  37.     <?php do_action( 'tribe_ce_event_submission_form_before_post_title' ); ?>
  38.     <div class="events-community-post-title">
  39.         <label for='post_title' <?php if ( $_POST && empty( $event->post_title ) ) echo 'class="error"'; ?>><?php _e( 'Event Title:', 'tribe-events-community' ); ?></label> <small class="req">(required)</small>
  40.         <?php $this->formTitle( $event ) ?>
  41.     </div>
  42.     <?php do_action( 'tribe_ce_event_submission_form_after_post_title' ); ?>
  43.  
  44.     <?php do_action( 'tribe_ce_event_submission_form_before_post_content' ); ?>
  45.     <div class="events-community-post-content">
  46.         <label for='post_content' <?php if ( $_POST && empty( $event->post_content)  ) echo 'class="error"'; ?>><?php _e( 'Event Description:', 'tribe-events-community' ); ?></label> <small class="req">(required)</small>
  47.         <?php $this->formContentEditor( $event ); ?>
  48.     </div>
  49.     <?php do_action( 'tribe_ce_event_submission_form_after_post_content' ); ?>
  50.  
  51.     <?php do_action( 'tribe_ce_event_submission_form_before_post_categories' ); ?> 
  52.     <div id='eventDetails' class="inside eventForm bubble">
  53.  
  54.     <table cellspacing="0" cellpadding="0" id="EventInfo">
  55.         <tr>
  56.             <td colspan="2" class="tribe_sectionheader"><h4 class="event-time"><?php _e( 'Categories:', 'tribe-events-community' ); ?></h4></td>
  57.         </tr>
  58.         <tr>
  59.             <td>
  60.                 <?php
  61.                     $this->formCategoryDropdown( $event );
  62.                 ?>
  63.             </td>
  64.         </tr>
  65.     </table>
  66.     </div>
  67.     <?php do_action( 'tribe_ce_event_submission_form_after_post_categories' ); ?>  
  68.  
  69.     <p></p>
  70.  
  71.     <?php do_action( 'tribe_ce_event_submission_form_before_post_featured_image' ); ?> 
  72.     <div id='eventDetails' class="inside eventForm bubble">
  73.  
  74.     <table cellspacing="0" cellpadding="0" id="EventInfo">
  75.         <tr>
  76.             <td colspan="2" class="tribe_sectionheader"><h4 class="event-time">Image</h4></td>
  77.         </tr>
  78.         <?php
  79.         $thumb = has_post_thumbnail( $tribe_event_id );
  80.         if( $thumb ) : ?>
  81.         <tr>
  82.             <td colspan="2" class="event-image"><p><?php echo get_the_post_thumbnail( $event->ID, 'medium' ); ?></p></td>
  83.         </tr>
  84.         <tr>
  85.             <td colspan="2"><p><?php echo $this->getDeleteFeaturedImageButton( $event ); ?></p></td>
  86.         </tr>
  87.         <?php endif; ?>
  88.  
  89.         <tr>
  90.             <td>Upload <?php if( !$thumb ) echo ' New'; ?></td>
  91.             <td>
  92.                 <input type="file" name="event_image">
  93.             </td>
  94.         </tr>
  95.             <td><p style="font-style: italic"><?php echo __('Images that are not png, jpg, or gif will not be uploaded.', 'tribe-community-events' ) ?></p></td>
  96.             <td></td>
  97.     </table>
  98.     </div>
  99.     <?php do_action( 'tribe_ce_event_submission_form_after_post_featured_image' ); ?>  
  100.     <p></p>
  101.  
  102.     <?php
  103.     global $post;
  104.     if (is_null($post)) $post = new stdClass;
  105.    
  106.     $this->formEventDetails( $event );
  107.     $this->formSpamControl();
  108.     ?>
  109.    
  110.     <?php do_action( 'tribe_ce_event_submission_form_before_post_submit_button' ); ?>  
  111.     <div class="events-community-footer wp-admin events-cal">
  112.     <input type='submit' id="post" class="button submit events-community-submit" value="<?php
  113.     if ( isset( $tribe_event_id ) && $tribe_event_id ) {
  114.         echo apply_filters( 'tribe_ce_event_update_button_text', __( 'Update Event', 'tribe-events-community' ) );
  115.     } else {
  116.         echo apply_filters( 'tribe_ce_event_submit_button_text', __( 'Submit Event', 'tribe-events-community' ) );
  117.     }
  118.     ?>" name='community-event' />
  119.     </div>
  120. <?php do_action( 'tribe_ce_event_submission_form_after_post_submit_button' ); ?>   
  121. <?php do_action( 'tribe_ce_event_submission_form_bottom' ); ?>
  122.  
  123. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement