Guest User

Untitled

a guest
Mar 13th, 2013
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.55 KB | None | 0 0
  1. <?php
  2. /**
  3. * A single event. This displays the event title, description, meta, and
  4. * optionally, the Google map for the event.
  5. *
  6. * You can customize this view by putting a replacement file of the same name (single.php) in the events/ directory of your theme.
  7. */
  8.  
  9. // Don't load directly
  10. if ( !defined('ABSPATH') ) { die('-1'); }
  11. ?>
  12. <?php
  13. $gmt_offset = (get_option('gmt_offset') >= '0' ) ? ' +' . get_option('gmt_offset') : " " . get_option('gmt_offset');
  14. $gmt_offset = str_replace( array( '.25', '.5', '.75' ), array( ':15', ':30', ':45' ), $gmt_offset );
  15. if (strtotime( tribe_get_end_date(get_the_ID(), false, 'Y-m-d G:i') . $gmt_offset ) <= time() ) { ?>
  16. <div class="event-passed">
  17. <?php _e('This event has passed.', 'tribe-events-calendar'); ?>
  18. </div>
  19. <?php } ?>
  20. <div id="tribe-events-event-meta" itemscope itemtype="http://schema.org/Event">
  21. <?php if (tribe_get_start_date() !== tribe_get_end_date() ) { ?>
  22. <div class="party_date ">
  23. <?php _e('', 'tribe-events-calendar'); ?>
  24. <meta itemprop="startDate" content="<?php echo tribe_get_start_date( null, false, 'Y-m-d-h:i:s' ); ?>"/>
  25. <?php echo tribe_get_start_date(); ?>
  26. <?php /*?> <?php _e('to', 'tribe-events-calendar'); ?>
  27. <meta itemprop="endDate" content="<?php echo tribe_get_end_date( null, false, 'Y-m-d-h:i:s' ); ?>"/>
  28. <?php echo tribe_get_end_date(); ?><?php */?></div>
  29. <?php } else { ?>
  30. <div class="party_date">
  31. <?php _e('Date:', 'tribe-events-calendar'); ?>
  32. <meta itemprop="startDate" content="<?php echo tribe_get_start_date( null, false, 'Y-m-d-h:i:s' ); ?>"/>
  33. <?php echo tribe_get_start_date(); ?></div>
  34. <?php } ?>
  35. <dl class="column">
  36. <?php /*?> <dt class="event-label event-label-name"><?php _e('Event:', 'tribe-events-calendar'); ?></dt>
  37. <dd itemprop="name" class="event-meta event-meta-name"><span class="summary"><?php the_title(); ?></span></dd><?php */?>
  38. <?php if ( tribe_get_cost() ) : ?>
  39. <dt class="event-label event-label-cost">
  40. <?php _e('Cost:', 'tribe-events-calendar'); ?>
  41. </dt>
  42. <dd itemprop="price" class="event-meta event-meta-cost"><?php echo tribe_get_cost(); ?></dd>
  43. <?php endif; ?>
  44. <?php /*?> <?php tribe_meta_event_cats(); ?><?php */?>
  45. <?php if ( tribe_get_organizer_link( get_the_ID(), false, false ) ) : ?>
  46. <dt class="event-label event-label-organizer">
  47. <?php _e('Promoter:', 'tribe-events-calendar'); ?>
  48. </dt>
  49. <dd class="vcard author event-meta event-meta-author"><span class="fn url"><?php echo tribe_get_organizer_link(); ?></span></dd>
  50. <?php elseif (tribe_get_organizer()): ?>
  51. <dt class="event-label event-label-organizer">
  52. <?php _e('Promoter:', 'tribe-events-calendar'); ?>
  53. </dt>
  54. <dd class="vcard author event-meta event-meta-author"><span class="fn url"><?php echo tribe_get_organizer(); ?></span></dd>
  55. <?php endif; ?>
  56. <?php if ( tribe_get_organizer_phone() ) : ?>
  57. <dt class="event-label event-label-organizer-phone">
  58. <?php _e('Phone:', 'tribe-events-calendar'); ?>
  59. </dt>
  60. <dd itemprop="telephone" class="event-meta event-meta-phone"><?php echo tribe_get_organizer_phone(); ?></dd>
  61. <?php endif; ?>
  62. <?php if ( tribe_get_organizer_email() ) : ?>
  63. <dt class="event-label event-label-email">
  64. <?php _e('Email:', 'tribe-events-calendar'); ?>
  65. </dt>
  66. <dd itemprop="email" class="event-meta event-meta-email"><a href="mailto:<?php echo tribe_get_organizer_email(); ?>"><?php echo tribe_get_organizer_email(); ?></a></dd>
  67. <?php endif; ?>
  68. <?php /*?><dt class="event-label event-label-updated"><?php _e('Updated:', 'tribe-events-calendar'); ?></dt>
  69. <dd class="event-meta event-meta-updated"><span class="date updated"><?php the_date(); ?></span></dd><?php */?>
  70. <?php if ( class_exists('TribeEventsRecurrenceMeta') && function_exists('tribe_get_recurrence_text') && tribe_is_recurring_event() ) : ?>
  71. <dt class="event-label event-label-schedule">
  72. <?php _e('Schedule:', 'tribe-events-calendar'); ?>
  73. </dt>
  74. <dd class="event-meta event-meta-schedule"><?php echo tribe_get_recurrence_text(); ?>
  75. <?php if( class_exists('TribeEventsRecurrenceMeta') && function_exists('tribe_all_occurences_link')): ?>
  76. (<a href='<?php tribe_all_occurences_link(); ?>'>See all</a>)
  77. <?php endif; ?>
  78. </dd>
  79. <?php endif; ?>
  80. </dl>
  81. <dl class="column" itemprop="location" itemscope itemtype="http://schema.org/Place">
  82. <?php if(tribe_get_venue()) : ?>
  83. <dt class="event-label event-label-venue">
  84. <?php _e('Venue:', 'tribe-events-calendar'); ?>
  85. </dt>
  86. <dd itemprop="name" class="event-meta event-meta-venue">
  87. <?php if( class_exists( 'TribeEventsPro' ) ): ?>
  88. <?php tribe_get_venue_link( get_the_ID(), class_exists( 'TribeEventsPro' ) ); ?>
  89. <?php else: ?>
  90. <?php echo tribe_get_venue( get_the_ID() ); ?>
  91. <?php endif; ?>
  92. </dd>
  93. <?php endif; ?>
  94. <?php if(tribe_get_phone()) : ?>
  95. <dt class="event-label event-label-venue-phone">
  96. <?php _e('Phone:', 'tribe-events-calendar'); ?>
  97. </dt>
  98. <dd itemprop="telephone" class="event-meta event-meta-venue-phone"><?php echo tribe_get_phone(); ?></dd>
  99. <?php endif; ?>
  100. <?php if( tribe_address_exists( get_the_ID() ) ) : ?>
  101. <dt class="event-label event-label-address">
  102. <?php _e('Address:', 'tribe-events-calendar') ?>
  103. </dt>
  104. <dd class="event-meta event-meta-address"> <?php echo tribe_get_full_address( get_the_ID() ); ?>
  105. <?php if( tribe_show_google_map_link( get_the_ID() ) ) : ?>
  106. <a class="gmap" itemprop="maps" href="<?php echo tribe_get_map_link(); ?>" title="<?php _e('Click to view a Google Map', 'tribe-events-calendar'); ?>" target="_blank">
  107. <?php _e('Google Map', 'tribe-events-calendar' ); ?>
  108. </a>
  109. <?php endif; ?>
  110. </dd> </dl>
  111. <?php endif; ?>
  112. <?php if( function_exists('tribe_the_custom_fields') && tribe_get_custom_fields( get_the_ID() ) ): ?>
  113. <?php
  114. //Check to see if there is any value in the field before displaying
  115. if(!empty(tribe_get_custom_field('Add a ticket link'))) { ?>
  116. <dd class="event-meta event-meta-custom"><a href="<?php echo tribe_get_custom_field('Add a ticket link'); ?>">Ticket</a></dd>
  117. <?php } ?>
  118. <?php if(!empty(tribe_get_custom_field('Add a Youtube video link'))) { ?>
  119. <dd class="event-meta event-meta-custom"><a href="<?php echo tribe_get_custom_field('Add a Youtube video link'); ?>">Youtube</a></dd>
  120. <?php } ?>
  121. <?php if(!empty(tribe_get_custom_field('Add a Soundcloud link'))) { ?>
  122. <dd class="event-meta event-meta-custom"><a href="<?php echo tribe_get_custom_field('Add a Soundcloud link'); ?>">Soundcloud</a></dd>
  123. <?php } ?>
  124. <?php if(!empty(tribe_get_custom_field('Add any other promo link'))) { ?>
  125. <dd class="event-meta event-meta-custom"><a href="<?php echo tribe_get_custom_field('Add any other promo link'); ?>">Promo link</a></dd>
  126. <?php } ?>
  127. <?php endif; ?>
  128. </div>
  129. <div class="entry-content">
  130. <?php if (function_exists('responsive_social_share_sidebar')) { echo responsive_social_share_sidebar(); } ?>
  131. <div class="summary"><div class="line_up">Line-up:</div>
  132. <?php the_content(); ?>
  133. </div>
  134. <?php
  135. if ( function_exists('has_post_thumbnail') && has_post_thumbnail() ) {?>
  136. <?php the_post_thumbnail(); ?>
  137. <?php } ?>
  138. <?php if (function_exists('tribe_get_ticket_form') && tribe_get_ticket_form()) { tribe_get_ticket_form(); } ?>
  139. </div>
  140. <?php /*?><?php if( function_exists('tribe_get_single_ical_link') ): ?>
  141. <a class="ical single" href="<?php echo tribe_get_single_ical_link(); ?>">
  142. <?php _e('iCal Import', 'tribe-events-calendar'); ?>
  143. </a>
  144. <?php endif; ?>
  145. <?php if( function_exists('tribe_get_gcal_link') ): ?>
  146. <a href="<?php echo tribe_get_gcal_link(); ?>" class="gcal-add" title="<?php _e('Add to Google Calendar', 'tribe-events-calendar'); ?>">
  147. <?php _e('+ Google Calendar', 'tribe-events-calendar'); ?>
  148. </a>
  149. <?php endif; ?><?php */?>
  150. <?php if( tribe_embed_google_map( get_the_ID() ) ) : ?>
  151. <?php if( tribe_address_exists( get_the_ID() ) ) { echo tribe_get_embedded_map(); } ?>
  152. <?php endif; ?>
  153. <h2 style="font-weight:600">Are you going?</h2>
  154. <div>(Support this event! Leave a comment below telling your friends that you are attending this event)</div>
  155. <?php echo do_shortcode('[fbcomments]'); ?>
  156. <div class="navlink tribe-previous">
  157. <?php tribe_previous_event_link(); ?>
  158. </div>
  159. <div class="navlink tribe-next">
  160. <?php tribe_next_event_link(); ?>
  161. </div>
  162. <div style="clear:both"></div>
  163. <div><a href="<?php echo tribe_get_events_link(); ?>" class="back1">
  164. <?php _e('&laquo; Back to global events calendar', 'tribe-events-calendar'); ?>
  165. </a></div>
Advertisement
Add Comment
Please, Sign In to add comment