AdrianV
Forum Replies Created
-
Thank you, I will try it and report back.
Wow, thanks for your quick answer.
Is there a way of altering the “standard” query to get the desired result?thanks for your reply.
But no, I have no caching plugin in use.
I think it’s my custom template which causes the error:
using this:
<td>#H:#i - #@H:#i</td>
gives the wrong time.
using this:
<td>#H:#i - #@H:@#i</td>
results in showing the second @-sign.So what is the correct format?
When I just put in #_EVENTTIMES instead, the resulting frontend is correct.
- This reply was modified 5 years, 5 months ago by AdrianV.
Ok, here it is on pastebin.
I used “yournewattribute” as name placeholder for any custom attribute.
You can add more atrributes with their conditions in the same snippet.
I already tried it and it works like a charm.Again, wouldn’t it be great to implement “custom conditions for custom attributes” in your plugin?
As a suggestion:
parallel to the existing ones like “has_location” the user would have the possibility to use “has_mycustomattribute”Because it WAS running before without errors on frontend pages I switched back to an older version of your plugin…
The code fragments were gone, BUT the intended functionality also.
I must have looked on a wrong page… sorry.So I have to filter my own attributes with some code in functions.php
like the one I found here.Or is there an easier solution (besides unsing a template)?
Thanks for your help!The project isn’t yet published so my client won’t be willing to show.
Here I link to a screenshot to demonstrate the problem.I don’t understand, why it was functioning before, if it is not allowed to use php in the settings input.
Hi,
try the following in your functions.php
add_filter( 'em_events_build_sql_conditions', 'my_em_scope_conditions',1,2); function my_em_scope_conditions2($conditions, $args){ if( !empty($args['scope']) && $args['scope']=='last6month' ){ $start_date = date('Y-m-d',strtotime("-6 months", current_time('timestamp'))); $end_date = date('Y-m-d',strtotime("last day of last month", 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; } add_filter( 'em_get_scopes','my_em_scopes',1,1); function my_em_scopes2($scopes){ $my_scopes = array( 'last6month' => 'last6month' ); return $scopes + $my_scopes; }
then change your scope name from “6-month” to “last6month”
No, I don’t use a plugin. The code is entered in Event Manager
“Settings/Formatting/Events/Default single event format”
and has worked as it should until the last update.Thanks for your help, but I’ve already tried your suggestion without success.
Meanwhile I managed it to display my videos on iPad. I used the generic wp-shortcode with mp4 encoded in h264:
[video width="360" height="202" mp4="https://https://www.mysite.com/videos/video_01.mp4" poster="https://www.mysite.com/videos/video_poster_01.jpg" preload="none" autoplay="off"][/video]
Hope it helps.
Good luck! AdrianHave the same problem with latest version of WP and plugin (Firefox v27).
The Custom sidebar panel is underneath the WP sidebar panel, which is underneath the widget panel. And I’ve got a big screen ??
Examining with firebug shows that position:static in your stylesheet is causing the problem.
When I deactivate.widgets_access .widget-liquid-right { position: static; }
everything is fine!
What to do now? I don’t want to change your stylesheet, which will be overwritten by the next update.
Thanks in advance,
AdrianGot the solution. Oh my gosh!
I used the time format: j-F-Y
It works with time format: Y-m-dAs I mentioned above I put it in functions.php and then call the scope in my page with following shortcode:
[events_list_grouped mode=”monthly” scope=”vorschau” category=”44″]
Im really stuck since weeks now and my client gets really impatient.
to 2. You mean simply like this?
add_filter( 'em_events_build_sql_conditions', 'my_em_scope_conditions2',1,2); function my_em_scope_conditions2($conditions, $args){ if( !empty($args['scope']) && $args['scope']=='vorschau' ){ $start_date = date('j-F-Y',current_time('timestamp')); $end_date = date('j-F-Y',strtotime("+3 months", 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))"; } if( !empty($args['scope']) && $args['scope']=='heute' ){ $start_date = date('j-F-Y',current_time('timestamp')); $end_date = date('j-F-Y',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; } add_filter( 'em_get_scopes','my_em_scopes2',1,1); function my_em_scopes2($scopes){ $my_scopes = array( 'vorschau' => 'vorschau' ); return $scopes + $my_scopes; } add_filter( 'em_get_scopes','my_em_scopes2',1,1); function my_em_scopes2($scopes){ $my_scopes = array( 'heute' => 'heute' ); return $scopes + $my_scopes; }
[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
still unable to implement videos on ipad…
no answer?
Sorry, but I’m not yet allowed to provide a link in public, cause my customer don’t want to show anything before the site is looking correctly.Forum: Plugins
In reply to: [WP Shortcodes Plugin — Shortcodes Ultimate] php-warning in settingsThanks, after updating with new version, the widgets are functioning as intended.
Forum: Plugins
In reply to: [WP Shortcodes Plugin — Shortcodes Ultimate] Custom CSS not workingthanks a lot for your very quick answer and correction! Works.