J?rg
Forum Replies Created
-
I mad the change locally at my installation and it works. Maybe someone can change it in SVN Repository:
em-functions.php
function em_get_scopes(){ $scopes = array( 'all' => __('All events','events-manager'), 'future' => __('Future events','events-manager'), 'past' => __('Past events','events-manager'), 'today' => __('Today\'s events','events-manager'), 'tomorrow' => __('Tomorrow\'s events','events-manager'), 'month' => __('Events this month','events-manager'), 'next-month' => __('Events next month','events-manager'), '1-months' => __('Events current and next month','events-manager'), '2-months' => __('Events within 2 months','events-manager'), '3-months' => __('Events within 3 months','events-manager'), '6-months' => __('Events within 6 months','events-manager'), '12-months' => __('Events within 12 months','events-manager'), <strong>'future-lastmonth' => __('Future events and last month','events-manager')</strong> ); return apply_filters('em_get_scopes',$scopes);
em-docs.php
'scope' => array( 'desc'=> 'Choose the time frame of events to show. Additionally you can supply dates (in format of YYYY-MM-DD), either single for events on a specific date or two dates separated by a comma (e.g. 2010-12-25,2010-12-31) for events ocurring between these dates.', 'default'=>'future', 'args'=>array("future", "past", "today", "tomorrow", "month", "next-month", "1-months", "2-months", "3-months", "6-months", "12-months"<strong>, "future-lastmonth"</strong>, "all")),
em-object.php function build_sql_conditions
}elseif ($scope == "future"){ $conditions['scope'] = " event_start >= '".$EM_DateTime->getDateTime(true)."'"; if( !get_option('dbem_events_current_are_past') ){ $conditions['scope'] .= " OR (event_end >= '".$EM_DateTime->getDateTime(true)."')"; } }<strong>elseif ($scope == "future-lastmonth"){ $EM_DateTime->sub('P1M'); $conditions['scope'] = " event_start >= '".$EM_DateTime->getDateTime(true)."'"; if( !get_option('dbem_events_current_are_past') ){ $conditions['scope'] .= " OR (event_end >= '".$EM_DateTime->getDateTime(true)."')"; } }</strong>
em-object.php function build_wpquery_conditions
added elseif in scope
}elseif ($scope == “future-lastmonth” ){
$EM_DateTime = new EM_DateTime(); //create default time in blog timezone
$EM_DateTime->setTimezone(‘UTC’);
$EM_DateTime->sub(‘P1M’);
if( get_option(‘dbem_events_current_are_past’) && $wp_query->query_vars[‘post_type’] != ‘event-recurring’ ){
$query[] = array( ‘key’ => ‘_event_start’, ‘value’ => $EM_DateTime->getDateTime(), ‘compare’ => ‘>=’, ‘type’ => ‘DATETIME’ );
}else{
$query[] = array( ‘key’ => ‘_event_end’, ‘value’ => $EM_DateTime->getDateTime(), ‘compare’ => ‘>=’, ‘type’ => ‘DATETIME’ );
}em-event-post.php in function parse_query
after elseif scope future}elseif ($scope == "future-lastmonth" ){ $EM_DateTime = new EM_DateTime(); //create default time in blog timezone $EM_DateTime->setTimezone('UTC'); $EM_DateTime->sub('P1M'); if( get_option('dbem_events_current_are_past') && $wp_query->query_vars['post_type'] != 'event-recurring' ){ $query[] = array( 'key' => '_event_start', 'value' => $EM_DateTime->getDateTime(), 'compare' => '>=', 'type' => 'DATETIME' ); }else{ $query[] = array( 'key' => '_event_end', 'value' => $EM_DateTime->getDateTime(), 'compare' => '>=', 'type' => 'DATETIME' ); }
Forum: Plugins
In reply to: [ALO EasyMail Newsletter] Preview in newsletter missingHi,
thank you. I close this issue because its a duplicate to https://www.ads-software.com/support/topic/theme-meta-box-disappears/