Reply to: tickets(357449)

Hi Artem, I’ve got the featured events working now. I’m still running into a problem, though. In my approach the list of events works. But with repeating events, only the originals is displayed, and not the repetitions.

This is the code:

function get_eventon_events_within_week() {
$start_date = strtotime(date(‘Y-m-d’) . ‘ +1 day’);
$end_date = strtotime(date(‘Y-m-d’, strtotime(‘+7 days’)));

// Query voor alle evenementen (inclusief herhalende evenementen)
$args = array(
‘post_type’ => ‘ajde_events’,
‘posts_per_page’ => -1,
‘meta_query’ => array(
‘relation’ => ‘AND’,
array(
‘key’ => ‘evcal_erow’,
‘value’ => array($start_date, $end_date),
‘compare’ => ‘BETWEEN’,
‘type’ => ‘NUMERIC’
)
),
‘orderby’ => ‘meta_value_num’,
‘order’ => ‘ASC’,
);

$events = new WP_Query($args);
$all_events = [];

foreach ($events->posts as $event) {
$repeat_intervals = get_post_meta($event->ID, ‘evcal_repeat_intervals’, true);
if ($repeat_intervals && is_array($repeat_intervals)) {
foreach ($repeat_intervals as $interval) {
$start = isset($interval[‘evcal_srow’]) ? $interval[‘evcal_srow’] : null;
$end = isset($interval[‘evcal_erow’]) ? $interval[‘evcal_erow’] : null;
if ($start && $end && $start >= $start_date && $start <= $end_date) {
// Voeg de herhaling toe aan de lijst met evenementen
$event_copy = clone $event;
$event_copy->start = $start;
$event_copy->end = $end;
$all_events[] = $event_copy;
}
}
} else {
$all_events[] = $event;
}
}

usort($all_events, function($a, $b) {
$a_start = isset($a->start) ? $a->start : get_post_meta($a->ID, ‘evcal_srow’, true);
$b_start = isset($b->start) ? $b->start : get_post_meta($b->ID, ‘evcal_srow’, true);
return $a_start – $b_start;
});

return $all_events;
}

function format_eventon_event($event) {
$event_link = get_permalink($event->ID);
$event_title = get_the_title($event->ID);
$description = wp_trim_words($event->post_content, 20, ‘…’);
$thumbnail_id = get_post_thumbnail_id($event->ID);
$thumbnail_url = $thumbnail_id ? wp_get_attachment_image_url($thumbnail_id, ‘medium’) : ‘https://amklassiek.nl/wp-content/uploads/2024/06/IMG-9442-1.jpeg’;
$is_featured = get_post_meta($event->ID, ‘_featured’, true);

if (isset($event->start)) {
$start_date = $event->start;
} else {
$start_date = get_post_meta($event->ID, ‘evcal_srow’, true);
}

if ($is_featured == ‘yes’) {
$background_color = ‘#333’;
$overlay_color = ‘rgba(0, 0, 0, 0.5)’;
$border = ‘border: 2px solid #FFD700;’;
$title_style = ‘color: #FFD700;’;
$content_style = ‘color: #FFFFFF;’;
} else {
$background_color = ‘#FFF’;
$overlay_color = ‘rgba(255, 255, 255, 0.85)’;
$border = ‘border: 1px solid #ddd;’;
$title_style = ‘color: #666;’;
$content_style = ‘color: #666;’;
}

return sprintf(
‘<tr>
<td colspan=”2″ style=”padding: 0; margin: 0;”>
<table width=”100%%” cellpadding=”0″ cellspacing=”0″ border=”0″ style=”border-collapse: collapse;”>
<tr>
<td width=”100%%” valign=”top” style=”padding: 0;”>
<!–[if gte mso 9]>
<v:rect xmlns:v=”urn:schemas-microsoft-com:vml” fill=”true” stroke=”false” style=”width:100%%; height:200px;”>
<v:fill type=”frame” src=”%s” color=”%s” />
<v:textbox inset=”0,0,0,0″>
<![endif]–>
<div style=”background: url(%s) no-repeat center center; background-size: cover; %s”>
<div style=”background-color:%s; padding: 20px; border-radius: 5px;”>
<a href=”%s” style=”text-decoration: none; display: block;”>
<strong style=”%s”>%s</strong>
<br>
<span style=”%s”>%s</span>
<span style=”%s; text-decoration: underline;”> Klik voor meer informatie</span>
</a>
</div>
</div>
<!–[if gte mso 9]>
</v:textbox>
</v:rect>
<![endif]–>
</td>
</tr>
</table>
</td>
</tr>’,
esc_url($thumbnail_url), $background_color, esc_url($thumbnail_url), $border, $overlay_color, esc_url($event_link), $title_style, esc_html($event_title), $content_style, esc_html($description), $content_style
);
}

