Making Upcoming list readonly

Is there a way to stop users from adding events to the “upcoming list”?

Hello,

The ‘Upcoming’ list is not a separate scheduler, it’s actually the same one. So if you block rights for your users to add events when no events will be added to the Upcoming list.
Yet i believe you meant that only certain events should be displayed in the list. Currently it’s not possible to configure upcoming list that way in the back-end.
Though if you can modify it’s source code to add such functionality.
Logic behind this change: you need to create some special user only whose events will be displayed in the list of upcoming events and with this user create events in the scheduler.

  1. If you are using joomla grab updated version in the attachment.
  2. Locate
function get_events(
  1. There you will find something similar to:

if ($cfg->get_option("privatemode") == "on") { $all_events = $events; $events = Array(); for ($i = 0; $i < count($all_events); $i++) { if ($all_events[$i]['user'] == $userid) $events[] = $all_events[$i]; } }
And change it to:

$all_events = $events; $events = Array(); for ($i = 0; $i < count($all_events); $i++) { if ($all_events[$i]['user'] == ID_OF_YOUR_SPECIAL_USER) $events[] = $all_events[$i]; }

Hope this helps,
Best regards
mod_scheduler.zip (16.4 KB)

Thank you for your reply.

What I meant was is there a way to make the upcoming list readonly while the user can still add/edit when in the daily/monthly view, but from your answer I guess I have to fiddle with the source.

Thanks.

Hello,

Sorry then i don’t quite get

part as upcoming list is readonly by default?

Best regards,
Ilya

Thanks. I fiddled around and made it work.