+ Post New Thread
Results 1 to 4 of 4
Web Development Thread, MRBS config.inc.php in Coding and Web Development; hi, im getting errors when setting up mrbs, the line the error refers to is where im trying to set ...
  1. #1

    Join Date
    Sep 2008
    Location
    Bristol
    Posts
    13
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    MRBS config.inc.php

    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!!!!

  2. #2

    Join Date
    May 2006
    Location
    West Bromwich
    Posts
    2,191
    Thank Post
    299
    Thanked 215 Times in 185 Posts
    Rep Power
    56
    /*******************
    * 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&nbsp;1"
    // $periods[] = "Period&nbsp;2"
    // ...
    // or
    // $periods[] = "09:15&nbsp;-&nbsp;09:50"
    // $periods[] = "09:55&nbsp;-&nbsp;10:35"
    // ...
    // &nbsp; 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 '&amp;', '>' to '&gt;', lower case e acute to
    // '&eacute;' or '&#233;', etc.

    // NOTE: The maximum number of periods is 60. Do not define more than this.
    $periods[] = "Period&nbsp;1";
    $periods[] = "Period&nbsp;2";
    $periods[] = "Period&nbsp;3";
    $periods[] = "Period&nbsp;4";
    $periods[] = "Period&nbsp;5";
    $periods[] = "Period&nbsp;6";
    $periods[] = "After&nbsp;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;
    Last edited by HodgeHi; 30th April 2009 at 03:39 PM. Reason: Sorry wrong config file

  3. #3
    mossj's Avatar
    Join Date
    Dec 2008
    Location
    Leicester
    Posts
    1,466
    Thank Post
    157
    Thanked 189 Times in 174 Posts
    Rep Power
    52
    Make sure your using valid syntax, and haven't accidently deleted a dollar or something...

    i.e no special chars or white space

  4. #4

    Join Date
    Sep 2008
    Location
    Bristol
    Posts
    13
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    blinkin semi-colon missing!

    thanks for the reply, it was a semi colon. or rather the lack of one.

    doh!

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 20
    Last Post: 30th April 2012, 01:26 PM
  2. MRBS, PHP, IIS 6.0, and one 500 error
    By mossj in forum Web Development
    Replies: 7
    Last Post: 14th July 2009, 04:23 PM
  3. config.php
    By Hightower in forum Coding
    Replies: 9
    Last Post: 11th December 2008, 03:48 PM
  4. My PHP config file - please ignore
    By monkey_boy in forum Other Stuff
    Replies: 0
    Last Post: 24th April 2007, 11:29 AM
  5. MRBS Config Files
    By Joedetic in forum Web Development
    Replies: 0
    Last Post: 28th June 2006, 11:54 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •