Merge remote-tracking branch 'calcms/master'

This commit is contained in:
Milan
2023-03-18 22:12:11 +01:00
110 changed files with 104 additions and 1624 deletions

View File

@@ -267,7 +267,7 @@ sub get($$) {
start_month => $start_month,
start_year => $start_year,
base_url => $config->{locations}->{base_url},
cache_base_url => $config->{cache}->{base_url},
widget_render_url=> $config->{locations}->{widget_render_url},
controllers => $config->{controllers},
};
@@ -283,10 +283,7 @@ sub render($$$$) {
my $parms = $request->{params}->{checked};
my $template_parameters = $calendar;
$template_parameters->{base_url} = $config->{locations}->{base_url};
$template_parameters->{cache_base_url} = $config->{cache}->{base_url};
$template_parameters->{server_cache} = $config->{cache}->{server_cache} if ( $config->{cache}->{server_cache} );
$template_parameters->{use_client_cache} = $config->{cache}->{use_client_cache}
if ( $config->{cache}->{use_client_cache} );
$template_parameters->{widget_render_url}= $config->{locations}->{widget_render_url};
template::process( $config, $_[0], $parms->{template}, $template_parameters );
}

View File

@@ -173,7 +173,7 @@ sub modify_results($$$) {
$result->{short_content} = $result->{content};
}
$result->{base_url} = $config->{locations}->{base_url};
$result->{cache_base_url} = $config->{cache}->{base_url};
$result->{widget_render_url} = $config->{locations}->{widget_render_url};
if ( $params->{template} =~ /\.xml/ ) {
@@ -223,10 +223,6 @@ sub render($$$$) {
$template_parameters->{event_id} = $params->{event_id};
$template_parameters->{event_start} = $params->{event_start};
$template_parameters->{server_cache} = $config->{cache}->{server_cache} if ( $config->{cache}->{server_cache} );
$template_parameters->{use_client_cache} = $config->{cache}->{use_client_cache}
if ( $config->{cache}->{use_client_cache} );
$template_parameters->{controllers} = $config->{controllers};
template::process( $config, $_[0], $params->{template}, $template_parameters );
}

View File

@@ -264,7 +264,7 @@ sub modify_results ($$$$) {
$result->{static_files_url} = $config->{locations}->{static_files_url};
$result->{source_base_url} = $config->{locations}->{source_base_url};
$result->{local_base_url} = $config->{locations}->{local_base_url};
$result->{cache_base_url} = $config->{cache}->{base_url};
$result->{widget_render_url}= $config->{locations}->{widget_render_url};
$result->{is_running} = 1 if $running_event_id
&& $result->{event_id}
@@ -1204,10 +1204,6 @@ sub render($$$$;$) {
my %tparams = %$params;
my $tparams = \%tparams;
$tparams->{events} = $results;
$tparams->{server_cache} = $config->{cache}->{server_cache}
if ( $config->{cache}->{server_cache} );
$tparams->{use_client_cache} = $config->{cache}->{use_client_cache}
if ( $config->{cache}->{use_client_cache} );
if ( scalar @$results > 0 ) {
my $result = $results->[0];
@@ -1221,7 +1217,7 @@ sub render($$$$;$) {
$tparams->{base_url} = $config->{locations}->{base_url};
$tparams->{base_domain} = $config->{locations}->{base_domain};
$tparams->{local_base_url} = $config->{locations}->{local_base_url};
$tparams->{cache_base_url} = $config->{cache}->{base_url};
$tparams->{widget_render_url} = $config->{locations}->{widget_render_url};
$tparams->{modified_at} = time::time_to_datetime( time() );
if ( ( defined $params->{template} )
&& ( $params->{template} =~ /(\.xml)/ ) )

View File

@@ -15,7 +15,6 @@ my $cgi=new CGI();
my $params=$cgi->Vars();
my $config =config::get('../../piradio.de/agenda/config/config.cgi');
my $debug =$config->{system}->{debug};
$params=check_params($params);
our $errors=[];

View File

@@ -1,18 +0,0 @@
<config>
start_dir /home/calcms/agenda/admin/jobs/start/
log_dir /home/calcms/agenda/admin/jobs/logs/
<job>
title potsdam : sender berlin -> 88vier.de
name potsdam_to_88vier.de
command /home/radio/calcms/sync_cms/sync_jobs/calcms_to_google.sh -7 31 potsdam
</job>
<job>
title frb : sender berlin -> 88vier.de
name frb_to_88vier.de
command /home/radio/calcms/sync_cms/sync_jobs/calcms_to_google.sh -7 31 frb
</job>
</config>

View File

@@ -1,33 +0,0 @@
<source>
<access>
hostname localhost
port 3306
database calcms
username calcms_read
password password
</access>
<date>
time_zone Europe/Berlin
</date>
project 88vier
<projects>
<88vier>
name 88vier
title 88vier Studio Ansage
start_date 2010-05-01
end_date 2020-06-01
</88vier>
</projects>
location ansage
<mapping>
event_details_url http://senderberlin.org/programm/sendung/<TMPL_VAR event_id>.html
</mapping>
<system>
debug 1
</system>
</source>

View File

@@ -1,33 +0,0 @@
<source>
<access>
hostname localhost
port 3306
database calcms
username calcms_read
password password
</access>
<date>
time_zone Europe/Berlin
</date>
project 88vier
<projects>
<88vier>
name 88vier
title 88vier Colaboradio
start_date 2010-05-01
end_date 2020-06-01
</88vier>
</projects>
location colabo
<mapping>
event_details_url http://senderberlin.org/programm/sendung/<TMPL_VAR event_id>.html
</mapping>
<system>
debug 1
</system>
</source>

View File

@@ -1,33 +0,0 @@
<source>
<access>
hostname localhost
port 3306
database calcms
username calcms_read
password password
</access>
<date>
time_zone Europe/Berlin
</date>
project 88vier
<projects>
<88vier>
name 88vier
title 88vier FRB
start_date 2010-05-01
end_date 2020-06-01
</88vier>
</projects>
location frb
<mapping>
event_details_url http://senderberlin.org/programm/sendung/<TMPL_VAR event_id>.html
</mapping>
<system>
debug 1
</system>
</source>

View File

@@ -1,33 +0,0 @@
<source>
<access>
hostname localhost
port 3306
database calcms
username calcms_read
password password
</access>
<date>
time_zone Europe/Berlin
</date>
project 88vier
<projects>
<88vier>
name 88vier
title 88vier PI-Radio
start_date 2010-05-01
end_date 2020-06-01
</88vier>
</projects>
location piradio
<mapping>
event_details_url http://piradio.de/programm/sendung/<TMPL_VAR event_id>.html
</mapping>
<system>
debug 1
</system>
</source>

View File

@@ -1,33 +0,0 @@
<source>
<access>
hostname localhost
port 3306
database calcms
username calcms_read
password password
</access>
<date>
time_zone Europe/Berlin
</date>
project 88vier
<projects>
<88vier>
name 88vier
title 88vier Frrapo
start_date 2010-05-01
end_date 2020-06-01
</88vier>
</projects>
location potsdam
<mapping>
event_details_url http://senderberlin.org/programm/sendung/<TMPL_VAR event_id>.html
</mapping>
<system>
debug 1
</system>
</source>

View File

@@ -1,21 +0,0 @@
<target>
<access>
calendarId your-id
serviceAccount your-accounr@developer.gserviceaccount.com
serviceAccountKeyFile googleApi.key
</access>
<date>
time_zone Europe/Berlin
</date>
<mapping>
title <TMPL_VAR location> : <TMPL_VAR series_name> - <TMPL_VAR title>
content <TMPL_VAR excerpt> <a href="<TMPL_VAR event_details_url>">mehr zur Sendung</a>
</mapping>
<system>
debug 1
</system>
</target>

View File

@@ -1,21 +0,0 @@
<target>
<access>
calendarId your-calendar-id
serviceAccount your-account@developer.gserviceaccount.com
serviceAccountKeyFile googleApi.key
</access>
<date>
time_zone Europe/Berlin
</date>
<mapping>
title <TMPL_VAR location> : <TMPL_VAR series_name> - <TMPL_VAR title>
content <TMPL_VAR excerpt> <a href="<TMPL_VAR event_details_url>">mehr zur Sendung</a>
</mapping>
<system>
debug 1
</system>
</target>

View File

@@ -1,21 +0,0 @@
<target>
<access>
calendarId your-id@group.calendar.google.com
serviceAccount your-account@developer.gserviceaccount.com
serviceAccountKeyFile googleApi.key
</access>
<date>
time_zone Europe/Berlin
</date>
<mapping>
title <TMPL_VAR location> : <TMPL_VAR series_name> - <TMPL_VAR title>
content <TMPL_VAR excerpt> <a href="<TMPL_VAR event_details_url>">mehr zur Sendung</a>
</mapping>
<system>
debug 1
</system>
</target>

View File

@@ -1,21 +0,0 @@
<target>
<access>
calendarId your-id@group.calendar.google.com
serviceAccount your-account@developer.gserviceaccount.com
serviceAccountKeyFile googleApi.key
</access>
<date>
time_zone Europe/Berlin
</date>
<mapping>
title <TMPL_VAR location> - <TMPL_VAR series_name> - <TMPL_VAR title>
content <TMPL_VAR excerpt> <a href="<TMPL_VAR event_details_url>">mehr zur Sendung</a>
</mapping>
<system>
debug 1
</system>
</target>

View File

@@ -1,23 +0,0 @@
<target>
type google_calendar2
<access>
calendarId 8nh18f858098u4ji4qrsmfrcr4@group.calendar.google.com
serviceAccount 433089473368-bv26eveq03b7nhb9p62nu3ts7htgb4g3@developer.gserviceaccount.com
serviceAccountKeyFile /home/radio/googleApi.key
</access>
<date>
time_zone Europe/Berlin
</date>
<mapping>
title <TMPL_VAR location> : <TMPL_VAR series_name> - <TMPL_VAR title>
content <TMPL_VAR excerpt> <a href="<TMPL_VAR event_details_url>">mehr zur Sendung</a>
</mapping>
<system>
debug 1
</system>
</target>

View File

@@ -1,135 +0,0 @@
package CalcmsEvents;
use strict;
use warnings;
use Common ('info','error');
use DateTime;
use Data::Dumper;
use creole_wiki;
use events;
use time;
#use config;
my $settings = {};
sub init($) {
$settings = shift || {};
}
sub set($$) {
my $key = shift;
my $value = shift;
$settings->{$key} = $value;
}
sub get($) {
my $key = shift;
return $settings->{$key};
}
# return a list of start_min, start_max request parameters.
sub splitRequest($$$) {
my $from = shift;
my $till = shift;
my $timeZone = shift;
return undef unless defined $from;
return undef unless defined $till;
return undef if $from eq '';
return undef if $till eq '';
my $dates = [];
my $start = time::get_datetime( $from, $timeZone );
my $end = time::get_datetime( $till, $timeZone );
#build a list of dates
my $date = $start;
my @dates = ();
while ( $date < $end ) {
push @dates, $date;
$date = $date->clone->add( days => 7 );
}
my $duration = $end - $date;
push @dates, $end->clone if $duration->delta_seconds <= 0;
#build a list of parameters from dates
$start = shift @dates;
for my $end (@dates) {
push @$dates,
{
from => $start,
till => $end
};
$start = $end;
}
return $dates;
}
#get a hash with per-day-lists days of a google calendar, given by its url defined at $calendar_name
sub getEvents($$) {
my $from = shift;
my $till = shift;
my $last_update = get('last_update');
info "getEvents from $from till $till";
my $request_parameters = {
from_date => $from,
till_date => $till,
project => get('project'),
archive => 'all',
template => 'no'
};
my $location = get('location') || '';
$request_parameters->{location} = $location if $location ne '';
my $config = $settings;
my %params = ();
my $request = {
url => $ENV{QUERY_STRING},
params => {
original => \%params,
checked => events::check_params( $config, $request_parameters, $settings ),
},
};
my $sourceEvents = events::get( $config, $request, $settings );
#return events by date
my $eventsByDate = {};
for my $source (@$sourceEvents) {
$source->{calcms_start} = $source->{start};
my $key = substr( $source->{start}, 0, 10 );
push @{ $eventsByDate->{$key} }, $source;
}
return $eventsByDate;
}
sub mapToSchema {
my $event = shift;
#override settings by source map filter
for my $key ( keys %{ get('mapping') } ) {
$event->{$key} = get('mapping')->{$key};
}
#resolve variables set in mapped values
for my $mkey ( keys %{ get('mapping') } ) {
for my $key ( keys %{$event} ) {
my $val = $event->{$key};
$val = $event->{$key} if ( $mkey eq $key );
$event->{$mkey} =~ s/<TMPL_VAR $key>/$val/g;
}
}
return $event;
}
#do not delete last line
1;

View File

@@ -1,75 +0,0 @@
package Common;
use warnings;
use strict;
use Fcntl ':flock';
use base 'Exporter';
our @EXPORT_OK = ( 'info', 'error' );
sub checkSingleInstance() {
open my $self, '<', $0 or die "Couldn't open self: $!";
flock $self, LOCK_EX | LOCK_NB or die "This script $0 is already running";
}
sub loadFile($) {
my $filename = shift;
my $content = '';
open my $file, '<', $filename || die("cannot load $filename");
while (<$file>) {
$content .= $_;
}
close $file;
return $content;
}
sub saveFile($$) {
my $filename = shift;
my $content = shift;
open my $file, ">:utf8", $filename || die("cannot write $filename");
print $file $content;
close $file;
}
sub getModifiedAt {
my $file = shift;
my @stats = stat $file;
return 0 if scalar @stats == 0;
my $modifiedAt = $stats[9];
return $modifiedAt;
}
sub execute($) {
my $command = shift;
print "EXEC:\t$command\n";
my $result = `$command`;
my $exitCode = ( $? >> 8 );
print "ERROR! exitCode=$?\n" if $exitCode > 0;
return ( $exitCode, $result );
}
my $debug = 0;
sub debug($$) {
my $level = shift;
my $message = shift;
print $message. "\n" if $debug > $level;
}
sub error ($) {
print "\nERROR: $_[0]\nsee $0 --help for help";
exit 1;
}
sub info ($) {
my $message = shift;
if ( $message =~ /^\n/ ) {
$message =~ s/^\n//g;
print "\n";
}
print "INFO:\t$message\n";
}
return 1;

View File

@@ -1,197 +0,0 @@
package GoogleCalendar;
use strict;
use warnings;
use Data::Dumper;
use lib '../calcms/';
use Common ( 'info', 'error' );
use GoogleCalendarApi();
use time();
my $settings = {};
my $cal = undef;
my $debug = 1;
sub set($$) {
my $key = shift;
my $value = shift;
$settings->{$key} = $value;
}
sub get($) {
my $key = shift;
return $settings->{$key};
}
sub init($) {
$settings = shift || {};
my $access = get('access');
# 1. create service account at https://console.developers.google.com/
# 2. enable Calendar API
# 3. share calendar with service account for update permissions
# see http://search.cpan.org/~shigeta/Google-API-Client-0.13/lib/Google/API/Client.pm
my $serviceAccount = $access->{serviceAccount};
my $serviceAccountKeyFile = $access->{serviceAccountKeyFile};
my $calendarId = $access->{calendarId};
my $serviceAccountKey = Common::loadFile($serviceAccountKeyFile);
my $calendar = GoogleCalendarApi->new(
{
'serviceAccount' => $serviceAccount,
'privateKey' => $serviceAccountKey,
'calendarId' => $calendarId,
'debug' => 0
}
);
$cal = $calendar;
}
#map event schema to target schema
sub mapToSchema {
my $event = shift;
#clone event
my $targetEvent = {};
for my $key ( keys %{$event} ) {
$targetEvent->{$key} = $event->{$key};
}
if ( defined $event->{recurrence} && ref( $event->{recurrence} ) eq 'HASH' ) {
$targetEvent->{reference} .= '[' . $event->{recurrence}->{number} . ']' if ( $event->{recurrence}->{number} > 0 );
$targetEvent->{recurrence} = $event->{recurrence}->{number} + 0;
}
$targetEvent->{rating} = 0;
$targetEvent->{visibility} = 0;
#set project by project's date range
my $projects = get('projects');
if ( ref($projects) eq 'HASH' ) {
for my $projectName ( keys %$projects ) {
my $project = get('projects')->{$projectName};
my $start = substr( $event->{start}, 0, 10 );
if ( $start ge $project->{start_date} && $start le $project->{end_date} ) {
$targetEvent->{project} = $project->{name};
}
}
}
#override settings by target map filter
for my $key ( keys %{ get('mapping') } ) {
$targetEvent->{$key} = get('mapping')->{$key};
}
#resolve variables set in mapped values
for my $mkey ( keys %{ get('mapping') } ) {
for my $key ( sort keys %{$targetEvent} ) {
my $val = $targetEvent->{$key};
$val = $event->{$key} if $mkey eq $key;
$targetEvent->{$mkey} =~ s/<TMPL_VAR $key>/$val/g;
}
}
$targetEvent->{title} =~ s/\s+$//g;
$targetEvent->{title} =~ s/\s*\#$//g;
$targetEvent->{title} =~ s/\s*\-\s*$//g;
my $schema = { event => $targetEvent };
return $schema;
}
#this is done before sync and allows to delete old events before adding new
sub getEvents {
my $event = shift;
return undef if get('date')->{'time_zone'} eq '';
return undef if $event->{start} eq '';
return undef if $event->{end} eq '';
#delete a span of dates
my $timeZone = get('date')->{'time_zone'};
my $start = time::get_datetime( $event->{start}, $timeZone );
my $end = time::get_datetime( $event->{end}, $timeZone );
info( "search target for events from " . $start . " to " . $end );
#search datetime with same timezone
my $events = $cal->getEvents(
{
timeMin => $cal->getDateTime( $start->datetime, $timeZone ),
timeMax => $cal->getDateTime( $end->datetime, $timeZone ),
maxResults => 50,
singleEvents => 'true',
orderBy => 'startTime'
}
);
return $events;
}
# insert a new event
sub insertEvent {
my $event = shift;
my $entity = $event->{event};
$entity->{'html_content'} = markup::creole_to_html( $entity->{'content'} );
my $timeZone = get('date')->{'time_zone'};
my $start = $cal->getDateTime( $entity->{start}, $timeZone );
my $end = $cal->getDateTime( $entity->{end}, $timeZone );
#info "insert event\t$start\t$entity->{title}";
my $entry = {
start => $start,
end => $end,
summary => $entity->{title},
description => $entity->{content},
location => $entity->{location},
transparency => 'transparent',
status => 'confirmed'
};
my $result = $cal->insertEvent($entry);
my $id = $result->{id};
}
sub deleteEvent {
my $event = shift;
#info "delete event";
$cal->deleteEvent( $event->{id} );
}
sub fixFields {
my $event = shift;
#lower case for upper case titles longer than 4 characters
for my $attr ( 'series_name', 'title' ) {
my $val = $event->{$attr};
my $c = 0;
while ( $val =~ /\b([A-Z]{5,99})\b/ && $c < 10 ) {
my $word = $1;
my $lower = lc $word;
$lower =~ s/^([a-z])/\u$1/gi;
$val =~ s/$word/$lower/g;
$c++;
}
$event->{$attr} = $val if $event->{$attr} ne $val;
}
for my $attr ( 'series_name', 'title', 'excerpt', 'content' ) {
my $val = $event->{$attr};
$val =~ s/^\s*(.*?)\s*$/$1/g;
$val =~ s/^[ \t]/ /g;
$event->{$attr} = $val if $event->{$attr} ne $val;
}
return $event;
}
#do not delete last line
1;

View File

@@ -1,250 +0,0 @@
package GoogleCalendarApi;
use strict;
use warnings;
use JSON;
use JSON::WebToken;
use LWP::UserAgent;
use HTML::Entities;
use URI::Escape;
use Data::Dumper;
use DateTime;
use Time::HiRes qw(sleep);
use Common ( 'info', 'error' );
sub new {
my $class = shift;
my $params = shift;
#print Dumper($class);
my $self = {};
for my $attr ( 'calendarId', 'debug' ) {
$self->{$attr} = $params->{$attr} if defined $params->{$attr};
}
$self->{debug} = 1;
my $instance = bless $self, $class;
if ( ( defined $params->{serviceAccount} ) && ( defined $params->{privateKey} ) ) {
$instance->login( $params->{serviceAccount}, $params->{privateKey} );
}
return $instance;
}
sub setCalendar {
my $self = shift;
my $calendarId = shift;
$self->{calendarId} = $calendarId;
}
sub getBasicUrl {
my $self = shift;
return 'https://www.googleapis.com/calendar/v3/calendars/' . encode_entities( $self->{calendarId} );
}
#https://developers.google.com/google-apps/calendar/v3/reference/events/list
#returns {
# 'timeZone' => 'Europe/Berlin',
# 'description' => "Radioprogramm von Pi Radio f\x{fc}r 88vier.de",
# 'defaultReminders' => [],
# 'accessRole' => 'owner',
# 'etag' => '"1415821582086000"',
# 'kind' => 'calendar#events',
# 'summary' => '88vier.de Pi Radio (Programm)',
# 'updated' => '2014-11-12T19:46:22.086Z',
# 'items' => [...]
# }
sub getEvents {
my $self = shift;
my $params = shift;
my $url = '/events?';
for my $param (
'iCalUID', 'alwaysIncludeEmail', 'maxAttendees', 'maxResults',
'orderBy', 'pageToken', 'privateExtendedProperty', 'q',
'sharedExtendedProperty', 'showDeleted', 'showHiddenInvitations', 'singleEvents',
'syncToken', 'timeZone'
)
{
$url .= '&' . $param . '=' . uri_escape( $params->{$param} ) if defined $params->{$param};
}
for my $param ( 'timeMin', 'timeMax', 'updatedMin' ) {
$url .= '&' . $param . '=' . uri_escape( $self->formatDateTime( $params->{$param} ) ) if defined $params->{$param};
}
my $result = $self->httpRequest( 'GET', $url );
return $result;
}
# sleep 0.25 seconds to prevent hitting the 5.0 requests/second/user rate
#sub sleep{
# my $this=shift;
# my $duration=shift;
# $duration=1 unless defined $duration;
# select(undef, undef, undef, $duration);
#}
#https://developers.google.com/google-apps/calendar/v3/reference/events/delete
sub deleteEvent {
my $self = shift;
my $eventId = shift;
my $url = '/events/' . $eventId;
#DELETE https://www.googleapis.com/calendar/v3/calendars/calendarId/events/eventId
my $result = $self->httpRequest( 'DELETE', $url );
#$self->sleep();
return $result;
}
#https://developers.google.com/google-apps/calendar/v3/reference/events/insert
sub insertEvent {
my $self = shift;
my $params = shift;
my $event = {
start => {
dateTime => $self->formatDateTime( $params->{start} )
},
end => {
dateTime => $self->formatDateTime( $params->{end} )
},
summary => $params->{summary} || '',
description => $params->{description} || '',
location => $params->{location} || '',
status => $params->{confirmed} || 'confirmed'
};
$event = encode_json $event;
#POST https://www.googleapis.com/calendar/v3/calendars/calendarId/events
my $url = '/events';
my $result = $self->httpRequest( 'POST', $url, $event );
#$self->sleep();
return $result;
}
# send a HTTP request
sub httpRequest {
my $self = shift;
my $method = shift;
my $url = shift;
my $content = shift || '';
sleep 0.3;
print STDERR "$method " . $url . "\n" if $self->{debug};
die("missing url") unless defined $url;
die("calendarId not set") unless defined $self->{calendarId};
die("not logged in ") unless defined $self->{api};
#prepend basic url including calendar id
$url = $self->getBasicUrl() . $url;
print STDERR "$method " . $url . "\n" if $self->{debug};
my $response = undef;
if ( $method eq 'GET' ) {
$response = $self->{api}->get($url);
} elsif ( ( $method eq 'POST' ) || ( $method eq 'PUT' ) ) {
#return;
print STDERR $content . "\n" if $self->{debug};
my $request = HTTP::Request->new( $method, $url );
$request->header( 'Content-Type' => 'application/json' );
$request->content($content);
$response = $self->{api}->request($request);
} elsif ( $method eq 'DELETE' ) {
#return;
$response = $self->{api}->delete($url);
}
if ( $response->is_success ) {
my $content = $response->content;
return {} if $content eq '';
return decode_json($content);
} else {
print "ERROR:\n";
print "Code: " . $response->code . "\n";
print "Message: " . $response->message . "\n";
print $response->content . "\n";
die;
}
}
# write datetime object to string
sub formatDateTime {
my $self = shift;
my $dt = shift;
my $datetime = $dt->format_cldr("yyyy-MM-ddTHH:mm:ssZZZZZ");
print STDERR "$dt -> $datetime\n" if $self->{debug};
return $datetime;
}
# parse datetime from string to object
sub getDateTime {
my $self = shift;
my $datetime = shift;
my $timezone = shift;
return if ( !defined $datetime ) or ( $datetime eq '' );
my @l = split /[\-\;T\s\:\+\.]/, $datetime;
$datetime = DateTime->new(
year => $l[0],
month => $l[1],
day => $l[2],
hour => $l[3],
minute => $l[4],
second => $l[5],
time_zone => $timezone
);
return $datetime;
}
# login with serviceAccount and webToken (from privateKey)
sub login {
my $self = shift;
my $serviceAccount = shift;
my $privateKey = shift;
# https://developers.google.com/accounts/docs/OAuth2ServiceAccount
my $time = time;
#create JSON Web Token
my $jwt = JSON::WebToken->encode(
{
iss => $serviceAccount,
scope => 'https://www.googleapis.com/auth/calendar',
aud => 'https://accounts.google.com/o/oauth2/token',
exp => $time + 3600,
iat => $time,
},
$privateKey,
'RS256',
{ typ => 'JWT' }
);
#send JSON web token to authentication service
$self->{auth} = LWP::UserAgent->new();
my $response = $self->{auth}->post(
'https://accounts.google.com/o/oauth2/token',
{
grant_type => encode_entities('urn:ietf:params:oauth:grant-type:jwt-bearer'),
assertion => $jwt
}
);
die( $response->code, "\n", $response->content, "\n" ) unless $response->is_success();
my $data = decode_json( $response->content );
#create a new user agent and set token to bearer
$self->{api} = LWP::UserAgent->new();
$self->{api}->default_header( Authorization => 'Bearer ' . $data->{access_token} );
print STDERR "login successful\n" if $self->{debug};
return $data;
}
1;

View File

@@ -1,81 +0,0 @@
#! /usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
use FindBin;
use lib "$FindBin::Bin/lib";
use lib "$FindBin::Bin/../calcms";
use Common ( 'info', 'error' );
use config();
use time();
use log();
$| = 1;
sub runJobs {
my $jobs = shift;
my $startDir = shift;
my $logDir = shift;
for my $job (@$jobs) {
my $startFile = $startDir . '/' . $job->{name} . '.start.txt';
my $startAge = Common::getModifiedAt($startFile);
next if $startAge == 0;
my $logFile = $logDir . '/' . $job->{name} . '.log';
my $logAge = Common::getModifiedAt($logFile);
next if $startAge < $logAge;
# read parameters form start file
my $content = log::load_file($startFile);
#execute command
my $command = $job->{command} . ' 2>&1 > ' . $logFile;
my ( $exitCode, $result ) = Common::execute($command);
error "exitCode=$exitCode on $command" if $exitCode != 0;
}
}
sub check() {
my $configFile = shift @ARGV;
error qq{cannot read $configFile "$configFile"} unless -e $configFile;
my $config = config::get($configFile);
my $startDir = $config->{start_dir} || '';
error 'missing configuration of jobs/start_dir!' if $startDir eq '';
error "job dir does not exist '$startDir'" unless -e $startDir;
error "cannot read from job dir '$startDir'. Please check permissions!" unless -w $startDir;
my $logDir = $config->{log_dir} || '';
error 'missing configuration of jobs/log_dir' if $logDir eq '';
error "job log dir does not exist '$logDir'" unless -e $logDir;
error "cannot read from job log dir '$logDir'. Please check permissions!" unless -r $logDir;
error "cannot write to job log dir '$logDir'. Please check permissions!" unless -w $logDir;
my $jobs = $config->{job};
error "no jobs defined!" if scalar @$jobs == 0;
return ( $jobs, $startDir, $logDir );
}
sub main() {
info "INIT\t" . time::time_to_datetime();
Common::checkSingleInstance();
my ( $jobs, $startDir, $logDir ) = check();
#exit after a at most 10 minute timeout in case of hanging process
local $SIG{ALRM} = sub { die "ERROR: exit due to synchronization hangs\n" };
alarm 10 * 60;
runJobs( $jobs, $startDir, $logDir );
info "DONE\t" . time::time_to_datetime();
}
main();

View File

@@ -1,292 +0,0 @@
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
use Getopt::Long;
use Config::General;
use DateTime;
use DateTime::Duration;
use IO::Socket::INET;
use Fcntl ':flock';
use FindBin;
use lib "$FindBin::Bin/lib";
use lib "$FindBin::Bin/../../calcms";
use Common ( 'info', 'error' );
use GoogleCalendar;
use CalcmsEvents;
Common::checkSingleInstance();
BEGIN {
$ENV{LANG} = "en_US.UTF-8";
}
$| = 1;
my $sourceConfigFile = '';
my $targetConfigFile = '';
my $debug = 1;
my $from = undef;
my $till = undef;
GetOptions(
"from=s" => \$from,
"till=s" => \$till,
"source=s" => \$sourceConfigFile,
"target=s" => \$targetConfigFile,
);
#source and taget settings are loaded from config files
my $settings = {};
error "set one of folling parameters: --from, --till" unless $from || $till;
init();
sync();
info "$0 done.";
exit 0;
#sync all events, splitting multi-day-requests into multiple 1-day-requests to avoid large result sets
sub sync {
my $timeZone = CalcmsEvents::get('date')->{time_zone};
my $from = CalcmsEvents::get('start_min');
my $till = CalcmsEvents::get('start_max');
info "sync from $from till $till at $timeZone";
#prepare target
info "last update: " . ( CalcmsEvents::get('last_update') || '' );
if ( my $days = CalcmsEvents::splitRequest( $from, $till, $timeZone ) ) {
for my $date (@$days) {
syncTimespan( $date->{from}, $date->{till} );
}
} else {
syncTimespan( $from, $till );
}
info "\nset last-update time: $settings->{event}->{update_start}";
setLastUpdateTime( $sourceConfigFile, $targetConfigFile, $settings->{event}->{update_start} );
}
#sync all events of a given source timespan
sub syncTimespan {
my $from = shift;
my $till = shift;
#get a list of all days and their events
my $sourceEvents = CalcmsEvents::getEvents( $from, $till );
my @dates = keys %$sourceEvents;
if ( scalar @dates == 0 ) {
info "\nno entries found.";
return;
}
#sort lists of date and time (same time events should be preserved)
for my $date ( sort { $a cmp $b } @dates ) {
syncEvents( $sourceEvents->{$date} );
}
}
#syncronize a list of source events to target events
sub syncEvents($) {
my $sourceEvents = shift;
my @sourceEvents = sort { $a->{calcms_start} cmp $b->{calcms_start} } @$sourceEvents;
$sourceEvents = \@sourceEvents;
my $start = $sourceEvents->[0]->{start};
my $end = $sourceEvents->[-1]->{end};
my $targetEvents = GoogleCalendar::getEvents(
{
start => $start,
end => $end
}
);
$targetEvents = $targetEvents->{items};
info "google:" . scalar(@$targetEvents) . " vs " . scalar(@$sourceEvents);
# mark all known target events
my $targetEventsByKey = {};
for my $event (@$targetEvents) {
#print Dumper($event);
next if $event->{status} eq 'canceled';
my $key = getGoogleEventToString($event);
$targetEventsByKey->{$key} = $event;
}
# mark all knwon source events
my $sourceEventsByKey = {};
for my $event (@$sourceEvents) {
$event = CalcmsEvents::mapToSchema($event);
$event = GoogleCalendar::mapToSchema($event);
my $key = getCalcmsEventToString($event);
$sourceEventsByKey->{$key} = $event;
}
# delete target entries without matching source entries
for my $key ( keys %$targetEventsByKey ) {
next if defined $sourceEventsByKey->{$key};
my $event = $targetEventsByKey->{$key};
info "delete $key ";
print Dumper($event);
GoogleCalendar::deleteEvent($event);
}
# insert source entries without matching target entries
for my $key ( keys %$sourceEventsByKey ) {
if ( defined $targetEventsByKey->{$key} ) {
info "$key is up to date";
next;
}
my $event = $sourceEventsByKey->{$key};
info "insert $key";
GoogleCalendar::insertEvent($event);
}
}
sub getGoogleEventToString {
my $event = shift;
my $result = "\n";
$result .= "start: " . substr( $event->{start}->{dateTime}, 0, 19 ) . "\n";
$result .= "end : " . substr( $event->{end}->{dateTime}, 0, 19 ) . "\n";
$result .= "title: $event->{summary}\n";
$result .= "desc : $event->{description}\n";
return $result;
}
sub getCalcmsEventToString {
my $event = shift;
my $result = "\n";
$result .= "start: " . substr( $event->{event}->{start_datetime}, 0, 19 ) . "\n";
$result .= "end : " . substr( $event->{event}->{end_datetime}, 0, 19 ) . "\n";
$result .= "title: $event->{event}->{title}\n";
$result .= "desc : $event->{event}->{content}\n";
return $result;
}
#import requested source and target libs
sub init {
binmode STDOUT, ":utf8";
{
#require target config file
error "missing target parameter!" unless $targetConfigFile =~ /\S/;
error "target file: '$targetConfigFile' does not exist" unless -e $targetConfigFile;
error "cannot read target file: '$targetConfigFile'" unless -r $targetConfigFile;
my $config = new Config::General($targetConfigFile);
$config = $config->{DefaultConfig}->{target};
GoogleCalendar::init($config);
}
{
#require source config file
error "missing source parameter!" unless $sourceConfigFile =~ /\S/;
error "source file: '$sourceConfigFile' does not exist" unless -e $sourceConfigFile;
error "cannot read source file: '$sourceConfigFile'" unless -r $sourceConfigFile;
my $config = new Config::General($sourceConfigFile);
$config = $config->{DefaultConfig}->{source};
$config->{last_update} = getLastUpdateTime( $sourceConfigFile, $targetConfigFile );
CalcmsEvents::init($config);
}
$from .= 'T00:00' if $from =~ /^\d\d\d\d\-\d\d\-\d\d$/;
$till .= 'T23:59' if $till =~ /^\d\d\d\d\-\d\d\-\d\d$/;
if ( $from =~ /^([-+]?\d+$)/ ) {
my $days = $1;
my $duration = new DateTime::Duration( days => $days );
$from = DateTime->today->add_duration($duration);
}
if ( $till =~ /^([-+]?\d+$)/ ) {
my $days = $1 + 1;
my $duration = new DateTime::Duration( days => $days );
$till = DateTime->today->add_duration($duration);
}
CalcmsEvents::set( 'start_min', $from ) if defined $from;
CalcmsEvents::set( 'start_max', $till ) if defined $till;
my $now = time();
$now = time::time_to_datetime($now);
$settings->{event} = {
update_start => time::time_to_datetime( time() ),
modified_at => $now,
};
}
#output usage on error or --help parameter
sub usage {
print qq{
update all/modified events from source at target.
USAGE: sync_cms.pl [--read,--update] [--modified,--all] --source s --target t
on using --from and --till requests will be processed as multiple single-day-requests.
parameters:
--read show all events without updating database
--update update target database with source events
--source source configuration file
--target target configuration file
--from start of date range: datetime (YYYY-MM-DDTHH:MM::SS) or days from today (e.g. -1 for yesterday, +1 for tomorrow)
--till end of date range: datetime (YYYY-MM-DDTHH:MM::SS) or days from today (e.g. -1 for yesterday, +1 for tomorrow)
examples:
update modified
perl sync_cms.pl --update --source=config/source/program.cfg --target=config/target/calcms.cfg
update a given time range
perl sync_cms.pl --update --all --from=2009-09-01T00:00:00 --till=2009-11-22T23:59:59 --source=config/source/program.cfg --target=config/target/calcms.cfg
update from last 2 days until next 3 days
perl sync_cms.pl --update --from=-2 --till=+3 --source=config/source/program.cfg --target=config/target/calcms.cfg
};
exit 1;
}
#load last update time out of sync.data
sub getLastUpdateTime {
my $source = shift;
my $target = shift;
my $date = undef;
return undef unless -r "sync.data";
my $content = Common::loadFile("sync.data");
if ( $content =~ /$source\s+\->\s+$target\s+:\s+(\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2})/ ) {
$date = $1;
}
return $date;
}
#save last update time to sync.data
sub setLastUpdateTime {
my $source = shift;
my $target = shift;
my $date = shift;
my $data = '';
if ( -r "sync.data" ) {
$data = Common::loadFile("sync.data");
}
if ( $data =~ /$source\s+\->\s+$target\s+:\s+(\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2})/ ) {
$data =~ s/($source\s+\->\s+$target\s+:)\s+\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}/$1\t$date/gi;
} else {
$data .= "$source\t\->\t$target\t:\t$date\n";
}
$data =~ s/[\r\n]+/\n/g;
Common::saveFile( "sync.data", $data );
}

View File

@@ -1,13 +0,0 @@
#!/bin/sh
from=$1
till=$2
project=$3
export LC_ALL="de_DE.utf8"
export LANGUAGE="de_DE.utf8"
set -x
cd /home/radio/calcms/sync_cms
nice -n 10 perl sync_cms.pl --from=$from --till=$till --source=config/source/calcms_$project.cfg --target=config/target/88vier_$project.cfg 2>&1

View File

@@ -1,7 +0,0 @@
#/bin/sh
./sync_project.sh "$1" "$2" piradio
./sync_project.sh "$1" "$2" potsdam
./sync_project.sh "$1" "$2" ansage
./sync_project.sh "$1" "$2" collabo
./sync_project.sh "$1" "$2" frb

View File

@@ -1,6 +0,0 @@
#!/bin/sh
file=/home/radio/piradio.de/agenda/admin/jobs/start/ansage_to_88vier.de.start.txt
touch $file
chown radio:www-data $file

View File

@@ -1,6 +0,0 @@
#!/bin/sh
file=/home/radio/piradio.de/agenda/admin/jobs/start/colabo_to_88vier.de.start.txt
touch $file
chown radio:www-data $file

View File

@@ -1,6 +0,0 @@
#!/bin/sh
file=/home/radio/piradio.de/agenda/admin/jobs/start/frb_to_88vier.de.start.txt
touch $file
chown radio:www-data $file

View File

@@ -1,6 +0,0 @@
#!/bin/sh
file=/home/radio/piradio.de/agenda/admin/jobs/start/piradio_to_88vier.de.start.txt
touch $file
chown radio:www-data $file

View File

@@ -1,6 +0,0 @@
#!/bin/sh
file=/home/radio/piradio.de/agenda/admin/jobs/start/potsdam_to_88vier.de.start.txt
touch $file
chown radio:www-data $file

View File

@@ -1,18 +0,0 @@
#!/bin/sh
from=$1
till=$2
project=$3
#. /etc/profile
set LC_ALL="de_DE.utf8"
export LC_ALL="de_DE.utf8"
set LANGUAGE="de_DE.utf8"
export LANGUAGE="de_DE.utf8"
cd /home/radio/calcms/sync_cms
echo "nice -n 10 perl sync_cms.pl --update --all --from=$from --till=$till --source=config/source/calcms_$project.cfg --target=config/target/88vier_$project.cfg 2>&1"
nice -n 10 perl sync_cms.pl --update --all --from=$from --till=$till --source=config/source/calcms_$project.cfg --target=config/target/88vier_$project.cfg 2>&1

View File

@@ -1,6 +0,0 @@
#/bin/sh
./sync_project.sh "$1" "$2" piradio
./sync_project.sh "$1" "$2" potsdam
./sync_project.sh "$1" "$2" ansage
./sync_project.sh "$1" "$2" collabo

View File

@@ -1,6 +0,0 @@
#!/bin/sh
file=/home/radio/senderberlin.org/agenda/admin/jobs/start/ansage_sender_berlin_to_88vier.de.start.txt
touch $file
chown radio:www-data $file

View File

@@ -1,6 +0,0 @@
#!/bin/sh
file=/home/radio/senderberlin.org/agenda/admin/jobs/start/colabo_sender_berlin_to_88vier.de.start.txt
touch $file
chown radio:www-data $file

View File

@@ -1,6 +0,0 @@
#!/bin/sh
file=/home/radio/senderberlin.org/agenda/admin/jobs/start/piradio_sender_berlin_to_88vier.de.start.txt
touch $file
chown radio:www-data $file

View File

@@ -1,6 +0,0 @@
#!/bin/sh
file=/home/radio/senderberlin.org/agenda/admin/jobs/start/potsdam_sender_berlin_to_88vier.de.start.txt
touch $file
chown radio:www-data $file

View File

@@ -31,8 +31,6 @@ if ( $0 =~ /aggregate.*?\.cgi$/ ) {
}
my $config = config::getFromScriptLocation();
my $debug = $config->{system}->{debug};
my $base_dir = $config->{locations}->{base_dir};
my $output_header = '';

View File

@@ -19,8 +19,6 @@ if ( $0 =~ /cal.*?\.cgi$/ ) {
( my $cgi, my $params, my $error ) = params::get($r);
my $config = config::getFromScriptLocation();
my $debug = $config->{system}->{debug};
my $request = {
url => $ENV{QUERY_STRING},
params => {

View File

@@ -20,8 +20,6 @@ binmode STDOUT, ":encoding(UTF-8)";
if ( $0 =~ /comments.*?\.cgi$/ ) {
my $config = config::get('config/config.cgi');
my $debug = $config->{system}->{debug};
my $request = {
url => $ENV{QUERY_STRING},
params => {

View File

@@ -31,21 +31,6 @@ domain ${DOMAIN}
rss rss
</controllers>
<system>
config_file ${BASE_DIR}/agenda/config/config.cgi
log_file /var/www/vhosts/${DOMAIN}/logs/error_log
log_debug_file ${LOG_DIR}/${DOMAIN}/calcms.log
log_debug_memory_file ${LOG_DIR}/${DOMAIN}/calcms-mem.log
debug_memory 0
debug 0
</system>
<cache>
base_url /programm
</cache>
<locations>
temp_dir ${BASE_DIR}/temp/
@@ -57,6 +42,7 @@ domain ${DOMAIN}
source_base_url https://${DOMAIN}/
local_base_url /agenda/
editor_base_url /agenda/planung/
widget_render_url /programm
# ajax
base_domain https://${DOMAIN}/

View File

@@ -93,7 +93,6 @@ var calcms = (function($) {
if (field != null && value != null && field != '') set(field, value);
// read fields
var debug = my.get('debug');
var from_date = my.get('from_date');
var till_date = my.get('till_date');
var date = my.get('date');
@@ -203,10 +202,6 @@ var calcms = (function($) {
url += "&print=1";
}
if (debug != '') {
url += '&debug=' + debug;
}
return url;
}
@@ -401,9 +396,7 @@ var calcms = (function($) {
// load calendar content
my.showCalendar = function showCalendar(target, field) {
var calendar_debug = my.get('calendar_debug');
var calendar_url = my.get('calendar_url');
var debug = my.get('debug');
var date = my.get('month');
var url = calendar_url;
@@ -411,9 +404,6 @@ var calcms = (function($) {
if (field == 'month') {
url += '/' + date + '/';
}
if (debug != '') {
url += '&debug=' + debug;
}
if (target == 'window') {
window.location.href = events_url + url;
@@ -421,9 +411,6 @@ var calcms = (function($) {
my.updateContainer('calcms_calendar', url);
}
if (calendar_debug != null) {
calendar_debug.innerHTML = url;
}
return false;
}
@@ -545,7 +532,6 @@ var calcms = (function($) {
if (my.get('preloaded') == '') {
var program_url = my.get('program_url');
var series_name_url = my.get('series_name_url');
var debug = my.get('debug');
if (program_url != null && program_url != '')
my.updateContainer('calcms_programs', program_url);

View File

@@ -32,7 +32,6 @@ my $r = shift;
( my $cgi, my $params, my $error ) = params::get($r);
my $config = config::get('../config/config.cgi');
my $debug = $config->{system}->{debug};
my ( $user, $expires ) = auth::get_user( $config, $params, $cgi );
return if ( !defined $user ) || ( $user eq '' );

View File

@@ -31,7 +31,6 @@ my $r = shift;
( my $cgi, my $params, my $error ) = params::get($r);
my $config = config::get('../config/config.cgi');
my $debug = $config->{system}->{debug};
my ( $user, $expires ) = auth::get_user( $config, $params, $cgi );
return if ( ( !defined $user ) || ( $user eq '' ) );

View File

@@ -29,7 +29,6 @@ use time();
binmode STDOUT, ":utf8";
our $config = config::get('../config/config.cgi');
our $debug = $config->{system}->{debug};
my $base_dir = $config->{locations}->{base_dir};
my $tempDir = '/var/tmp';

View File

@@ -42,7 +42,6 @@ my $r = shift;
( my $cgi, my $params, my $error ) = params::get($r);
my $config = config::get('../config/config.cgi');
my $debug = $config->{system}->{debug};
my ( $user, $expires ) = auth::get_user( $config, $params, $cgi );
return if ( !defined $user ) || ( $user eq '' );
$config->{user} = $user;

View File

@@ -32,7 +32,6 @@ my $r = shift;
( my $cgi, my $params, my $error ) = params::get($r);
my $config = config::get('../config/config.cgi');
my $debug = $config->{system}->{debug};
my ( $user, $expires ) = auth::get_user( $config, $params, $cgi );
return if ( !defined $user ) || ( $user eq '' );
@@ -139,7 +138,7 @@ sub showComments {
for my $event (@$events) {
$event->{start} = time::date_time_format( $config, $event->{start}, $language );
$comment_count += $event->{comment_count} if defined $event->{comment_count};
$event->{cache_base_url} = $config->{cache}->{base_url};
$event->{widget_render_url} = $config->{locations}->{widget_render_url};
}
}
for my $param (%$comment) {
@@ -148,7 +147,6 @@ sub showComments {
$template_parameters->{search} = markup::fix_utf8( $request->{params}->{original}->{search} );
$template_parameters->{events} = $events;
$template_parameters->{debug} = $config->{system}->{debug};
$template_parameters->{event_count} = scalar(@$events);
$template_parameters->{comment_count} = $comment_count;
$template_parameters->{is_empty} = 1 if scalar @$events == 0;

View File

@@ -26,7 +26,6 @@ my $r = shift;
( my $cgi, my $params, my $error ) = params::get($r);
my $config = config::get('../config/config.cgi');
my $debug = $config->{system}->{debug};
my ( $user, $expires ) = auth::get_user( $config, $params, $cgi );
return if ( ( !defined $user ) || ( $user eq '' ) );

View File

@@ -30,7 +30,6 @@ my $r = shift;
( my $cgi, my $params, my $error ) = params::get($r);
my $config = config::get('../config/config.cgi');
my $debug = $config->{system}->{debug};
my ( $user, $expires ) = auth::get_user( $config, $params, $cgi );
return if ( ( !defined $user ) || ( $user eq '' ) );
my $user_presets = uac::get_user_presets(

View File

@@ -40,7 +40,6 @@ my $r = shift;
( my $cgi, my $params, my $error ) = params::get($r);
my $config = config::get('../config/config.cgi');
my $debug = $config->{system}->{debug};
my ( $user, $expires ) = auth::get_user( $config, $params, $cgi );
return if ( ( !defined $user ) || ( $user eq '' ) );

View File

@@ -25,7 +25,6 @@ my $r = shift;
( my $cgi, my $params, my $error ) = params::get($r);
my $config = config::get('../config/config.cgi');
my $debug = $config->{system}->{debug};
my ( $user, $expires ) = auth::get_user( $config, $params, $cgi );
return if ( ( !defined $user ) || ( $user eq '' ) );

View File

@@ -33,7 +33,6 @@ my $r = shift;
my $cgi = undef;
my $config = config::get('../config/config.cgi');
our $debug = $config->{system}->{debug};
my $base_dir = $config->{locations}->{base_dir};
my $tmp_dir = '/var/tmp';
my $upload_limit = 2048 * 1000;

View File

@@ -33,7 +33,6 @@ my $r = shift;
( my $cgi, my $params, my $error ) = params::get($r);
my $config = config::get('../config/config.cgi');
my $debug = $config->{system}->{debug};
my ( $user, $expires ) = auth::get_user( $config, $params, $cgi );
return if ( ( !defined $user ) || ( $user eq '' ) );

View File

@@ -20,7 +20,6 @@ my $r = shift;
( my $cgi, my $params, my $error ) = params::get($r);
my $config = config::get('../config/config.cgi');
my $debug = $config->{system}->{debug};
my ( $user, $expires ) = auth::get_user( $config, $params, $cgi );
return if ( $user eq '' );

View File

@@ -28,7 +28,6 @@ my $r = shift;
( my $cgi, my $params, my $error ) = params::get($r);
my $config = config::get('../config/config.cgi');
my $debug = $config->{system}->{debug};
my ( $user, $expires ) = auth::get_user( $config, $params, $cgi );
return if ( ( !defined $user ) || ( $user eq '' ) );
@@ -216,7 +215,7 @@ sub getMail {
$mail->{Data} .= "nur zur Erinnerung...\n\n";
$mail->{Data} .= "am $event->{weekday_name} ist die naechste '$event->{series_name}'-Sendung.\n\n";
$mail->{Data} .=
"$event->{source_base_url}$event->{cache_base_url}/$config->{controllers}->{event}/$event->{event_id}.html\n\n";
"$event->{source_base_url}$event->{widget_render_url}/$config->{controllers}->{event}/$event->{event_id}.html\n\n";
$mail->{Data} .= "Gruss, $request->{user}\n";
return $mail;
}
@@ -243,12 +242,6 @@ sub check_params {
my $template = '';
$checked->{template} = template::check( $config, $params->{template}, 'notify-events' );
my $debug = $params->{debug} || '';
if ( $debug =~ /([a-z\_\,]+)/ ) {
$debug = $1;
}
$checked->{debug} = $debug;
entry::set_numbers( $checked, $params, [
'event_id', 'project_id', 'studio_id', 'default_studio_id', 'user_id', 'series_id', 'duration'
]);

View File

@@ -32,7 +32,6 @@ my $r = shift;
( my $cgi, my $params, my $error ) = params::get($r);
my $config = config::get('../config/config.cgi');
my $debug = $config->{system}->{debug};
my ( $user, $expires ) = auth::get_user( $config, $params, $cgi );
return if ( ( !defined $user ) || ( $user eq '' ) );

View File

@@ -22,7 +22,6 @@ my $r = shift;
( my $cgi, my $params, my $error ) = params::get($r);
my $config = config::get('../config/config.cgi');
my $debug = $config->{system}->{debug};
my ( $user, $expires ) = auth::get_user( $config, $params, $cgi );
return if ( $user eq '' );

View File

@@ -19,7 +19,6 @@ my $r = shift;
( my $cgi, my $params, my $error ) = params::get($r);
my $config = config::get('../config/config.cgi');
my $debug = $config->{system}->{debug};
$params = check_params( $config, $params );

View File

@@ -23,7 +23,6 @@ my $r = shift;
( my $cgi, my $params, my $error ) = params::get($r);
my $config = config::get('../config/config.cgi');
my $debug = $config->{system}->{debug};
my ( $user, $expires ) = auth::get_user( $config, $params, $cgi );
return if ( ( !defined $user ) || ( $user eq '' ) );

View File

@@ -22,7 +22,6 @@ my $r = shift;
( my $cgi, my $params, my $error ) = params::get($r);
my $config = config::get('../config/config.cgi');
my $debug = $config->{system}->{debug};
my ( $user, $expires ) = auth::get_user( $config, $params, $cgi );
return if ( ( !defined $user ) || ( $user eq '' ) );

View File

@@ -34,7 +34,6 @@ my $r = shift;
( my $cgi, my $params, my $error ) = params::get($r);
my $config = config::get('../config/config.cgi');
my $debug = $config->{system}->{debug};
my ( $user, $expires ) = auth::get_user( $config, $params, $cgi );
return if ( !defined $user ) || ( $user eq '' );

View File

@@ -24,7 +24,6 @@ my $r = shift;
( my $cgi, my $params, my $error ) = params::get($r);
my $config = config::get('../config/config.cgi');
my $debug = $config->{system}->{debug};
my ( $user, $expires ) = auth::get_user( $config, $params, $cgi );
return if ( ( !defined $user ) || ( $user eq '' ) );

View File

@@ -22,7 +22,6 @@ my $r = shift;
( my $cgi, my $params, my $error ) = params::get($r);
my $config = config::get('../config/config.cgi');
my $debug = $config->{system}->{debug};
my ( $user, $expires ) = auth::get_user( $config, $params, $cgi );
return if ( ( !defined $user ) || ( $user eq '' ) );

View File

@@ -25,7 +25,6 @@ my $r = shift;
( my $cgi, my $params, my $error ) = params::get($r);
my $config = config::get('../config/config.cgi');
my $debug = $config->{system}->{debug};
my ( $user, $expires ) = auth::get_user( $config, $params, $cgi );
return if ( !defined $user ) || ( $user eq '' );

View File

@@ -28,7 +28,6 @@ my $r = shift;
( my $cgi, my $params, my $error ) = params::get($r);
my $config = config::get('../config/config.cgi');
my $debug = $config->{system}->{debug};
my ( $user, $expires ) = auth::get_user( $config, $params, $cgi );
return if ( ( !defined $user ) || ( $user eq '' ) );

View File

@@ -22,7 +22,6 @@ my $r = shift;
( my $cgi, my $params, my $error ) = params::get($r);
my $config = config::get('../config/config.cgi');
my $debug = $config->{system}->{debug};
my ( $user, $expires ) = auth::get_user( $config, $params, $cgi );
return if ( $user eq '' );

View File

@@ -58,7 +58,7 @@
</a>
</td>
<td class="event_title">
<a href="<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event escape=url>/<TMPL_VAR id>.html#comments" title="zeige Sendung">
<a href="<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event escape=url>/<TMPL_VAR id>.html#comments" title="zeige Sendung">
<TMPL_VAR series_name> - <TMPL_VAR title>
</a>
</td>

View File

@@ -138,7 +138,7 @@
<!--
<TMPL_IF .allow.update_event>
<a class="button"
href="mailto:<TMPL_VAR .series_users_email_list>?cc=programm@radiopiloten.de&reply-to=programm@radiopiloten.de&subject=<TMPL_VAR start> - <TMPL_VAR series_name><TMPL_IF title> - <TMPL_VAR title></TMPL_IF><TMPL_IF episode> #<TMPL_VAR episode></TMPL_IF>&body=Hallo <TMPL_VAR .series_user_names>,%0A%0Anur zur Erinnerung...%0A%0Aam <TMPL_VAR weekday_name> ist die naechste '<TMPL_VAR series_name>'-Sendung.%0A%0Ahttp:<TMPL_VAR source_base_url><TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html%0A%0AGruss, <TMPL_VAR user>"
href="mailto:<TMPL_VAR .series_users_email_list>?cc=programm@radiopiloten.de&reply-to=programm@radiopiloten.de&subject=<TMPL_VAR start> - <TMPL_VAR series_name><TMPL_IF title> - <TMPL_VAR title></TMPL_IF><TMPL_IF episode> #<TMPL_VAR episode></TMPL_IF>&body=Hallo <TMPL_VAR .series_user_names>,%0A%0Anur zur Erinnerung...%0A%0Aam <TMPL_VAR weekday_name> ist die naechste '<TMPL_VAR series_name>'-Sendung.%0A%0Ahttp:<TMPL_VAR source_base_url><TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html%0A%0AGruss, <TMPL_VAR user>"
><button><TMPL_VAR .loc.button_reminder></button></a>
</TMPL_IF>
-->

View File

@@ -32,7 +32,6 @@ binmode STDOUT, ":utf8";
my $useCgi = 0;
our $config = config::get('../config/config.cgi');
our $debug = $config->{system}->{debug};
my $base_dir = $config->{locations}->{base_dir};
my $tempDir = '/var/tmp';

View File

@@ -24,7 +24,6 @@ my $r = shift;
( my $cgi, my $params, my $error ) = params::get($r);
my $config = config::get('../config/config.cgi');
my $debug = $config->{system}->{debug};
my ( $user, $expires ) = auth::get_user( $config, $params, $cgi );
return if ( ( !defined $user ) || ( $user eq '' ) );

View File

@@ -24,7 +24,6 @@ use localization();
my $r = shift;
( my $cgi, my $params, my $error ) = params::get($r);
my $config = config::get('../config/config.cgi');
my $debug = $config->{system}->{debug};
my ( $user, $expires ) = auth::get_user( $config, $params, $cgi );
return if ( ( !defined $user ) || ( $user eq '' ) );

View File

@@ -24,7 +24,6 @@ my $r = shift;
( my $cgi, my $params, my $error ) = params::get($r);
my $config = config::get('../config/config.cgi');
my $debug = $config->{system}->{debug};
my ( $user, $expires ) = auth::get_user( $config, $params, $cgi );
return if ( ( !defined $user ) || ( $user eq '' ) );

View File

@@ -23,7 +23,6 @@ binmode STDOUT, ":utf8";
my $r = shift;
( my $cgi, my $params, my $error ) = params::get($r);
my $config = config::get('../config/config.cgi');
my $debug = $config->{system}->{debug};
my ( $user, $expires ) = auth::get_user( $config, $params, $cgi );
return if ( ( !defined $user ) || ( $user eq '' ) );
my $user_presets = uac::get_user_presets(

View File

@@ -25,7 +25,6 @@ my $r = shift;
( my $cgi, my $params, my $error ) = params::get($r);
my $config = config::get('../config/config.cgi');
my $debug = $config->{system}->{debug};
my ( $user, $expires ) = auth::get_user( $config, $params, $cgi );
return if ( ( !defined $user ) || ( $user eq '' ) );

View File

@@ -19,7 +19,6 @@ binmode STDOUT, ":utf8";
my $r = shift;
( my $cgi, my $params, my $error ) = params::get($r);
my $config = config::getFromScriptLocation();
my $debug = $config->{system}->{debug};
#get request
my $request = {
@@ -38,8 +37,6 @@ my $dbh = db::connect($config);
#fill template
my $template_parameters = {};
$template_parameters->{projects} = getProjects( $dbh, $config, $params );
$template_parameters->{debug} = $config->{system}->{debug};
$template_parameters->{server_cache} = $config->{cache}->{server_cache} if $config->{cache}->{server_cache};
#output template
my $template = $params->{template};
@@ -96,7 +93,6 @@ sub getSeriesNames {
my $project = shift;
my $params = shift;
my $debug = $config->{system}->{debug};
my $bind_values = [];
my @conds = ();

View File

@@ -3,7 +3,6 @@ Content-type:text/html; charset=UTF-8;
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="expires" content="">
<meta http-equiv="Content-Script-Type" content="javascript" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<title>Calendar <TMPL_VAR project_title></title>
@@ -22,16 +21,16 @@ Content-type:text/html; charset=UTF-8;
<thead>
<tr>
<th class="first">
<a href="<TMPL_VAR .cache_base_url>/<TMPL_VAR .controllers.calendar>/<TMPL_VAR previous_month>.html" onclick="calcms.selectMonthEventListener('<TMPL_VAR previous_month>');return false;"
<a href="<TMPL_VAR .widget_render_url>/<TMPL_VAR .controllers.calendar>/<TMPL_VAR previous_month>.html" onclick="calcms.selectMonthEventListener('<TMPL_VAR previous_month>');return false;"
>&laquo;</a>
</th>
<th colspan="5" align="center">
<a class="calmonthclick" href="<TMPL_VAR .cache_base_url>/<TMPL_VAR .controllers.calendar>/<TMPL_VAR start_date>_<TMPL_VAR end_date>.html"
<a class="calmonthclick" href="<TMPL_VAR .widget_render_url>/<TMPL_VAR .controllers.calendar>/<TMPL_VAR start_date>_<TMPL_VAR end_date>.html"
><TMPL_VAR start_month_name> <TMPL_VAR start_year></a>
<!-- onclick="calcms.selectMonthEventListener('<TMPL_VAR start_date>');return false;" -->
</th>
<th class="last">
<a href="<TMPL_VAR .cache_base_url>/<TMPL_VAR .controllers.calendar>/<TMPL_VAR next_month>.html" onclick="calcms.selectMonthEventListener('<TMPL_VAR next_month>');return false;"
<a href="<TMPL_VAR .widget_render_url>/<TMPL_VAR .controllers.calendar>/<TMPL_VAR next_month>.html" onclick="calcms.selectMonthEventListener('<TMPL_VAR next_month>');return false;"
>&raquo;</a>
</th>
</tr>
@@ -50,7 +49,7 @@ Content-type:text/html; charset=UTF-8;
<!--
<TMPL_LOOP week><th class="<TMPL_VAR class>"><a href="<TMPL_VAR .local_base_url>/<TMPL_VAR .controllers.events>/<TMPL_VAR from_date>/<TMPL_VAR till_date>/" title="Woche anzeigen" onclick="calcms.selectDateRangeEventListener('<TMPL_VAR from_date>','<TMPL_VAR till_date>');return false;" ><TMPL_VAR week_of_year></a></th></TMPL_LOOP>
-->
<TMPL_LOOP days><td class="<TMPL_VAR class>"><a class="caldayclick" href="<TMPL_VAR .cache_base_url>/<TMPL_VAR .controllers.events>/<TMPL_VAR date>.html" title="<TMPL_VAR day>.<TMPL_VAR month>. zeigen"
<TMPL_LOOP days><td class="<TMPL_VAR class>"><a class="caldayclick" href="<TMPL_VAR .widget_render_url>/<TMPL_VAR .controllers.events>/<TMPL_VAR date>.html" title="<TMPL_VAR day>.<TMPL_VAR month>. zeigen"
><TMPL_VAR day></a></td>
</TMPL_LOOP>

View File

@@ -3,7 +3,6 @@ Content-type:text/html; charset=UTF-8;
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="expires" content="36000">
<meta http-equiv="Content-Script-Type" content="javascript" />
<meta http-equiv="Content-Style-Type" content="text/css" />
@@ -19,19 +18,19 @@ Content-type:text/html; charset=UTF-8;
<table cellpadding="0" cellspacing="0" border="0" width="190">
<tr>
<th class="first">
<a href="<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.calendar>/<TMPL_VAR previous_month>.html"
<a href="<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.calendar>/<TMPL_VAR previous_month>.html"
>&lt;</a>
<!--onclick="calcms.selectMonthEventListener('<TMPL_VAR previous_month>');return false;"-->
</th>
<th colspan="6" width="180" align="center">
<a href="<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.calendar>/<TMPL_VAR start_date>_<TMPL_VAR end_date>.html"
<a href="<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.calendar>/<TMPL_VAR start_date>_<TMPL_VAR end_date>.html"
>
<TMPL_VAR start_month_name> <TMPL_VAR start_year>
</a>
<!--onclick="calcms.selectMonthEventListener('<TMPL_VAR start_date>');return false;"-->
</th>
<th class="last">
<a href="<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.calendar>/<TMPL_VAR next_month>.html"
<a href="<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.calendar>/<TMPL_VAR next_month>.html"
>&gt;</a>
</th>
<!--onclick="calcms.selectMonthEventListener('<TMPL_VAR next_month>');return false;"-->
@@ -65,7 +64,7 @@ Content-type:text/html; charset=UTF-8;
<TMPL_LOOP NAME=days>
<td class="<TMPL_VAR class>">
<TMPL_IF is_day>
<a href="<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.events>/<TMPL_VAR date>.html"
<a href="<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.events>/<TMPL_VAR date>.html"
title="<TMPL_VAR description>"
>
<TMPL_VAR day>

View File

@@ -3,7 +3,6 @@ Content-type:text/html; charset=UTF-8;
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="expires" content="36000">
<meta http-equiv="Content-Script-Type" content="javascript" />
<meta http-equiv="Content-Style-Type" content="text/css" />
@@ -19,15 +18,15 @@ Content-type:text/html; charset=UTF-8;
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<th class="first">
<a href="<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.calendar>/<TMPL_VAR previous_month>.html"
<a href="<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.calendar>/<TMPL_VAR previous_month>.html"
>&laquo;</a>
</th>
<th colspan="6" align="center">
<a href="<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.calendar>/<TMPL_VAR start_date>_<TMPL_VAR end_date>.html"
<a href="<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.calendar>/<TMPL_VAR start_date>_<TMPL_VAR end_date>.html"
><TMPL_VAR start_month_name> <TMPL_VAR start_year></a>
</th>
<th class="last">
<a href="<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.calendar>/<TMPL_VAR next_month>.html"
<a href="<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.calendar>/<TMPL_VAR next_month>.html"
>&raquo;</a>
</th>
</tr>
@@ -56,7 +55,7 @@ Content-type:text/html; charset=UTF-8;
<TMPL_LOOP NAME=days>
<td class="<TMPL_VAR class>">
<TMPL_IF is_day>
<a href="<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.events>/<TMPL_VAR date>.html"
<a href="<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.events>/<TMPL_VAR date>.html"
title="<TMPL_VAR description>"
><TMPL_VAR day></a>
</TMPL_IF>

View File

@@ -3,7 +3,7 @@ Access-Control-Allow-Origin: *
<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom' xmlns:gCal='http://schemas.google.com/gCal/2005'>
<id><TMPL_VAR cache_base_url>comments</id>
<id><TMPL_VAR widget_render_url>comments</id>
<title type='text'><TMPL_VAR project_title> - Kommentare</title>
<updated><TMPL_VAR created_at></updated>
@@ -14,7 +14,7 @@ Access-Control-Allow-Origin: *
<name><TMPL_VAR project_title></name>
<email>info@radiopiloten.de</email>
</author>
<link rel='alternate' type='text/html' href='<TMPL_VAR cache_base_url>feed_kommentare/'/>
<link rel='alternate' type='text/html' href='<TMPL_VAR widget_render_url>feed_kommentare/'/>
<generator version='0.1' uri='http://radiopiloten.org'>calcms</generator>
<gCal:timezone value='Europe/Berlin'/>
<gCal:timesCleaned value='0'/>
@@ -29,8 +29,8 @@ Access-Control-Allow-Origin: *
<TMPL_IF content><summary type='text'><TMPL_VAR content></summary></TMPL_IF>
<TMPL_IF content><content type='html'><![CDATA[<TMPL_VAR content>]]></content></TMPL_IF>
<link rel='alternate' type='text/html' href='<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event escape=url>/<TMPL_VAR event_id escape=url>.html#comment_<TMPL_VAR id escape=url>' title='alternate'/>
<link rel='self' type='application/atom+xml' href='<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event escape=url>/<TMPL_VAR event_id escape=url>.html#comment_<TMPL_VAR id escape=url>'/>
<link rel='alternate' type='text/html' href='<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event escape=url>/<TMPL_VAR event_id escape=url>.html#comment_<TMPL_VAR id escape=url>' title='alternate'/>
<link rel='self' type='application/atom+xml' href='<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event escape=url>/<TMPL_VAR event_id escape=url>.html#comment_<TMPL_VAR id escape=url>'/>
<author><name><TMPL_VAR author></name></author>
</entry>
</TMPL_LOOP>

View File

@@ -12,7 +12,7 @@ Access-Control-Allow-Origin: *
<div id="sendungen">
</div>
<TMPL_LOOP comments>
<a id="event_list_id_<TMPL_VAR event_id>" class="click_for_detail" href="<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#comments">
<a id="event_list_id_<TMPL_VAR event_id>" class="click_for_detail" href="<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#comments">
<div class="comments level<TMPL_VAR level>">
<span class="author"><TMPL_VAR author escape=none></span>:
<span class="content"><TMPL_VAR short_content escape=none></span>

View File

@@ -3,7 +3,7 @@ Access-Control-Allow-Origin: *
<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom' xmlns:gCal='http://schemas.google.com/gCal/2005'>
<id><TMPL_VAR cache_base_url></id>
<id><TMPL_VAR widget_render_url></id>
<title type='text'><TMPL_VAR project_title></title>
<updated><TMPL_VAR modified_at></updated>
@@ -15,14 +15,14 @@ Access-Control-Allow-Origin: *
<email><TMPL_VAR project_email></email>
</author>
<link rel='alternate' type='text/html' href='<TMPL_VAR source_base_url>'/>
<link rel='self' type='application/atom+xml' href='<TMPL_VAR cache_base_url>/feed/'/>
<link rel='self' type='application/atom+xml' href='<TMPL_VAR widget_render_url>/feed/'/>
<generator version='0.1' uri='http://radiopiloten.de'>calcms</generator>
<gCal:timezone value='<TMPL_VAR time_zone>'/>
<gCal:timesCleaned value='0'/>
<TMPL_LOOP events>
<entry>
<id><TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html</id>
<id><TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html</id>
<published><TMPL_VAR created_at></published>
<updated><TMPL_VAR modified_at></updated>
@@ -31,8 +31,8 @@ Access-Control-Allow-Origin: *
<summary type='text'><TMPL_VAR excerpt></summary>
<content type='html'><![CDATA[<TMPL_VAR weekday_short_name>, <TMPL_VAR start_date_name> - <TMPL_VAR start_time_name> - <TMPL_VAR end_time_name> | <TMPL_VAR full_title><p><TMPL_VAR content_html>]]></content>
<link rel='alternate' type='text/html' href='<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>' title='alternate'/>
<link rel='self' type='application/atom+xml' href='<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>'/>
<link rel='alternate' type='text/html' href='<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>' title='alternate'/>
<link rel='self' type='application/atom+xml' href='<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>'/>
<TMPL_IF media_url><link rel="enclosure" type="audio/mpeg" href="<TMPL_VAR media_url>"/>
</TMPL_IF>
<TMPL_IF project_title><author>

View File

@@ -35,7 +35,7 @@ Feed = {
"openSearch$totalResults" : { "$t" : "<TMPL_VAR event_count>" },
<TMPL_LOOP events>
"entry" : [ {
"id" : { "$t" : "<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html/" },
"id" : { "$t" : "<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html/" },
"published" : { "$t": "<TMPL_VAR created_at>" },
"updated" : { "$t": "<TMPL_VAR modified_at>" },
"category" : [ {
@@ -49,11 +49,11 @@ Feed = {
"link" : [ {
"rel" : "alternate",
"type" : "text/html",
"href" : "<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri>"
"href" : "<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri>"
},{
"rel" : "self",
"type" : "application/atom+xml",
"href" : "<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri>"
"href" : "<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri>"
} ],
"author" : [ {
"name" : { "$t" : "<TMPL_VAR project_email>" },

View File

@@ -4,8 +4,8 @@ Content-type:application/rss+xml; charset=UTF-8
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<atom:link href="http:<TMPL_VAR base_domain><TMPL_VAR cache_base_url>/rss" rel="self" type="application/rss+xml" />
<link>http:<TMPL_VAR base_domain><TMPL_VAR cache_base_url>/event.rss.xml</link>
<atom:link href="http:<TMPL_VAR base_domain><TMPL_VAR widget_render_url>/rss" rel="self" type="application/rss+xml" />
<link>http:<TMPL_VAR base_domain><TMPL_VAR widget_render_url>/event.rss.xml</link>
<title><TMPL_VAR project_title></title>
<description><TMPL_VAR project_subtitle></description>
<language>de-de</language>
@@ -14,7 +14,7 @@ Content-type:application/rss+xml; charset=UTF-8
<ttl>3600</ttl>
<image>
<url>http:<TMPL_VAR base_domain>sites/default/files/images/piradio-logo-kreis.preview.gif</url>
<link>http:<TMPL_VAR base_domain><TMPL_VAR cache_base_url>/event.rss.xml</link>
<link>http:<TMPL_VAR base_domain><TMPL_VAR widget_render_url>/event.rss.xml</link>
<title><TMPL_VAR project_title></title>
</image>
@@ -23,8 +23,8 @@ Content-type:application/rss+xml; charset=UTF-8
<item>
<title><TMPL_VAR weekday_short_name>, <TMPL_VAR start_date_name> - <TMPL_VAR start_time_name> - <TMPL_VAR end_time_name> | <TMPL_VAR full_title></title>
<description><TMPL_VAR excerpt></description>
<link>http:<TMPL_VAR base_domain><TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url></link>
<guid>http:<TMPL_VAR base_domain><TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html</guid>
<link>http:<TMPL_VAR base_domain><TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url></link>
<guid>http:<TMPL_VAR base_domain><TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html</guid>
<pubDate><TMPL_VAR modified_at></pubDate>
<comments>http:<TMPL_VAR base_domain><TMPL_VAR cache_base_domain>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#comments</comments>
<media:content url="http:<TMPL_VAR base_domain><TMPL_VAR image>" medium="image">

View File

@@ -18,7 +18,7 @@ Content-type:text/html; charset=utf-8;
<!-- Titel der Sendung -->
<!--<a href="<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>" >-->
<!--<a href="<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>" >-->
<h1><TMPL_VAR full_title></h1>
@@ -133,7 +133,7 @@ Content-type:text/html; charset=utf-8;
<!-- Permalink -->
<a class="permalink" href="<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>">Permalink</a>
<a class="permalink" href="<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>">Permalink</a>
<div style="clear:both"></div>

View File

@@ -5,7 +5,7 @@ $events=[
{
'__last__' => q|<TMPL_VAR __last__>|,
'base_url' => q|<TMPL_VAR base_url>|,
'cache_base_url' => q|<TMPL_VAR cache_base_url>|,
'widget_render_url' => q|<TMPL_VAR widget_render_url>|,
'comment_count' => q|<TMPL_VAR comment_count>|,
'.controllers.event' => q|<TMPL_VAR .controllers.event>|,
'.controllers.events' => q|<TMPL_VAR .controllers.events>|,

View File

@@ -69,7 +69,7 @@ Content-type:text/xml; charset=UTF-8
</categories>
<feed>
<title>Sendebeschreibung</title>
<url>https://piradio.de<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url></url>
<url>https://piradio.de<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url></url>
</feed>
<transmit-times>
<transmit-time date-from="<TMPL_VAR start_datetime_utc>" date-to="<TMPL_VAR end_datetime_utc>" recurrence="false" rerun="<TMPL_IF rerun>true<TMPL_ELSE>false</TMPL_IF>" />

View File

@@ -14,7 +14,7 @@ Content-type:text/html; charset=utf-8;
>
<span class="summary title" title="Mehr Infos zur Sendung">
<TMPL_VAR start_time_name><TMPL_IF name="__last__"> - <TMPL_VAR end_time_name></TMPL_IF> |
<a id="event_list_id_<TMPL_VAR event_id>" class="click_for_detail" href="<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>"
<a id="event_list_id_<TMPL_VAR event_id>" class="click_for_detail" href="<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>"
><TMPL_VAR full_title></a> <br>
<span class="excerpt">
<TMPL_VAR excerpt> <TMPL_VAR user_excerpt>

View File

@@ -3,7 +3,6 @@ Content-type:text/html; charset=utf-8;
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="expires" content="3600">
<meta http-equiv="Content-Script-Type" content="javascript" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<title>Agenda <TMPL_VAR project_title></title>
@@ -19,7 +18,7 @@ Content-type:text/html; charset=utf-8;
</div>
</TMPL_IF>
<a href="<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>" >
<a href="<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>" >
<div class="event">
<TMPL_IF event_id>
<div class="header"><TMPL_VAR series_name><br><TMPL_VAR full_title_no_series></div>
@@ -27,7 +26,7 @@ Content-type:text/html; charset=utf-8;
<div class="label">
<TMPL_VAR start_time><br/>
<a class="comment" href="<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#comments"
<a class="comment" href="<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#comments"
<span class="submitted"><TMPL_VAR comment_count> Kommentar<TMPL_UNLESS one_comment>e</TMPL_UNLESS></span>
</a>
</div>

View File

@@ -4,7 +4,6 @@ Content-type:text/html; charset=UTF-8;
<html>
<head>
<meta http-equiv="Cache-control" content="public">
<meta http-equiv="expires" content="600">
</head>
<body>
@@ -20,7 +19,7 @@ Content-type:text/html; charset=UTF-8;
<div class="date">
<TMPL_VAR weekday_short_name>, <TMPL_VAR start_date_name>
<!--
<a href="<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.events>/<TMPL_VAR start_date>.html">
<a href="<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.events>/<TMPL_VAR start_date>.html">
<TMPL_VAR weekday_short_name>, <TMPL_VAR start_date_name>
</a>
-->
@@ -53,7 +52,7 @@ Content-type:text/html; charset=UTF-8;
<noscript>
<a
href="<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>"
href="<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>"
>
<div id="event_menu_<TMPL_VAR event_id>" class="vevent event<TMPL_IF is_running> running</TMPL_IF>"
title="<TMPL_IF program><TMPL_VAR program> - </TMPL_IF><TMPL_IF series_name><TMPL_VAR series_name> - </TMPL_IF><TMPL_VAR title>"

View File

@@ -4,7 +4,6 @@ Content-type:text/html; charset=UTF-8;
<html>
<head>
<meta http-equiv="Cache-control" content="public">
<meta http-equiv="expires" content="600">
</head>
<body>
@@ -20,7 +19,7 @@ div.event div.title div{
</style>
<TMPL_LOOP NAME=events>
<a href="<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>"
<a href="<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>"
>
<div id="event_playlist_<TMPL_VAR event_id>" class="event" title="<TMPL_VAR full_title><TMPL_IF excerpt>. <TMPL_VAR excerpt escape=url></TMPL_IF>">
<TMPL_COMMENT>

View File

@@ -1,5 +1,5 @@
Content-type:text/plain; charset=UTF-8;
Access-Control-Allow-Origin: *
<TMPL_IF no_result>Andere Veranstalter</TMPL_IF><TMPL_LOOP NAME=events><a href="<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri>" ><TMPL_VAR full_title></a></TMPL_LOOP>
<TMPL_IF no_result>Andere Veranstalter</TMPL_IF><TMPL_LOOP NAME=events><a href="<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri>" ><TMPL_VAR full_title></a></TMPL_LOOP>

View File

@@ -4,7 +4,6 @@ Access-Control-Allow-Origin: *
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="expires" content="3600">
<meta http-equiv="Cache-control" content="public">
<meta http-equiv="Content-Script-Type" content="javascript" />
<meta http-equiv="Content-Style-Type" content="text/css" />
@@ -112,7 +111,7 @@ Playlist Long <br><br>
<TMPL_LOOP NAME=events>
<a class="playlist_long_event_detail" href="<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>" >
<a class="playlist_long_event_detail" href="<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>" >
<div id="event_playlist_<TMPL_VAR event_id>" class="eventContainer event">
<div class="top" title="<TMPL_VAR full_title><TMPL_IF excerpt>. <TMPL_VAR excerpt></TMPL_IF>">
<TMPL_VAR weekday_short_name> <TMPL_VAR start_time_name>
@@ -137,7 +136,7 @@ Playlist Long <br><br>
</div>
<noscript>
<a class="playlist_long_event_detail" href="<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>" >
<a class="playlist_long_event_detail" href="<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>" >
<div id="event_playlist_<TMPL_VAR event_id>" class="eventContainer event">
<div class="top" title="<TMPL_VAR full_title><TMPL_IF excerpt>. <TMPL_VAR excerpt></TMPL_IF>">
<TMPL_VAR weekday_short_name> <TMPL_VAR start_time_name>

View File

@@ -4,7 +4,6 @@ Access-Control-Allow-Origin: *
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="expires" content="3600">
<meta http-equiv="Cache-control" content="public">
<meta http-equiv="Content-Script-Type" content="javascript" />
<meta http-equiv="Content-Style-Type" content="text/css" />

View File

@@ -18,7 +18,7 @@ Content-type:text/html; charset=utf-8;
<!-- Titel der Sendung -->
<!--<a href="<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>" >-->
<!--<a href="<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>" >-->
<h1><TMPL_VAR full_title></h1>
@@ -133,7 +133,7 @@ Content-type:text/html; charset=utf-8;
<!-- Permalink -->
<!--<a class="permalink" href="<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>">Permalink</a>-->
<!--<a class="permalink" href="<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>">Permalink</a>-->
<!--<div style="clear:both"></div>-->

View File

@@ -56,7 +56,7 @@ Access-Control-Allow-Origin: *
<div class="date<TMPL_IF is_running> running</TMPL_IF>">
<p>
<h1 class="summary title">
Aktuelle Sendung: <a href="<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>">
Aktuelle Sendung: <a href="<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>">
<TMPL_VAR full_title>
</a>
</h1>
@@ -66,14 +66,14 @@ Access-Control-Allow-Origin: *
<div class="content" >
<TMPL_COMMENT>
<div class="image-attach-teaser" style="width: 150px;">
<a href="<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>">
<a href="<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>">
<img class="image image-thumbnail" src="<TMPL_VAR image>" width="150" height="150" />
</a>
</div>
</TMPL_COMMENT>
<TMPL_VAR excerpt >
</div>
<a href="<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#comments">
<a href="<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#comments">
<span><TMPL_VAR comment_count> Kommentar<TMPL_UNLESS one_comment>e</TMPL_UNLESS></span>
</a>
</div>

View File

@@ -12,23 +12,19 @@ Access-Control-Allow-Origin: *
<body>
<div >
<TMPL_IF debug>
<div id="calendar_debug"></div>
</TMPL_IF>
<table>
<thead>
<tr>
<th class="first">
<a href="<TMPL_VAR .cache_base_url>/<TMPL_VAR .controllers.calendar>/<TMPL_VAR previous_month>.html"
<a href="<TMPL_VAR .widget_render_url>/<TMPL_VAR .controllers.calendar>/<TMPL_VAR previous_month>.html"
>&laquo;</a>
</th>
<th colspan="5" align="center">
<a href="<TMPL_VAR .cache_base_url>/<TMPL_VAR .controllers.calendar>/<TMPL_VAR start_date>_<TMPL_VAR end_date>.html"
<a href="<TMPL_VAR .widget_render_url>/<TMPL_VAR .controllers.calendar>/<TMPL_VAR start_date>_<TMPL_VAR end_date>.html"
><TMPL_VAR start_month_name> <TMPL_VAR start_year></a>
</th>
<th class="last">
<a href="<TMPL_VAR .cache_base_url>/<TMPL_VAR .controllers.calendar>/<TMPL_VAR next_month>.html"
<a href="<TMPL_VAR .widget_render_url>/<TMPL_VAR .controllers.calendar>/<TMPL_VAR next_month>.html"
>&raquo;</a>
</th>
</tr>
@@ -47,7 +43,7 @@ Access-Control-Allow-Origin: *
<TMPL_COMMENT>
<TMPL_LOOP week><th class="<TMPL_VAR class>"><a href="<TMPL_VAR .local_base_url>/<TMPL_VAR .controllers.events>/<TMPL_VAR from_date>/<TMPL_VAR till_date>/" title="Woche anzeigen" onclick="calcms.selectDateRangeEventListener('<TMPL_VAR from_date escape=js>','<TMPL_VAR till_date escape=js>');return false;" ><TMPL_VAR week_of_year></a></th></TMPL_LOOP>
</TMPL_COMMENT>
<TMPL_LOOP days><td class="<TMPL_VAR class>"><a href="<TMPL_VAR .cache_base_url>/<TMPL_VAR .controllers.events>/<TMPL_VAR date>.html" title="<TMPL_VAR day>.<TMPL_VAR month>. zeigen"><TMPL_VAR day></a></td>
<TMPL_LOOP days><td class="<TMPL_VAR class>"><a href="<TMPL_VAR .widget_render_url>/<TMPL_VAR .controllers.events>/<TMPL_VAR date>.html" title="<TMPL_VAR day>.<TMPL_VAR month>. zeigen"><TMPL_VAR day></a></td>
</TMPL_LOOP></tr></TMPL_LOOP>
</tbody>
</table>

View File

@@ -1,10 +1,9 @@
<TMPL_IF use_client_cache>Cache-Control: max-age=600, must-revalidate
</TMPL_IF>Content-type:application/atom+xml; charset=UTF-8
Content-type:application/atom+xml; charset=UTF-8
Access-Control-Allow-Origin: *
<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom' xmlns:gCal='http://schemas.google.com/gCal/2005'>
<id><TMPL_VAR cache_base_url>comments</id>
<id><TMPL_VAR widget_render_url>comments</id>
<title type='text'><TMPL_VAR project_title> - Kommentare</title>
<updated><TMPL_VAR created_at></updated>
@@ -15,7 +14,7 @@ Access-Control-Allow-Origin: *
<name><TMPL_VAR project_title></name>
<email>info@radiopiloten.de</email>
</author>
<link rel='alternate' type='text/html' href='<TMPL_VAR cache_base_url>feed_kommentare/'/>
<link rel='alternate' type='text/html' href='<TMPL_VAR widget_render_url>feed_kommentare/'/>
<generator version='0.1' uri='http://radiopiloten.org'>calcms</generator>
<gCal:timezone value='Europe/Berlin'/>
<gCal:timesCleaned value='0'/>
@@ -30,8 +29,8 @@ Access-Control-Allow-Origin: *
<TMPL_IF content><summary type='text'><TMPL_VAR content></summary></TMPL_IF>
<TMPL_IF content><content type='html'><![CDATA[<TMPL_VAR content>]]></content></TMPL_IF>
<link rel='alternate' type='text/html' href='<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event escape=url>/<TMPL_VAR event_id escape=url>.html#comment_<TMPL_VAR id escape=url>' title='alternate'/>
<link rel='self' type='application/atom+xml' href='<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event escape=url>/<TMPL_VAR event_id escape=url>.html#comment_<TMPL_VAR id escape=url>'/>
<link rel='alternate' type='text/html' href='<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event escape=url>/<TMPL_VAR event_id escape=url>.html#comment_<TMPL_VAR id escape=url>' title='alternate'/>
<link rel='self' type='application/atom+xml' href='<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event escape=url>/<TMPL_VAR event_id escape=url>.html#comment_<TMPL_VAR id escape=url>'/>
<author><name><TMPL_VAR author></name></author>
</entry>
</TMPL_LOOP>

View File

@@ -12,7 +12,7 @@ Access-Control-Allow-Origin: *
<div id="sendungen">
</div>
<TMPL_LOOP comments>
<a id="event_list_id_<TMPL_VAR event_id>" class="click_for_detail" href="<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#comments">
<a id="event_list_id_<TMPL_VAR event_id>" class="click_for_detail" href="<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#comments">
<div class="comments level<TMPL_VAR level>">
<span class="author"><TMPL_VAR author escape=none></span>:
<span class="content"><TMPL_VAR short_content escape=none></span>

View File

@@ -3,7 +3,7 @@ Access-Control-Allow-Origin: *
<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom' xmlns:gCal='http://schemas.google.com/gCal/2005'>
<id><TMPL_VAR cache_base_url></id>
<id><TMPL_VAR widget_render_url></id>
<title type='text'><TMPL_VAR project_title></title>
<updated><TMPL_VAR modified_at></updated>
@@ -15,14 +15,14 @@ Access-Control-Allow-Origin: *
<email><TMPL_VAR project_email></email>
</author>
<link rel='alternate' type='text/html' href='<TMPL_VAR source_base_url>'/>
<link rel='self' type='application/atom+xml' href='<TMPL_VAR cache_base_url>/feed/'/>
<link rel='self' type='application/atom+xml' href='<TMPL_VAR widget_render_url>/feed/'/>
<generator version='0.1' uri='http://radiopiloten.de'>calcms</generator>
<gCal:timezone value='<TMPL_VAR time_zone>'/>
<gCal:timesCleaned value='0'/>
<TMPL_LOOP events>
<entry>
<id><TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html</id>
<id><TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html</id>
<published><TMPL_VAR created_at></published>
<updated><TMPL_VAR modified_at></updated>
@@ -31,8 +31,8 @@ Access-Control-Allow-Origin: *
<summary type='text'><TMPL_VAR excerpt></summary>
<content type='html'><![CDATA[<TMPL_VAR weekday_short_name>, <TMPL_VAR start_date_name> - <TMPL_VAR start_time_name> - <TMPL_VAR end_time_name> | <TMPL_VAR full_title><p><TMPL_VAR content_html>]]></content>
<link rel='alternate' type='text/html' href='<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>' title='alternate'/>
<link rel='self' type='application/atom+xml' href='<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>'/>
<link rel='alternate' type='text/html' href='<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>' title='alternate'/>
<link rel='self' type='application/atom+xml' href='<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>'/>
<TMPL_IF media_url><link rel="enclosure" type="audio/mpeg" href="<TMPL_VAR media_url>"/>
</TMPL_IF>
<TMPL_IF project_title><author>

View File

@@ -41,7 +41,7 @@ LOCATION:<TMPL_VAR location_mapped>
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:<TMPL_VAR full_title> - coloRadio
URL:<TMPL_VAR base_url><TMPL_VAR .controllers.domain><TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri>
URL:<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri>
TRANSP:OPAQUE
CATEGORIES:<TMPL_VAR project_title>
END:VEVENT

View File

@@ -35,7 +35,7 @@ Feed = {
"openSearch$totalResults" : { "$t" : "<TMPL_VAR event_count>" },
<TMPL_LOOP events>
"entry" : [ {
"id" : { "$t" : "<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html/" },
"id" : { "$t" : "<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html/" },
"published" : { "$t": "<TMPL_VAR created_at>" },
"updated" : { "$t": "<TMPL_VAR modified_at>" },
"category" : [ {
@@ -49,11 +49,11 @@ Feed = {
"link" : [ {
"rel" : "alternate",
"type" : "text/html",
"href" : "<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri>"
"href" : "<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri>"
},{
"rel" : "self",
"type" : "application/atom+xml",
"href" : "<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri>"
"href" : "<TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri>"
} ],
"author" : [ {
"name" : { "$t" : "<TMPL_VAR project_email>" },

View File

@@ -4,8 +4,8 @@ Content-type:application/rss+xml; charset=UTF-8
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<atom:link href="http:<TMPL_VAR base_domain><TMPL_VAR cache_base_url>/rss" rel="self" type="application/rss+xml" />
<link>http:<TMPL_VAR base_domain><TMPL_VAR cache_base_url>/event.rss.xml</link>
<atom:link href="http:<TMPL_VAR base_domain><TMPL_VAR widget_render_url>/rss" rel="self" type="application/rss+xml" />
<link>http:<TMPL_VAR base_domain><TMPL_VAR widget_render_url>/event.rss.xml</link>
<title><TMPL_VAR project_title></title>
<description><TMPL_VAR project_subtitle></description>
<language>de-de</language>
@@ -14,7 +14,7 @@ Content-type:application/rss+xml; charset=UTF-8
<ttl>3600</ttl>
<image>
<url>http:<TMPL_VAR base_domain>sites/default/files/images/piradio-logo-kreis.preview.gif</url>
<link>http:<TMPL_VAR base_domain><TMPL_VAR cache_base_url>/event.rss.xml</link>
<link>http:<TMPL_VAR base_domain><TMPL_VAR widget_render_url>/event.rss.xml</link>
<title><TMPL_VAR project_title></title>
</image>
@@ -23,8 +23,8 @@ Content-type:application/rss+xml; charset=UTF-8
<item>
<title><TMPL_VAR weekday_short_name>, <TMPL_VAR start_date_name> - <TMPL_VAR start_time_name> - <TMPL_VAR end_time_name> | <TMPL_VAR full_title></title>
<description><TMPL_VAR excerpt></description>
<link>http:<TMPL_VAR base_domain><TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url></link>
<guid>http:<TMPL_VAR base_domain><TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html</guid>
<link>http:<TMPL_VAR base_domain><TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url></link>
<guid>http:<TMPL_VAR base_domain><TMPL_VAR widget_render_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html</guid>
<pubDate><TMPL_VAR modified_at></pubDate>
<comments>http:<TMPL_VAR base_domain><TMPL_VAR cache_base_domain>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#comments</comments>
<media:content url="http:<TMPL_VAR base_domain><TMPL_VAR image>" medium="image">

View File

@@ -5,7 +5,7 @@ $events=[
{
'__last__' => q|<TMPL_VAR __last__>|,
'base_url' => q|<TMPL_VAR base_url>|,
'cache_base_url' => q|<TMPL_VAR cache_base_url>|,
'widget_render_url' => q|<TMPL_VAR widget_render_url>|,
'comment_count' => q|<TMPL_VAR comment_count>|,
'.controllers.event' => q|<TMPL_VAR .controllers.event>|,
'.controllers.events' => q|<TMPL_VAR .controllers.events>|,

Some files were not shown because too many files have changed in this diff Show More