meeting-room-booking-system / mrbs-code

MRBS application code
Other
124 stars 61 forks source link

Booking view edit #3001

Open jberanek opened 3 years ago

jberanek commented 3 years ago

how do i change what is displayed on booking calendar? i.e on the day view the booking name is shown but howdo i add details from another field

Reported by: *anonymous

Original Ticket: mrbs/support-requests/2311

jberanek commented 3 years ago

You'd need to modify the MRBS code. What fields would you like to show?

Original comment by: campbell-m

jberanek commented 3 years ago

details from a custom field

Original comment by: *anonymous

jberanek commented 3 years ago

Assuming you are using MRBS 1.9.2 then you'll have to modify functions_table.inc and change line 333 from

        $html .= htmlspecialchars($booking['name']) . '</a>';

replacing $booking['name'] with whatever you want to display. To see what's available do

var_dump($booking);
exit;

Original comment by: campbell-m

jberanek commented 3 years ago

how do i add a space and make the new text bold?

Original comment by: *anonymous

jberanek commented 3 years ago

Add a space like this:

        $html .= htmlspecialchars($booking['name'] . ' ' . $booking['another_field']) . '</a>';

The text should be bold anyway because it's all part of the same anchor.

Original comment by: campbell-m

jberanek commented 2 years ago

Hi, I am trying to follow this in ver 1.10.0. Found the line above at line 370 and changed it to:

$html .= htmlspecialchars($booking['create_by']) . '<p>' . htmlspecialchars($booking['name']) . '</a>';

with the expectation that I would get two lines displayed in the calendar view, the booking creator/owner, and the description this is 'name'?

btw, this is a great platform but I am a newbie to this type of coding.... Scott

Original comment by: *anonymous

jberanek commented 2 years ago

And I just joined the club!

Original comment by: scottknoble

jberanek commented 2 years ago

Your <p> element doesn't have a closing </p>. Might be better to try <br> instead.

Original comment by: campbell-m