Send private message

You must be logged in to send a private message.

Friends

No friends yet.

Activity

  • Bereng replied on the discussion topic Events map in home page
    Hello Nikolai, when I go to "events", I see them as a list, but on the right, I can choose to see them as a calendar or a map. You can see here... view reply
  • Bereng added a new discussion topic Events map in home page in the group General Discussion
    I want to show the events map on the home page. I don't know what to do in te index.php maybe there is a variable for the event map. Any ideas ? Thanks !
    • Hello Nikolai,
      when I go to "events", I see them as a list, but on the right, I can choose to see them as a calendar or a map.
      You can see here :
      Thanks
    • So, the map is from the Event Manager plugin (https://elgg.org/plugins/736695). Best would be to ask the developers (from Coldtrick) directly how to do it or to suggest it as as a feature request. The same developers also offer the Widget Manager plugin (https://elgg.org/plugins/384604) that allow to built an home page / index page quite easily. Maybe they could add an index page widget to the Event Manager plugin that can be added to the index page provided by the Widget Manager plugin. But the best way to proceed is probably to ask the guys from Coldtrick directly.

    • @Bereng

      I assume you're using Elgg 4.

      I also assume that you've activated Front Page Demo plugin.
      If so, here's what you can do.

      Create 'custom_index\events_map.php' file in your custom plugin.

      (You can use the skeleton My plugin if you haven't own plugin.)

      So your new file should be located at:

      \mod\my_plugin\views\default\custom_index\events_map.php

      With this code:

      <?php
      
      
      $maps_provider = elgg_get_plugin_setting('maps_provider', 'event_manager');
      
      
      if (elgg_is_active_plugin('event_manager') && $maps_provider !== 'none') {
      
            echo elgg_view_module('featured', elgg_echo('event_manager:list:upcoming'), elgg_view('event_manager/listing/map'));
      
      }

      Extend 'index/righthandside' view (or 'index/lefthandside' if you want to see your events module on the left side on the main page) with this new view in your elgg-plugin.php:

      'view_extensions' => [
      
          'index/righthandside' => [
               'custom_index/events_map' => [],
          ]
      
      ],
      You may need to run 'Upgrade' via Administration to apply these changes.
       
      Now your 'Events map' module will be displayed on the main page.

       

      Elgg docs.