示例#1
0
<?php

/**
 * Template Name: Neste helhus
 * Neste helhus
 *
 * @package WordPress
 * @subpackage kvarteret
 * @since Kvarteret 1.0
 */
//require_once('dew_template.php');
if (!in_array('dak_events_wp/dak_events_wp.php', get_option('active_plugins'))) {
    // Don't do anything if the dak_events_wp isn't activated
    get_header();
    ?>
<div id="content" class="narrowcolumn">
	<h2 class="center">The plugin <dd>dak_events_wp</dd> <em>must</em> be activated before you can use this template</h2>
</div>
<?php 
    get_sidebar();
    get_footer();
    exit;
}
$dew_options = DEW_Management::getOptions();
$client = new eventsCalendarClient($dew_options['eventServerUrl'], null, $dew_options['cache'], $dew_options['cacheTime']);
$festivalSearch = $client->festivalList(array('titleContains' => 'helhus', 'limit' => 1));
if (!empty($festivalSearch->data[0]->id)) {
    $wp_query->set('festival_id', $festivalSearch->data[0]->id);
    include TEMPLATEPATH . '/eventTemplates/festival.php';
}
示例#2
0
/**
 * Template Name: Events
 * The Template for displaying dak_event_wp events, festival and agenda
 *
 * @package WordPress
 * @subpackage kvarteret
 * @since Kvarteret 1.0
 */
//require_once('dew_template.php');
// if this is a full event, attach wp_title filter
$festival_id = 0;
$festival_id = empty($_GET['festival_id']) ? $wp_query->get('festival_id') : $_GET['festival_id'];
$festival_id = intval($festival_id);
if ($festival_id > 0) {
    $eventOptions = get_option('optionsDakEventsWp');
    $client = new eventsCalendarClient($eventOptions['eventServerUrl'], null, $eventOptions['cache'], $eventOptions['cacheTime']);
    $arr = $client->festival($festival_id);
    $rawFestival = $arr->data[0];
    add_filter('wp_title', 'dew_arrangement_template_wp_title', 5, 3);
}
if ($festival_id > 0) {
    $dew_title = $rawFestival->title;
    $title = apply_filters('the_title', $dew_title);
} else {
    $title = the_title('', '', false);
}
get_header();
?>
			<?php 
echo dew_agenda_menu_shortcode_handler();
?>
示例#3
0
 * Template Name: Events
 * The Template for displaying dak_event_wp events, festival and agenda
 *
 * @package WordPress
 * @subpackage kvarteret
 * @since Kvarteret 1.0
 */
//require_once('dew_template.php');
// if this is a full event, attach wp_title filter
//require_once('../../../plugins/dak_event_plugin/dew_shell_classes.php');
$event_id = 0;
$event_id = empty($_GET['event_id']) ? $wp_query->get('event_id') : $_GET['event_id'];
$event_id = intval($event_id);
if ($event_id > 0) {
    $eventOptions = get_option('optionsDakEventsWp');
    $client = new eventsCalendarClient($eventOptions['eventServerUrl'], null, $eventOptions['cache'], $eventOptions['cacheTime']);
    $arr = $client->event($event_id);
    $rawEvent = $arr->data[0];
    add_filter('wp_title', 'dew_arrangement_template_wp_title', 5, 3);
}
if ($event_id > 0) {
    $dew_title = $rawEvent->title;
    $title = apply_filters('the_title', $dew_title);
} else {
    $title = the_title('', '', false);
}
get_header();
?>
				<?php 
echo dew_agenda_menu_shortcode_handler();
?>