/*************************************/
/* Template für Beispiel */
/* Datei: events_beispiel.php */
/*************************************/
function ec3_get_beispiel_events(
$limit,
$template_event=EC3_DEFAULT_TEMPLATE_EVENT,
$template_day =EC3_DEFAULT_TEMPLATE_DAY,
$date_format =EC3_DEFAULT_DATE_FORMAT,
$template_month=EC3_DEFAULT_TEMPLATE_MONTH,
$month_format =EC3_DEFAULT_MONTH_FORMAT)
{
global $ec3,$wpdb,$wp_version;
// Parse $limit:
// NUMBER - limits number of posts
// NUMBER days - next NUMBER of days
if(empty($limit))
{
$limit_numposts='LIMIT 5';
}
elseif(preg_match('/^ *([0-9]+) *d(ays?)?/',$limit,$matches))
{
$secs=intval($matches[1])*24*3600;
$and_before="AND start<='".ec3_strftime('%Y-%m-%d',time()+$secs)."'";
}
elseif(intval($limit)<1)
{
$limit_numposts='LIMIT 5';
}
else
{
$limit_numposts='LIMIT '.intval($limit);
}
if(!$date_format)
$date_format=get_option('date_format');
// Find the upcoming events.
$calendar_entries = $wpdb->get_results(
"SELECT DISTINCT
p.id AS id,
post_title,
start,
u.$ec3->wp_user_nicename AS author,
allday
FROM $ec3->schedule s
LEFT JOIN $wpdb->posts p ON s.post_id=p.id
LEFT JOIN $wpdb->users u ON p.post_author = u.id
WHERE p.post_status='publish'
AND end>='$ec3->today' $and_before
ORDER BY start $limit_numposts"
);
echo "\n";
if($calendar_entries)
{
$time_format=get_option('time_format');
$current_month=false;
$current_date=false;
$data=array();
foreach($calendar_entries as $entry)
{
// To use %SINCE%, you need Dunstan's 'Time Since' plugin.
if(function_exists('time_since'))
$data['SINCE']=time_since( time(), ec3_to_time($entry->start) );
// Month changed?
$data['MONTH']=mysql2date($month_format,$entry->start);
if((!$current_month || $current_month!=$data['MONTH']) && $template_month)
{
if($current_date)
echo "\n";
if($current_month)
echo "\n";
echo ec3_format_str($template_month,$data)."\n\n";
$current_month=$data['MONTH'];
$current_date=false;
}
// Date changed?
$data['DATE'] =mysql2date($date_format, $entry->start);
if((!$current_date || $current_date!=$data['DATE']) && $template_day)
{
if($current_date)
echo "\n";
echo ec3_format_str($template_day,$data)."\n\n";
$current_date=$data['DATE'];
}
if($entry->allday)
$data['TIME']=__('all day','ec3');
else
$data['TIME']=mysql2date($time_format,$entry->start);
$data['TIME2']=mysql2date($time_format,$entry->allday);
$data['TITLE'] =
htmlentities(
stripslashes(strip_tags($entry->post_title)),
ENT_QUOTES,get_option('blog_charset')
);
$data['LINK'] = get_permalink($entry->id);
$data['LINK3'] = get_permalink($entry->id);
$data['AUTHOR']=
htmlentities($entry->author,ENT_QUOTES,get_option('blog_charset'));
echo ec3_format_str($template_event,$data)."\n";
}
if($current_date)
echo "\n";
if($current_month)
echo "\n";
}
else
{
echo "".__('No events.','ec3')."\n";
}
echo "\n";
}
?>
/*************************************/
/* Template für Beispiel lang */
/* Datei: events_beispiel_lang.php */
/*************************************/
function ec3_get_beispiel_events_lang(
$limit,
$template_event=EC3_DEFAULT_TEMPLATE_EVENT,
$template_day =EC3_DEFAULT_TEMPLATE_DAY,
$date_format =EC3_DEFAULT_DATE_FORMAT,
$template_month=EC3_DEFAULT_TEMPLATE_MONTH,
$month_format =EC3_DEFAULT_MONTH_FORMAT)
{
if(!ec3_check_installed(__('Upcoming Events','ec3')))
return;
global $ec3,$wpdb,$wp_version;
// Parse $limit:
// NUMBER - limits number of posts
// NUMBER days - next NUMBER of days
if(empty($limit))
{
$limit_numposts='LIMIT 5';
}
elseif(preg_match('/^ *([0-9]+) *d(ays?)?/',$limit,$matches))
{
$secs=intval($matches[1])*24*3600;
$and_before="AND start<='".ec3_strftime('%Y-%m-%d',time()+$secs)."'";
}
elseif(intval($limit)<1)
{
$limit_numposts='LIMIT 5';
}
else
{
$limit_numposts='LIMIT '.intval($limit);
}
if(!$date_format)
$date_format=get_option('date_format');
// Find the upcoming events.
$calendar_entries = $wpdb->get_results(
"SELECT DISTINCT
p.id AS id,
post_title,
start,
u.$ec3->wp_user_nicename AS author,
allday
FROM $ec3->schedule s
LEFT JOIN $wpdb->posts p ON s.post_id=p.id
LEFT JOIN $wpdb->users u ON p.post_author = u.id
WHERE p.post_status='publish'
AND end>='$ec3->today' $and_before
ORDER BY start $limit_numposts"
);
echo "
";
echo "\n";
if($calendar_entries)
{
$time_format=get_option('time_format');
$current_month=false;
$current_date=false;
$data=array();
foreach($calendar_entries as $entry)
{
// To use %SINCE%, you need Dunstan's 'Time Since' plugin.
if(function_exists('time_since'))
$data['SINCE']=time_since( time(), ec3_to_time($entry->start) );
// Month changed?
$data['MONTH']=mysql2date($month_format,$entry->start);
if((!$current_month || $current_month!=$data['MONTH']) && $template_month)
{
if($current_date)
echo "
\n";
if($current_month)
echo "\n";
echo ""
. ec3_format_str($template_month,$data)."\n\n";
$current_month=$data['MONTH'];
$current_date=false;
}
// Date changed?
$data['DATE'] =mysql2date($date_format, $entry->start);
if((!$current_date || $current_date!=$data['DATE']) && $template_day)
{
if($current_date)
echo "
\n";
echo ""
. ec3_format_str($template_day,$data)."\n\n";
$current_date=$data['DATE'];
}
if($entry->allday)
$data['TIME']=__('all day','ec3');
else
$data['TIME']=mysql2date($time_format,$entry->start);
$data['TITLE'] =
htmlentities(
stripslashes(strip_tags($entry->post_title)),
ENT_QUOTES,get_option('blog_charset')
);
$data['TITLE'] = mb_convert_encoding($data['TITLE'],"ISO-8859-1");
$data['LINK'] =get_permalink($entry->id);
$data['LINK2'] ="http://wap.italo-meetings.de/index.php?p=" . $entry->id;
$data['AUTHOR']=
htmlentities($entry->author,ENT_QUOTES,get_option('blog_charset'));
echo " - ".ec3_format_str($template_event,$data)."
\n";
}
if($current_date)
echo "
\n";
if($current_month)
echo "\n";
}
else
{
echo "".__('No events.','ec3')."\n";
}
echo "\n";
}
?>
/*************************************/
/* Template für Puntotreffen.de */
/* Datei: events_ptde.php */
/*************************************/
function ec3_get_ptde_events(
$limit,
$template_event=EC3_DEFAULT_TEMPLATE_EVENT,
$template_day =EC3_DEFAULT_TEMPLATE_DAY,
$date_format =EC3_DEFAULT_DATE_FORMAT,
$template_month=EC3_DEFAULT_TEMPLATE_MONTH,
$month_format =EC3_DEFAULT_MONTH_FORMAT)
{
if(!ec3_check_installed(__('Upcoming Events','ec3')))
return;
global $ec3,$wpdb,$wp_version;
// Parse $limit:
// NUMBER - limits number of posts
// NUMBER days - next NUMBER of days
if(empty($limit))
{
$limit_numposts='LIMIT 5';
}
elseif(preg_match('/^ *([0-9]+) *d(ays?)?/',$limit,$matches))
{
$secs=intval($matches[1])*24*3600;
$and_before="AND start<='".ec3_strftime('%Y-%m-%d',time()+$secs)."'";
}
elseif(intval($limit)<1)
{
$limit_numposts='LIMIT 5';
}
else
{
$limit_numposts='LIMIT '.intval($limit);
}
if(!$date_format)
$date_format=get_option('date_format');
// Find the upcoming events.
$calendar_entries = $wpdb->get_results(
"SELECT DISTINCT
p.id AS id,
post_title,
start,
u.$ec3->wp_user_nicename AS author,
allday
FROM $ec3->schedule s
LEFT JOIN $wpdb->posts p ON s.post_id=p.id
LEFT JOIN $wpdb->users u ON p.post_author = u.id
WHERE p.post_status='publish'
AND end>='$ec3->today' $and_before
ORDER BY start $limit_numposts"
);
echo "";
echo "\n";
if($calendar_entries)
{
$time_format=get_option('time_format');
$current_month=false;
$current_date=false;
$data=array();
foreach($calendar_entries as $entry)
{
// To use %SINCE%, you need Dunstan's 'Time Since' plugin.
if(function_exists('time_since'))
$data['SINCE']=time_since( time(), ec3_to_time($entry->start) );
// Month changed?
$data['MONTH']=mysql2date($month_format,$entry->start);
if((!$current_month || $current_month!=$data['MONTH']) && $template_month)
{
if($current_date)
echo "
\n";
if($current_month)
echo "\n";
echo ""
. ec3_format_str($template_month,$data)."\n\n";
$current_month=$data['MONTH'];
$current_date=false;
}
// Date changed?
$data['DATE'] =mysql2date($date_format, $entry->start);
if((!$current_date || $current_date!=$data['DATE']) && $template_day)
{
if($current_date)
echo "
\n";
echo ""
. ec3_format_str($template_day,$data)."\n\n";
$current_date=$data['DATE'];
}
$data['DATE'] = mb_convert_encoding($data['DATE'],"ISO-8859-1");
if($entry->allday)
$data['TIME']=__('all day','ec3');
else
$data['TIME']=mysql2date($time_format,$entry->start);
$data['TITLE'] =
htmlentities(
stripslashes(strip_tags($entry->post_title)),
ENT_QUOTES,get_option('blog_charset')
);
$data['TITLE'] = mb_convert_encoding($data['TITLE'],"ISO-8859-1");
$data['LINK'] =get_permalink($entry->id);
$data['LINK2'] ="http://wap.italo-meetings.de/index.php?p=" . $entry->id;
$data['AUTHOR']=
htmlentities($entry->author,ENT_QUOTES,get_option('blog_charset'));
echo " - ".ec3_format_str($template_event,$data)."
\n";
}
if($current_date)
echo "
\n";
if($current_month)
echo "\n";
}
else
{
echo "".__('No events.','ec3')."\n";
}
echo "\n";
}
?>
/*************************************/
/* Template für Puntotreffen.de */
/* Datei: events_ptde_lang.php */
/*************************************/
function ec3_get_ptde_events_lang(
$limit,
$template_event=EC3_DEFAULT_TEMPLATE_EVENT,
$template_day =EC3_DEFAULT_TEMPLATE_DAY,
$date_format =EC3_DEFAULT_DATE_FORMAT,
$template_month=EC3_DEFAULT_TEMPLATE_MONTH,
$month_format =EC3_DEFAULT_MONTH_FORMAT)
{
if(!ec3_check_installed(__('Upcoming Events','ec3')))
return;
global $ec3,$wpdb,$wp_version;
// Parse $limit:
// NUMBER - limits number of posts
// NUMBER days - next NUMBER of days
if(empty($limit))
{
$limit_numposts='LIMIT 5';
}
elseif(preg_match('/^ *([0-9]+) *d(ays?)?/',$limit,$matches))
{
$secs=intval($matches[1])*24*3600;
$and_before="AND start<='".ec3_strftime('%Y-%m-%d',time()+$secs)."'";
}
elseif(intval($limit)<1)
{
$limit_numposts='LIMIT 5';
}
else
{
$limit_numposts='LIMIT '.intval($limit);
}
if(!$date_format)
$date_format=get_option('date_format');
// Find the upcoming events.
$calendar_entries = $wpdb->get_results(
"SELECT DISTINCT
p.id AS id,
post_title,
start,
u.$ec3->wp_user_nicename AS author,
allday
FROM $ec3->schedule s
LEFT JOIN $wpdb->posts p ON s.post_id=p.id
LEFT JOIN $wpdb->users u ON p.post_author = u.id
WHERE p.post_status='publish'
AND end>='$ec3->today' $and_before
ORDER BY start $limit_numposts"
);
echo "";
echo "\n";
if($calendar_entries)
{
$time_format=get_option('time_format');
$current_month=false;
$current_date=false;
$data=array();
foreach($calendar_entries as $entry)
{
// To use %SINCE%, you need Dunstan's 'Time Since' plugin.
if(function_exists('time_since'))
$data['SINCE']=time_since( time(), ec3_to_time($entry->start) );
// Month changed?
$data['MONTH']=mysql2date($month_format,$entry->start);
$data['MONTH'] = mb_convert_encoding($data['MONTH'],"ISO-8859-1");
if((!$current_month || $current_month!=$data['MONTH']) && $template_month)
{
if($current_date)
echo "
\n";
if($current_month)
echo "\n";
echo ""
. ec3_format_str($template_month,$data)."\n\n";
$current_month=$data['MONTH'];
$current_date=false;
}
// Date changed?
$data['DATE'] =mysql2date($date_format, $entry->start);
if((!$current_date || $current_date!=$data['DATE']) && $template_day)
{
if($current_date)
echo "
\n";
echo ""
. ec3_format_str($template_day,$data)."\n\n";
$current_date=$data['DATE'];
}
$data['DATE'] = mb_convert_encoding($data['DATE'],"ISO-8859-1");
if($entry->allday)
$data['TIME']=__('all day','ec3');
else
$data['TIME']=mysql2date($time_format,$entry->start);
$data['TITLE'] =
htmlentities(
stripslashes(strip_tags($entry->post_title)),
ENT_QUOTES,get_option('blog_charset')
);
$data['TITLE'] = mb_convert_encoding($data['TITLE'],"ISO-8859-1");
$data['LINK'] =get_permalink($entry->id);
$data['LINK2'] ="http://wap.italo-meetings.de/index.php?p=" . $entry->id;
$data['AUTHOR']=
htmlentities($entry->author,ENT_QUOTES,get_option('blog_charset'));
echo " - ".ec3_format_str($template_event,$data)."
\n";
}
if($current_date)
echo "
\n";
if($current_month)
echo "\n";
}
else
{
echo "".__('No events.','ec3')."\n";
}
echo "\n";
}
?>
/*************************************/
/* Template für Punto-Forum.de */
/* Datei: events_pfde.php */
/*************************************/
function ec3_get_pfde_events(
$limit,
$template_event=EC3_DEFAULT_TEMPLATE_EVENT,
$template_day =EC3_DEFAULT_TEMPLATE_DAY,
$date_format =EC3_DEFAULT_DATE_FORMAT,
$template_month=EC3_DEFAULT_TEMPLATE_MONTH,
$month_format =EC3_DEFAULT_MONTH_FORMAT)
{
global $ec3,$wpdb,$wp_version;
// Parse $limit:
// NUMBER - limits number of posts
// NUMBER days - next NUMBER of days
if(empty($limit))
{
$limit_numposts='LIMIT 5';
}
elseif(preg_match('/^ *([0-9]+) *d(ays?)?/',$limit,$matches))
{
$secs=intval($matches[1])*24*3600;
$and_before="AND start<='".ec3_strftime('%Y-%m-%d',time()+$secs)."'";
}
elseif(intval($limit)<1)
{
$limit_numposts='LIMIT 5';
}
else
{
$limit_numposts='LIMIT '.intval($limit);
}
if(!$date_format)
$date_format=get_option('date_format');
// Find the upcoming events.
$calendar_entries = $wpdb->get_results(
"SELECT DISTINCT
p.id AS id,
post_title,
start,
u.$ec3->wp_user_nicename AS author,
allday
FROM $ec3->schedule s
LEFT JOIN $wpdb->posts p ON s.post_id=p.id
LEFT JOIN $wpdb->users u ON p.post_author = u.id
WHERE p.post_status='publish'
AND end>='$ec3->today' $and_before
ORDER BY start $limit_numposts"
);
echo "\n";
if($calendar_entries)
{
$time_format=get_option('time_format');
$current_month=false;
$current_date=false;
$data=array();
foreach($calendar_entries as $entry)
{
// To use %SINCE%, you need Dunstan's 'Time Since' plugin.
if(function_exists('time_since'))
$data['SINCE']=time_since( time(), ec3_to_time($entry->start) );
// Month changed?
$data['MONTH']=mysql2date($month_format,$entry->start);
if((!$current_month || $current_month!=$data['MONTH']) && $template_month)
{
if($current_date)
echo "\n";
if($current_month)
echo "\n";
echo ec3_format_str($template_month,$data)."\n\n";
$current_month=$data['MONTH'];
$current_date=false;
}
// Date changed?
$data['DATE'] =mysql2date($date_format, $entry->start);
if((!$current_date || $current_date!=$data['DATE']) && $template_day)
{
if($current_date)
echo "\n";
echo ec3_format_str($template_day,$data)."\n\n";
$current_date=$data['DATE'];
}
$data['DATE'] = mb_convert_encoding($data['DATE'],"ISO-8859-1");
if($entry->allday)
$data['TIME']=__('all day','ec3');
else
$data['TIME']=mysql2date($time_format,$entry->start);
$data['TITLE'] =
htmlentities(
stripslashes(strip_tags($entry->post_title)),
ENT_QUOTES,get_option('blog_charset')
);
$data['TITLE'] = mb_convert_encoding($data['TITLE'],"ISO-8859-1");
$data['LINK'] = get_permalink($entry->id);
$data['AUTHOR']=
htmlentities($entry->author,ENT_QUOTES,get_option('blog_charset'));
echo ec3_format_str($template_event,$data)."\n";
}
if($current_date)
echo "\n";
if($current_month)
echo "\n";
}
else
{
echo "".__('No events.','ec3')."\n";
}
echo "\n";
}
?>
/*************************************/
/* Template für Scuderia-Saar.de */
/* Datei: events_scusa.php */
/*************************************/
function ec3_get_scusa_events(
$limit,
$template_event=EC3_DEFAULT_TEMPLATE_EVENT,
$template_day =EC3_DEFAULT_TEMPLATE_DAY,
$date_format =EC3_DEFAULT_DATE_FORMAT,
$template_month=EC3_DEFAULT_TEMPLATE_MONTH,
$month_format =EC3_DEFAULT_MONTH_FORMAT)
{
if(!ec3_check_installed(__('Upcoming Events','ec3')))
return;
global $ec3,$wpdb,$wp_version;
// Parse $limit:
// NUMBER - limits number of posts
// NUMBER days - next NUMBER of days
if(empty($limit))
{
$limit_numposts='LIMIT 5';
}
elseif(preg_match('/^ *([0-9]+) *d(ays?)?/',$limit,$matches))
{
$secs=intval($matches[1])*24*3600;
$and_before="AND start<='".ec3_strftime('%Y-%m-%d',time()+$secs)."'";
}
elseif(intval($limit)<1)
{
$limit_numposts='LIMIT 5';
}
else
{
$limit_numposts='LIMIT '.intval($limit);
}
if(!$date_format)
$date_format=get_option('date_format');
// Find the upcoming events.
$calendar_entries = $wpdb->get_results(
"SELECT DISTINCT
p.id AS id,
post_title,
start,
u.$ec3->wp_user_nicename AS author,
allday
FROM $ec3->schedule s
LEFT JOIN $wpdb->posts p ON s.post_id=p.id
LEFT JOIN $wpdb->users u ON p.post_author = u.id
WHERE p.post_status='publish'
AND end>='$ec3->today' $and_before
ORDER BY start $limit_numposts"
);
echo "";
echo "\n";
if($calendar_entries)
{
$time_format=get_option('time_format');
$current_month=false;
$current_date=false;
$data=array();
foreach($calendar_entries as $entry)
{
// To use %SINCE%, you need Dunstan's 'Time Since' plugin.
if(function_exists('time_since'))
$data['SINCE']=time_since( time(), ec3_to_time($entry->start) );
// Month changed?
$data['MONTH']=mysql2date($month_format,$entry->start);
if((!$current_month || $current_month!=$data['MONTH']) && $template_month)
{
if($current_date)
echo "
\n";
if($current_month)
echo "\n";
echo ""
. ec3_format_str($template_month,$data)."\n\n";
$current_month=$data['MONTH'];
$current_date=false;
}
// Date changed?
$data['DATE'] =mysql2date($date_format, $entry->start);
if((!$current_date || $current_date!=$data['DATE']) && $template_day)
{
if($current_date)
echo "
\n";
echo ""
. ec3_format_str($template_day,$data)."\n\n";
$current_date=$data['DATE'];
}
$data['DATE'] = mb_convert_encoding($data['DATE'],"utf-8");
if($entry->allday)
$data['TIME']=__('all day','ec3');
else
$data['TIME']=mysql2date($time_format,$entry->start);
$data['TITLE'] =
htmlentities(
stripslashes(strip_tags($entry->post_title)),
ENT_QUOTES,get_option('blog_charset')
);
$data['TITLE'] = mb_convert_encoding($data['TITLE'],"utf-8");
$data['LINK'] =get_permalink($entry->id);
$data['LINK2'] ="http://wap.italo-meetings.de/index.php?p=" . $entry->id;
$data['AUTHOR']=
htmlentities($entry->author,ENT_QUOTES,get_option('blog_charset'));
echo " - ".ec3_format_str($template_event,$data)."
\n";
}
if($current_date)
echo "
\n";
if($current_month)
echo "\n";
}
else
{
echo "".__('No events.','ec3')."\n";
}
echo "\n";
}
?>
/*************************************/
/* Template für Scuderia-Saar.de */
/* Datei: events_scusa_galerie.php */
/*************************************/
function ec3_get_scusa_events_galerie(
$limit,
$template_event=EC3_DEFAULT_TEMPLATE_EVENT,
$template_day =EC3_DEFAULT_TEMPLATE_DAY,
$date_format =EC3_DEFAULT_DATE_FORMAT,
$template_month=EC3_DEFAULT_TEMPLATE_MONTH,
$month_format =EC3_DEFAULT_MONTH_FORMAT)
{
if(!ec3_check_installed(__('Upcoming Events','ec3')))
return;
global $ec3,$wpdb,$wp_version;
// Parse $limit:
// NUMBER - limits number of posts
// NUMBER days - next NUMBER of days
if(empty($limit))
{
$limit_numposts='LIMIT 5';
}
elseif(preg_match('/^ *([0-9]+) *d(ays?)?/',$limit,$matches))
{
$secs=intval($matches[1])*24*3600;
$and_before="AND start<='".ec3_strftime('%Y-%m-%d',time()+$secs)."'";
}
elseif(intval($limit)<1)
{
$limit_numposts='LIMIT 5';
}
else
{
$limit_numposts='LIMIT '.intval($limit);
}
if(!$date_format)
$date_format=get_option('date_format');
// Find the upcoming events.
$calendar_entries = $wpdb->get_results(
"SELECT DISTINCT
p.id AS id,
post_title,
start,
u.$ec3->wp_user_nicename AS author,
allday
FROM $ec3->schedule s
LEFT JOIN $wpdb->posts p ON s.post_id=p.id
LEFT JOIN $wpdb->users u ON p.post_author = u.id
WHERE p.post_status='publish'
AND end>='$ec3->today' $and_before
ORDER BY start $limit_numposts"
);
echo "";
echo "\n";
if($calendar_entries)
{
$time_format=get_option('time_format');
$current_month=false;
$current_date=false;
$data=array();
foreach($calendar_entries as $entry)
{
// To use %SINCE%, you need Dunstan's 'Time Since' plugin.
if(function_exists('time_since'))
$data['SINCE']=time_since( time(), ec3_to_time($entry->start) );
// Month changed?
$data['MONTH']=mysql2date($month_format,$entry->start);
if((!$current_month || $current_month!=$data['MONTH']) && $template_month)
{
if($current_date)
echo "
\n";
if($current_month)
echo "\n";
echo ""
. ec3_format_str($template_month,$data)."\n\n";
$current_month=$data['MONTH'];
$current_date=false;
}
// Date changed?
$data['DATE'] =mysql2date($date_format, $entry->start);
if((!$current_date || $current_date!=$data['DATE']) && $template_day)
{
if($current_date)
echo "
\n";
echo ""
. ec3_format_str($template_day,$data)."\n\n";
$current_date=$data['DATE'];
}
$data['DATE'] = mb_convert_encoding($data['DATE'],"ISO-8859-1");
if($entry->allday)
$data['TIME']=__('all day','ec3');
else
$data['TIME']=mysql2date($time_format,$entry->start);
$data['TITLE'] =
htmlentities(
stripslashes(strip_tags($entry->post_title)),
ENT_QUOTES,get_option('blog_charset')
);
$data['TITLE'] = mb_convert_encoding($data['TITLE'],"ISO-8859-1");
$data['LINK'] =get_permalink($entry->id);
$data['LINK2'] ="http://wap.italo-meetings.de/index.php?p=" . $entry->id;
$data['AUTHOR']=
htmlentities($entry->author,ENT_QUOTES,get_option('blog_charset'));
echo " - ".ec3_format_str($template_event,$data)."
\n";
}
if($current_date)
echo "
\n";
if($current_month)
echo "\n";
}
else
{
echo "".__('No events.','ec3')."\n";
}
echo "\n";
}
?>
/*************************************/
/* Template für Scuderia-Saar.de */
/* Datei: events_scusa_lang.php */
/*************************************/
function ec3_get_scusa_events_lang(
$limit,
$template_event=EC3_DEFAULT_TEMPLATE_EVENT,
$template_day =EC3_DEFAULT_TEMPLATE_DAY,
$date_format =EC3_DEFAULT_DATE_FORMAT,
$template_month=EC3_DEFAULT_TEMPLATE_MONTH,
$month_format =EC3_DEFAULT_MONTH_FORMAT)
{
if(!ec3_check_installed(__('Upcoming Events','ec3')))
return;
global $ec3,$wpdb,$wp_version;
// Parse $limit:
// NUMBER - limits number of posts
// NUMBER days - next NUMBER of days
if(empty($limit))
{
$limit_numposts='LIMIT 5';
}
elseif(preg_match('/^ *([0-9]+) *d(ays?)?/',$limit,$matches))
{
$secs=intval($matches[1])*24*3600;
$and_before="AND start<='".ec3_strftime('%Y-%m-%d',time()+$secs)."'";
}
elseif(intval($limit)<1)
{
$limit_numposts='LIMIT 5';
}
else
{
$limit_numposts='LIMIT '.intval($limit);
}
if(!$date_format)
$date_format=get_option('date_format');
// Find the upcoming events.
$calendar_entries = $wpdb->get_results(
"SELECT DISTINCT
p.id AS id,
post_title,
start,
u.$ec3->wp_user_nicename AS author,
allday
FROM $ec3->schedule s
LEFT JOIN $wpdb->posts p ON s.post_id=p.id
LEFT JOIN $wpdb->users u ON p.post_author = u.id
WHERE p.post_status='publish'
AND end>='$ec3->today' $and_before
ORDER BY start $limit_numposts"
);
echo "";
echo "\n";
if($calendar_entries)
{
$time_format=get_option('time_format');
$current_month=false;
$current_date=false;
$data=array();
foreach($calendar_entries as $entry)
{
// To use %SINCE%, you need Dunstan's 'Time Since' plugin.
if(function_exists('time_since'))
$data['SINCE']=time_since( time(), ec3_to_time($entry->start) );
// Month changed?
$data['MONTH']=mysql2date($month_format,$entry->start);
$data['MONTH'] = mb_convert_encoding($data['MONTH'],"utf-8");
if((!$current_month || $current_month!=$data['MONTH']) && $template_month)
{
if($current_date)
echo "
\n";
if($current_month)
echo "\n";
echo ""
. ec3_format_str($template_month,$data)."\n\n";
$current_month=$data['MONTH'];
$current_date=false;
}
// Date changed?
$data['DATE'] =mysql2date($date_format, $entry->start);
if((!$current_date || $current_date!=$data['DATE']) && $template_day)
{
if($current_date)
echo "
\n";
echo ""
. ec3_format_str($template_day,$data)."\n\n";
$current_date=$data['DATE'];
}
$data['DATE'] = mb_convert_encoding($data['DATE'],"utf-8");
if($entry->allday)
$data['TIME']=__('all day','ec3');
else
$data['TIME']=mysql2date($time_format,$entry->start);
$data['TITLE'] =
htmlentities(
stripslashes(strip_tags($entry->post_title)),
ENT_QUOTES,get_option('blog_charset')
);
$data['TITLE'] = mb_convert_encoding($data['TITLE'],"ISO-8859-1");
$data['LINK'] =get_permalink($entry->id);
$data['LINK2'] ="http://wap.italo-meetings.de/index.php?p=" . $entry->id;
$data['AUTHOR']=
htmlentities($entry->author,ENT_QUOTES,get_option('blog_charset'));
echo " - ".ec3_format_str($template_event,$data)."
\n";
}
if($current_date)
echo "
\n";
if($current_month)
echo "\n";
}
else
{
echo "".__('No events.','ec3')."\n";
}
echo "\n";
}
?>
/*************************************/
/* Template für Fiat Club Monheim */
/* Datei: events_monheim.php */
/*************************************/
function ec3_get_monheim_events(
$limit,
$template_event=EC3_DEFAULT_TEMPLATE_EVENT,
$template_day =EC3_DEFAULT_TEMPLATE_DAY,
$date_format =EC3_DEFAULT_DATE_FORMAT,
$template_month=EC3_DEFAULT_TEMPLATE_MONTH,
$month_format =EC3_DEFAULT_MONTH_FORMAT)
{
global $ec3,$wpdb,$wp_version;
// Parse $limit:
// NUMBER - limits number of posts
// NUMBER days - next NUMBER of days
if(empty($limit))
{
$limit_numposts='LIMIT 5';
}
elseif(preg_match('/^ *([0-9]+) *d(ays?)?/',$limit,$matches))
{
$secs=intval($matches[1])*24*3600;
$and_before="AND start<='".ec3_strftime('%Y-%m-%d',time()+$secs)."'";
}
elseif(intval($limit)<1)
{
$limit_numposts='LIMIT 5';
}
else
{
$limit_numposts='LIMIT '.intval($limit);
}
if(!$date_format)
$date_format=get_option('date_format');
// Find the upcoming events.
$calendar_entries = $wpdb->get_results(
"SELECT DISTINCT
p.id AS id,
post_title,
start,
u.$ec3->wp_user_nicename AS author,
allday
FROM $ec3->schedule s
LEFT JOIN $wpdb->posts p ON s.post_id=p.id
LEFT JOIN $wpdb->users u ON p.post_author = u.id
WHERE p.post_status='publish'
AND end>='$ec3->today' $and_before
ORDER BY start $limit_numposts"
);
echo "\n";
if($calendar_entries)
{
$time_format=get_option('time_format');
$current_month=false;
$current_date=false;
$data=array();
foreach($calendar_entries as $entry)
{
// To use %SINCE%, you need Dunstan's 'Time Since' plugin.
if(function_exists('time_since'))
$data['SINCE']=time_since( time(), ec3_to_time($entry->start) );
// Month changed?
$data['MONTH']=mysql2date($month_format,$entry->start);
if((!$current_month || $current_month!=$data['MONTH']) && $template_month)
{
if($current_date)
echo "\n";
if($current_month)
echo "\n";
echo ec3_format_str($template_month,$data)."\n\n";
$current_month=$data['MONTH'];
$current_date=false;
}
// Date changed?
$data['DATE'] =mysql2date($date_format, $entry->start);
if((!$current_date || $current_date!=$data['DATE']) && $template_day)
{
if($current_date)
echo "\n";
echo ec3_format_str($template_day,$data)."\n\n";
$current_date=$data['DATE'];
}
if($entry->allday)
$data['TIME']=__('all day','ec3');
else
$data['TIME']=mysql2date($time_format,$entry->start);
$data['TITLE'] =
htmlentities(
stripslashes(strip_tags($entry->post_title)),
ENT_QUOTES,get_option('blog_charset')
);
$data['LINK'] = get_permalink($entry->id);
$data['AUTHOR']=
htmlentities($entry->author,ENT_QUOTES,get_option('blog_charset'));
echo ec3_format_str($template_event,$data)."\n";
}
if($current_date)
echo "\n";
if($current_month)
echo "\n";
}
else
{
echo "".__('No events.','ec3')."\n";
}
echo "\n";
}
?>
/***************************************/
/* Template für Fiat Club Monheim lang */
/* Datei: events_monheim_lang.php */
/***************************************/
function ec3_get_monheim_events_lang(
$limit,
$template_event=EC3_DEFAULT_TEMPLATE_EVENT,
$template_day =EC3_DEFAULT_TEMPLATE_DAY,
$date_format =EC3_DEFAULT_DATE_FORMAT,
$template_month=EC3_DEFAULT_TEMPLATE_MONTH,
$month_format =EC3_DEFAULT_MONTH_FORMAT)
{
if(!ec3_check_installed(__('Upcoming Events','ec3')))
return;
global $ec3,$wpdb,$wp_version;
// Parse $limit:
// NUMBER - limits number of posts
// NUMBER days - next NUMBER of days
if(empty($limit))
{
$limit_numposts='LIMIT 5';
}
elseif(preg_match('/^ *([0-9]+) *d(ays?)?/',$limit,$matches))
{
$secs=intval($matches[1])*24*3600;
$and_before="AND start<='".ec3_strftime('%Y-%m-%d',time()+$secs)."'";
}
elseif(intval($limit)<1)
{
$limit_numposts='LIMIT 5';
}
else
{
$limit_numposts='LIMIT '.intval($limit);
}
if(!$date_format)
$date_format=get_option('date_format');
// Find the upcoming events.
$calendar_entries = $wpdb->get_results(
"SELECT DISTINCT
p.id AS id,
post_title,
start,
u.$ec3->wp_user_nicename AS author,
allday
FROM $ec3->schedule s
LEFT JOIN $wpdb->posts p ON s.post_id=p.id
LEFT JOIN $wpdb->users u ON p.post_author = u.id
WHERE p.post_status='publish'
AND end>='$ec3->today' $and_before
ORDER BY start $limit_numposts"
);
echo "";
echo "\n";
if($calendar_entries)
{
$time_format=get_option('time_format');
$current_month=false;
$current_date=false;
$data=array();
foreach($calendar_entries as $entry)
{
// To use %SINCE%, you need Dunstan's 'Time Since' plugin.
if(function_exists('time_since'))
$data['SINCE']=time_since( time(), ec3_to_time($entry->start) );
// Month changed?
$data['MONTH']=mysql2date($month_format,$entry->start);
$data['MONTH'] = mb_convert_encoding($data['MONTH'],"ISO-8859-1");
if((!$current_month || $current_month!=$data['MONTH']) && $template_month)
{
if($current_date)
echo "
\n";
if($current_month)
echo "\n";
echo ""
. ec3_format_str($template_month,$data)."\n\n";
$current_month=$data['MONTH'];
$current_date=false;
}
// Date changed?
$data['DATE'] =mysql2date($date_format, $entry->start);
if((!$current_date || $current_date!=$data['DATE']) && $template_day)
{
if($current_date)
echo "
\n";
echo ""
. ec3_format_str($template_day,$data)."\n\n";
$current_date=$data['DATE'];
}
$data['DATE'] = mb_convert_encoding($data['DATE'],"ISO-8859-1");
if($entry->allday)
$data['TIME']=__('all day','ec3');
else
$data['TIME']=mysql2date($time_format,$entry->start);
$data['TITLE'] =
htmlentities(
stripslashes(strip_tags($entry->post_title)),
ENT_QUOTES,get_option('blog_charset')
);
$data['TITLE'] = mb_convert_encoding($data['TITLE'],"ISO-8859-1");
$data['LINK'] =get_permalink($entry->id);
$data['LINK2'] ="http://wap.italo-meetings.de/index.php?p=" . $entry->id;
$data['AUTHOR']=
htmlentities($entry->author,ENT_QUOTES,get_option('blog_charset'));
echo " - ".ec3_format_str($template_event,$data)."
\n";
}
if($current_date)
echo "
\n";
if($current_month)
echo "\n";
}
else
{
echo "".__('No events.','ec3')."\n";
}
echo "\n";
}
?>
/*************************************/
/* Template für Fiat 500 Club */
/* Datei: events_fiat500club.php */
/*************************************/
function ec3_get_fiat500club_events(
$limit,
$template_event=EC3_DEFAULT_TEMPLATE_EVENT,
$template_day =EC3_DEFAULT_TEMPLATE_DAY,
$date_format =EC3_DEFAULT_DATE_FORMAT,
$template_month=EC3_DEFAULT_TEMPLATE_MONTH,
$month_format =EC3_DEFAULT_MONTH_FORMAT)
{
global $ec3,$wpdb,$wp_version;
// Parse $limit:
// NUMBER - limits number of posts
// NUMBER days - next NUMBER of days
if(empty($limit))
{
$limit_numposts='LIMIT 5';
}
elseif(preg_match('/^ *([0-9]+) *d(ays?)?/',$limit,$matches))
{
$secs=intval($matches[1])*24*3600;
$and_before="AND start<='".ec3_strftime('%Y-%m-%d',time()+$secs)."'";
}
elseif(intval($limit)<1)
{
$limit_numposts='LIMIT 5';
}
else
{
$limit_numposts='LIMIT '.intval($limit);
}
if(!$date_format)
$date_format=get_option('date_format');
// Find the upcoming events.
$calendar_entries = $wpdb->get_results(
"SELECT DISTINCT
p.id AS id,
post_title,
start,
u.$ec3->wp_user_nicename AS author,
allday
FROM $ec3->schedule s
LEFT JOIN $wpdb->posts p ON s.post_id=p.id
LEFT JOIN $wpdb->users u ON p.post_author = u.id
WHERE p.post_status='publish'
AND end>='$ec3->today' $and_before
ORDER BY start $limit_numposts"
);
echo "\n";
if($calendar_entries)
{
$time_format=get_option('time_format');
$current_month=false;
$current_date=false;
$data=array();
foreach($calendar_entries as $entry)
{
// To use %SINCE%, you need Dunstan's 'Time Since' plugin.
if(function_exists('time_since'))
$data['SINCE']=time_since( time(), ec3_to_time($entry->start) );
// Month changed?
$data['MONTH']=mysql2date($month_format,$entry->start);
if((!$current_month || $current_month!=$data['MONTH']) && $template_month)
{
if($current_date)
echo "\n";
if($current_month)
echo "\n";
echo ec3_format_str($template_month,$data)."\n\n";
$current_month=$data['MONTH'];
$current_date=false;
}
// Date changed?
$data['DATE'] =mysql2date($date_format, $entry->start);
if((!$current_date || $current_date!=$data['DATE']) && $template_day)
{
if($current_date)
echo "\n";
echo ec3_format_str($template_day,$data)."\n\n";
$current_date=$data['DATE'];
}
$data['DATE'] = mb_convert_encoding($data['DATE'],"ISO-8859-1");
if($entry->allday)
$data['TIME']=__('all day','ec3');
else
$data['TIME']=mysql2date($time_format,$entry->start);
$data['TITLE'] =
htmlentities(
stripslashes(strip_tags($entry->post_title)),
ENT_QUOTES,get_option('blog_charset')
);
$data['TITLE'] = mb_convert_encoding($data['TITLE'],"ISO-8859-1");
$data['LINK'] = get_permalink($entry->id);
$data['AUTHOR']=
htmlentities($entry->author,ENT_QUOTES,get_option('blog_charset'));
echo ec3_format_str($template_event,$data)."\n";
}
if($current_date)
echo "\n";
if($current_month)
echo "\n";
}
else
{
echo "".__('No events.','ec3')."\n";
}
echo "\n";
}
?>
/***************************************/
/* Template für Fiat 500 Club lang */
/* Datei: events_fiat500club_lang.php */
/***************************************/
function ec3_get_fiat500club_events_lang(
$limit,
$template_event=EC3_DEFAULT_TEMPLATE_EVENT,
$template_day =EC3_DEFAULT_TEMPLATE_DAY,
$date_format =EC3_DEFAULT_DATE_FORMAT,
$template_month=EC3_DEFAULT_TEMPLATE_MONTH,
$month_format =EC3_DEFAULT_MONTH_FORMAT)
{
if(!ec3_check_installed(__('Upcoming Events','ec3')))
return;
global $ec3,$wpdb,$wp_version;
// Parse $limit:
// NUMBER - limits number of posts
// NUMBER days - next NUMBER of days
if(empty($limit))
{
$limit_numposts='LIMIT 5';
}
elseif(preg_match('/^ *([0-9]+) *d(ays?)?/',$limit,$matches))
{
$secs=intval($matches[1])*24*3600;
$and_before="AND start<='".ec3_strftime('%Y-%m-%d',time()+$secs)."'";
}
elseif(intval($limit)<1)
{
$limit_numposts='LIMIT 5';
}
else
{
$limit_numposts='LIMIT '.intval($limit);
}
if(!$date_format)
$date_format=get_option('date_format');
// Find the upcoming events.
$calendar_entries = $wpdb->get_results(
"SELECT DISTINCT
p.id AS id,
post_title,
start,
u.$ec3->wp_user_nicename AS author,
allday
FROM $ec3->schedule s
LEFT JOIN $wpdb->posts p ON s.post_id=p.id
LEFT JOIN $wpdb->users u ON p.post_author = u.id
WHERE p.post_status='publish'
AND end>='$ec3->today' $and_before
ORDER BY start $limit_numposts"
);
echo "";
echo "\n";
if($calendar_entries)
{
$time_format=get_option('time_format');
$current_month=false;
$current_date=false;
$data=array();
foreach($calendar_entries as $entry)
{
// To use %SINCE%, you need Dunstan's 'Time Since' plugin.
if(function_exists('time_since'))
$data['SINCE']=time_since( time(), ec3_to_time($entry->start) );
// Month changed?
$data['MONTH']=mysql2date($month_format,$entry->start);
$data['MONTH'] = mb_convert_encoding($data['MONTH'],"ISO-8859-1");
if((!$current_month || $current_month!=$data['MONTH']) && $template_month)
{
if($current_date)
echo "
\n";
if($current_month)
echo "\n";
echo ""
. ec3_format_str($template_month,$data)."\n\n";
$current_month=$data['MONTH'];
$current_date=false;
}
// Date changed?
$data['DATE'] =mysql2date($date_format, $entry->start);
if((!$current_date || $current_date!=$data['DATE']) && $template_day)
{
if($current_date)
echo "
\n";
echo ""
. ec3_format_str($template_day,$data)."\n\n";
$current_date=$data['DATE'];
}
$data['DATE'] = mb_convert_encoding($data['DATE'],"ISO-8859-1");
if($entry->allday)
$data['TIME']=__('all day','ec3');
else
$data['TIME']=mysql2date($time_format,$entry->start);
$data['TITLE'] =
htmlentities(
stripslashes(strip_tags($entry->post_title)),
ENT_QUOTES,get_option('blog_charset')
);
$data['TITLE'] = mb_convert_encoding($data['TITLE'],"ISO-8859-1");
$data['LINK'] =get_permalink($entry->id);
$data['LINK2'] ="http://wap.italo-meetings.de/index.php?p=" . $entry->id;
$data['AUTHOR']=
htmlentities($entry->author,ENT_QUOTES,get_option('blog_charset'));
echo " - ".ec3_format_str($template_event,$data)."
\n";
}
if($current_date)
echo "
\n";
if($current_month)
echo "\n";
}
else
{
echo "".__('No events.','ec3')."\n";
}
echo "\n";
}
?>
/*************************************/
/* Template für Fiat Club Altmark */
/* Datei: events_fiatclubaltmark.php */
/*************************************/
function ec3_get_fiatclubaltmark_events(
$limit,
$template_event=EC3_DEFAULT_TEMPLATE_EVENT,
$template_day =EC3_DEFAULT_TEMPLATE_DAY,
$date_format =EC3_DEFAULT_DATE_FORMAT,
$template_month=EC3_DEFAULT_TEMPLATE_MONTH,
$month_format =EC3_DEFAULT_MONTH_FORMAT)
{
global $ec3,$wpdb,$wp_version;
// Parse $limit:
// NUMBER - limits number of posts
// NUMBER days - next NUMBER of days
if(empty($limit))
{
$limit_numposts='LIMIT 5';
}
elseif(preg_match('/^ *([0-9]+) *d(ays?)?/',$limit,$matches))
{
$secs=intval($matches[1])*24*3600;
$and_before="AND start<='".ec3_strftime('%Y-%m-%d',time()+$secs)."'";
}
elseif(intval($limit)<1)
{
$limit_numposts='LIMIT 5';
}
else
{
$limit_numposts='LIMIT '.intval($limit);
}
if(!$date_format)
$date_format=get_option('date_format');
// Find the upcoming events.
$calendar_entries = $wpdb->get_results(
"SELECT DISTINCT
p.id AS id,
post_title,
start,
u.$ec3->wp_user_nicename AS author,
allday
FROM $ec3->schedule s
LEFT JOIN $wpdb->posts p ON s.post_id=p.id
LEFT JOIN $wpdb->users u ON p.post_author = u.id
WHERE p.post_status='publish'
AND end>='$ec3->today' $and_before
ORDER BY start $limit_numposts"
);
echo "\n";
if($calendar_entries)
{
$time_format=get_option('time_format');
$current_month=false;
$current_date=false;
$data=array();
foreach($calendar_entries as $entry)
{
// To use %SINCE%, you need Dunstan's 'Time Since' plugin.
if(function_exists('time_since'))
$data['SINCE']=time_since( time(), ec3_to_time($entry->start) );
// Month changed?
$data['MONTH']=mysql2date($month_format,$entry->start);
if((!$current_month || $current_month!=$data['MONTH']) && $template_month)
{
if($current_date)
echo "\n";
if($current_month)
echo "\n";
echo ec3_format_str($template_month,$data)."\n\n";
$current_month=$data['MONTH'];
$current_date=false;
}
// Date changed?
$data['DATE'] =mysql2date($date_format, $entry->start);
$data['DATE'] = mb_convert_encoding($data['DATE'],"ISO-8859-1");
if((!$current_date || $current_date!=$data['DATE']) && $template_day)
{
if($current_date)
echo "\n";
echo ec3_format_str($template_day,$data)."\n\n";
$current_date=$data['DATE'];
}
if($entry->allday)
$data['TIME']=__('all day','ec3');
else
$data['TIME']=mysql2date($time_format,$entry->start);
$data['TITLE'] =
htmlentities(
stripslashes(strip_tags($entry->post_title)),
ENT_QUOTES,get_option('blog_charset')
);
$data['TITLE'] = mb_convert_encoding($data['TITLE'],"ISO-8859-1");
$data['LINK'] = get_permalink($entry->id);
$data['AUTHOR']=
htmlentities($entry->author,ENT_QUOTES,get_option('blog_charset'));
echo ec3_format_str($template_event,$data)."\n";
}
if($current_date)
echo "\n";
if($current_month)
echo "\n";
}
else
{
echo "".__('No events.','ec3')."\n";
}
echo "\n";
}
?>
/*******************************************/
/* Template für Fiat Club Altmark lang */
/* Datei: events_fiatclubaltmark_lang.php */
/*******************************************/
function ec3_get_fiatclubaltmark_events_lang(
$limit,
$template_event=EC3_DEFAULT_TEMPLATE_EVENT,
$template_day =EC3_DEFAULT_TEMPLATE_DAY,
$date_format =EC3_DEFAULT_DATE_FORMAT,
$template_month=EC3_DEFAULT_TEMPLATE_MONTH,
$month_format =EC3_DEFAULT_MONTH_FORMAT)
{
if(!ec3_check_installed(__('Upcoming Events','ec3')))
return;
global $ec3,$wpdb,$wp_version;
// Parse $limit:
// NUMBER - limits number of posts
// NUMBER days - next NUMBER of days
if(empty($limit))
{
$limit_numposts='LIMIT 5';
}
elseif(preg_match('/^ *([0-9]+) *d(ays?)?/',$limit,$matches))
{
$secs=intval($matches[1])*24*3600;
$and_before="AND start<='".ec3_strftime('%Y-%m-%d',time()+$secs)."'";
}
elseif(intval($limit)<1)
{
$limit_numposts='LIMIT 5';
}
else
{
$limit_numposts='LIMIT '.intval($limit);
}
if(!$date_format)
$date_format=get_option('date_format');
// Find the upcoming events.
$calendar_entries = $wpdb->get_results(
"SELECT DISTINCT
p.id AS id,
post_title,
start,
u.$ec3->wp_user_nicename AS author,
allday
FROM $ec3->schedule s
LEFT JOIN $wpdb->posts p ON s.post_id=p.id
LEFT JOIN $wpdb->users u ON p.post_author = u.id
WHERE p.post_status='publish'
AND end>='$ec3->today' $and_before
ORDER BY start $limit_numposts"
);
echo "";
echo "\n";
if($calendar_entries)
{
$time_format=get_option('time_format');
$current_month=false;
$current_date=false;
$data=array();
foreach($calendar_entries as $entry)
{
// To use %SINCE%, you need Dunstan's 'Time Since' plugin.
if(function_exists('time_since'))
$data['SINCE']=time_since( time(), ec3_to_time($entry->start) );
// Month changed?
$data['MONTH']=mysql2date($month_format,$entry->start);
$data['MONTH'] = mb_convert_encoding($data['MONTH'],"ISO-8859-1");
if((!$current_month || $current_month!=$data['MONTH']) && $template_month)
{
if($current_date)
echo "
\n";
if($current_month)
echo "\n";
echo ""
. ec3_format_str($template_month,$data)."\n\n";
$current_month=$data['MONTH'];
$current_date=false;
}
// Date changed?
$data['DATE'] =mysql2date($date_format, $entry->start);
if((!$current_date || $current_date!=$data['DATE']) && $template_day)
{
if($current_date)
echo "
\n";
echo ""
. ec3_format_str($template_day,$data)."\n\n";
$current_date=$data['DATE'];
}
$data['DATE'] = mb_convert_encoding($data['DATE'],"ISO-8859-1");
if($entry->allday)
$data['TIME']=__('all day','ec3');
else
$data['TIME']=mysql2date($time_format,$entry->start);
$data['TITLE'] =
htmlentities(
stripslashes(strip_tags($entry->post_title)),
ENT_QUOTES,get_option('blog_charset')
);
$data['TITLE'] = mb_convert_encoding($data['TITLE'],"ISO-8859-1");
$data['LINK'] =get_permalink($entry->id);
$data['LINK2'] ="http://wap.italo-meetings.de/index.php?p=" . $entry->id;
$data['AUTHOR']=
htmlentities($entry->author,ENT_QUOTES,get_option('blog_charset'));
echo " - ".ec3_format_str($template_event,$data)."
\n";
}
if($current_date)
echo "
\n";
if($current_month)
echo "\n";
}
else
{
echo "".__('No events.','ec3')."\n";
}
echo "\n";
}
?>
/*************************************/
/* Template für Puntotreffen.de */
/* Datei: events_puntogemeinde.php */
/*************************************/
function ec3_get_puntogemeinde_events(
$limit,
$template_event=EC3_DEFAULT_TEMPLATE_EVENT,
$template_day =EC3_DEFAULT_TEMPLATE_DAY,
$date_format =EC3_DEFAULT_DATE_FORMAT,
$template_month=EC3_DEFAULT_TEMPLATE_MONTH,
$month_format =EC3_DEFAULT_MONTH_FORMAT)
{
if(!ec3_check_installed(__('Upcoming Events','ec3')))
return;
global $ec3,$wpdb,$wp_version;
// Parse $limit:
// NUMBER - limits number of posts
// NUMBER days - next NUMBER of days
if(empty($limit))
{
$limit_numposts='LIMIT 5';
}
elseif(preg_match('/^ *([0-9]+) *d(ays?)?/',$limit,$matches))
{
$secs=intval($matches[1])*24*3600;
$and_before="AND start<='".ec3_strftime('%Y-%m-%d',time()+$secs)."'";
}
elseif(intval($limit)<1)
{
$limit_numposts='LIMIT 5';
}
else
{
$limit_numposts='LIMIT '.intval($limit);
}
if(!$date_format)
$date_format=get_option('date_format');
// Find the upcoming events.
$calendar_entries = $wpdb->get_results(
"SELECT DISTINCT
p.id AS id,
post_title,
start,
u.$ec3->wp_user_nicename AS author,
allday
FROM $ec3->schedule s
LEFT JOIN $wpdb->posts p ON s.post_id=p.id
LEFT JOIN $wpdb->users u ON p.post_author = u.id
WHERE p.post_status='publish'
AND end>='$ec3->today' $and_before
ORDER BY start $limit_numposts"
);
echo "";
echo "\n";
if($calendar_entries)
{
$time_format=get_option('time_format');
$current_month=false;
$current_date=false;
$data=array();
foreach($calendar_entries as $entry)
{
// To use %SINCE%, you need Dunstan's 'Time Since' plugin.
if(function_exists('time_since'))
$data['SINCE']=time_since( time(), ec3_to_time($entry->start) );
// Month changed?
$data['MONTH']=mysql2date($month_format,$entry->start);
if((!$current_month || $current_month!=$data['MONTH']) && $template_month)
{
if($current_date)
echo "
\n";
if($current_month)
echo "\n";
echo ""
. ec3_format_str($template_month,$data)."\n\n";
$current_month=$data['MONTH'];
$current_date=false;
}
// Date changed?
$data['DATE'] =mysql2date($date_format, $entry->start);
if((!$current_date || $current_date!=$data['DATE']) && $template_day)
{
if($current_date)
echo "
\n";
echo ""
. ec3_format_str($template_day,$data)."\n\n";
$current_date=$data['DATE'];
}
$data['DATE'] = mb_convert_encoding($data['DATE'],"ISO-8859-1");
if($entry->allday)
$data['TIME']=__('all day','ec3');
else
$data['TIME']=mysql2date($time_format,$entry->start);
$data['TITLE'] =
htmlentities(
stripslashes(strip_tags($entry->post_title)),
ENT_QUOTES,get_option('blog_charset')
);
$data['TITLE'] = mb_convert_encoding($data['TITLE'],"ISO-8859-1");
$data['LINK'] =get_permalink($entry->id);
$data['LINK2'] ="http://wap.italo-meetings.de/index.php?p=" . $entry->id;
$data['AUTHOR']=
htmlentities($entry->author,ENT_QUOTES,get_option('blog_charset'));
echo " - ".ec3_format_str($template_event,$data)."
\n";
}
if($current_date)
echo "
\n";
if($current_month)
echo "\n";
}
else
{
echo "".__('No events.','ec3')."\n";
}
echo "\n";
}
?>
/*************************************/
/* Template für Puntotreffen.de */
/* Datei: events_puntogemeinde_lang.php */
/*************************************/
function ec3_get_puntogemeinde_events_lang(
$limit,
$template_event=EC3_DEFAULT_TEMPLATE_EVENT,
$template_day =EC3_DEFAULT_TEMPLATE_DAY,
$date_format =EC3_DEFAULT_DATE_FORMAT,
$template_month=EC3_DEFAULT_TEMPLATE_MONTH,
$month_format =EC3_DEFAULT_MONTH_FORMAT)
{
if(!ec3_check_installed(__('Upcoming Events','ec3')))
return;
global $ec3,$wpdb,$wp_version;
// Parse $limit:
// NUMBER - limits number of posts
// NUMBER days - next NUMBER of days
if(empty($limit))
{
$limit_numposts='LIMIT 5';
}
elseif(preg_match('/^ *([0-9]+) *d(ays?)?/',$limit,$matches))
{
$secs=intval($matches[1])*24*3600;
$and_before="AND start<='".ec3_strftime('%Y-%m-%d',time()+$secs)."'";
}
elseif(intval($limit)<1)
{
$limit_numposts='LIMIT 5';
}
else
{
$limit_numposts='LIMIT '.intval($limit);
}
if(!$date_format)
$date_format=get_option('date_format');
// Find the upcoming events.
$calendar_entries = $wpdb->get_results(
"SELECT DISTINCT
p.id AS id,
post_title,
start,
u.$ec3->wp_user_nicename AS author,
allday
FROM $ec3->schedule s
LEFT JOIN $wpdb->posts p ON s.post_id=p.id
LEFT JOIN $wpdb->users u ON p.post_author = u.id
WHERE p.post_status='publish'
AND end>='$ec3->today' $and_before
ORDER BY start $limit_numposts"
);
echo "";
echo "\n";
if($calendar_entries)
{
$time_format=get_option('time_format');
$current_month=false;
$current_date=false;
$data=array();
foreach($calendar_entries as $entry)
{
// To use %SINCE%, you need Dunstan's 'Time Since' plugin.
if(function_exists('time_since'))
$data['SINCE']=time_since( time(), ec3_to_time($entry->start) );
// Month changed?
$data['MONTH']=mysql2date($month_format,$entry->start);
$data['MONTH'] = mb_convert_encoding($data['MONTH'],"ISO-8859-1");
if((!$current_month || $current_month!=$data['MONTH']) && $template_month)
{
if($current_date)
echo "
\n";
if($current_month)
echo "\n";
echo ""
. ec3_format_str($template_month,$data)."\n\n";
$current_month=$data['MONTH'];
$current_date=false;
}
// Date changed?
$data['DATE'] =mysql2date($date_format, $entry->start);
if((!$current_date || $current_date!=$data['DATE']) && $template_day)
{
if($current_date)
echo "
\n";
echo ""
. ec3_format_str($template_day,$data)."\n\n";
$current_date=$data['DATE'];
}
$data['DATE'] = mb_convert_encoding($data['DATE'],"ISO-8859-1");
if($entry->allday)
$data['TIME']=__('all day','ec3');
else
$data['TIME']=mysql2date($time_format,$entry->start);
$data['TITLE'] =
htmlentities(
stripslashes(strip_tags($entry->post_title)),
ENT_QUOTES,get_option('blog_charset')
);
$data['TITLE'] = mb_convert_encoding($data['TITLE'],"ISO-8859-1");
$data['LINK'] =get_permalink($entry->id);
$data['LINK2'] ="http://wap.italo-meetings.de/index.php?p=" . $entry->id;
$data['AUTHOR']=
htmlentities($entry->author,ENT_QUOTES,get_option('blog_charset'));
echo " - ".ec3_format_str($template_event,$data)."
\n";
}
if($current_date)
echo "
\n";
if($current_month)
echo "\n";
}
else
{
echo "".__('No events.','ec3')."\n";
}
echo "\n";
}
?>Beispielausgabe für alle Termine
Schriftart, Farbe, Codierung etc. werden komplett von mir auf euer Design angepasst!
Die Events aktualisieren sich natürlich automatisch!