Menu

#117 See more informations about an event in calendar

open
nobody
None
1
2022-12-03
2022-12-01
Anonymous
No

As a guest user (with no rights) is it possible to view in addition to the description of the event also the person who created it, when placing the mouse on the title?

Discussion

  • Campbell Morrison

    If you are running MRBS 1.10.0 then edit the function prepare_entry() in functions_table.inc and at line 12 add something like

      $creator = auth()->getUser($entry['create_by']);
      $description = "[" . $creator->display_name . "] " . $description;
    
     
  • Anonymous

    Anonymous - 2022-12-02

    Thanks. But I put the code on line 12 of functions_table.inc but the author of the event is not seen when I put the mouse on the title of the event. I only see the description

     
  • Campbell Morrison

    Sorry, wherever it says $description above use $entry['description'].

     
  • Anonymous

    Anonymous - 2022-12-02

    Very good! but now I only see the author of the event and the description is gone!

     
  • Anonymous

    Anonymous - 2022-12-02

    function prepare_entry(array $entry) : array
    {
    global $is_private_field, $show_registration_level, $auth;

    $creator = auth()->getUser($entry['create_by']);
    $entry['description'] = "[" . $creator->display_name . "] " . $description;
    
     
  • Campbell Morrison

    You haven't replaced all the occurrences of $description

     
  • Campbell Morrison

    You need

    $creator = auth()->getUser($entry['create_by']);
    $entry['description'] = "[" . $creator->display_name . "] " . $entry['description'];
    
     
  • Anonymous

    Anonymous - 2022-12-03

    Many thanks, your system is helping me a lot