Atte Moisio
Forum Replies Created
-
Forum: Plugins
In reply to: [AM Events] Full List Of Event Page Not Removing Past EventsYes, that’s right!
Forum: Plugins
In reply to: [AM Events] Full List Of Event Page Not Removing Past EventsHi,
I don’t see anything wrong or missing in your code. It will keep passed events visible for a whole day due to “
time() - (24 * 60 * 60)
” though.Removing “
- (24 * 60 * 60)
” should make passed events disappear right away.Forum: Plugins
In reply to: [AM Events] Update event category to recurring events doesn't work.Yes, managed to fix it! Just a simple little bug ??
Plugin updated.
Forum: Plugins
In reply to: [AM Events] Update event category to recurring events doesn't work.Hey,
I’ll have a look into it today. Thanks for reporting!
Forum: Plugins
In reply to: [AM Events] "No Upcoming Events" event though there isHi,
I just tried to do a fresh install, and could not reproduce the problem. Everything seems to be working fine for me.
Are you sure the plugin is enabled? You could also check the file permissions in the plugin folder. Other than that, I can’t think of anything else.
Forum: Plugins
In reply to: [AM Events] Remove end date if it's same as start dateHey again,
You can ignore the instructions in the previous post, I’ve just updated the plugin and included the conditional tags ??
Example of displaying end date only if it not the same as the startdate:
[start-date format='D d.m.Y H:s'] [if cond='startdate-not-enddate'] - [end-date format='D d.m.Y H:s'] [/if]
Forum: Plugins
In reply to: [AM Events] Remove end date if it's same as start dateHi,
Sorry for taking so long to answer. Anyway, if you are displaying the events in a page template, it is as easy as using a conditional statement to check if the dates are equal and displaying based on that.
However, if you are using the widget, then it’s not so easy. I’ll probably be adding some kind of conditional tags for the widget in the future. Meanwhile, if you want, you could do the following:
in widget-upcoming-events.php in function process_shortcode( $m ) replace:
case 'end-date': $enddate = am_get_the_enddate(); $format = $format === '' ? "m/d/Y H:i" : $format; return $m[1] . date_i18n( $format, strtotime($enddate) ) . $m[6];
with:
case 'end-date': $enddate = am_get_the_enddate(); $format = $format === '' ? "m/d/Y H:i" : $format; if (am_get_the_startdate() !== am_get_the_enddate()) { return $m[1] . date_i18n( $format, strtotime($enddate) ) . $m[6]; }
Forum: Plugins
In reply to: [AM Events] Widget stripping html tagsHi,
The template code seems ok, and it shouldn’t strip those <tr> or <td> tags. I tried it and it works. Please make sure you have the following setup in the widget.
Display before events:
<table> <tr> <th>Date</th> <th>Play</th> <th>Location</th> <th>Time</th> <th>Tickets</th> </tr>
Display for single event:
<tr> <td>[start-date format='d M']</td> <td>[event-title]</td> <td>[event-venue]</td> <td>[start-date format="H:i"]</td> <td>[content]</td> </tr>
Display after events:
</table>
Forum: Plugins
In reply to: [AM Events] Filter event list by dateHi,
You can specify the start and end date of the month and do a meta_query for events that are between those dates.
Get the start and end dates (requires php 5.3):
$startDate = new DateTime('first day of january'); $endDate = new DateTime('last day of january'); $endDate->setTime(23, 59, 59); $start = startDate->format(am_get_default_date_format()); $end = endDate->format(am_get_default_date_format());
Use them in the meta_query:
'meta_query' => array( array( 'key' => 'am_startdate', 'value' => array($start, $end), 'compare' => "BETWEEN" ), )
I have not tested the code above, so prepare for some typos ??
If you’re using php 5.2 or older, check out https://stackoverflow.com/questions/4702696/timestamps-of-start-and-end-of-month on how to get the dates.
Forum: Plugins
In reply to: [AM Events] Show all Events on one PageThere’s a setting in Settings -> Reading that limit’s the number of posts per page. The default value is 10.
If you want, you can overwrite that number in the query by adding ‘post_count’ => ’99’ in the query args.
Forum: Plugins
In reply to: [AM Events] Rich snippets supportI’ll definitely look into adding support for rich snippets.
Is there anything else you’re having problems with other than the iso date format? As far as I know though, php date should support it (try “c” as the date format), so I don’t see why it wouldn’t work. Could you specify what the problem actually is?
Forum: Plugins
In reply to: [AM Events] Widget not showing minutesThe widget on your page seems to be working okay.
Do you mean it shows :00 instead of the actual minutes? In that case, could you show me the template you are using for the widget?
Forum: Plugins
In reply to: [AM Events] Shortcodes in Display before eventsThe Display before events is displayed before the event listing, so you shouldn’t need to use the shortcodes there.
The shortcodes display information specific to each event and can only be used in the Template for single event -field.
Can you specify what you are trying to do exactly? You can add custom html to each field for styling purposes.
Forum: Plugins
In reply to: [AM Events] Adding div to separate eventsIn the admin panel, go to Appearance -> Widgets and expand the AM Upcoming Events -widget you have placed in the sidebar. In the expanded widget, you can find the “Template for single event:” field which you can modify.
In addition to using plain html (like adding the div element), you can use shortcodes to display the event data. The available shortcodes can be found in Other Notes on the plugin page.
Forum: Plugins
In reply to: [AM Events] Adding div to separate eventsHi,
Are you using the widget? If so, then you can just add the <div> tag to the template for single event in the widget options.