Installing the Calendar and Blogs

How to install the calendar

 

1. ssh to the webserver using putty, change to the util directory:

 

cd /data/www/webtemplate/wtv2/util

 

2. edit installCalendar.php:

 

vi installCalendar.php

 

3. set $GLOBALS["WTSITEDATABASE"]  and $GLOBALS["WTSITEID"] to the site database and site id (type 'i' for insert/edit mode, 'ESC' to exit insert mode). eg for a site with an id of 11792:

 

$GLOBALS["WTSITEDATABASE"] = "wt11792";

$GLOBALS["WTSITEID"] = 11792;

 

4. save and quit (type ':wq' and press 'ENTER')

 

:wq

 

5. run the script

 

php installCalendar.php

 

6. create the calendar template. the calendar template needs to contain the <wt:extension> tag:

 

<wt:extension name="Calendar" width="95%" height="590px"/>

 

7. if you want a bullet list of events, you can do something like:

 

<ul>

<wt:extension name="Calendar" show="Event List" from="[wt:wt.date.today]" to="[wt:wt.date.tomorrow]">

<li>[wt:Name] - [wt:Start Date] [wt:Start Time] to [wt:End Date] [wt:End Time]</li>

</wt:extension>

</ul>

 

8. To add a legend:

 

<h3>Calendar Legend</h3>

<wt:extension name="Calendar" show="Calendar Control" calendars="[wt:wt.vars.Show Calendars]"/>

<wt:extension name="Calendar" width="95%" height="590px" calendars="[wt:wt.vars.Show Calendars]"/>

 

 

How to install blogs

 

1. change to the util directory:

 

cd /data/www/webtemplate/wtv2/util

 

2. edit installBlogs.php

 

vi installBlogs.php

 

3. change $GLOBALS["WTSITEDATABASE"] AND $GLOBALS["WTSITEID"] to the site database and site id (type 'i' for insert mode, 'ESC' to exit insert mode)

 

$GLOBALS["WTSITEDATABASE"] = "wt11792";

$GLOBALS["WTSITEID"] = 11792;

 

4. save and quit (type ':wq' and press 'ENTER')

 

:wq

 

5. run the script

 

php installBlogs.php

 

refresh the office menu frame on the left

 

create a blog template, see blog.wt in the AdelaideZoo2008 directory