Advertisement
BakerMan

Slightly Amended TEC Gridview (Custom Topper)

Aug 14th, 2012
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.67 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Grid view template.  This file loads the TEC month view, specifically the
  4.  * month view navigation.  The actual rendering if the calendar happens in the
  5.  * table.php template.
  6.  *
  7.  * You can customize this view by putting a replacement file of the same name (gridview.php) in the events/ directory of your theme.
  8.  */
  9.  
  10. // Don't load directly
  11. if ( !defined('ABSPATH') ) { die('-1'); }
  12. $tribe_ecp = TribeEvents::instance();
  13. ?> 
  14.     <div id="tribe-events-content" class="grid">
  15.       <!-- This title is here for ajax loading - do not remove if you wish to use ajax switching between month views -->
  16.       <title><?php wp_title() ?></title>
  17.       <p><a class="bnbtn" href="/events/">List View</a></p>
  18.                 <!--custom top of calendar-->
  19.             <div id="dans-custom-topper" class="upcoming" style="height:0px;padding:1px 0px 20px 0;">
  20.             <div style="float:right; width: 180px; margin-top:-75px; margin-left:15px; margin-right:0;display:block;">
  21.                 <?php advertisement_unit("tier1_small"); ?>
  22.             </div>
  23.             <div style="margin-top:15px;width:725px;">
  24.                     <p>Bay Nature's events calendar has events from nature organizations all over the Bay Area. Find guided Bay Area hiking, learn about Bay Area wildlife, and more. <a href="../inthefield">Learn about our In the Field outings</a>, or <a href="/events/community/add">submit your own event!</a></p>
  25.                     <div class="event-info" style="background:none;width:725px;margin:0;">
  26.                         <ul>
  27.                             <li><a href="/events/month">All</a></li>
  28.                             <?php
  29.                             $terms = get_terms("tribe_events_cat");
  30.                             $count = count($terms);
  31.                             if ( $count > 0 ){
  32.                                 foreach ( $terms as $term ) {
  33.                                   echo "<li><a href='" . "/events/category/" . $term->slug . "/month'>" . $term->name . "</a></li>";
  34.                    
  35.                                     }
  36.                                 }
  37.                             ?>
  38.                         </ul>
  39.                     </div>
  40.                 </div>
  41.                 <div class="cl">&nbsp;</div>
  42.             </div>  
  43.      
  44.         <div id='tribe-events-calendar-header' class="clearfix">
  45.             <span class='tribe-events-month-nav'>
  46.                 <span class='tribe-events-prev-month'>
  47.                     <a href='<?php echo tribe_get_previous_month_link(); ?>'>
  48.                     &#x2190; <?php echo tribe_get_previous_month_text(); ?>
  49.                     </a>
  50.                 </span>
  51.  
  52.                 <?php tribe_month_year_dropdowns( "tribe-events-" ); ?>
  53.    
  54.                 <span class='tribe-events-next-month'>
  55.                     <a href='<?php echo tribe_get_next_month_link(); ?>'>              
  56.                     <?php echo tribe_get_next_month_text(); ?> &#x2192;
  57.                     </a>
  58.                <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading" id="ajax-loading" alt="" style='display: none'/>
  59.                 </span>
  60.             </span>
  61.  
  62.             <span class='tribe-events-calendar-buttons'>
  63.                 <a class='tribe-events-button-off' href='<?php echo tribe_get_listview_link(); ?>'><?php _e('Event List', 'tribe-events-calendar')?></a>
  64.                 <a class='tribe-events-button-on' href='<?php echo tribe_get_gridview_link(); ?>'><?php _e('Calendar', 'tribe-events-calendar')?></a>
  65.             </span>
  66.            
  67.  
  68.  
  69.  
  70.            
  71.         </div><!-- tribe-events-calendar-header -->
  72.        
  73.         <?php tribe_calendar_grid(); // See the views/table.php template for customization ?>
  74.       <?php if( function_exists( 'tribe_get_ical_link' ) ): ?>
  75.          <a title="<?php esc_attr_e('iCal Import', 'tribe-events-calendar') ?>" class="ical" href="<?php echo tribe_get_ical_link(); ?>"><?php _e('iCal Import', 'tribe-events-calendar') ?></a>
  76.       <?php endif; ?>
  77.         <?php if (tribe_get_option('donate-link', false) == true) { ?>
  78.             <p class="tribe-promo-banner"><?php echo apply_filters('tribe_promo_banner', sprintf( __('Calendar powered by %sThe Events Calendar%s', 'tribe-events-calendar'), '<a href="http://tri.be/wordpress-events-calendar/">', '</a>' ) ); ?></p>
  79.         <?php } ?>
  80.     </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement