Jump to content

Recommended Posts

Posted

hi, im getting errors when setting up mrbs, the line the error refers to is where im trying to set up periods as opposed to time lines...

 

could you post the calendar bit of your config file if you have a working periods not time set up>>???

 

"Parse error: syntax error, unexpected T_VARIABLE in /var/www/mrbs/config.inc.php on line 94"

 

thanks!!!!

Posted (edited)

/*******************

* Calendar settings

*******************/

 

// Note: Be careful to avoid specify options that displays blocks overlaping

// the next day, since it is not properly handled.

 

// This setting controls whether to use "clock" based intervals (FALSE and

// the default) or user defined periods (TRUE). If user-defined periods

// are used then $resolution, $morningstarts, $eveningends,

// $eveningends_minutes and $twentyfourhour_format are ignored.

$enable_periods = TRUE;

 

// Resolution - what blocks can be booked, in seconds.

// Default is half an hour: 1800 seconds.

$resolution = 1800;

 

// Default duration - default length (in seconds) of a booking.

// Ignored if $enable_periods is TRUE

// Defaults to (60 * 60) seconds, i.e. an hour

$default_duration = (60 * 60);

 

// Start and end of day.

// NOTE: The time between the beginning of the last and first

// slots of the day must be an integral multiple of the resolution,

// and obviously >=0.

 

 

// The default settings below (along with the 30 minute resolution above)

// give you 24 half-hourly slots starting at 07:00, with the last slot

// being 18:30 -> 19:00

 

// The beginning of the first slot of the day

$morningstarts = 7; // must be integer in range 0-23

$morningstarts_minutes = 0; // must be integer in range 0-59

 

// The beginning of the last slot of the day

$eveningends = 18; // must be integer in range 0-23

$eveningends_minutes = 30; // must be integer in range 0-59

 

// Example 1.

// If resolution=3600 (1 hour), morningstarts = 8 and morningstarts_minutes = 30

// then for the last period to start at say 4:30pm you would need to set eveningends = 16

// and eveningends_minutes = 30

 

// Example 2.

// To get a full 24 hour display with 15-minute steps, set morningstarts=0; eveningends=23;

// eveningends_minutes=45; and resolution=900.

 

// Do some checking

$start_first_slot = ($morningstarts*60) + $morningstarts_minutes; // minutes

$start_last_slot = ($eveningends*60) + $eveningends_minutes; // minutes

$start_difference = ($start_last_slot - $start_first_slot) * 60; // seconds

if (($start_difference < 0) or ($start_difference%$resolution != 0))

{

die('Configuration error: start and end of day incorrectly defined');

}

 

 

// Define the name or description for your periods in chronological order

// For example:

// $periods[] = "Period 1"

// $periods[] = "Period 2"

// ...

// or

// $periods[] = "09:15 - 09:50"

// $periods[] = "09:55 - 10:35"

// ...

//   is used to ensure that the name or description is not wrapped

// when the browser determines the column widths to use in day and week

// views

//

// NOTE: MRBS assumes that the descriptions are valid HTML and can be output

// directly without any encoding. Please ensure that any special characters

// are encoded, eg '&' to '&', '>' to '>', lower case e acute to

// 'é' or 'é', etc.

 

// NOTE: The maximum number of periods is 60. Do not define more than this.

$periods[] = "Period 1";

$periods[] = "Period 2";

$periods[] = "Period 3";

$periods[] = "Period 4";

$periods[] = "Period 5";

$periods[] = "Period 6";

$periods[] = "After School";

 

 

// NOTE: The maximum number of periods is 60. Do not define more than this.

 

// Do some checking

if (count($periods) > 60)

{

die('Configuration error: too many periods defined');

}

 

// Start of week: 0 for Sunday, 1 for Monday, etc.

$weekstarts = 1;

 

// Trailer date format: 0 to show dates as "Jul 10", 1 for "10 Jul"

$dateformat = 1;

 

// Time format in pages. 0 to show dates in 12 hour format, 1 to show them

// in 24 hour format

$twentyfourhour_format = 0;

Edited by HodgeHi
Sorry wrong config file
Posted

Make sure your using valid syntax, and haven't accidently deleted a dollar or something...

 

i.e no special chars or white space

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...