This topic is locked

Calendar Templates - Changing the period and work week

11/19/2010 11:31:52 AM
PHPRunner General questions
D
DouglasB author

I haven't seen this type of post but maybe someone has already answered it and can point me to the thread?
Albit the Calendar Template is not the end all of all calendars, but it is pretty good. The problem is lack of documentation for us NOOB users <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=15786&image=1&table=forumtopics' class='bbc_emoticon' alt=':)' /> So my question is more of how things work and where are they located in the files to be changed.

  1. Making the Calendar start on a Sunday. This I would think would be controled in the template HTML but it appears not to be there so where do I look?
  2. Re-occuring events. You can pick a start and stop date for a daily even BUT when doing so it includes the weekends in that time frame. Delete any one date from the reoccuring event and the entire event is deleted. Where are the controls for reoccurring events? Are there other options for reoccurring events?
  3. Define period. We need to define a work week period to be Monday thru Friday. Where do we find this control?

J
Jane 11/22/2010

Douglas,
please see my answers below:

  1. to change week format (start on Sunday) open "List page: Before display" event for calmonthly view on the Evenst tab, find this code:

$ndays = Array();

$ndays[1]=$locale_info["LOCALE_SDAYNAME1"];

$ndays[2]=$locale_info["LOCALE_SDAYNAME2"];

$ndays[3]=$locale_info["LOCALE_SDAYNAME3"];

$ndays[4]=$locale_info["LOCALE_SDAYNAME4"];

$ndays[5]=$locale_info["LOCALE_SDAYNAME5"];

$ndays[6]=$locale_info["LOCALE_SDAYNAME6"];

$ndays[7]=$locale_info["LOCALE_SDAYNAME7"];



and replace it with this one:

$ndays = Array();

$ndays[1]=$locale_info["LOCALE_SDAYNAME7"];

$ndays[2]=$locale_info["LOCALE_SDAYNAME1"];

$ndays[3]=$locale_info["LOCALE_SDAYNAME2"];

$ndays[4]=$locale_info["LOCALE_SDAYNAME3"];

$ndays[5]=$locale_info["LOCALE_SDAYNAME4"];

$ndays[6]=$locale_info["LOCALE_SDAYNAME5"];

$ndays[7]=$locale_info["LOCALE_SDAYNAME6"];


Then find and remove this code:

$wd=$wd-1;


2, 3. Unfortunately it's not possible to manage separate reoccurring events. Each event is saved as one record in the calcalendartable and then this event is converted to reoccurring events dynamically in theList page: Before display events for calmonthly/calweekly pages.

As workaround you can save reoccurring events in the calcalendar table manually in the "After record added"/"After record updated" events for caldaily page. Please note you'll need to change Recurrencefield value to 0 for all these events to manage (edit, delete) each event separately.
There are only four periods in the Calendartemplate. Records are selected from database based on these periods only. So you'll need to edit all SQL queries to apply new period ('work week' for example) in the events. Monthly and weekly pages are created in the [b]List page: Before display[/b] events, SQL query for caldaily page is defined in the ListQueryevent.