Guest User

Untitled

a guest
Feb 11th, 2012
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.74 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. ?>
  13. <span class="back"><a href="<?php echo tribe_get_events_link(); ?>"><?php _e('&laquo; Back to Events', 'tribe-events-calendar'); ?></a></span>
  14. <?php if (tribe_get_end_date() > time() ) { ?><small><?php _e('This event has passed.', 'tribe-events-calendar') ?></small> <?php } ?>
  15.  
  16. <?php
  17. if ( function_exists('has_post_thumbnail') && has_post_thumbnail() ) {?>
  18. <?php the_post_thumbnail(); ?>
  19. <?php } ?>
  20.  
  21. <p class="event-info"><?php echo tribe_get_start_date(); ?> to<br/><?php echo tribe_get_end_date(); ?></p>
  22.  
  23. <div class="summary"><?php the_content() ?></div>
  24.  
  25. <?php if ( function_exists('tribe_get_recurrence_text') && tribe_is_recurring_event() ) : ?>
  26. <?php if(function_exists('tribe_all_occurences_link')): ?><p class="recurring"><em>This is a recurring event.
  27. <a href='<?php tribe_all_occurences_link() ?>'>Click here</a> to see future dates and times.</p></em><?php endif; ?>
  28.  
  29. <div id="tribe-events-event-meta" itemscope itemtype="http://schema.org/Event">
  30. <h5>Full Event Details</h5>
  31. <dl class="column">
  32. <dt><?php _e('Event:', 'tribe-events-calendar') ?></dt>
  33. <dd itemprop="name"><span class="summary"><?php the_title() ?></span></dd>
  34. <?php if (tribe_get_start_date() !== tribe_get_end_date() ) { ?>
  35. <dt><?php _e('Start:', 'tribe-events-calendar') ?></dt>
  36. <dd><meta itemprop="startDate" content="<?php echo tribe_get_start_date( null, false, 'Y-m-d-h:i:s' ); ?>"/><?php echo tribe_get_start_date(); ?></dd>
  37. <dt><?php _e('End:', 'tribe-events-calendar') ?></dt>
  38. <dd><meta itemprop="endDate" content="<?php echo tribe_get_end_date( null, false, 'Y-m-d-h:i:s' ); ?>"/><?php echo tribe_get_end_date(); ?></dd>
  39. <?php } else { ?>
  40. <dt><?php _e('Date:', 'tribe-events-calendar') ?></dt>
  41. <dd><meta itemprop="startDate" content="<?php echo tribe_get_start_date( null, false, 'Y-m-d-h:i:s' ); ?>"/><?php echo tribe_get_start_date(); ?></dd>
  42. <?php } ?>
  43. <?php if ( tribe_get_cost() ) : ?>
  44. <dt><?php _e('Cost:', 'tribe-events-calendar') ?></dt>
  45. <dd itemprop="price"><?php echo tribe_get_cost(); ?></dd>
  46. <?php endif; ?>
  47. <?php tribe_meta_event_cats(); ?>
  48.  
  49. </dd>
  50. <?php endif; ?>
  51. </dl>
  52. <dl class="column" itemprop="location" itemscope itemtype="http://schema.org/Place">
  53. <?php if(tribe_get_venue()) : ?>
  54. <dt><?php _e('Venue:', 'tribe-events-calendar') ?></dt>
  55. <dd itemprop="name">
  56. <?php if( class_exists( 'TribeEventsPro' ) ): ?>
  57. <?php tribe_get_venue_link( get_the_ID(), class_exists( 'TribeEventsPro' ) ); ?>
  58. <?php else: ?>
  59. <?php echo tribe_get_venue( get_the_ID() ) ?>
  60. <?php endif; ?>
  61. </dd>
  62. <?php endif; ?>
  63. <?php if(tribe_get_phone()) : ?>
  64. <dt><?php _e('Phone:', 'tribe-events-calendar') ?></dt>
  65. <dd itemprop="telephone"><?php echo tribe_get_phone(); ?></dd>
  66. <?php endif; ?>
  67. <?php if( tribe_address_exists( get_the_ID() ) ) : ?>
  68. <dt>
  69. <?php _e('Address:', 'tribe-events-calendar') ?><br />
  70. <?php if( tribe_show_google_map_link( get_the_ID() ) ) : ?>
  71. <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"><?php _e('Google Map', 'tribe-events-calendar' ); ?></a>
  72. <?php endif; ?>
  73. </dt>
  74. <dd>
  75. <?php echo tribe_get_full_address( get_the_ID() ); ?>
  76. </dd>
  77. <?php endif; ?>
  78. </dl>
  79.  
  80. <?php if( function_exists('tribe_the_custom_fields') ): ?>
  81. <?php echo tribe_the_custom_fields( get_the_ID() ); ?>
  82. <?php endif; ?>
  83. </div>
  84. <?php if( tribe_embed_google_map( get_the_ID() ) ) : ?>
  85. <?php if( tribe_address_exists( get_the_ID() ) ) { echo tribe_get_embedded_map(); } ?>
  86. <?php endif; ?>
  87. <div class="entry">
  88.  
  89. <?php if (function_exists('tribe_get_ticket_form')) { tribe_get_ticket_form(); } ?>
  90. </div>
  91. <?php if( function_exists('tribe_get_single_ical_link') ): ?>
  92. <a class="ical single" href="<?php echo tribe_get_single_ical_link(); ?>"><?php _e('iCal Import', 'tribe-events-calendar'); ?></a>
  93. <?php endif; ?>
  94. <?php if( function_exists('tribe_get_gcal_link') ): ?>
  95. <a href="<?php echo tribe_get_gcal_link() ?>" class="gcal-add" title="<?php _e('Add to Google Calendar', 'tribe-events-calendar'); ?>"><?php _e('+ Google Calendar', 'tribe-events-calendar'); ?></a>
  96. <?php endif; ?>
  97.  
  98. <div class="navlink previous"><?php tribe_previous_event_link();?></div>
  99.  
  100. <div class="navlink next"><?php tribe_next_event_link();?></div>
  101. <div style="clear:both"></div>
Advertisement
Add Comment
Please, Sign In to add comment