kvwebmaster
Forum Replies Created
-
Having the same issue. Didn’t see an entry in the FAQs, so I’ll bump this one.
Oops, the second code I posted (my revision) still has “event_start_date” and “event_end_date” in it.
I did change those, but still no luck.
Revised code:
add_filter( 'em_events_build_sql_conditions', 'my_em_scope_conditions',1,2); function my_em_scope_conditions($conditions, $args){ if( !empty($args['scope']) && $args['scope']=='today-tomorrow' ){ $start_time = time(); $end_time = time() +86400; $conditions['scope'] = " (event_start_time BETWEEN CAST('$start_time AS TIME) AND CAST('$end_time' AS TIME)) OR (event_end_time BETWEEN CAST('$end_time' AS TIME) AND CAST('$start_time' AS TIME))"; } return $conditions; }Thanks! I am working to put together a custom scope for “Future Events” that are not just >= the current day, but also the current time.
Their tutorial shows how to create a “today and tomorrow” scope that I’m trying to work from.add_filter( 'em_events_build_sql_conditions', 'my_em_scope_conditions',1,2); function my_em_scope_conditions($conditions, $args){ if( !empty($args['scope']) && $args['scope']=='today-tomorrow' ){ $start_date = date('Y-m-d',current_time('timestamp')); $end_date = date('Y-m-d',strtotime("+1 day", current_time('timestamp'))); $conditions['scope'] = " (event_start_date BETWEEN CAST('$start_date' AS DATE) AND CAST('$end_date' AS DATE)) OR (event_end_date BETWEEN CAST('$end_date' AS DATE) AND CAST('$start_date' AS DATE))"; } return $conditions;I’ve tried creating variables “$start_time” and “$end_time” to display events with a start time after now, but before 24 hrs from now. I’m almost a complete neophyte at SQL, so any wisdom as to what rookie mistakes I’m making is welcome!
Here’s my current code….
add_filter( 'em_events_build_sql_conditions', 'my_em_scope_conditions',1,2); function my_em_scope_conditions($conditions, $args){ if( !empty($args['scope']) && $args['scope']=='today-tomorrow' ){ $start_time = time(); $end_time = time() +86400; $conditions['scope'] = " (event_start_date BETWEEN CAST('$start_time AS TIME) AND CAST('$end_time' AS TIME)) OR (event_end_date BETWEEN CAST('$end_time' AS TIME) AND CAST('$start_time' AS TIME))"; } return $conditions; }Hi angelo_nwl,
I gave that a try, but that is meant to show upcoming events at a particular location. I’m looking to show the next upcoming event. I’ve selected in the widget to show 1 event, and selected “future events.” However, when there is, say a 6am and 6pm event, the 6am shows all day.
<div class="location-image"> #_LOCATIONIMAGE</div> <h2>#_EVENTLINK</h2> <h3>#l, #_12HSTARTTIME <br> #_LOCATIONADDRESS<br/> #_LOCATIONTOWN , #_LOCATIONSTATE #_LOCATIONPOSTCODE </h3>Screenshot of widget settings at
http://postimg.org/image/u9uh8v11j/Thanks!
Forum: Plugins
In reply to: [Testimonials Widget] Disabling blockquotesUpdate:
This doesn’t remove the blockquotes, but styles then back to a more normal appearance, from Michael’s FAQ page.
.testimonials-widget-testimonial blockquote {
font-size: 1em;
border-left: none;
padding-left: 0;
margin-left: 0;
}Some of my testimonials were also wrapping in “code” tags. I applied the same CSS to the code tags as well. It’d be nice if there’s a way that they can just display in standard paragraph tags. Any ideas?
Thanks!
Forum: Plugins
In reply to: [Testimonials Widget] Disabling blockquotesSame issue as Jonathan, so I’ll piggyback to get updates.
Forum: Plugins
In reply to: [Contact Form 7] Spinning Icon, message sends, but no confirmationmy mistake was rather dumb, I’m afraid.
I had brought into my localhost for editing via duplicator…thus it wasn’t actually on the real web server, which made sending mail difficult.
Mine is working now…hope yours gets fixed soon!
Forum: Plugins
In reply to: [Contact Form 7] Spinning Icon, message sends, but no confirmationAlso, my emails don’t get sent at all.
Forum: Plugins
In reply to: [Contact Form 7] Spinning Icon, message sends, but no confirmationHaving the same problem. Also upgraded to 3.5 last night.
for some reason, it started working. Not sure how, but not complaining!
Forum: Localhost Installs
In reply to: BitNami WordPress Stack Migration URL IssuesEnded up going back to the traditional format of enabling multisite. For some reason, the copy/paste of the
define('MULTISITE', true);
was screwing up the wp-config.php file. I hand-typed it in, no problems. 6 hours and finally done!