Revision: 1825
http://mrbs.svn.sourceforge.net/mrbs/?rev=1825&view=rev
Author: cimorrison
Date: 2011-05-14 09:37:11 +0000 (Sat, 14 May 2011)
Log Message:
-----------
Extracted the per-area default settings from systemdefaults and put them into a
new file, areadefaults.inc.php, to make it more obvious that these are the
default settings for new areas and will have no effect on existing areas.
Modified Paths:
--------------
mrbs/trunk/INSTALL
mrbs/trunk/web/config.inc.php
mrbs/trunk/web/defaultincludes.inc
mrbs/trunk/web/mrbs_auth.inc
mrbs/trunk/web/systemdefaults.inc.php
Added Paths:
-----------
mrbs/trunk/web/areadefaults.inc.php
Modified: mrbs/trunk/INSTALL
===================================================================
--- mrbs/trunk/INSTALL 2011-05-13 10:19:59 UTC (rev 1824)
+++ mrbs/trunk/INSTALL 2011-05-14 09:37:11 UTC (rev 1825)
@@ -301,9 +301,17 @@
As a minimum you will need to set the timezone and the database variables.
Other settings can be changed by copying lines from systemdefaults.inc.php and
-oasting them into config.inc.php. Do not edit systemdefaults.inc.php as it
-will make it harder for you to upgrade when new versions are released.
+areadefaults.inc.php and pasting them into config.inc.php. Do not edit
+systemdefaults.inc.php or areadefaults.inc.php as it will make it harder for
+you to upgrade when new versions are released.
+Note that there are two different defaults files (systemdefaults.inc.php and
+areadefaults.inc.php) to draw attention to the fact that the settings in
+areadefaults just determine the settings for NEW areas. Settings for existing
+areas are set using a web browser by following the "Rooms" link in MRBS. (It
+can be a little frustrating editing the area settings to find that they have no
+effect on existing areas!)
+
1. Timezone
You must set the timezone to a valid value, a list of which can be found at
@@ -376,10 +384,11 @@
3. Other Settings
-Now go through systemdefaults.inc.php and see which other configuration
settings
-you would like to change. Do this by copying them to config.inc.php and
changing
-them there. This should make the task of upgrading to new releases easier as
all
-your site-specific configuration changes will be confined to config.inc.php.
+Now go through systemdefaults.inc.php and areadefaults.inc.php and see which
other
+configuration settings you would like to change. Do this by copying them to
+config.inc.php and changing them there. This should make the task of
upgrading to
+new releases easier as all your site-specific configuration changes will be
confined
+to config.inc.php.
There is a wide variety of settings that can be changed, including
@@ -396,11 +405,11 @@
- report settings
- entry types
-The comments in the systemdefaults.inc.php file should explain the purpose of
the
-various configuration variables and how to change them. (Note that some of
the
-settinngs can be set on a per-area basis through the area administration page
in MRBS.
-In this case the setting in the systemdefaults.inc.php/config.inc.php file
defines
-the default settings for new areas.)
+The comments in the systemdefaults.inc.php and areadefaults.inc.php files
should
+explain the purpose of the various configuration variables and how to change
them.
+(Note that some of the settings can be set on a per-area basis through the area
+administration page in MRBS. In this case the setting in the
areadefaults.inc.php
+and config.inc.php files defines the default settings for new areas.)
The Help information is held in the site_faq files, one per language. You may
well
want to customise it by editing the files.
Added: mrbs/trunk/web/areadefaults.inc.php
===================================================================
--- mrbs/trunk/web/areadefaults.inc.php (rev 0)
+++ mrbs/trunk/web/areadefaults.inc.php 2011-05-14 09:37:11 UTC (rev 1825)
@@ -0,0 +1,194 @@
+<?php
+
+// $Id$
+
+/**************************************************************************
+ * MRBS area defaults file (default settings for NEW areas)
+ *
+ * DO _NOT_ MODIFY THIS FILE YOURSELF. IT IS FOR _INTERNAL_ USE ONLY.
+ *
+ * TO CONFIGURE MRBS FOR YOUR SYSTEM ADD CONFIGURATION PARAMETERS FROM
+ * THIS FILE INTO config.inc.php, DO _NOT_ EDIT THIS FILE.
+ *
+ * This file contains the default settings for configuration parameters that
+ * can be set on a per-area basis by using a web browser and following the
+ * "Rooms" link in MRBS. The settings in this file just determine the
+ * default values that are used when new areas are created. They are kept
+ * in a separate file to system defaults to draw attention to the fact that
+ * they are merely the default settings for new areas: it can be a little
+ * frustrating sometimes to edit these values and find they have no effect
+ * on existing areas
+ **************************************************************************/
+
+
+
+/*******************
+ * Calendar settings
+ *******************/
+
+// This setting controls whether to use "clock" or "times" based intervals
+// (FALSE and the default) or user defined periods (TRUE).
+
+// $enable_periods is settable on a per-area basis.
+
+$enable_periods = FALSE; // Default value for new areas
+
+
+// TIMES SETTINGS
+// --------------
+
+// These settings are all set per area through MRBS. These are the default
+// settings that are used when a new area is created.
+
+// The "Times" settings are ignored if $enable_periods is TRUE.
+
+// Note: Be careful to avoid specifying options that display blocks overlapping
+// the next day, since it is not properly handled.
+
+// Resolution - what blocks can be booked, in seconds.
+// Default is half an hour: 1800 seconds.
+$resolution = (30 * 60); // DEFAULT VALUE FOR NEW AREAS
+
+// If the following variable is set to TRUE, the resolution of bookings
+// is forced to be the value of $resolution, rather than the resolution set
+// for the area in the database.
+$force_resolution = FALSE;
+
+// Default duration - default length (in seconds) of a booking.
+// Defaults to (60 * 60) seconds, i.e. an hour
+$default_duration = (60 * 60); // DEFAULT VALUE FOR NEW AREAS
+// Whether the "All Day" checkbox should be checked by default. (Note
+// that even if this is set to true, $default_duration should still
+// be set as that is the duration that will be used when the All Day
+// checkbox is unchecked)
+$default_duration_all_day = FALSE; // DEFAULT VALUE FOR NEW AREAS
+
+// 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 (DEFAULT VALUES FOR NEW AREAS)
+$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 (DEFAULT VALUES FOR NEW AREAS)
+$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.
+
+
+
+/******************
+ * Booking policies
+ ******************/
+
+// If the variables below are set to TRUE, MRBS will force a minimum and/or
maximum advance
+// booking time on ordinary users (admins can make bookings for whenever they
like). The
+// minimum advance booking time allows you to set a policy saying that users
must book
+// at least so far in advance. The maximum allows you to set a policy saying
that they cannot
+// book more than so far in advance. How the times are determined depends on
whether Periods
+// or Times are being used. These settings also apply to the deletion of
bookings.
+
+// DEFAULT VALUES FOR NEW AREAS
+$min_book_ahead_enabled = FALSE; // set to TRUE to enforce a minimum
advance booking time
+$max_book_ahead_enabled = FALSE; // set to TRUE to enforce a maximum
advance booking time
+
+// The advance booking limits are measured in seconds and are set by the two
variables below.
+// The relevant time for determining whether a booking is allowed is the start
time of the
+// booking. Values may be negative: for example setting $min_book_ahead_secs
= -300 means
+// that users cannot book more than 5 minutes in the past.
+
+// DEFAULT VALUES FOR NEW AREAS
+$min_book_ahead_secs = 0; // (seconds) cannot book in the past
+$max_book_ahead_secs = 60*60*24*7; // (seconds) no more than one week ahead
+
+// NOTE: If you are using periods, MRBS has no notion of when the periods
occur during the
+// day, and so cannot impose policies of the kind "users must book at least
one period
+// in advance". However it can impose policies such as "users must book at
least
+// one day in advance". The two values above are rounded down to the nearest
whole
+// number of days when using periods. For example 86401 will be rounded down
to 86400
+// (one day) and 1 will be rounded down to 0.
+//
+// As MRBS does not know when the periods occur in the day, there is no way of
specifying, for example,
+// that bookings must be made at least 24 hours in advance. Setting
$min_book_ahead_secs=86400
+// will allow somebody to make a booking at 11:59 pm for the first period the
next day, which
+// which may occur at 8.00 am.
+
+
+/************************
+ * Miscellaneous settings
+ ************************/
+
+// PRIVATE BOOKINGS SETTINGS
+
+// These settings are all set per area through MRBS. These are the default
+// settings that are used when a new area is created.
+
+// Only administrators or the person who booked a private event can see
+// details of the event. Everyone else just sees that the time/period
+// is booked on the schedule.
+
+$private_enabled = FALSE; // DEFAULT VALUE FOR NEW AREAS
+ // Display checkbox in entry page to make
+ // the booking private.
+
+$private_mandatory = FALSE; // DEFAULT VALUE FOR NEW AREAS
+ // If TRUE all new/edited entries will
+ // use the value from $private_default when saved.
+ // If checkbox is displayed it will be disabled.
+
+$private_default = FALSE; // DEFAULT VALUE FOR NEW AREAS
+ // Set default value for "Private" flag on new/edited entries.
+ // Used if the $private_enabled checkbox is displayed
+ // or if $private_mandatory is set.
+
+$private_override = "none"; // DEFAULT VALUE FOR NEW AREAS
+ // Override default privacy behavior.
+ // "none" - Private flag on entry is used
+ // "private" - ALL entries are treated as private regardless
+ // of private flag on the entry.
+ // "public" - NO entry is treated as private, regardless of
+ // private flag on the entry.
+ // Overrides $private_default and $private_mandatory
+ // Consider your users' expectations of privacy before
+ // changing to "public" or from "private" to "none"
+
+
+// SETTINGS FOR APPROVING BOOKINGS - PER-AREA
+
+// These settings control whether bookings made by ordinary users need to be
+// approved by an admin. The settings here are the default settings for new
+// areas. The settings for individual areas can be changed from within MRBS.
+
+$approval_enabled = FALSE; // Set to TRUE to enable booking approval
+
+// Set to FALSE if you don't want users to be able to send reminders
+// to admins when bookings are still awaiting approval.
+$reminders_enabled = TRUE;
+
+
+// SETTINGS FOR BOOKING CONFIRMATION
+
+// Allows bookings to be marked as "tentative", ie not yet 100% certain,
+// and confirmed later. Useful if you want to reserve a slot but at the same
+// time let other people know that there's a possibility it may not be needed.
+$confirmation_enabled = TRUE;
+
+// The default confirmation status for new bookings. (TRUE: confirmed, FALSE:
tentative)
+// Only used if $confirmation_enabled is TRUE. If $confirmation_enabled is
+// FALSE, then all new bookings are confirmed automatically.
+$confirmed_default = TRUE;
Property changes on: mrbs/trunk/web/areadefaults.inc.php
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Modified: mrbs/trunk/web/config.inc.php
===================================================================
--- mrbs/trunk/web/config.inc.php 2011-05-13 10:19:59 UTC (rev 1824)
+++ mrbs/trunk/web/config.inc.php 2011-05-14 09:37:11 UTC (rev 1825)
@@ -46,13 +46,15 @@
// $db_nopersist = 1;
-/* Add lines from systemdefaults.inc.php below here to change the default
- configuration. Do _NOT_ modify systemdefaults.inc.php. */
+/* Add lines from systemdefaults.inc.php and areadefaults.inc.php below here
+ to change the default configuration. Do _NOT_ modify systemdefaults.inc.php
+ or areadefaults.inc.php. */
+
// This next section must come at the end of the config file - ie after any
// language and mail settings, as the definitions are used in the included file
//
Modified: mrbs/trunk/web/defaultincludes.inc
===================================================================
--- mrbs/trunk/web/defaultincludes.inc 2011-05-13 10:19:59 UTC (rev 1824)
+++ mrbs/trunk/web/defaultincludes.inc 2011-05-14 09:37:11 UTC (rev 1825)
@@ -4,6 +4,7 @@
require_once "grab_globals.inc.php";
require_once "systemdefaults.inc.php";
+require_once "areadefaults.inc.php";
require_once "config.inc.php";
require_once "internalconfig.inc.php";
require_once "functions.inc";
Modified: mrbs/trunk/web/mrbs_auth.inc
===================================================================
--- mrbs/trunk/web/mrbs_auth.inc 2011-05-13 10:19:59 UTC (rev 1824)
+++ mrbs/trunk/web/mrbs_auth.inc 2011-05-14 09:37:11 UTC (rev 1825)
@@ -82,7 +82,7 @@
* Checks to see that a user is authorised to access the current page.
* If they are not, then shows an Access Denied message and exits.
*
- * Required page level authorisations are defined in systemdefaults/config
+ * Required page level authorisations are defined above.
* If they are not defined then the function plays safe and requires the
* highest level of authorisation.
*/
Modified: mrbs/trunk/web/systemdefaults.inc.php
===================================================================
--- mrbs/trunk/web/systemdefaults.inc.php 2011-05-13 10:19:59 UTC (rev
1824)
+++ mrbs/trunk/web/systemdefaults.inc.php 2011-05-14 09:37:11 UTC (rev
1825)
@@ -5,7 +5,7 @@
/**************************************************************************
* MRBS system defaults file
*
- * DO _NOT_ MODIFY THIS FILE YOURSELF. IT FOR _INTERNAL_ USE ONLY.
+ * DO _NOT_ MODIFY THIS FILE YOURSELF. IT IS FOR _INTERNAL_ USE ONLY.
*
* TO CONFIGURE MRBS FOR YOUR SYSTEM ADD CONFIGURATION PARAMETERS FROM
* THIS FILE INTO config.inc.php, DO _NOT_ EDIT THIS FILE.
@@ -123,10 +123,9 @@
/*******************
* Calendar settings
*******************/
-
-// This setting controls whether to use "clock" or "times" based intervals
-// (FALSE and the default) or user defined periods (TRUE). "Times" based
-// bookings allow you to define regular consecutive booking slots, eg every
+
+// MRBS has two different modes of operation: "times" and "periods". "Times"
+// based bookings allow you to define regular consecutive booking slots, eg
every
// half an hour from 7.00 am to 7.00 pm. "Periods" based bookings are useful
// in, for example, schools where the booking slots are of different lengths
// and are not consecutive because of change-over time or breaks.
@@ -135,74 +134,36 @@
// been created and to have meaningful entries. This is due to differences
// in the way that the data is stored.
-// $enable_periods is settable on a per-area basis.
+// It is however possible to configure the system so that some areas operate in
+// "periods" mode and others in "times" mode. Therefore the configuration
variable
+// that determines the default setting for new areas appears together with
other
+// variables that can be set on a per-area basis in the file
areadefaults.inc.php.
+// This is done to draw attention to the fact that they are default settings
for new
+// areas only and to avoid frustration when trying to change settings for
existing
+// areas: this is done by editing the settings for an area using a web browser
by
+// following the "Rooms" link in MRBS.
-$enable_periods = FALSE; // Default value for new areas
+// GENERAL SETTINGS
+// ----------------
-// TIMES SETTINGS
-// --------------
+// This is the maximum number of rows (timeslots or periods) that one can
+// expect to see in the day and week views. It is used by mrbs.css.php for
+// creating classes. It does not matter if it is too large, except for the
+// fact that more CSS than necessary will be generated. (The variable is
ignored
+// if $times_along_top is set to TRUE).
-// These settings are all set per area through MRBS. These are the default
-// settings that are used when a new area is created.
+$max_slots = 60;
-// The "Times" settings are ignored if $enable_periods is TRUE.
-// Note: Be careful to avoid specifying options that display blocks overlapping
-// the next day, since it is not properly handled.
+// TIMES SETTINGS
+// --------------
-// Resolution - what blocks can be booked, in seconds.
-// Default is half an hour: 1800 seconds.
-$resolution = (30 * 60); // DEFAULT VALUE FOR NEW AREAS
+// The times settings can all be configured on a per-area basis, so these
variables
+// appear in the areadefaults.inc.php file.
-// If the following variable is set to TRUE, the resolution of bookings
-// is forced to be the value of $resolution, rather than the resolution set
-// for the area in the database.
-$force_resolution = FALSE;
-// Default duration - default length (in seconds) of a booking.
-// Defaults to (60 * 60) seconds, i.e. an hour
-$default_duration = (60 * 60); // DEFAULT VALUE FOR NEW AREAS
-// Whether the "All Day" checkbox should be checked by default. (Note
-// that even if this is set to true, $default_duration should still
-// be set as that is the duration that will be used when the All Day
-// checkbox is unchecked)
-$default_duration_all_day = FALSE; // DEFAULT VALUR FOR NEW AREAS
-// 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 (DEFAULT VALUES FOR NEW AREAS)
-$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 (DEFAULT VALUES FOR NEW AREAS)
-$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.
-
-// This is the maximum number of rows (timeslots or periods) that one can
expect to see in the day
-// and week views. It is used by mrbs.css.php for creating classes. It
does not matter if it
-// is too large, except for the fact that more CSS than necessary will be
generated. (The variable
-// is ignored if $times_along_top is set to TRUE).
-$max_slots = 60;
-
-
// PERIODS SETTINGS
// ----------------
@@ -240,39 +201,10 @@
* Booking policies
******************/
-// If the variables below are set to TRUE, MRBS will force a minimum and/or
maximum advance
-// booking time on ordinary users (admins can make bookings for whenever they
like). The
-// minimum advance booking time allows you to set a policy saying that users
must book
-// at least so far in advance. The maximum allows you to set a policy saying
that they cannot
-// book more than so far in advance. How the times are determined depends on
whether Periods
-// or Times are being used. These settings also apply to the deletion of
bookings.
+// Booking policies can all be be configured on a per-area basis, so these
variables
+// appear in the areadefaults.inc.php file.
-// DEFAULT VALUES FOR NEW AREAS
-$min_book_ahead_enabled = FALSE; // set to TRUE to enforce a minimum
advance booking time
-$max_book_ahead_enabled = FALSE; // set to TRUE to enforce a maximum
advance booking time
-// The advance booking limits are measured in seconds and are set by the two
variables below.
-// The relevant time for determining whether a booking is allowed is the start
time of the
-// booking. Values may be negative: for example setting $min_book_ahead_secs
= -300 means
-// that users cannot book more than 5 minutes in the past.
-
-// DEFAULT VALUES FOR NEW AREAS
-$min_book_ahead_secs = 0; // (seconds) cannot book in the past
-$max_book_ahead_secs = 60*60*24*7; // (seconds) no more than one week ahead
-
-// NOTE: If you are using periods, MRBS has no notion of when the periods
occur during the
-// day, and so cannot impose policies of the kind "users must book at least
one period
-// in advance". However it can impose policies such as "users must book at
least
-// one day in advance". The two values above are rounded down to the nearest
whole
-// number of days when using periods. For example 86401 will be rounded down
to 86400
-// (one day) and 1 will be rounded down to 0.
-//
-// As MRBS does not know when the periods occur in the day, there is no way of
specifying, for example,
-// that bookings must be made at least 24 hours in advance. Setting
$min_book_ahead_secs=86400
-// will allow somebody to make a booking at 11:59 pm for the first period the
next day, which
-// which may occur at 8.00 am.
-
-
/******************
* Display settings
******************/
@@ -446,38 +378,9 @@
// PRIVATE BOOKINGS SETTINGS
-// These settings are all set per area through MRBS. These are the default
-// settings that are used when a new area is created.
+// Note: some settings for private bookings can be set on a per-area basis and
+// so appear in the areadefaults.inc.php file
-// Only administrators or the person who booked a private event can see
-// details of the event. Everyone else just sees that the time/period
-// is booked on the schedule.
-
-$private_enabled = FALSE; // DEFAULT VALUE FOR NEW AREAS
- // Display checkbox in entry page to make
- // the booking private.
-
-$private_mandatory = FALSE; // DEFAULT VALUE FOR NEW AREAS
- // If TRUE all new/edited entries will
- // use the value from $private_default when saved.
- // If checkbox is displayed it will be disabled.
-
-$private_default = FALSE; // DEFAULT VALUE FOR NEW AREAS
- // Set default value for "Private" flag on new/edited entries.
- // Used if the $private_enabled checkbox is displayed
- // or if $private_mandatory is set.
-
-$private_override = "none"; // DEFAULT VALUE FOR NEW AREAS
- // Override default privacy behavior.
- // "none" - Private flag on entry is used
- // "private" - ALL entries are treated as private regardless
- // of private flag on the entry.
- // "public" - NO entry is treated as private, regardless of
- // private flag on the entry.
- // Overrides $private_default and $private_mandatory
- // Consider your users' expectations of privacy before
- // changing to "public" or from "private" to "none"
-
// Choose which fields should be private by setting
// $is_private_field['tablename.columnname'] = TRUE
// At the moment only fields in the entry table can be marked as private,
@@ -491,16 +394,10 @@
// SETTINGS FOR APPROVING BOOKINGS - PER-AREA
-// These settings control whether bookings made by ordinary users need to be
-// approved by an admin. The settings here are the default settings for new
-// areas. The settings for individual areas can be changed from within MRBS.
+// These settings can all be be configured on a per-area basis, so these
variables
+// appear in the areadefaults.inc.php file.
-$approval_enabled = FALSE; // Set to TRUE to enable booking approval
-// Set to FALSE if you don't want users to be able to send reminders
-// to admins when bookings are still awaiting approval.
-$reminders_enabled = TRUE;
-
// SETTINGS FOR APPROVING BOOKINGS - GLOBAL
// These settings are system-wide and control the behaviour in all areas.
@@ -512,17 +409,12 @@
// Days of the week that are working days (Sunday = 0, etc.)
$working_days = array(1,2,3,4,5); // Mon-Fri
+
// SETTINGS FOR BOOKING CONFIRMATION
-// Allows bookings to be marked as "tentative", ie not yet 100% certain,
-// and confirmed later. Useful if you want to reserve a slot but at the same
-// time let other people know that there's a possibility it may not be needed.
-$confirmation_enabled = TRUE;
+// These settings can all be be configured on a per-area basis, so these
variables
+// appear in the areadefaults.inc.php file.
-// The default confirmation status for new bookings. (TRUE: confirmed, FALSE:
tentative)
-// Only used if $confirmation_enabled is TRUE. If $confirmation_enabled is
-// FALSE, then all new bookings are confirmed automatically.
-$confirmed_default = TRUE;
/***********************************************
* Form values
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits