Menu

#2755 Suppressing selection of events in lowest level

open
nobody
None
1
2023-05-12
2023-05-11
Bob Friberg
No

I am using this to book a function hall at an American Legion. I would like to display the calendar so the public can view it and see if their date and time is available to rent and I was able to do so. The only problem is that they can click on an event and get sent to login popup. Is there anyway to suppress the selection of the events? On a side note I have no php experience and I was still able to work with thanks to the idiot proof way this was written. Great Job guys!!!!!

Discussion

  • Campbell Morrison

    There are two possibilities.

    The first is to use "kiosk mode". This probably isn't what you are looking for, but I mention it just in case. This enables you to put a particular device, eg a tablet outside a meeting room, into a mode where it will just display the meetings for that day and room (or area).

    The second would be to modify the MRBS code so that links aren't active unless you are logged in.

     
    • Bob Friberg

      Bob Friberg - 2023-05-12

      Ty Campbell. Just figure out have to do it. Lol

       

      Last edit: Campbell Morrison 2023-05-12
  • Campbell Morrison

    Well the easiest thing to do is to write some JavaScript/jQuery to disable the links in the body of the table when the user is not logged in. You can put this in a custom JavaScript file.

     
  • Campbell Morrison

    Something like

    $('.logged_in .dwm_main td a).on('click', function(e) {
      e.preventDefault();
      return false;
    }
    

    and then also add some custom CSS to change the cursor.

     
  • Campbell Morrison

    This works as custom JavaScript

    $(document).on('page_ready', function() {
        $('body:not(.logged_in) .dwm_main td a').css('cursor', 'default').on('click mousedown', function(e) {
            e.preventDefault();
            return false;
        });
    });
    
     

    Last edit: Campbell Morrison 2023-05-12
    • Bob Friberg

      Bob Friberg - 2023-05-12

      Ty sir. And I was almost there. Another year or two and I would have had
      it!

       

      Last edit: Campbell Morrison 2023-05-12