Menu

#286 Relate entry type (background color in calendar) to user tpye

open
nobody
None
1
2015-10-09
2014-10-08
Anonymous
No

Hi, is it possible (it would be nice to, if not) to make 2 subsets of users (not between admins and normal users but between the same level, another clasificarion) and then pick a default entry type to each of them.

Use case, people are related to an area, and if they book in another area, they would do it with a different color.

Area 1 users green
Area 2 users blue
Area 3 users red

If an area 1 user booked a room in area 3, it would be a default "area_type_1" entry (or some sort) an if would be green background.

thanks, i hope i made myself clear

Discussion

  • Anonymous

    Anonymous - 2014-10-08

    What i exactly need to do is relate any random user to one of the three booking types below, so when they go and make an entry, they have it by default.

    $booking_types[] = "area 1";
    $booking_types[] = "area 2";
    $booking_types[] = "area 3";

     
  • Anonymous

    Anonymous - 2014-10-14

    anyone please? is this forum dead or i am doing anything wrong? I never seem to get anyone respond to my questions.

    thanks for the help
    Sebastian

     
  • Campbell Morrison

    It's not possible in standard MRBS, but if you are prepared to make some coding changes then it would be possible.

     
  • Anonymous

    Anonymous - 2014-10-17

    I am willing but i dont consider myself prepared. I could give a try, can i ask you for some tips into which are the files that i should? Im really new to php

    thanks

     
  • Anonymous

    Anonymous - 2014-10-17

    The logic i imagine would be somthing like this.

    add a column to users table, split them by areas and assign a diferent "code" per area
    eg: 1,2,3

    then, when making the booking i should go and check that variable and using conditionals i should relate it to the booking type i want.

    I would probably have to define booking types somewhere else, and customize their background colour.

    am i on track?

     
  • Treblig

    Treblig - 2014-11-07

    The booking types are in config.inc.php,
    their local descriptions in lang/lang.en and lang/lang.xx (xx is your local language)
    and their colors in Themes/[whichever_you_use]/styling.inc

    I had the same kind of need (though for a one unique user : "Maintenance") but I'm not a good enough developer to do it so this user has to pick his booking type him/herself.

     
  • Anonymous

    Anonymous - 2015-03-09

    I am looking to do something like this too, well I would like to have the default room type different for each user.

     
  • Treblig

    Treblig - 2015-10-09

    If you have a (very) limited number of users you could try his :
    http://sourceforge.net/p/mrbs/support-requests/800/