function eventon_upcoming_events_content() {
$events = get_eventon_events_within_week();

if (empty($events)) {
return ‘<p>Er zijn geen aankomende evenementen.</p>’;
}

// Groepeer de evenementen op datum
$events_by_date = [];
foreach ($events as $event) {
$start_date = isset($event->start) ? $event->start : get_post_meta($event->ID, ‘evcal_srow’, true);
$date_display = date_i18n(‘j F’, $start_date);
if (!isset($events_by_date[$date_display])) {
$events_by_date[$date_display] = [];
}
$events_by_date[$date_display][] = format_eventon_event($event);
}

// Genereer de HTML output voor de gegroepeerde evenementen
$output = ”;
foreach ($events_by_date as $date => $event_list) {
$output .= sprintf(‘<h2 style=”font-size: 1.5em; color: #333; margin-top: 20px; margin-bottom: 10px;”>%s</h2>’, esc_html($date));
$output .= sprintf(‘<table style=”width: 100%%; border-collapse: separate; border-spacing: 0 10px;”>%s</table>’, implode(”, $event_list));
}

return $output;
}

function mailpoet_custom_shortcode($shortcode, $newsletter, $subscriber, $queue, $newsletter_body, $arguments) {
if ($shortcode !== ‘[custom:eventon]’) return $shortcode;

return eventon_upcoming_events_content();
}

add_filter(‘mailpoet_newsletter_shortcode’, ‘mailpoet_custom_shortcode’, 10, 6);

Reply to: tickets(358330)

Hi!
I have just turned off security plugin as well, probably abroad ips were blocked. Please try again the login now at https://stiflergarden.hu/wp-admin.

B the way, these css lines are needed for other purposes:

html, body {overflow-x: hidden;}

@supports (overflow:clip) {

html, body {

overflow-x: clip !important;}}

So that, we cannot remove them, because if so, other parts of the page will be broken.

Reply to: tickets(358655)

Hello,

Could you send us a link to the file you are trying to import?

Please make sure that you added both Date and Time in the following format:

event_start_date & event_end_date – Start/End date in format mm/dd/YYYY

event_start_time & event_end_time – Start/End time in format h:mm:AM/PM

Reply to: tickets(358330)

https://stiflergarden.hu/bejelentkezes/ leads to 404 and /wp-admin shows the same restricted access message.

Could you remove all the added custom code?

html, body {overflow-x: hidden;}


@supports (overflow:clip) {

html, body {

overflow-x: clip !important;}}


body.evo_overflow {overflow-x: initial !important;}

Reply to: tickets(357873)

Please take a look at

https://docs.myeventon.com/documentations/set-additional-fields-rsvp/

Also: is it possible to de activate the possibility to de-activate the multiple-participants on all active events?…And: is it possible to de activate the option to add more participants?

Please go to EventON > RSVP > RSVP Form > uncheck RSVP Count — (If unckecked system will count as 1 RSVP).

Reply to: tickets(357446)

Please take a look at this page:

https://totnmallorca.com/de/was-ist-los/

It translates the calendar to Spanish, because you translated L2 to Spanish:

https://totnmallorca.com/wp-admin/admin.php?page=eventon&tab=evcal_2&lang=L2

While WPML shows that the second language is German:

https://totnmallorca.com/wp-admin/admin.php?page=sitepress-multilingual-cms%2Fmenu%2Flanguages.php

Could you change the order?

Reply to: tickets(358664)

Hello,

You can just write in your native language. We will translate it.

I cannot find “Les rendez-vous à la terre” event:

Could you send us a screenshot of the issue?