Update of /cvs/scoop/scoop/struct/patch-files/current In directory lithium.sabren.com:/tmp/cvs-serv21684/struct/patch-files/current Modified Files: README Added Files: patch-08-Calendar.sql script-08-post.pl Log Message: Event Calendar module, also includes janra's get_sids() and story_data() patches. Index: README =================================================================== RCS file: /cvs/scoop/scoop/struct/patch-files/current/README,v retrieving revision 1.98 retrieving revision 1.99 diff -C2 -d -r1.98 -r1.99 *** README 15 Jan 2005 17:57:03 -0000 1.98 --- README 21 Jan 2005 14:14:31 -0000 1.99 *************** *** 43,49 **** Moves the special page formatting to a block Any problems, email scoop-help at lists.kuro5hin.org (don't forget to join!) join here: http://lists.kuro5hin.org/mailman/listinfo/scoop-help - or if you irc look in #scoop on irc.slashnet.org or #kuro5hin if nobody is in #scoop. --- 43,52 ---- Moves the special page formatting to a block + Jan 21 09:30 patch-08-Calendar.sql + Adds a very featureful collaborative event calendar module. Docs remain to + be written, unfortunately, but here's all the funtionality, anyway. + Any problems, email scoop-help at lists.kuro5hin.org (don't forget to join!) join here: http://lists.kuro5hin.org/mailman/listinfo/scoop-help or if you irc look in #scoop on irc.slashnet.org or #kuro5hin if nobody is in #scoop. --- NEW FILE: script-08-post.pl --- #!/usr/bin/perl use strict; use Getopt::Std; use DBI; my $args = &get_args(); my $db_user = $args->{u}; my $db_pass = $args->{p}; my $db_port = $args->{o}; my $db_name = $args->{d}; my $db_host = $args->{h}; my $QUIET = $args->{q} || 0; my $dsn = "DBI:mysql:database=$db_name:host=$db_host:port=$db_port"; my $dbh = DBI->connect($dsn, $db_user, $db_pass); my ($query, $sth, $rv); my $default; $|++; &mesg("\nUpdating admin urltemplate\n"); my $urltemplate = &grab_optemplate($dbh,'admin'); &mesg(" Checking for calendar line... "); if ($urltemplate =~ /calendar:/) { &mesg("found. Skipping.\n"); } else { &mesg("not found. Adding.\n"); $urltemplate =~ s/\/tool\/$/element.1=calendar:\/tool\/item,\n\/tool\//; &update_optemplate($dbh,'admin',$urltemplate); } &mesg("\nUpdating user urltemplate\n"); $urltemplate = &grab_optemplate($dbh,'user'); &mesg(" Checking for calendar lines... "); if ($urltemplate =~ /calendar/) { &mesg("found. Skipping.\n"); } else { &mesg("not found. Adding.\n"); $urltemplate =~ s/(.*)(\s*\} else \{\s*)(.*)/$1 } elsif (\$path[1] eq 'calendar') {\n \$p->{op} = 'calendar';\n \$p->{view} = \$path[2] || \$S->pref('calendar_view');\n \$p->{uid} = \$uid;\n \$p->{date} = \$path[4];\n } else {\n$3/s; &update_optemplate($dbh,'user',$urltemplate); } #Alert about optemplate &mesg(qq{\n\n ***** ATTENTION!\nFor this calendar patch to work properly, you need\n to modify your "admin" op. We can't do this automatically for you. Once you've\n restarted your scoop site, please go to the "Ops" admin tool, pull up the\n "Admin" op, and in the URL Templates field add the following line as the second\n to last line in the list:\n\n element.1=calendar:/tool/item/, \n\n This should be followed by the line:\n\n /tool/\n\n and you'll be all set.\n}); # utility functions follow from here sub grab_optemplate { my ($dbh, $id) = @_; my $query = "SELECT urltemplates FROM ops WHERE op=" . $dbh->quote($id); my $sth = $dbh->prepare($query); $sth->execute; my ($contents) = $sth->fetchrow_array; $sth->finish; return $contents; } sub update_optemplate { my ($dbh, $id, $contents) = @_; my $query = "UPDATE ops SET urltemplates = " . $dbh->quote($contents) . " WHERE op = " . $dbh->quote($id); my $sth = $dbh->prepare($query); $sth->execute(); $sth->finish; } sub delete_var { my ($dbh, $id) = @_; my $query = "DELETE FROM vars WHERE name=" . $dbh->quote($id); my $sth = $dbh->prepare($query); $sth->execute; $sth->finish; } sub grab_var { my ($dbh, $id) = @_; my $query = "SELECT value FROM vars WHERE name = " . $dbh->quote($id); my $sth = $dbh->prepare($query); $sth->execute; my ($contents) = $sth->fetchrow_array; $sth->finish; return $contents; } sub update_var { my ($dbh, $id, $contents) = @_; my $query = "UPDATE vars SET value = ? WHERE name = ?"; my $sth = $dbh->prepare($query); $id = $dbh->quote($id); $contents = $dbh->quote($contents); $sth->execute($contents, $id); $sth->finish; } sub grab_block { my ($dbh, $bid) = @_; my $query = "SELECT block FROM blocks WHERE bid = " . $dbh->quote($bid); my $sth = $dbh->prepare($query); $sth->execute; my ($contents) = $sth->fetchrow_array; $sth->finish; return $contents; } sub update_block { my ($dbh, $bid, $contents) = @_; my $query = "UPDATE blocks SET block = ? WHERE bid = ?"; my $sth = $dbh->prepare($query); $bid = $dbh->quote($bid); $contents = $dbh->quote($contents); $sth->execute($contents, $bid); $sth->finish; } sub grab_box { my ($dbh, $box) = @_; my $query = "SELECT content FROM box WHERE boxid = " . $dbh->quote($box); my $sth = $dbh->prepare($query); $sth->execute; my ($contents) = $sth->fetchrow_array; $sth->finish; return $contents; } sub update_box { my ($dbh, $box, $contents) = @_; my $query = "UPDATE box SET content = ? WHERE boxid = ?"; my $sth = $dbh->prepare($query); $box = $dbh->quote($box); $contents = $dbh->quote($contents); $sth->execute($contents, $box); $sth->finish; } sub insert_box { my ($dbh, $box, $contents, $title, $template) = @_; map { $dbh->quote($_) } ($box,$contents,$title,$template); my $query = "INSERT INTO box (boxid,title,content,template) VALUES ($box, $title, $contents, $template)"; my $sth = $dbh->prepare($query); $sth->execute(); $sth->finish; } sub mesg { print @_ unless $QUIET; } sub get_args { my %info; my @neededargs; getopts("u:p:d:h:o:vqD", \%info); # now first generate an array of hashrefs that tell us what we # still need to get foreach my $arg ( qw( u p d h o ) ) { next if ( $info{$arg} and $info{$arg} ne '' ); if( $arg eq 'u' ) { push( @neededargs, {arg => 'u', q => 'db username? ', default => 'nobody'} ); } elsif( $arg eq 'p' ) { push( @neededargs, {arg => 'p', q => 'db password? ', default => 'password'} ); } elsif( $arg eq 'd' ) { push( @neededargs, {arg => 'd', q => 'db name? ', default => 'scoop'} ); } elsif( $arg eq 'h' ) { push( @neededargs, {arg => 'h', q => 'db hostname? ', default => 'localhost'} ); } elsif( $arg eq 'o' ) { push( @neededargs, {arg => 'o', q => 'db port? ', default => '3306'} ); } } foreach my $h ( @neededargs ) { my $answer = ''; print "$h->{q}"."[$h->{default}] "; chomp( $answer = <STDIN> ); $answer = $h->{default} unless( $answer && $answer ne '' ); $info{ $h->{arg} } = $answer; } return \%info; } --- NEW FILE: patch-08-Calendar.sql --- -- SQL patch for contact calendar -- Written for Armstrong-Zuniga -- Table Calendars CREATE TABLE calendars ( cal_id int(11) NOT NULL auto_increment, title varchar(100), owner int(11) DEFAULT 0, description text, public_view varchar(10) DEFAULT 'public', public_submit varchar(10) DEFAULT 'private', PRIMARY KEY (cal_id), KEY owner_idx (owner) ); INSERT INTO calendars VALUES (NULL, 'Global Calendar', '0', 'Site-wide calendar', 'public', 'private'); -- Table Events CREATE TABLE events ( eid int(11) NOT NULL auto_increment, owner int(11) NOT NULL, date_start DATE NOT NULL, date_end DATE, last_update timestamp(14) NOT NULL, public_view varchar(10), public_submit varchar(10), is_parent tinyint(1) DEFAULT 0, parent int(11) DEFAULT 0, volunteers tinyint(1) DEFAULT 0, PRIMARY KEY (eid), KEY owner_idx (owner), KEY parent_idx (parent) ); -- Table Calendar/Event link CREATE TABLE calendar_link ( eid int(11) NOT NULL, cal_id int(11) NOT NULL, is_primary_calendar tinyint(1) NOT NULL DEFAULT 0, displaystatus tinyint(1) DEFAULT 0, PRIMARY KEY (eid, cal_id) ); -- Table Event/Story link CREATE TABLE event_story ( eid int(11) NOT NULL, sid varchar(20) NOT NULL, PRIMARY KEY (eid,sid) ); -- Table Event Subscriptions -- This is for displaying notification that an event has changed -- Similar in concept to comment replies/viewed_stories CREATE TABLE event_watch ( uid int(11) NOT NULL, eid int(11) NOT NULL, last_viewed timestamp(14) NOT NULL, subscribed tinyint(1) DEFAULT 0, PRIMARY KEY (uid,eid) ); -- Table Event RSVP CREATE TABLE event_rsvp ( uid int(11) NOT NULL, eid int(11) NOT NULL, attend tinyint(1), volunteer varchar(30), PRIMARY KEY (uid,eid) ); -- Table Event Properties CREATE TABLE event_properties ( eid int(11) NOT NULL, property varchar(32) NOT NULL, value text, PRIMARY KEY (eid,property) ); -- Table Event Property Items CREATE TABLE event_property_items ( property varchar(32) NOT NULL, title varchar(50), description text, field text, template text, calendar_template text, display_order int(5), requires varchar(32), is_date tinyint(1), is_time tinyint(1), html tinyint(1), regex text, enabled tinyint(1), required tinyint(1), PRIMARY KEY (property) ); -- Default Event Properties INSERT INTO event_property_items VALUES ('title','Event Name','','event_property_text','','<A href="%%rootdir%%/event/%%eid%%/"><B>%%value%%</B></A><BR>','1','','0','0','0','','1','1'); INSERT INTO event_property_items VALUES ('description','Description','','event_property_textarea','<P>%%value%%</P>','%%value%%<BR><BR>\n','2','','0','1','0','','1','0'); INSERT INTO event_property_items VALUES ('country','Country','','event_property_text','<BR>%%value%%','','3','','0','0','0','','1',''); INSERT INTO event_property_items VALUES ('state','State/Province','','event_property_text','<BR>%%value%%','','4','country','0','0','0','','1',''); INSERT INTO event_property_items VALUES ('city','City','','event_property_text','<BR>%%value%%','','5','state','0','0','0','','1',''); INSERT INTO event_property_items VALUES ('address','Address','','event_property_text','<BR>%%value%%','','6','city','0','0','0','','1',''); INSERT INTO event_property_items VALUES ('time_start','Event Start Time','','event_property_text','','','7','','0','0','0','','1',''); INSERT INTO event_property_items VALUES ('time_end','Event End Time','','event_property_text','','','8','time_start','0','0','0','','1',''); INSERT INTO event_property_items VALUES ('deadline','Application/Registration Deadline','The deadline shows up in the calendar view as a reminder','event_property_date','<P>Apply/Register by: %%value%%</P>','Deadline: %%value%%<BR>','9','','1','0','0','','1',''); -- Add some new perms UPDATE vars SET value=CONCAT(value, ',\nedit_events,\nedit_event_properties,\nedit_calendars,\nsubmit_event,\nupdate_own_event,\nedit_own_calendar') WHERE name='perms'; UPDATE perm_groups SET group_perms=CONCAT(group_perms, ',edit_events,edit_event_properties,edit_calendars,submit_event,update_own_event,edit_own_calendar') WHERE perm_group_id='Superuser'; UPDATE perm_groups SET group_perms=CONCAT(group_perms, ',edit_events,edit_calendars,submit_event,update_own_event,edit_own_calendar') WHERE perm_group_id='Editors'; UPDATE perm_groups SET group_perms=CONCAT(group_perms, ',edit_events,edit_event_properties,edit_calendars,submit_event,update_own_event,edit_own_calendar') WHERE perm_group_id='Admins'; UPDATE perm_groups SET group_perms=CONCAT(group_perms, ',submit_event,update_own_event,edit_own_calendar') WHERE perm_group_id='Users'; -- And vars to turn this subsystem on INSERT INTO vars (name, value, description, type, category) VALUES ('allow_event_stories', '1', '<P>This variable determines whether or not events can have stories attached to them. The possible values are: 0) events cannot have stories attached; and 1) events can have stories attached.<BR>Events can have multiple stories attached. Event stories are stored in the section named in <B>event_story_section</B>. Whether or not individual users can attach a story to an event is determined by the specific event\'s permissions. This variable has no effect unless <B>use_calendars</B> is on.</P>', 'bool', 'Events'); INSERT INTO vars (name, value, description, type, category) VALUES ('allow_personal_calendar_view', '0', '<P>This variable determines whether or not users may have their own personal calendar views, and may subscribe to other calendars. The possible values are: 0) require explicit calendars to be requested; and 1) users may have a personalized calendar view which combines several calendars\' events.<BR>If <B>allow_user_calendars</B> is on or if you are setting up more than one site calendar, turning this on is recommended. If this is off, the calendar named in <B>default_calendar_id</B> is used if no calendar is explicitly selected. This variable has no effect unless <B>use_calendars</B> is on.</P>', 'bool', 'Events'); INSERT INTO vars (name, value, description, type, category) VALUES ('allow_user_calendars', '0', '<P>This variable determines whether or not users can have their own individual calendars. The possible values are: 0) only admin-created calendars are permitted; and 1) users may create their own calendars as well.<BR>This variable has no effect unless <B>use_calendars</B> is on.</P>', 'bool', 'Events'); INSERT INTO vars (name, value, description, type, category) VALUES ('use_calendars', '0', '<P>This variable determines whether or not the entire event calendar system is used at all. The possible values are: 0) do not use calendars; and 1) use calendars.<BR>See all of the other Site Controls in the <B>Events</B> category for further configuration.</P>', 'bool', 'Events'); INSERT INTO vars (name, value, description, type, category) VALUES ('calendar_navigation_range', '4', '<P>The number of navigation elements on either side of "today" in the calendar views. The possible values are any positive integer. The default value is 4.<BR>The value chosen should be big enough to allow the user to easily navigate the calendar, but small enough that it doesn\'t wrap the navigation in ugly ways. This variable has no effect unless <B>use_calendars</B> is on.</P>', 'num', 'Events'); INSERT INTO vars (name, value, description, type, category) VALUES ('default_calendar_id', '1', '<P>This variable sets the calendar ID number to be used when no calendar ID is specified on the event submission form. The default value is 1 (the site global calendar, included by default).<BR>This variable has no effect unless <B>use_calendars</b> is on.</p>', 'num', 'Events'); INSERT INTO vars (name, value, description, type, category) VALUES ('event_search_num_options','3','<P>This variable sets the number of different event properties a user can use in one event search query. The possible values are any positive integer. The default value is 3.<BR>This should be set to a number high enough to allow reasonably flexible searching, but not so high that the search form is over-complicated.</P>','num','Events'); INSERT INTO vars (name, value, description, type, category) VALUES ('event_story_section', 'events', '<P>The name of the section used for stories attached to events. The possible values are any internal section name.<BR>If the section named here does not exist, event stories won\'t be posted properly. This variable has no effect unless <B>use_calendars</B> and <B>allow_event_stories</B> are on.</P>', 'text', 'Events'); UPDATE vars SET value=CONCAT(value,', events') WHERE name='sections_excluded_from_all'; -- Section INSERT INTO sections (section, title, description) VALUES ('events', 'Events', 'Section for event stories'); INSERT INTO section_perms (group_id, section, sect_perms, default_sect_perm) VALUES ('Admins','events',',norm_read_comments,norm_post_comments,norm_read_stories,autosec_post_stories','0'); INSERT INTO section_perms (group_id, section, sect_perms, default_sect_perm) VALUES ('Advertisers','events',',norm_read_comments,norm_post_comments,norm_read_stories,autosec_post_stories','0'); INSERT INTO section_perms (group_id, section, sect_perms, default_sect_perm) VALUES ('Anonymous','events',',norm_read_comments,norm_post_comments,norm_read_stories,norm_post_stories','0'); INSERT INTO section_perms (group_id, section, sect_perms, default_sect_perm) VALUES ('Editors','events',',norm_read_comments,norm_post_comments,norm_read_stories,autosec_post_stories','0'); INSERT INTO section_perms (group_id, section, sect_perms, default_sect_perm) VALUES ('Superuser','events',',norm_read_comments,norm_post_comments,norm_read_stories,autosec_post_stories','0'); INSERT INTO section_perms (group_id, section, sect_perms, default_sect_perm) VALUES ('Users','events',',norm_read_comments,norm_post_comments,norm_read_stories,autosec_post_stories','0'); -- The ops INSERT INTO ops (op, template, func, is_box, enabled, perm, aliases, urltemplates, description) VALUES ('calendar', 'default_template', 'display_calendar', '0', '1', '', '', '/view/calendar/date/', 'monthly, weekly, daily calendar view'); INSERT INTO ops (op, template, func, is_box, enabled, perm, aliases, urltemplates, description) VALUES ('editcalendar', 'default_template', 'edit_calendar', '0', '1', 'edit_own_calendar', '', '/tool/id/action/eid/', 'interface for managing calendars'); INSERT INTO ops (op, template, func, is_box, enabled, perm, aliases, urltemplates, description) VALUES ('event', 'default_template', 'display_event', '0', '1', '', '', '/eid/', 'displays a single event'); INSERT INTO ops (op, template, func, is_box, enabled, perm, aliases, urltemplates, description) VALUES ('eventsearch', 'default_template', 'event_search', '0', '1', '', '', '', 'event search (should one day get rolled in with all the other search stuff)'); INSERT INTO ops (op, template, func, is_box, enabled, perm, aliases, urltemplates, description) VALUES ('submitevent', 'default_template', 'submit_event', '0', '1', 'submit_event', '', '/tool/id/', 'submit/edit an event'); -- The admin tool INSERT INTO admin_tools (tool, pos, dispname, menuname, perm, func, is_box) VALUES ('calendar', '22', 'Events and Calendars', 'Calendars', 'edit_calendars', 'admin_calendars', '0'); -- New blocks INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('admin_calendar_list', '<P>%%msg%%</P>\n\n<TABLE width="100%" cellpadding="2px" cellspacing="0">\n <TR>\n <TH>Calendar</TH>\n <TH>Owner</TH>\n <TH>Actions</TH>\n </TR>\n%%calendar_list_rows%%\n</TABLE>\n\n<FORM name="newcal" action="%%rootdir%%/admin/calendar/list" method="POST">\n <P><B>Create a new site-wide calendar</B></P>\n <P>Title: <INPUT type="text" name="title" size="30">\n <FIELDSET><LEGEND>View Permissions:</LEGEND>\n <INPUT type="radio" name="public_view" value="public"> Everybody\n <BR><INPUT type="radio" name="public_view" value="invite"> Only people on the invitation list\n <BR><INPUT type="radio" name="public_view" value="private"> Only admins\n </FIELDSET><BR>\n <FIELDSET><LEGEND>Submit permissions:</LEGEND>\n <INPUT type="radio" name="public_submit" value="public"> Everybody\n <BR><INPUT type="radio" name="public_submit" value="modpublic"> Everybody, bu! t an admin will review the events before they\'re visible\n <BR><INPUT type="radio" name="public_submit" value="invite"> Only people on the invitation list\n <BR><INPUT type="radio" name="public_submit" value="modinvite"> Only people on the invitation list, but an admin will review the events before they\'re visible\n <BR><INPUT type="radio" name="public_submit" value="private"> Only admins</FIELDSET>\n <BR><INPUT type="submit" name="create" value="Create"></P>\n \n</FORM>', '1', '<P>This block creates the calendar list admin tool. This is inserted into the block <B>admin_calendar_main</b> when you are working specifically with the calendar list. The names of the form elements should not be changed. The following special keys are recognized:</p>\n<DL>\n <DT>msg</dt>\n <DD>Any status or error messages.</dd>\n <DT>calendar_list_rows</dt>\n <DD>All of the rows containing the calendars. Each row is built from the block <B>admin_calendar_list_item</b>.</dd>\n</dl>', 'Admi! n Pages', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('admin_calendar_list_item', ' <TR>\n <TD><A href="%%rootdir%%/calendar//%%cal_id%%">%%title%%</A><BR>%%description%%</TD>\n <TD><A href="%%rootdir%%/user/%%owner_nick%%">%%owner_nick%%</A></TD>\n <TD>[<A href="%%rootdir%%/admin/calendar/list?delete=%%cal_id%%">delete</A>] [<A href="%%rootdir%%/editcalendar/settings/%%cal_id%%">edit</A>]</TD>\n </TR>\n', '1', '<P>This block formats a single item of the calendar list admin tool. The following special keys are recognized:</p>\n<DL>\n <DT>cal_id</dt>\n <DD>The ID number of the calendar being formatted here</dd>\n <DT>title</dt>\n <DD>The calendar\'s title</dd>\n <DT>owner</dt>\n <DD>The calendar\'s owner\'s UID</dd>\n <DT>owner_nick</dt>\n <DD>The calendar\'s owner\'s nickname</dd>\n <DT>description</dt>\n <DD>The calendar description</dd>\n <DT>public_view</dt>\n <DD>The view permission status</dd>\n <DT>public_submit</dt>\n <! DD>The event submission permission status</dd>\n</dl>', 'Admin Pages', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('admin_calendar_main', ' <table width="100%" border="0" cellpadding="0" cellspacing="0">\n <tr>\n <td bgcolor="%%title_bgcolor%%">%%title_font%%Events and Calendars%%title_font_end%%</td>\n </tr>\n </table>\n <P><a href="%%rootdir%%/admin/calendar/list">Calendar List</A>\n <A href="%%rootdir%%/admin/calendar/eventlist">Event List</A>\n <A href="%%rootdir%%/admin/calendar/eventproperties">Event Properties</A></P>\n\n%%calendar_form%%\n', '1', '<P>This block is used to create the Calendars Admin Tool page. It should be self-contained HTML. The special keys recognised are:</p>\n<DL>\n <DT>calendar_form</dt>\n <DD>The page for the particular tool requested within the calendar admin tool</dd>\n</dl>\n', 'Admin Pages', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('admin_event_list', '<P>%%error_font%%%%admin_events_errormsg%%%%error_font_end%%</P>\n<P>%%prevlink%%</P>\n<table width="100%" cellpadding="2px" cellspacing="0">\n <tr>\n <th>Event</th>\n <th>Organizer</th>\n <th>Calendar(s)</th>\n </tr>\n%%list%%\n</table>\n<P align="right">%%nextlink%%</P>\n', '1', '<P>This block is used to create the Event List for the Calendar Admin Tool.</p>\n<DL>\n <DT>admin_events_errmsg</dt>\n <DD>Any error or status message</dd>\n <DT>prevlink</dt>\n <DD>If we are not on the first page, a link to the previous page. Formatted with the block <B>prev_page_link</b></dd>\n <DT>nextlink</dt>\n <DD>If there are more events than those shown on this and earlier pages, a link to the next page. Formatted with the block <B>next_page_link</b></dd>\n <DT>list</dt>\n <DD>The actual list of events. Each row is formatted using the block <B>admin_event_list_item</b></! dd>\n</dl>', 'Admin Pages', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('admin_event_list_item', ' <tr bgcolor="%%rowbg%%">\n <td><A href="%%rootdir%%/event/%%eid%%">%%title%%</A> [<A href="%%rootdir%%/submitevent/edit/%%eid%%">edit</A>] (%%date_start%%)</td>\n <td><A href="%%rootdir%%/user/%%owner_nick%%">%%owner_nick%%</A></td>\n <td>%%cal_list%%</td>\n </tr>\n', '1', '<P>This block is used to format each row in the event list in the calendars admin tool. The following special keys are recognized:</p>\n<DL>\n <DT>eid</dt>\n <DD>The event ID number</dd>\n <DT>rowbg</dt>\n <DD>This toggles between blank and the value in <B>story_mod_bg</b> so rows can be easily distinguished</dd>\n <DT>owner_nick</dt>\n <DD>The event owner\'s nickname</dd>\n <DT>cal_list</dt>\n <DD>The list of calendars this event is included in, each formatted using the block <B>admin_event_list_item_cals</b></dd>\n</dl>\n<P>Also recognized are all valid event fields, including a! ll built-in fields and all fields defined in Event Properties.</p>', 'Admin Pages', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('admin_event_list_item_cals', '%%primary_marker%% <A href="%%rootdir%%/calendar//%%cal_id%%/%%date_start%%">%%title%%</A> [<A href="%%rootdir%%/editcalendar/settings/%%cal_id%%">edit</A>] <A href="%%rootdir%%/user/%%owner_nick%%">%%owner_nick%%</A><br>\n', '1', '<P>This block is used to format each calendar an event is included in, for the event list in the calendars admin tool. The special keys recognized are:</p>\n<DL>\n <DT>primary_marker</dt>\n <DD>A mark used to indicated which calendar the event is primarily associated with and hence where it draws its permissions from</dd>\n <DT>cal_id</dt>\n <DD>The ID number of the calendar</dd>\n <DT>owner_nick</dt>\n <DD>The owner of the calendar\'s nickname</dd>\n</dl>\n<P>Also recognized are all calendar properties and all event properties and event fields which do not share a name with a calendar property.</p>', 'Admin Pages', 'default', 'en! '); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('admin_event_properties', '<form name="event_properties" action="%%rootdir%%/admin/calendar/eventproperties" method="post">\n <table width="100%" border="0" cellpadding="0" cellspacing="0">\n <tr><td>%%error_font%%%%admin_events_errormsg%%%%error_font_end%%</td></tr>\n <tr> \n <td>%%norm_font%%<b>Property:</b> %%admin_events_property_menu%%\n <input type="submit" name="get" value="Get Event Property" /></font></td>\n </tr><tr><td>\n%%norm_font%%<b>%%admin_events_delete_check%%</b></font>\n</td></tr>\n <tr>\n <td>%%norm_font%%<b>Property ID:</b>\n <input type="text" name="property" value="%%admin_events_property%%" size="40" />\n </font></td>\n </tr>\n <tr>\n <td>%%norm_font%%<b>Title:</b>\n <input type="text" name="title" value="%%admin_events_title%%" size="40" />\n </font></td>\n </tr>\n <tr>\n <td>%%norm_font%%<! b>Format on event page:</b><INPUT type="text" size="40" name="template" value="%%admin_events_template%%">%%norm_font_end%%</td>\n </tr>\n <tr>\n <td>%%norm_font%%<b>Format in calendar view:</b><INPUT type="text" size="40" name="calendar_template" value="%%admin_events_calendar_template%%">%%norm_font_end%%</td>\n </tr>\n <tr>\n <td><input type="checkbox" name="enabled" value="1"%%admin_events_enabled_checked%% />\n %%norm_font%%Enabled%%norm_font_end%%\n <input type="checkbox" name="required" value="1"%%admin_events_required_checked%% />\n %%norm_font%%Required%%norm_font_end%%\n <input type="checkbox" name="html" value="1"%%admin_events_html_checked%% />\n %%norm_font%%HTML allowed%%norm_font_end%%\n <input type="checkbox" name="is_date" value="1"%%admin_events_is_date_checked%% />\n %%norm_font%%Property is a date%%norm_font_end%%\n </td>\n </tr>\n <tr><td>%%norm_font%%<b>Display order:</b>! <input type="text" name="display_order" size="5" value="%%admin_event s_display_order%%"></td></tr>\n <tr><td>%%norm_font%%<b>Form field:</b>\n %%admin_events_field_list%% %%admin_events_field_edit%%%%norm_font_end%%</td>\n </tr>\n <tr><td>%%norm_font%%<b>Validation regex:</b> <INPUT type="text" size="30" name="regex" value="%%admin_events_regex%%">%%norm_font_end%%</td></tr>\n <tr><td>%%norm_font%%<b>This property requires:</b>%%admin_events_requires_menu%%%%norm_font_end%%</td></tr>\n <tr><td>%%norm_font%%<b>Description:</b>%%norm_font_end%%</td></tr>\n <tr>\n <td>%%norm_font%%\n <textarea cols="50" rows="5" name="description" wrap="soft">%%admin_events_description%%</textarea>\n </font></td>\n </tr>\n <tr><td>%%norm_font%%\n <input type="submit" name="write" value="Save Event Property" /> <input type="reset" />\n </font></td></tr>\n </table>\n</form>\n', '1', '<P>This block is used to create the Event Properties Admin Tool page. It must contain all of the form elements used in the Event ! Properties Admin page, and should be self-contained HTML. The special keys recognised are:</p>\n<DL>\n <DT>admin_events_errormsg</dt>\n <DD>A message indicating whether a save was successful or not, and if not, the text of the error message</dd>\n <DT>admin_events_property_menu</dt>\n <DD>The select box used to choose an event property to edit</dd>\n <DT>admin_events_delete_check</dt>\n <DD>The delete checkbox displayed when an event property is being edited</dd>\n <DT>admin_events_template_menu</dt>\n <DD>The select box used to choose the template block to use for a particular event property</dd>\n <DT>admin_events_template_link</dt>\n <DD>A link to the block admin tool to edit the event property template selected for the event property currently being edited</dd>\n <DT>admin_events_enabled_checked</dt>\n <DD>The "checked" status of the checkbox which determines whether or not the event property is enabled</dd>\n <DT>admin_events_required_checked</dt>\n <DD>The "ch! ecked" status of the checkbox which determines whether or not the even t property is required</dd>\n <DT>admin_events_property</dt>\n <DD>The name of the event property currently being edited</dd>\n <DT>admin_events_title</dt>\n <DD>The title of the event property currently being edited</dd>\n <DT>admin_events_description</dt>\n <DD>The description of the event property currently being edited</dd>\n <DT>admin_events_field</dt>\n <DD>The HTML form field for the event property currently being edited.</dd>\n <DT>admin_events_order</dt>\n <DD>The display order for the current event property</dd>\n </dl>\n<P>Do not change the names of the form elements, or remove any form elements, or event property editing may fail in unexpected ways.</p>', 'Admin Pages', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('calendar_body_daily', '<DIV class="cal_head">\n%%title_font%%%%calendar_title%% - %%date%%%%title_font_end%%\n<UL>\n%%BOX,calendar_datenav%%\n</UL>\n</DIV>\n\n<DIV class="cal_body">\n<table width="100%">\n<tr>%%day%%</tr>\n</table>\n%%subscribe_link%%\n%%BOX,calendar_actions%%</DIV>', '1', '<P>This block formats the body of the calendar in "daily" view. This should be a self-contained block of HTML that can be inserted anywhere. The following special keys are recognized:</P>\n<DL>\n <DT>day</DT>\n <DD>the contents of <B>calendar_body_one_day</B> for the given date</DD>\n <DT>subscribe_link</DT>\n <DD>The link to subscribe (or unsubscribe) to this calendar, if viewing one calendar.</DD>\n <DT>calendar_title</dt>\n <DD>The title of the current calendar</dd>\n <DT>date</dt>\n <DD>The date being viewed (YYYY-MM-DD)</dd>\n <DT>mediumdate</dt>\n <DD>The date being viewed (DD-Mmm-YYYY)</dd>\n! <DT>longdate</dt>\n <DD>The date being viewed (Wwwwww, DD Mmmmmmm YYYY)</dd>\n <DT>dow</dt>\n <DD>The name of the day of the week being viewed (Monday, Tuesday, etc)</dd>\n <DT>dow_short</dt>\n <DD>The abbreviated day of the week being viewed (Mon, Tues, etc)</dd>\n <DT>day_num</dt>\n <DD>The day number</dd>\n <DT>day_ord</dt>\n <DD>The day number in ordinal form (1st, 2nd, 3rd, etc)</dd>\n <DT>month</dt>\n <DD>The name of the month</dd>\n <DT>monthnum</dt>\n <DD>The number of the month</dd>\n <DT>year</dt>\n <DD>The year.</dd>\n</DL>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('calendar_body_monthly', '<DIV class="cal_head">\n%%title_font%%%%calendar_title%% - %%longdate%%%%title_font_end%%\n<UL>\n%%BOX,calendar_datenav%%\n</UL>\n</DIV>\n\n<DIV class="cal_body">\n<TABLE width="100%" cellspacing="0" cellpadding="0">\n<TR>\n <TD> </TD>\n <TH>Monday</TH>\n <TH>Tuesday</TH>\n <TH>Wednesday</TH>\n <TH>Thursday</TH>\n <TH>Friday</TH>\n <TH>Saturday</TH>\n <TH>Sunday</TH>\n</TR>\n<TR>\n <TD><A href="%%rootdir%%/calendar/weekly/%%cal_id%%/%%wk1%%">--></A></TD>\n %%wk1_d1%%\n %%wk1_d2%%\n %%wk1_d3%%\n %%wk1_d4%%\n %%wk1_d5%%\n %%wk1_d6%%\n %%wk1_d7%%\n</TR>\n<TR>\n <TD><A href="%%rootdir%%/calendar/weekly/%%cal_id%%/%%wk2%%">--></A></TD>\n %%wk2_d1%%\n %%wk2_d2%%\n %%wk2_d3%%\n %%wk2_d4%%\n %%wk2_d5%%\n %%wk2_d6%%\n %%wk2_d7%%\n</TR>\n<TR>\n <TD><A href="%%rootdir%%/calendar/weekly/%%cal_id%%/%%wk3%%">--></A></TD>\n %%wk3_d1%%\n %%wk3_d2%%\n %%wk3_d3%%\n %%wk3_d4%%\n ! %%wk3_d5%%\n %%wk3_d6%%\n %%wk3_d7%%\n</TR>\n<TR>\n <TD><A href="%%rootdir%%/calendar/weekly/%%cal_id%%/%%wk4%%">--></A></TD>\n %%wk4_d1%%\n %%wk4_d2%%\n %%wk4_d3%%\n %%wk4_d4%%\n %%wk4_d5%%\n %%wk4_d6%%\n %%wk4_d7%%\n</TR>\n<TR>\n <TD><A href="%%rootdir%%/calendar/weekly/%%cal_id%%/%%wk5%%">--></A></TD>\n %%wk5_d1%%\n %%wk5_d2%%\n %%wk5_d3%%\n %%wk5_d4%%\n %%wk5_d5%%\n %%wk5_d6%%\n %%wk5_d7%%\n</TR>\n<TR>\n <TD><A href="%%rootdir%%/calendar/weekly/%%cal_id%%/%%wk6%%">--></A></TD>\n %%wk6_d1%%\n %%wk6_d2%%\n %%wk6_d3%%\n %%wk6_d4%%\n %%wk6_d5%%\n %%wk6_d6%%\n %%wk6_d7%%\n</TR>\n</TABLE>\n%%subscribe_link%%\n%%BOX,calendar_actions%%</DIV>', '1', '<P>This block formats the body of the calendar in "monthly" view. This should be a self-contained block of HTML that can be inserted anywhere. The following special keys are recognized:</P>\n<DL>\n <DT>wk*_d*</DT>\n <DD>The week number within the month and day number within the week. The code replaces each of these with the content! s of <B>calendar_body_one_day</B> formatted for the appropriate day.</ DD>\n <DT>wk*</DT>\n <DD>The week number within the month. The code replaces each of these with the date of the monday of that week.</DD>\n <DT>cal_id</DT>\n <DD>The ID of the calendar currently being viewed, or zero for the current user\'s personal calendar view.</DD>\n <DT>subscribe_link</DT>\n <DD>The link to subscribe (or unsubscribe) to this calendar, if viewing one calendar.</DD>\n <DT>calendar_title</dt>\n <DD>The title of the current calendar</dd>\n <DT>date</dt>\n <DD>The month being viewed (YYYY-MM)</dd>\n <DT>longdate</dt>\n <DD>The month being viewed (Mmmmmmm YYYY)</dd>\n <DT>month</dt>\n <DD>The name of the month</dd>\n <DT>monthnum</dt>\n <DD>The number of the month</dd>\n <DT>year</dt>\n <DD>The year.</dd>\n</DL>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('calendar_body_monthly_mini', '<DIV class="cal_body">\n<P align="center"><A href="%%rootdir%%/calendar/monthly/">%%month%% %%year%%</A></P>\n<TABLE width="100%" cellspacing="0" cellpadding="0">\n<TR>\n <TH>M</TH>\n <TH>T</TH>\n <TH>W</TH>\n <TH>T</TH>\n <TH>F</TH>\n <TH>S</TH>\n <TH>S</TH>\n</TR>\n<TR>\n %%wk1_d1%%\n %%wk1_d2%%\n %%wk1_d3%%\n %%wk1_d4%%\n %%wk1_d5%%\n %%wk1_d6%%\n %%wk1_d7%%\n</TR>\n<TR>\n %%wk2_d1%%\n %%wk2_d2%%\n %%wk2_d3%%\n %%wk2_d4%%\n %%wk2_d5%%\n %%wk2_d6%%\n %%wk2_d7%%\n</TR>\n<TR>\n %%wk3_d1%%\n %%wk3_d2%%\n %%wk3_d3%%\n %%wk3_d4%%\n %%wk3_d5%%\n %%wk3_d6%%\n %%wk3_d7%%\n</TR>\n<TR>\n %%wk4_d1%%\n %%wk4_d2%%\n %%wk4_d3%%\n %%wk4_d4%%\n %%wk4_d5%%\n %%wk4_d6%%\n %%wk4_d7%%\n</TR>\n<TR>\n %%wk5_d1%%\n %%wk5_d2%%\n %%wk5_d3%%\n %%wk5_d4%%\n %%wk5_d5%%\n %%wk5_d6%%\n %%wk5_d7%%\n</TR>\n<TR>\n %%wk6_d1%%\n %%wk6_d2%%\n %%wk6_d3%%\n %%wk6_d4%%\n %%wk6_d5%%\n %%wk6_d6%%\n ! %%wk6_d7%%\n</TR>\n</TABLE>\n\n</DIV>', '1', '<P>This block formats the body of the mini monthly calendar on the front page. This should be a self-contained block of HTML that can be inserted anywhere. The following special keys are recognized:</p>\n<DL>\n <DT>wk*_d*</dt>\n <DD>The week number within the month and day number within the week. The code replaces each of these with the contents of <B>calendar_body_one_day</b> formatted for the appropriate day.</dd>\n <DT>cal_id</dt>\n <DD>The ID of the calendar currently being viewed, or zero for the current user\'s personal calendar view.</dd>\n <DT>month</dt>\n <DD>The current month</dd>\n <DT>year</dt>\n <DD>The current year</dd>\n</dl>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('calendar_body_one_day', '<TD%%hilight%%><DIV class="cal_day">\n<DIV class="date_number"><A href="%%rootdir%%/calendar/daily/%%cal_id%%/%%year%%-%%month%%-%%date_number%%">%%date_number%%</A></DIV>\n%%events%%\n</DIV></TD>', '1', '<P>This block formats the inside of a single day from either <B>calendar_body_monthly</B>, <B>calendar_body_weekly</B>, or <B>calendar_body_daily</B>. By default it is a single table cell, so all three of the calendar templates must treat it as such and encapsulate it in the appropriate table structure. The following special keys are recognized:</P>\n<DL>\n <DT>hilight</DT>\n <DD>If the date being formatted is the current date, this is replaced with the contents of <B>calendar_today_hilight</B>, otherwise it is cleared.</DD>\n <DT>cal_id</DT>\n <DD>The ID of the calendar currently being viewed, or zero for the current user\'s personal calendar view.</DD>\n <DT>ye! ar</DT>\n <DD>The year being viewed</DD>\n <DT>month</DT>\n <DD>The month being viewed</DD>\n <DT>date_number</DT>\n <DD>The day being viewed</DD>\n <DT>usercal</dt>\n <DD>If viewing another user\'s personal calendar view, the "/user/nickname" portion of the URL, otherwise blank</dd>\n<DT>events</DT>\n <DD>All of the events for this day, each formatted according to <B>event_format_monthly</B>, <B>event_format_weekly</B>, or <B>event_format_daily</B>, depending on which calendar view is currently being used.</DD>\n</DL>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('calendar_body_weekly', '<DIV class="cal_head">\n%%title_font%%%%calendar_title%% - week starting %%mediumdate%%%%title_font_end%%\n<UL>\n%%BOX,calendar_datenav%%\n</UL>\n</DIV>\n\n<DIV class="cal_body">\n<TABLE width="100%" cellspacing="0" cellpadding="0">\n<TR>\n <TH>Monday</TH>\n <TH>Tuesday</TH>\n <TH>Wednesday</TH>\n <TH>Thursday</TH>\n <TH>Friday</TH>\n <TH>Saturday</TH>\n <TH>Sunday</TH>\n</TR>\n<TR>\n %%d1%%\n %%d2%%\n %%d3%%\n %%d4%%\n %%d5%%\n %%d6%%\n %%d7%%\n</TR>\n\n</TABLE>\n%%subscribe_link%%\n%%BOX,calendar_actions%%</DIV>', '1', '<P>This block formats the body of the calendar in "weekly" view. This should be a self-contained block of HTML that can be inserted anywhere. The following special keys are recognized:</P>\n<DL>\n <DT>d*</DT>\n <DD>The day number within the current week. Each one is replaced with the block <B>calendar_body_one_day</B> formatted for the appropriate ! day.</DD>\n <DT>subscribe_link</DT>\n <DD>The link to subscribe (or unsubscribe) to this calendar, if viewing one calendar.</DD>\n <DT>date</dt>\n <DD>The monday of the week being viewed (YYYY-MM-DD)</dd>\n <DT>mediumdate</dt>\n <DD>The monday of the week being viewed (DD-Mmm-YYYY)</dd>\n <DT>longdate</dt>\n <DD>The monday of the week being viewed (Wwwwww, DD Mmmmmmm YYYY)</dd>\n <DT>dow</dt>\n <DD>Monday (the date displayed is always the monday of the week being viewed)</dd>\n <DT>dow_short</dt>\n <DD>Mon (see above)</dd>\n <DT>day_num</dt>\n <DD>The day number of the week\'s monday</dd>\n <DT>day_ord</dt>\n <DD>The day number of the week\'s monday in ordinal form (1st, 2nd, 3rd, etc)</dd>\n <DT>month</dt>\n <DD>The name of the month (if the week spans the end/beginning of a month, it is the month of the week\'s monday)</dd>\n <DT>monthnum</dt>\n <DD>The number of the month</dd>\n <DT>year</dt>\n <DD>The year (if the week spans the end/beginning of a year, it is! the year of the week\'s monday)</dd>\n</DL>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('calendar_error_body', '%%title_font%%No Such Calendar%%title_font_end%%\n\n<P>Sorry, the calendar you requested either doesn\'t exist or is private. <A href="%%rootdir%%/my/calendar">Your personal calendar view</A>.</P>', '1', '<P>This is the error message displayed when a user requests a calendar that either doesn\'t exist or which they don\'t have permission to see.</P>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('calendar_invitations', '%%title_font%%Invite users%%title_font_end%%\n\n%%edit_calendar_links%%\n\n<P>%%msg%%</P>\n\n<P><B>Users invited to view this calendar</B></P>\n\n<UL>\n%%view_list%%\n</UL>\n%%view_add%%\n\n<P><B>Users invited to submit events to this calendar</B></P>\n\n<UL>\n%%submit_list%%\n</UL>\n%%submit_add%%', '1', '<P>This block formats the page where a calendar owner manages the invitation lists for their calendar. The following special keys are recognized:</p>\n<DL>\n <DT>msg</dt>\n <DD>Any status or error message produced</dd>\n <DT>view_list</dt>\n <DD>The list of users invited to view the calendar</dd>\n <DT>view_add</dt>\n <DD>The form used to add users to the above list</dd>\n <DT>submit_list</dt>\n <DD>The list of users invited to submit events to the calendar</dd>\n <DT>submit_add</dt>\n <DD>The form used to add users to the above list</dd>\n</dl>', 'Calendars a! nd Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('calendar_invitations_add', '<FORM action="%%rootdir%%/%%op%%/invite/%%cal_id%%" method="POST">\n<INPUT type="hidden" name="action" value="%%list%%_add">\nNickname: <INPUT type="text" name="nick" size="20"> <INPUT type="submit" name="add" value="Add">\n</FORM>', '1', '<P>This block contains the form used in the block <B>calendar_invitations</b> and <B>event_invitations</b> to add to either list available in those two pages. The special keys recognized are:</p>\n<DL>\n <DT>op</dt>\n <DD>The current op, either editcalendar or submitevent depending on whether we\'re working on a calendar or an event</dd>\n <DT>cal_id</dt>\n <DD>The internal ID of either the calendar or the event, depending on which we\'re working on</dd>\n <DT>list</dt>\n <DD>Which list, view or submit, this form is being used for</dd>\n</dl>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('calendar_invitations_item', '<LI><A href="%%rootdir%%/user/%%urlnick%%">%%nickname%%</A> (<A href="%%rootdir%%/%%op%%/invite/%%cal_id%%?action=%%list%%_remove;nick=%%nickname%%">remove</A>)</LI>', '1', '<P>This block formats a single item in either list in either calendar or event invitation management. The special keys recognized are:</p>\n<DL>\n <DT>urlnick</dt>\n <DD>the user\'s url-escaped nickname</dd>\n <DT>op</dt>\n <DD>the current op, either for the calendar or the event</dd>\n <DT>cal_id</dt>\n <DD>the ID number of the calender or event currently being edited</dd>\n <DT>list</dt>\n <DD>the name of the list, either view or submit, currently being displayed</dd>\n <DT>nickname</dt>\n <DD>the user\'s nickname</dd>\n</dl>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('calendar_navigation_hilight', ' id="current"', '1', '<P>The text placed in <B>calendar_navigation_item</B> to indicate the currently selected calendar date. By default this is an HTML id property for use with CSS, but it can be anything.</P>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('calendar_navigation_item', '<LI><A href="%%rootdir%%%%usercal%%/calendar/%%type%%/%%cal_id%%/%%date%%"%%css_id%%>%%nav_link%%</A></LI>\n', '1', '<P>This block formats a single item in the calendar navigation bar. By default it is a single list item, so the block <B>calendar_header</B> must contain the appropriate list start and end HTML. The following special keys are recognized:</P>\n<DL>\n <DT>type</DT>\n <DD>The current calendar view: monthly, weekly, or daily.</DD>\n <DT>cal_id</DT>\n <DD>The calendar ID of the current calendar, or zero for the user\'s personal calendar view.</DD>\n <DT>date</DT>\n <DD>The link\'s destination date.</DD>\n <DT>css_id</DT>\n <DD>The contents of <B>calendar_navigation_hilight</B> if this is the item for the current calendar, blank otherwise.</DD>\n <DT>nav_link</DT>\n <DD>The formatted destination date.</DD>\n <DT>usercal</DT>\n <DD>If viewing a user! \'s personal calendar view, this becomes /user/nickname; otherwise blank</DD>\n</DL>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('calendar_other_month_hilight', ' id="other_month"', '1', '<P>The text placed in <B>calendar_body_one_day</b> to indicate days which are outside the range being displayed. This is only used in the monthly view, to fill in the grid. By default this is an HTML id property for use with CSS, but it can be anything.</p>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('calendar_settings', '%%title_font%%%%pagetitle%%%%title_font_end%%\n\n%%edit_calendar_links%%\n\n<DIV>\n<FORM name="calendar_settings" action="%%rootdir%%/editcalendar/settings/%%cal_id%%" method="POST">\n<P>%%msg%%</P>\n<P><B>Calendar Title:</B> <INPUT type="text" size="50" maxlength="100" name="title" value="%%title%%"></P>\n<P><B>Description:</B><BR>\n<TEXTAREA name="description" rows="%%textarea_rows%%" cols="%%textarea_cols%%">%%description%%</TEXTAREA></P>\n<FIELDSET><LEGEND>Who can see this calendar?</LEGEND>\n<INPUT type="radio" name="public_view" value="public"%%view_public_checked%%> Everybody<BR>\n<INPUT type="radio" name="public_view" value="invite"%%view_invite_checked%%> Only people on <A href="%%rootdir%%/editcalendar/invite/%%cal_id%%">the invitation list</A><BR>\n<INPUT type="radio" name="public_view" value="private"%%view_private_checked%%> Only me</FIELDSET>\n<FIELDSET><L! EGEND>Who can submit events to this calendar?</LEGEND>\n<INPUT type="radio" name="public_submit" value="public"%%submit_public_checked%%> Everybody<BR>\n<INPUT type="radio" name="public_submit" value="modpublic"%%submit_modpublic_checked%%> Everybody, but I will review the events before they\'re visible<BR>\n<INPUT type="radio" name="public_submit" value="invite"%%submit_invite_checked%%> Only people on <A href="%%rootdir%%/editcalendar/invite/%%cal_id%%">the invitation list</A><BR>\n<INPUT type="radio" name="public_submit" value="modinvite"%%submit_modinvite_checked%%> Only people on <A href="%%rootdir%%/editcalendar/invite/%%cal_id%%">the invitation list</A>, but I will review the events before they\'re visible<BR>\n<INPUT type="radio" name="public_submit" value="private"%%submit_private_checked%%> Only me</FIELDSET>\n<P><INPUT type="submit" name="save" value="Save"></P>\n</FORM>\n<P><A href="%%rootdir%%/calendar//%%cal_id%%">View this calendar</A></P>\n</DIV>', '1', '<P>! This block is the form used to edit a particular calendar. The special keys recognized are:</P>\n<DL>\n <DT>submit_*_checked, view_*_checked</DT>\n <DD>The checked indicator for the permissions radio buttons</DD>\n <DT>pagetitle</DT>\n <DD>The title of the page</DD>\n <DT>cal_id</DT>\n <DD>The internal ID of the calendar we\'re editing</DD>\n <DT>msg</DT>\n <DD>Any status or error message that comes up when we save a calendar</DD>\n <DT>title</DT>\n <DD>The calendar title</DD>\n <DT>description</DT>\n <DD>A description of what the calendar is for</DD> </DL>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('calendar_subscribe_item', '<INPUT type="checkbox" name="subscribe_item" value="%%cal_value%%"%%cal_checked%%> <A href="%%rootdir%%/calendar/%%view%%/%%cal_value%%/%%date%%">%%cal_title%%</A><BR>\n', '1', '<P>This is one item in the list of calendars we can subscribe to. It is shown in the personal calendar view. If this is a list item, the block <B>calendar_subscribe_multi_form</B> must contain the list start and end tags. The following special keys are recognized:</P>\n<DL>\n <DT>cal_value</DT>\n <DD>The calendar number for the calendar being displayed on this line</DD>\n <DT>cal_checked</DT>\n <DD>the \'checked\' toggle to indicate if this calendar is in our subscription list or not</DD>\n <DT>view</DT>\n <DD>monthly, weekly, or daily, depending on the current view</DD>\n <DT>date</dt>\n <DD>The date of the calendar currently being viewed</dd>\n <DT>cal_title</DT>\n <DD>The title of ! the calendar</DD>\n<DL>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('calendar_subscribe_link', '<P><A href="/calendar/%%view%%/%%cal_id%%/%%date%%?subscribe=add">Subscribe to this calendar</A></P>','1','<P>This block is the subscribe link shown underneath a calendar to which the user is not currently subscribed, if the site control <B>allow_personal_calendar_view</B> is on. The special keys recognized are:</P>\n<DL>\n <DT>view</DT>\n <DD>The current view (monthly, weekly, or daily)</DD>\n <DT>cal_id</DT>\n <DD>The ID number of the current calendar</DD>\n <DT>date</DT>\n <DD>The current calendar\'s date</DD>\n</DL>','Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('calendar_subscribe_multi_form', '<P>Calendars in your personal calendar view:<BR>\n<FORM name="calendar_subscribe" action="%%rootdir%%%%usercal%%/calendar/%%view%%/%%cal_id%%/%%date%%" method="post">\n<INPUT type="hidden" name="subscribe" value="multi">\n%%calendar_checks%%\n<BR>\n<INPUT type="submit" name="save" value="Update Calendar">\n</FORM>', '1', '<P>This is the framework for the calendar subscription form shown underneath the personal calendar view, if the site control <B>allow_personal_calendar_view</B> is on. The special keys recognized are:</P>\n<DL>\n <DT>view</DT>\n <DD>The current view (monthly, weekly, or daily)</DD>\n <DT>cal_id</DT>\n <DD>The ID number of the current calendar</DD>\n <DT>date</DT>\n <DD>The current calendar\'s date</DD>\n <DT>usercal</DT>\n <DD>If we\'re in the user op, the user op and nickname, otherwise blank.</DD>\n <DT>calendar_checks</DT>\n <DD>one! copy of <B>calendar_subscribe_item</B> for each calendar the current user is allowed to subscribe to, checked appropriately.</DD>\n</DL>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('calendar_today_hilight', ' id="today"', '1', '<P>The text placed in <B>calendar_body_one_day</B> to indicate today. By default this is an HTML id property for use with CSS, but it can be anything.</P>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('calendar_unsubscribe_link', '<P><A href="/calendar/%%view%%/%%cal_id%%/%%date%%?subscribe=remove">Unsubscribe from this calendar</A></P>', '1', '<P>This block is the unsubscribe link shown underneath a calendar to which the user is currently subscribed, if the site control <B>allow_personal_calendar_view</B> is on. The special keys recognized are:</P>\n<DL>\n <DT>view</DT>\n <DD>The current view (monthly, weekly, or daily)</DD>\n <DT>cal_id</DT>\n <DD>The ID number of the current calendar</DD>\n <DT>date</DT>\n <DD>The current calendar\'s date</DD>\n</DL>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('edit_calendar_links', '<DIV class="caledit_menu">\n<A href="%%rootdir%%/editcalendar/settings/%%cal_id%%">Edit Calendar Settings</A>\n<A href="%%rootdir%%/editcalendar/moderate/%%cal_id%%">Approve Submitted Events</A>\n<A href="%%rootdir%%/editcalendar/listevents/%%cal_id%%">Event List</A>\n<A href="%%rootdir%%/editcalendar/invite/%%cal_id%%">Invitation List</A>\n</DIV>', '1', '<P>This is the menu at the top of the calendar edit page which links to the other pages available through the calendar edit form. The only special key recognized is cal_id, the ID number of the calendar being edited.</p>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event', '%%title_font%%%%title%%%%title_font_end%%\n\n<DIV class="event_body">\n<P id="description">%%description%%</P>\n<P>Organizer: <A href="%%rootdir%%/user/uid:%%owner%%">%%owner_nick%%</A></P>\n<P>Date: %%date_start%%</P><P>Calendar: <A href="%%rootdir%%/calendar//%%cal_id%%/%%date_start%%">%%calendar_title%%</A></P>\n%%deadline%%\n%%address%%\n%%City%%\n%%state%%\n%%country%%\n%%rsvp%%\n<P>%%edit_link%% %%add_cal_link%% %%add_child_link%% %%event_sub_link%% %%add_story_link%%</P>\n</DIV>\n%%child_events%%\n\n<HR>\n\n<DIV class="event_stories">\n%%BOX,event_stories%%\n</DIV>\n', '1', '<P>This block formats the page when viewing a single event in full detail. This should be a fully self-contained block of HTML. The special keys recognized are any defined event property name. Each one is replaced with the value of that property, formatted according to the template defined for that event! property. If no template is defined, the value alone is used.</P>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_add_child_link', '[<A href="%%rootdir%%/submitevent/submit/%%eid%%?newchild=1">Add a sub-event</A>]', '1', '<P>This is the link shown on the event page when the event displayed is a parent event and may have sub-events added, and the user viewing the event has permission to submit an event. The only special key recognized is eid, the current event\'s ID number.</p>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_add_story_link', '[<A href="%%rootdir%%/submitstory/?event=%%eid%%">Write a story</A>]', '1', '<P>This is the link displayed when the current user has permission to submit a story to the event being displayed. The only special key recognized is eid, the current event\'s event ID number.</P>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_also_submit', '<INPUT type="checkbox" name="other_cals" value="%%cal_value%%"%%cal_checked%%> <A href="%%rootdir%%/calendar//%%cal_value%%">%%cal_title%%</A><BR>\n', '1', '<P>This is a single item in the list of alternate calendars to submit an event to, on the event edit form. The following special keys are recognized:</p>\n<DL>\n <DT>cal_value</dt>\n <DD>The ID number of the calendar in this list item</dd>\n <DT>cal_checked</dt>\n <DD>The checked/unchecked indicator showing if the current event has been submitted to the calendar in this list item</dd>\n <DT>cal_title</dt>\n <DD>The calendar\'s display title</dd>\n</dl>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_child_list', '<P>Local events:</P>\n<UL>\n%%child_list%%\n</UL>\n', '1', '<P>This sets up the list of child events (or sub-events) on the display of a parent event. The only special key is child_list, which is built from one copy of event_child_list_item per child event.</p>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_child_list_item', ' <LI><A href="%%rootdir%%/event/%%eid%%">%%title%%</A></LI>\n', '1', '<P>This is one item in the list of child events (or sub-events) for a parent event. The special keys recognized are any defined event property.</p>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_edit_displaystatus', '<SELECT name="displaystatus" size="1">\n <OPTION value="-2"%%pending_selected%%>Pending Moderation</OPTION>\n <OPTION value="-1"%%never_selected%%>Never Display</OPTION>\n <OPTION value="0"%%always_selected%%>Always Display</OPTION>\n</SELECT>', '1', '<P>This is the displaystatus selectbox shown on the event edit form to those users who have admin permissions for an event. The special keys recognized are the three *_selected keys, which show which option is currently set for the event being displayed.</p>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_edit_form', '%%title_font%%Edit Event%%title_font_end%%\n<P>%%msg%%</P>\n<FORM name="event_edit" action="%%rootdir%%/submitevent/%%action%%/%%id%%" method="POST"><INPUT type="hidden" name="parent" value="%%parent%%">\n<INPUT type="hidden" name="newchild" value="%%newchild%%">\n\n<TABLE>\n<tr><td>%%required_pref_marker%%<B>Display event?</B></td>\n<td>%%displaystatus%%</td></tr>\n<tr><td>%%required_pref_marker%%<B>Submit to Calendar:</B></td>\n<td>%%BOX,calendar_selectbox%%</td></tr>\n\n%%event_form_items%%\n\n<tr><td><B>Event needs volunteers?</B></td>\n<td><input type="checkbox" name="volunteers" value="1"%%volunteers%%></td></tr>\n<tr><td>%%required_pref_marker%%<B>Event is public?</B></td>\n<td><input type="radio" name="public_view" value="public"%%public_checked%%> Public\n<BR><input type="radio" name="public_view" value="private"%%private_checked%%> Private\n<BR><input type="radi! o" name="public_view" value="invite"%%invite_checked%%> Invitation Only%%invite_link%%</td></tr><tr><td>%%required_pref_marker%%<B>Who can submit stories to this event?</B></td>\n<td><input type="radio" name="public_submit" value="public"%%public_submit_checked%%> Public\n<BR><input type="radio" name="public_submit" value="private"%%private_submit_checked%%> Private\n<BR><input type="radio" name="public_submit" value="invite"%%invite_submit_checked%%> Invitation Only%%invite_link%%</td></tr>\n\n<tr><td>%%required_pref_marker%%<B>Start date</B>:</td><td><INPUT type="hidden" name="date_start" value="%%date_start%%">\n<SELECT name="date_start_year">\n%%BOX,cal_year_select,%%date_start_year%%%%</SELECT>\n<SELECT name="date_start_month">\n%%BOX,cal_month_select,%%date_start_month%%%%</SELECT>\n<SELECT name="date_start_day">\n%%BOX,cal_day_select,%%date_start_day%%%%</SELECT></td></tr>\n\n<tr><td><B>End date</B>:<br>(Only for multi-day events)</td>\n<td><INPUT type="radio" name="! date_end" value=""%%one_day%%> One Day Event\n<BR><INPUT type="radio" name="date_end" value="%%date_end%%"%%multi_day%%> This date:\n<SELECT name="date_end_year">\n%%BOX,cal_year_select,%%date_end_year%%%%</SELECT> \n<SELECT name="date_end_month">\n%%BOX,cal_month_select,%%date_end_month%%%%</SELECT> \n<SELECT name="date_end_day">\n%%BOX,cal_day_select,%%date_end_day%%%%</SELECT></td></tr>\n\n\n%%also_submit_line%%\n\n%%parent_event_line%%\n\n</TABLE>\n<BR><INPUT type="submit" name="save" value="Save Event">\n</FORM>','1','<P>This block builds the single event edit and submit form. The special keys recognized are:</p>\n<DL>\n <DT>msg</dt>\n <DD>Any status or error messages</dd>\n <DT>action</dt>\n <DD>The "action" part of the URL (edit or submit)</dd>\n <DT>id</dt>\n <DD>The ID of the calendar (if we\'re submitting an event) or the event (if we\'re editing an event)</dd>\n <DT>eid</dt>\n <DD>The event ID</dd>\n <DT>cal_id</dt>\n <DD>The event\'s calendar ID</dd>\n <DT>parent</dt>\n <DD>The event ID of the parent event, if this is a sub-e! vent</dd>\n <DT>newchild</dt>\n <DD>True if this is a new sub-event</dd>\n <DT>displaystatus</dt>\n <DD>The displaystatus control. A selectbox if the user can administer this event</dd>\n <DT>event_form_items</dt>\n <DD>The form elements for each event property. The formatting of each event is determined by that event property\'s template</dd>\n <DT>volunteers</dt>\n <DD>the checked indicator, if the event is marked as needing volunteers or not</dd>\n <DT>*_checked</dt>\n <DD>The checked indicator for the permissions radio buttons</dd>\n <DT>date_start</dt>\n <DD>The current start date</dd>\n <DT>date_start_*</dt>\n <DD>the year, month and day parts of the date, individually</dd>\n <DT>one_day</dt>\n <DD>The radio button checked indicator if this is a one-day event</dd>\n <DT>multi_day</dt>\n <DD>The radio button checked indicator if this is a multi-day event</dd>\n <DT>date_end</dt>\n <DD>The current end date</dd>\n <DT>date_end_*</dt>\n <DD>The year, month, and! day parts of the date, individually</dd>\n <DT>also_submit_line</dt>\ n <DD>The form elements to submit the current event to other calendars; formatted according to <B>event_other_calendars</b>. Not shown for child events (sub-events)</dd>\n <DT>parent_event_line</dt>\n <DD>The form element to set an event as a parent (or umbrella) event which can have child events attached. Not shown for child events.</dd>\n <DT>invite_link</DT>\n <DD>The link to the event\'s invitation management page. Not shown for new events, only existing events.</DD>\n</dl>','Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_error_body', '%%title_font%%%%title%%%%title_font_end%%\n\n<P>Sorry, the event you requested either doesn\'t exist or is private. <A href="%%rootdir%%/my/calendar">Your personal calendar view</A>.</P>', '1', '<P>This is the error message displayed in place of the event body if the event requested is not viewable either because it doesn\'t exist or because the user doesn\'t have permission to see it.</P>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_error_title', 'No Such Event', '1', '<P>This is the title used for the page if the event requested is not viewable either because it doesn\'t exist or because the user doesn\'t have permission to see it.</P>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_format_daily', '%%title%%\n%%description%%\n%%deadline%%', '1', '<P>This block formats a single event for use in <B>calendar_body_one_day</B> for the daily view. Zero, one, or more copies of this block may be displayed in a single day. The special keys recognized are any defined event property name. Each one is replaced with the value of that property, formatted according to the calendar_template defined for that event property. If no calendar_template is defined, the value alone is used.</P>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_format_monthly', '%%title%%', '1', '<P>This block formats a single event for use in <B>calendar_body_one_day</B> for the monthly view. Zero, one, or more copies of this block may be displayed in a single day. The special keys recognized are any defined event property name. Each one is replaced with the value of that property, formatted according to the calendar_template defined for that event property. If no calendar_template is defined, the value alone is used.</P>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_format_weekly', '%%title%%\n%%description%%', '1', '<P>This block formats a single event for use in <B>calendar_body_one_day</B> for the weekly view. Zero, one, or more copies of this block may be displayed in a single day. The special keys recognized are any defined event property name. Each one is replaced with the value of that property, formatted according to the calendar_template defined for that event property. If no calendar_template is defined, the value alone is used.</P>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_invitation_link', ' <A href="%%rootdir%%/submitevent/invite/%%eid%%">Invite users to view this event</A>', '1', '<P>This is the link to the event invitation management page. It is placed in <B>event_edit_form</B> for existing events.</P>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_invitations', '%%title_font%%Invite users%%title_font_end%%\n\n<P>%%msg%%</P>\n<P><A href="%%rootdir%%/submitevent/edit/%%id%%">Edit this event</A></P>\n<P><B>Users invited to view this event</B></P>\n\n<UL>\n%%view_list%%\n</UL>\n%%view_add%%\n\n<P><B>Users invited to attach stories to this event</B></P>\n<UL>\n%%submit_list%%\n</UL>\n%%submit_add%%\n', '1', '<P>This block formats the event invitation management page. The following special keys are used:</p>\n<DL>\n <DT>msg</dt>\n <DD>Any status or error messages generated</dd>\n <DT>id</dt>\n <DD>The event ID number</dd>\n <DT>view_list</dt>\n <DD>The list of users invited to view the event. Each list item is formatted using <B>calendar_invitations_item</b>.</dd>\n <DT>view_add</dt>\n <DD>The form used to add a user to the invitation list above. The form is in <B>calendar_invitations_add</b>.</dd>\n <DT>submit_list</dt>\n <DD>T! he list of users invited to submit stories to the event. Each list item is formatted using <B>calendar_invitations_item</b>.</dd>\n <DT>submit_add</dt>\n <DD>The form used to add a user to the invitation list above. The form is in <B>calendar_invitations_add</b>.</dd>\n</dl>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_invite_mail', '%%nick%%:\n\n%%sender_nick%% has invited you to attend the following event:\n\n%%title%%\n%%date_start%%\n\n%%description%%\n\n----------\n\nFor more information about this event, and to RSVP and/or \nsign up for updates, go to:\n\n%%event_url%%\n\n-- %%sitename%%', '1', '<P>This is the email sent to users invited to view a particular event. It is sent to the real email address of the invitee. Because this is an email and not a regular Scoop page, only the special keys listed below will work.</p>\n<DL>\n <DT>nick</dt>\n <DD>The nickname of the invitee</dd>\n <DT>sender_nick</dt>\n <DD>The nickname of the user who sent the invitation</dd>\n <DT>event_url</dt>\n <DD>The URL of the event display page</dd>\n <DT>sitename</dt>\n <DD>The contents of the sitename Site Control</dd>\n</dl>\n<P>Any defined event property may also be used.</p>', 'Calendars and Events', 'defaul! t', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_invite_mail_subject', 'You\'re invited!', '1', '<P>The subject line for the email sent when a user is invited to attend (view) an event. Because this is used in an email and does not go through Scoop\'s usual page out process, no regular keys may be used. There are no special keys for this block.</P>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_list', '%%title_font%%Events in %%title%%%%title_font_end%%\n\n%%edit_calendar_links%%\n\n<P>%%msg%%</P>\n\n<P>%%prevlink%%</P>\n<TABLE width="100%" cellspacing=0 cellpadding="2px">\n <TR>\n <TH>Event</TH>\n <TH>Submitted By</TH>\n <TH>Start Date</TH>\n <TH>Actions</TH>\n </TR>\n%%eventlist%%\n</TABLE>\n<P align="right">%%nextlink%%</P>', '1', '<P>This is the structure of the event list page. By default, it creates a table, and <B>event_list_item</B> contains each row of the table\'s data. The number of columns and associated headings should match the structure and data in <B>event_list_item</B>. The following special keys are recognized:</P>\n<DL>\n <DT>cal_title</DT>\n <DD>The display title of the calendar whose events are in the list</DD>\n <DT>prevlink</DT>\n <DD>The link to the previous page of events if we\'re not on the first page</DD>\n <DT>eventlist</DT>\n <DD>The actu! al list of events. Each line is built using <B>event_list_item</B> and the number of items displayed is limited by the site control <B>storylist</B>, which also controls the number of items in many other lists</DD>\n <DT>nextlink</DT>\n <DD>The link to the next page in the event list, if there are more items.</DD>\n</DL>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_list_action_approve', ' (<A href="%%rootdir%%/editcalendar/moderate/%%cal_id%%">approve</A>)', '1', '<P>This is the link used in the event list to a calendar\'s event moderation page, where events can be approved or disapproved for inclusion in a calendar. The only special key is cal_id, the ID number of the calendar currently being edited.</p>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_list_action_edit', ' (<A href="%%rootdir%%/submitevent/edit/%%eid%%">edit</A>)', '1', '<P>This is the link used in the event list to the event\'s edit form. The only special key is eid, the event\'s ID number.</p>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_list_action_remove', '(<A href="%%rootdir%%/editcalendar/addevent/%%cal_id%%/remove/%%eid%%">remove</A>)', '1', '<P>This is the link used to remove an event from the calendar being edited, if this is a "secondary" calendar for the event (the "also show this event in..." item on the event edit form)</p>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_list_item', ' <TR bgcolor="%%event_bg%%">\n <TD><A href="%%rootdir%%/event/%%eid%%">%%title%%</A></TD>\n <TD>%%owner_nick%%</TD>\n <TD>%%date_start%%</TD>\n <TD>%%actions%%</TD>\n </TR>\n', '1', '<P>This is one line (one event) in the event list page. It should have the same number of columns as the table in the block <B>event_list</B>, and its data should match the table headers. The following special keys are recognized:</P>\n<DL>\n <DT>event_bg</DT>\n <DD>Background colours taken from the story list to distinguish between events filed primarily in this calendar, and events included in this calendar separately.</DD>\n <DT>eid</DT>\n <DD>The internal event ID of the event in this line</DD>\n <DT>owner_nick</DT>\n <DD>The nickname of the event owner (submitter)</DD>\n <DT>actions</dt>\n <DD>the actions (edit, remove, etc) that the current user has permission to do.</dd>\n <DT>! any other field in the events or event_properties table</DT>\n <DD>Any event property defined can have its name used in this block and the value of that property will be entered exactly as-is</DD>\n</DL>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_moderate', '%%title_font%%Moderate Events%%title_font_end%%\n\n%%edit_calendar_links%%\n\n<P>%%msg%%</P>\n\n<FORM name="moderate_events" action="%%rootdir%%/editcalendar/moderate/%%cal_id%%" method="POST">\n<TABLE cellspacing=0 cellpadding="3px">\n <TR>\n <TD> </TD>\n <TH>Event</TH>\n <TH>Submitted By</TH>\n <TH colspan="2">Date(s)</TH>\n </TR>\n%%eventlist%%\n</TABLE>\n<P>With selected events:<BR>\n<INPUT type="radio" name="action" value="approve"> Approve for display<BR>\n<INPUT type="radio" name="action" value="reject"> Do not display</P>\n<P><INPUT type="submit" name="save" value="Moderate">\n</FORM>', '1', '<P>This provides the page structure for the event moderation. The following special keys are recognized:</P>\n<DL>\n <DT>msg</DT>\n <DD>Any status or error messages</DD>\n <DT>cal_id</DT>\n <DD>The internal ID of the calendar whose events we\'re moderating</DD>\n <DT>even! tlist</DT>\n <DD>The list of events waiting for moderation. The individual events are formatted with the block <B>event_moderate_item</B></DD>\n</DL>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_moderate_item', ' <TR>\n <TD><INPUT type="checkbox" name="%%eid%%" value="1"></TD>\n <TD><A href="%%rootdir%%/event/%%eid%%">%%title%%</A></TD>\n <TD>%%owner_nick%%</TD>\n <TD>%%date_start%%</TD>\n <TD>%%date_delim%%%%date_end%%</TD>\n </TR>\n', '1', '<P>This formats each item in the event moderation list. The structure must match the structure set out in the block <B>event_moderate</B>. The following special keys are recognized:</P>\n<DL>\n <DT>eid</DT>\n <DD>The event ID number</DD>\n <DT>date_delim</DT>\n <DD>If there is an end date, this is a separator to show that it\'s a date range. Otherwise blank.</DD>\n <DT>owner_nick</DT>\n <DD>The nickname of the event owner (submitter)</DD>\n <DT>any event property</DT>\n <DD>Any property defined in the events or event_properties table may be used here. The value is substituted as-is</DD>\n</DL>', 'Calendars and Events', 'default'! , 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_other_calendars', '<tr><td><B>Also show in</B>:</td><td>%%also_submit%%</td></tr>\n', '1', '<P>This is the portion of the event edit form that displays checkboxes for each calendar the user can submit the event to, excluding the one the event is primarily submitted to. The only special key is also_submit, which is replaced with the actual checkboxes</P>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_parent_item', '<P><A href="%%rootdir%%/event/%%eid%%">Related events</A></P>', '1', '<P>This is the link back to the parent event, shown if the event currently displayed is actually a child event (sub-event). The only special key is eid, the parent event\'s ID</P>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_parent_line', '<tr><td><B>This is an "umbrella" event</B>:<br>(ie, a country-wide "meetup"<br>If so, don\'t set a location.)</td><td><INPUT type="checkbox" name="is_parent" value="1"%%is_parent%%></td></tr>', '1', '<P>This is the part of the event edit form that sets whether or not an event is a "parent" event or not. The only special key recognized is is_parent, a checkbox checked indicator used for the current status of the event.</P>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_property_date', '<tr><td><B>%%title%%</B><br>%%description%%</td>\n<td><INPUT type="radio" name="%%property%%" value=""%%no_date%%> Not Applicable\n<BR><INPUT type="radio" name="%%property%%" value="%%value%%"%%use_date%%> This date:\n<SELECT name="%%property%%_year">\n%%BOX,cal_year_select,%%year%%%%\n</SELECT>\n<SELECT name="%%property%%_month">\n%%BOX,cal_month_select,%%month%%%%\n</SELECT>\n<SELECT name="%%property%%_day">\n%%BOX,cal_day_select,%%day%%%%\n</SELECT></td></tr>\n', '1', '<P>This block formats any date event properties on the submit/edit event form. It should be one item in the structure defined in <B>event_edit_form</B>. The following special keys are recognized:</P>\n<DL>\n <DT>title</DT>\n <DD>The title of the event property</DD>\n <DT>description</DT>\n <DD>The description of the event property</DD>\n <DT>property</DT>\n <DD>The internal name of the event prope! rty</DD>\n <DT>no_date</DT>\n <DD>The radio button checked indicator if this property is not being set for a particular event</DD>\n <DT>use_date</DT>\n <DD>The radio button checked indicator if this property is being set for a particular event</DD>\n <DT>value</DT>\n <DD>The current value of this property</DD>\n <DT>year, month, day</DT>\n <DD>The three parts of the event date, individually</DD>\n</DL>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_property_text', '<tr><td>%%required%%<B>%%title%%:</B><br>%%description%%</td><td><INPUT type="text" name="%%property%%" value="%%value%%"></td></tr>\n', '1', '<P>This block formats any plain text format event properties on the submit/edit event form. It should be one item in the structure defined in <B>event_edit_form</B>. The following special keys are recognized:</P>\n<DL>\n <DT>title</DT>\n <DD>The title of the event property</DD>\n <DT>description</DT>\n <DD>The description of the event property</DD>\n <DT>property</DT>\n <DD>The internal name of the event property</DD>\n <DT>value</DT>\n <DD>The current value of this property</DD>\n</DL>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_property_textarea', '<tr><td>%%required%%<B>%%title%%:</B><br>%%description%%</td><td><TEXTAREA name="%%property%%" rows="%%textarea_rows%%" cols="%%textarea_cols%%">%%value%%</textarea></td></tr>\n', '1', '<P>This block formats any textarea format event properties on the submit/edit event form. It should be one item in the structure defined in <B>event_edit_form</B>. The following special keys are recognized:</P>\n<DL>\n <DT>title</DT>\n <DD>The title of the event property</DD>\n <DT>description</DT>\n <DD>The description of the event property</DD>\n <DT>property</DT>\n <DD>The internal name of the event property</DD>\n <DT>value</DT>\n <DD>The current value of this property</DD>\n</DL>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_saved_msg', '%%title_font%%Event saved.%%title_font_end%%\n\n<UL>\n <LI><A href="%%rootdir%%/event/%%eid%%">View this event</A></LI>\n <LI><A href="%%rootdir%%/calendar//%%cal_id%%">Go to this event\'s calendar</A></LI>\n <LI><A href="%%rootdir%%/my/calendar">Go back to your personal calendar view</A></LI>\n <LI><A href="%%rootdir%%/submitevent/submit/%%cal_id%%">Submit another event</A></LI>\n</UL>', '1', '<P>This is the message displayed when a new event has been submitted. It should provide useful links to things the user might want to do after submitting an event. The following special keys are recognized:</P>\n<DL>\n <DT>cal_id</DT>\n <DD>The ID of the calendar the user has just submitted an event to</DD>\n <DT>eid</DT>\n <DD>The ID of the event just submitted</DD>\n</DL>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_search', '%%title_font%%Event Search Results%%title_font_end%%\n\n<P>Any fields left blank will not be used in the search.</P>\n\n<FORM name="Search" action="%%rootdir%%/eventsearch" method="GET">\n<INPUT type="hidden" name="page" value="%%page%%">\nEvents between \n<SELECT name="year_start">%%BOX,cal_year_select,%%year_start%%%%</SELECT>\n<SELECT name="month_start">%%BOX,cal_month_select,%%month_start%%%%</SELECT>\n<SELECT name="day_start">%%BOX,cal_day_select,%%day_start%%%%</SELECT>\nand <SELECT name="year_end">%%BOX,cal_year_select,%%year_end%%%%</SELECT>\n<SELECT name="month_end">%%BOX,cal_month_select,%%month_end%%%%</SELECT>\n<SELECT name="day_end">%%BOX,cal_day_select,%%day_end%%%%</SELECT>\n<BR>\n%%prop_search%%\n%%BOX,num_results%% results: <INPUT type="submit" name="search" value="Search">\n\n<P>%%prev_button%%</P>\n%%results%%\n<P align="right">%%next_button%%</P>\n</FORM>! \n', '1', '<P>This is the page for event searching. The following special keys are recognized:</p>\n<DL>\n <DT>page</dt>\n <DD>The current page number, for pages of search results</dd>\n <DT>year_start, month_start, day_start</dt>\n <DD>The currently selected value for the start date\'s year, month, and day</dd>\n <DT>year_end, month_end, day_end</dt>\n <DD>The currently selected value for the end date\'s year, month, and day</dd>\n <DT>prop_search</dt>\n <DD>The form elements for searching event properties. The number of form elements is set in the Site Control <B>event_search_num_options</b>, and the formatting for each element is set in the block <B>event_search_property_item</b>.</dd>\n <DT>prev_button</dt>\n <DD>A button to return to the previous page of search results. Only shown if we\'re not on page 1 of results</dd>\n <DT>next_button</dt>\n <DD>A button to go to the next page of search results. Only shown if there are more search results after the last result! shown</dd>\n</dl>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_search_property_item', '%%propertysel%% contains <INPUT type="text" size="30" name="value_%%num%%" value="%%value_%%num%%%%"><BR>\n', '1', '<P>This formats one event property form element in the event search form. The special keys are:</P>\n<DL>\n <DT>propertysel</DT>\n <DD>A selectbox containing a list of all event properties</DD>\n <DT>num</DT>\n <DD>A counter to distinguish this form element from the others, when it is repeated multiple times</DD>\n <DT>value_|num|</DT>\n <DD>The value entered by the user. |num| is substituted as above before the value is substituted.</DD>\n</DL>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_search_result_item', '<DIV class="search_result">\n<P><A href="%%rootdir%%/event/%%eid%%">%%title%%</A> (%%date_start%%)<BR>\n%%description%%</P>\n</DIV>\n', '1', '<P>This formats one event search result. It should be HTML suitable for repeating an arbitrary number of times.</P>\n<P>The special keys are any defined event property.</P>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_submit', '%%title_font%%Submit an Event%%title_font_end%%\n\n', '1', '<P>The page title for event submission</P>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_subscribe_link', '[<A href="%%rootdir%%/event/%%eid%%?subscribe=add">Notify me of changes to this event</A>]\n', '1', '<P>This is the link displayed on the event display page when the current user is not subscribed to the event being viewed. The only special key is eid, the event ID number.</P>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('event_unsubscribe_link', '[<A href="%%rootdir%%/event/%%eid%%?subscribe=remove">Stop notifying me of changes to this event</A>]\n', '1', '<P>This is the link displayed on the event display page when the current user is already subscribed to the event being viewed. The only special key is eid, the event ID number.</P>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('month_link_up', '<LI><A href="%%rootdir%%%%usercal%%/calendar/monthly/%%cal_id%%/%%year%%-%%month%%">This Month</A></LI>\n', '1', '<P>This block is the link used in weekly and daily calendar views to allow the user to move back up to monthly view. The following special keys are recognized:</P>\n<DL>\n <DT>usercal</DT>\n <DD>If viewing another user\'s personal calendar view, the "/user/nickname" portion of the URL, otherwise blank</DD>\n <DT>cal_id</DT>\n <DD>The calendar ID of the current calendar, or zero for the user\'s personal calendar view</DD>\n <DT>year</DT>\n <DD>The currently selected year</DD>\n <DT>month</DT>\n <DD>The currently selected month. If in weekly view and the week spans a month change, the Monday\'s month is used.</DD>\n</DL>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('personal_calendar_title', '%%nick%%\'s Personal Calendar View', '1', '<P>The title used when in a user\'s personal calendar view. The special key <B>nick</B> is replaced with the user\'s nickname.</P>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('primary_calendar_marker', '<B>*</B>', '1', '<P>The text used to indicate that a calendar is the event\'s primary calendar in the admin event list.</P>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('rsvp_form', '<FORM name="event_rsvp" action="%%rootdir%%/event/%%eid%%" method="POST">\n<FIELDSET>\n<LEGEND>RSVP</LEGEND>\n<INPUT type="checkbox" name="attend" value="1">I will attend\n%%volunteer%%\n<BR><INPUT type="submit" name="rsvp" value="Send RSVP">\n</FIELDSET>\n</FORM>', '1', '<P>The form shown on the event display page for users who have not yet replied via this form for RSVP. The special keys are:</P>\n<DL>\n <DT>eid</DT>\n <DD>The event ID number</DD>\n <DT>volunteer</DT>\n <DD>If the event owner indicated that volunteers are needed, the contents of <B>rsvp_volunteer_form</B> is inserted.</DD>\n</DL>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('rsvp_list', '<P>%%number%% people signed up.</P>\n<UL>\n%%attending%%\n</UL>', '1', '<P>This is displayed in place of the RSVP form for the event owner, so the number and names of people signed up (and volunteering) can be easily seen. The special keys are:</P>\n<DL>\n <DT>number</DT>\n <DD>The total number of people signed up</DD>\n <DT>attending</DT>\n <DD>The list of people who have signed up via the RSVP form, and whether or not they have offered to help out, sorted with volunteers first. Formatted using <B>rsvp_list_item</B></DD>\n</DL>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('rsvp_list_item', ' <LI><A href="%%rootdir%%/user/%%nick%%">%%nick%%</A> volunteering? %%volunteer%%</LI>', '1', '<P>This is one item in the list of people who have indicated that they are coming via the RSVP form. It is used in the block <B>rsvp_list</B>. The special keys are:</P>\n<DL>\n <DT>nick</DT>\n <DD>The user\'s nickname</DD>\n <DT>urlnick</DT>\n <DD>The user\'s nickname, url-escaped</DD>\n <DT>volunteer</DT>\n <DD>Whether or not, and when, the user has offered to volunteer. This is usually "during", "prior", or "no".</DD>\n</DL>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('rsvp_received', '<P>You have indicated that you\'re coming to this event</P>', '1', '<P>This is shown in place of the RSVP form when a user has submitted that form.</P>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('rsvp_volunteer_email', '%%owner_nick%%:\n\n%%volunteer_nick%% has just volunteered to help out at the \nevent %%title%%.\n<%%url%%>\n\n%%volunteer_nick%% can be reached at %%volunteer_email%%\n\n-- %%sitename%%', '1', '<P>This is the text of the email sent to an event owner when somebody uses the RSVP form and indicates that they wish to volunteer. Because this is an email and does not go through the same processing as a normal Scoop page, only the keys listed below may be used. The following special keys are used:</P>\n<DL>\n <DT>owner_nick</DT>\n <DD>The nickname of the event owner</DD>\n <DT>volunteer_nick</DT>\n <DD>The nickname of the volunteer</DD>\n <DT>url</DT>\n <DD>The URL for the event display page</DD>\n <DT>volunteer_email</DT>\n <DD>The volunteer\'s "real email"</DD>\n <DT>sitename</DT>\n <DD>The contents of the Site Control sitename</DD>\n</DL>\n<P>Any defined event prop! erty may also be used.</P>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('rsvp_volunteer_form', '<BR><INPUT type="checkbox" name="volunteer" value="during">I would like to volunteer the day of the event\n<BR><INPUT type="checkbox" name="volunteer" value="before">I would like to volunteer prior to the day of the event\n<BR><B>Note:</B> by signing up to volunteer, you give %%sitename%% permission to send your "real email" as set in <A href="%%rootdir%%/my/prefs/Protected">your user preferences</A> to the organizer of this event.\n', '1', '<P>This is the portion of the RSVP form displayed when the event owner has indicated that volunteers would be appreciated. Since the system emails the volunteer\'s realemail to the event owner, and the realemail is generally considered secret information, a notice informing the user of this is strongly recommended.</P>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('story_event_link', 'Attached to event <A href="%%rootdir%%/event/%%eid%%">%%title%%</A>\n', '1', '<P>This is the text placed in the story_summary block if the story is attached to an event. Any defined event property may be used.</P>', 'Calendars and Events', 'default', 'en'); INSERT INTO blocks (bid, block, aid, description, category, theme, language) VALUES ('week_link_up', '<LI><A href="%%rootdir%%/calendar/weekly/%%cal_id%%/%%year%%-%%month%%-%%day%%">This Week</A></LI>\n', '1', '<P>This block is the link used in the daily calendar view to allow the user to move back up to weekly view. The following special keys are recognized:</P>\n<DL>\n <DT>cal_id</DT>\n <DD>The calendar ID of the current calendar, or zero for the user\'s personal calendar view</DD>\n <DT>year</DT>\n <DD>The currently selected year</DD>\n <DT>month</DT>\n <DD>The currently selected month.</DD>\n <DT>day</DT>\n <DD>The currently selected day.</DD>\n</DL>', 'Calendars and Events', 'default', 'en'); UPDATE blocks SET block=CONCAT(block,'\n\n/* calendar stuff */\n\n.cal_head { background-color: %%comment_head_bg%%; }\n\n.cal_head UL { text-align: center; }\n\n.cal_head UL LI { display: inline;\n list-style-type: none; }\n\n.cal_head UL LI A#current { background-color: #ff0000;\n color: #ffffff;\n font-weight: bold; }\n\n.cal_body TD,TH { border: 1px solid black;\n padding: 3px; }\n\n.cal_body #today { background-color: #eeeeee; }\n\n.cal_body #other_month { background-color: #cccccc; }\n\n.date_number { font-weight: bold;\n font-size: large; }\n') WHERE bid='main_css'; -- adding event context to allowed_html description UPDATE blocks SET description='<P>This variable determines which HTML tags are available to users posting comments or stories, and which elements of those tags are allowed. The value must follow the format described below. You should have a reasonable knowledge of HTML before editing this variable.</P>\n<P>The default allows a fairly flexible, if limited, subset of HTML in all comments and stories to all user groups. Tags may be added or removed depending on the culture of the site, and you may specify some tags as allowed only to certain users or only in certain locations.</P>\n<P>One HTML tag is listed per line, beginning with the tag itself, followed by a comma-separated list of allowed tag elements and parser commands. For example:</P>\n<PRE>A, HREF, NAME, -close</pre>\n<P>allows the A tag to be used with only the elements "href" and "name", and requires that the tag be closed with a </a>. To further specify what is permitted, a perl regular expression may be ! used alongside a tag element. For example:</P>\n<PRE>A, HREF="^http://", NAME, -close</pre>\n<P>allows the A tag to be used with the same two elements as above, but the "href" element must contain a value which begins with (the ^ indicates the string following must be at the beginning of the string we\'re testing against) http://.</P>\n<P>You may also specify which user groups are permitted to use a specific HTML tag. For example:</P>\n<PRE>IMG, src, alt, height, width, -groups="Superuser Admins Editors"</pre>\n<P>would allow the use of the IMG tag and the listed tag elements for the three groups listed only. Any group name may be used here. The entire list of groups may be inverted, giving all groups <I>except</i> those listed access to the tag with</P>\n<PRE>-group="!Anonymous Restricted"</pre>\n<P>which denies the use of a tag to the Anonymous and Restricted groups but allows it to all others).</P>\nSimilarly, you may specify where a tag may be used. For example:</P! >\n<PRE>IMG, src, alt, height, width, -context="body"</pre>\n<P>would allow the use of the IMG tag to any user group but only in the body (extended copy) of a story. The list may be inverted in the same way as -group. Valid contexts are intro (story\'s intro copy), body (story\'s extended copy), comment (comment body), pref (any HTML-allowed fields in user preferences), and event (any HTML-allowed fields in events).</P>\n<P>Which tags you permit in which locations depends entirely on you and the culture of your site. Some sites will do fine with images allowed to all users in all locations; others will need to restrict images or remove them entirely. Before adding a new tag, consider carefully how it could be used and abused by the members of your site.</P>' WHERE bid='allowed_html'; -- new boxes INSERT INTO box (boxid, title, content, description, template, user_choose) VALUES ('cal_day_select', '', 'my $day = $ARGS[0];\nmy $select;\n\n$select = qq{<OPTION value="00">DD</OPTION>\n};\nforeach (1..31) {\n my $selected = ( $day == $_ ) ? \' SELECTED\' : \'\';\n $select .= qq{<OPTION value="$_"$selected>$_</OPTION>\n};\n}\n\nreturn $select;', 'The options in a selectbox for a day field. Does not include the <SELECT> tags, only the <OPTION> tags.', 'empty_box', '0'); INSERT INTO box (boxid, title, content, description, template, user_choose) VALUES ('cal_month_select', '', 'my $month = $ARGS[0];\nmy $select;\n\n$select = qq{<OPTION value="00">MM</OPTION>\n};\nforeach (1..12) {\n my $selected = ( $month == $_ ) ? \' SELECTED\' : \'\';\n $select .= qq{<OPTION value="$_"$selected>$_</OPTION>\n};\n}\n\nreturn $select;', 'The options in a selectbox for a month field. Does not include the <SELECT> tags, only the <OPTION> tags.', 'empty_box', '0'); INSERT INTO box (boxid, title, content, description, template, user_choose) VALUES ('cal_year_select', '', 'my $year = $ARGS[0];\nmy $select;\n\n$select = qq{<OPTION value="0000">YYYY</OPTION>\n};\nforeach (2004..2014) {\n my $selected = ( $year == $_ ) ? \' SELECTED\' : \'\';\n $select .= qq{<OPTION value="$_"$selected>$_</OPTION>\n};\n}\n\nreturn $select;', 'The options in a selectbox for a year field. Does not include the <SELECT> tags, only the <OPTION> tags.', 'empty_box', '0'); INSERT INTO box (boxid, title, content, description, template, user_choose) VALUES ('calendar_actions', '', 'my ($content, $newevent, $modevents, $edit_cal);\nmy $cal_id = $S->cgi->param(\'calendar\');\n\nif ( $cal_id ) {\n # viewing a particular calendar\n if ($S->have_calendar_perm(\'edit\',$cal_id)) {\n $edit_cal = qq{<A href="%%rootdir%%/editcalendar/settings/$cal_id">Edit this calendar</A>};\n }\n if ($S->have_calendar_perm(\'submit\',$cal_id)) {\n $newevent = qq{<A href="%%rootdir%%/submitevent/submit/$cal_id">Submit new event</A>};\n }\n if ( $S->have_calendar_perm(\'moderate\',$cal_id) ) {\n $modevents = qq{<A href="%%rootdir%%/editcalendar/moderate/$cal_id">Moderate submitted events</A>};\n } \n} else {\n # personal calendar view\n $edit_cal = qq{<A href="%%rootdir%%/editcalendar">Edit your calendar</A>} if $S->var(\'allow_user_calendars\');\n my $cals = $S->_cal_submit_list();\n my $use_submit = 0;\n foreach ( @$cals ) {\n if ( $S->pref("ca! lendar_${_}_subscribe") ) {\n $use_submit = 1;\n next;\n }\n }\n if ( $use_submit ) {\n $newevent = qq{<A href="%%rootdir%%/submitevent/submit">Submit new event</A>};\n }\n}\n\n$content = qq{\n<DIV class="cal_actions">\n$newevent\n$modevents\n$edit_cal\n</DIV>};\n\nreturn $content;\n', 'Links to the various things you can do to/with a calendar', 'empty_box', '0'); INSERT INTO box (boxid, title, content, description, template, user_choose) VALUES ('calendar_selectbox', '', 'my $cals = $S->_cal_submit_list();\nmy $tool = $S->cgi->param(\'tool\') || \'submit\';\nmy $id = $S->cgi->param(\'id\');\nmy ($current,$selected);\n\nif ( $tool eq \'edit\' || $tool eq \'invite\' || ($tool eq \'submit\' && $S->cgi->param(\'newchild\')) ) {\n my $event = $S->get_event($id);\n $current = $S->cgi->param(\'cal_id\') || $event->{cal_id};\n} else {\n $current = $S->cgi->param(\'cal_id\') || $id;\n}\n\nmy $content = qq{\n <SELECT name="cal_id" size="1">\n <OPTION value="">Select a calendar</OPTION>};\nforeach ( @$cals ) {\n my $cal = $S->get_calendar($_);\n $selected = ($current == $cal->{cal_id}) ? \' SELECTED\' : \'\';\n $content .= qq|\n <OPTION value=\"$cal->{cal_id}\"$selected>$cal->{title}</OPTION>|;\n}\n$content .= qq{\n </SELECT>};\nreturn $content;', 'selects the calendar an event is submitted to. Selectbox with all ! of the calendars a use has permission to submit events ', 'empty_box', '0'); INSERT INTO box (boxid, title, content, description, template, user_choose) VALUES ('event', '', 'return if $S->cgi->param(\'op\') eq \'event\';\n\nmy $sid = $ARGS[0];\nmy $q_sid = $S->dbh->quote($sid);\n\nmy ($rv,$sth) = $S->db_select({\n DEBUG => 1,\n WHAT => \'eid\',\n FROM => \'event_story\',\n WHERE => qq{sid = $q_sid}\n});\n\nreturn if ( $rv == 0 );\n\nmy ($eid) = $sth->fetchrow_array();\nmy $event = $S->get_event($eid);\n\nmy $link = $S->{UI}->{BLOCKS}->{story_event_link};\nreturn $S->interpolate($link,$event);', 'displays the link to the event, if the story is associated with an event', 'empty_box', '0'); INSERT INTO box (boxid, title, content, description, template, user_choose) VALUES ('event_calendar_invitations', '', 'my $hook = $ARGS[0];\nmy $uid = $ARGS[1];\nmy $pref = $ARGS[2];\nmy $value = $ARGS[3];\n\nif ( $pref =~ /event_(.*)_invite/ && $value eq \'on\' ) {\n $S->_invite_notify(\'event\',$1,$uid);\n} elsif ( $pref =~ /calendar_(.*)_invite/ && $value eq \'on\' ) {\n $S->_invite_notify(\'calendar\',$1,$uid);\n}\n\n# not either of those, so don\'t do anything', 'handles notification of invitation for calendars and events (tied to pref_change hook)', 'empty_box', '0'); INSERT INTO box (boxid, title, content, description, template, user_choose) VALUES ('event_invitations', 'New Invitations', 'my $content;\n\nmy ($rv,$sth) = $S->db_select({\n WHAT => \'eid\',\n FROM => \'event_watch\',\n WHERE => qq at uid = $S->{UID} AND last_viewed = 0@\n});\n\nwhile ( my ($eid) = $sth->fetchrow_array() ) {\n my $event = $S->get_event($eid);\n $content .= qq@%%dot%% <A href="%%rootdir%%/event/$eid">$event->{title}</A><BR>@;\n}\n\nreturn $content;', 'Shows a list of events to which the user is invited if they haven\'t yet followed the link', 'box', '0'); INSERT INTO box (boxid, title, content, description, template, user_choose) VALUES ('event_notify', 'Event Updates', 'my $content;\nmy ($rv,$sth) = $S->db_select({\n WHAT => \'*\',\n FROM => \'event_watch LEFT JOIN events USING (eid)\',\n WHERE => "uid=$S->{UID} AND subscribed=1"\n});\n\nwhile ( my $item = $sth->fetchrow_hashref() ) {\n next unless ( $item->{last_update} > $item->{last_viewed} );\n my $event = $S->get_event($item->{eid});\n $content .= qq@%%dot%% <A href="%%rootdir%%/event/$item->{eid}">$event->{title}</A><BR>@;\n}\n\nreturn $content;', 'a disappearing/reappearing box that notifies users if an event that they\'ve subscribed to has been changed since they last saw it.', 'box', '0'); INSERT INTO box (boxid, title, content, description, template, user_choose) VALUES ('event_stories', '', 'my $eid = $S->cgi->param(\'eid\');\nmy $event = $S->get_event($eid);\nmy $page;\n\nif ( $event->{is_parent} ) {\n # get the stories for all the child events too\n my @eids = ($eid);\n my ($rv,$sth) = $S->db_select({\n DEBUG => 1,\n WHAT => \'eid\',\n FROM => \'events\',\n WHERE => "parent = $eid"\n });\n while ( my ($e) = $sth->fetchrow_array() ) {\n push @eids, $e;\n }\n my $sql_eids = join(\',\',map {$S->dbh->quote($_)} @eids );\n $page = $S->frontpage_view(\'summaries\', "eid IN ($sql_eids)", \'left join event_story e on s.sid = e.sid\');\n} else {\n # get only the stories for this one event\n $page = $S->frontpage_view(\'summaries\', "eid = $eid", \'left join event_story e on s.sid = e.sid\');\n}\n\nreturn $page;', 'displays the formatted stories attached to this event', 'empty_box', '0'); INSERT INTO box (boxid, title, content, description, template, user_choose) VALUES ('mini_calendar', 'Events', 'return unless $S->var(\'use_calendars\');\n\nmy @today = $S->time_localize_array(Date::Calc::Today_and_Now(),1);\nmy $keys;\nmy $cal = $S->{UI}->{BLOCKS}->{calendar_body_monthly_mini};\nmy ($cal_ids,$view_cals);\nmy ($day_link,$day_link_end);\n\nif ( $S->var(\'allow_personal_calendar_view\') ) {\n $cal_ids = $S->_personal_calendar_list($S->{UID});\n}\nif ( !$cal_ids ) {\n $cal_ids->[0] = $S->var(\'default_calendar_id\');\n}\n$view_cals = $S->_calendar_can_view($cal_ids);\nreturn unless $view_cals;\n\n$S->_get_months_events($today[0],$today[1],$view_cals);\n\n# properly blank out the structure, so unused \n# calendar squares don\'t collapse\nforeach my $a (1..7) {\n foreach my $b (1..5) {\n $keys->{"wk${b}_d$a"} = \'<TD> </TD>\';\n }\n}\n\n# fill in the basic keys\n$keys->{month} = Date::Calc::Month_to_Text($today[1]);\n$keys->{year} = $today[0];\n\n# no! w the keys for each day\nmy $i = 0;\nmy @date = @today;\nmy ($dow,$wom);\nwhile ( $i++ < Date::Calc::Days_in_Month($today[0],$today[1]) ) {\n $dow = Date::Calc::Day_of_Week($today[0],$today[1],$i);\n $wom = int(($i + Date::Calc::Day_of_Week($today[0],$today[1],1) - 2) /7)+1;\n my $hilight = ($i == $today[2]) ? \' id="today"\' : \'\';\n $date[2] = $i;\n\n my $eventlist = $S->_get_days_events(@date[0,1,2],$view_cals) if $view_cals;\n if ( $eventlist ) {\n $day_link_end = \'</A>\';\n if ( @$eventlist > 1 ) {\n $day_link = qq{<A href="%%rootdir%%/calendar/daily/0/$date[0]-$date[1]-$date[2]">};\n } else {\n $day_link = qq{<A href="%%rootdir%%/event/$eventlist->[0]">};\n }\n } else {\n $day_link = \'\';\n $day_link_end = \'\';\n }\n\n $keys->{"wk${wom}_d$dow"} = qq{<TD$hilight>$day_link$i$day_link_end</TD>};\n}\n\nreturn $S->interpolate($cal,$keys);', '', 'box', ''); INSERT INTO box (boxid, title, content, description, template, user_choose) VALUES ('num_results', '', 'my $num = $S->cgi->param(\'count\') || 30;\nmy $out;\n$out = qq{\n <SELECT name="count" size="1">};\n\nforeach ( (10,20,30,50) ) {\n my $selected = ( $_ == $num ) ? \' SELECTED\' : \'\';\n $out .= qq{\n <OPTION value="$_"$selected>$_</OPTION>};\n}\n$out .= qq{\n </SELECT>};\n\nreturn $out;', 'number of results for search form', 'empty_box', ''); INSERT INTO box (boxid, title, content, description, template, user_choose) VALUES ('calendar_datenav', '', 'my $content = \'\';\nmy $view = $S->cgi->param(\'view\') || $S->pref(\'calendar_view\');\nmy @date = $S->_get_date_array($S->cgi->param(\'date\'));\nmy $nav_items = $S->_calendar_date_navigation($view, at date);\n\nmy $prefix = \'<< \';\nmy $suffix = \'\';\n\nforeach my $item (@$nav_items) {\n my $keys = {}; # keys for interpolation\n my $string = $S->{UI}->{BLOCKS}->{calendar_navigation_item};\n $keys->{link_url} = $item->{link_url};\n\n #link text\n my $text;\n if ( $view eq \'monthly\' ) {\n $text = Date::Calc::Month_to_Text($item->{date_array}->[1]) . " " . $date[0];\n } else {\n $text = Date::Calc::Date_to_Text(@{$item->{date_array}});\n }\n $keys->{nav_link} = "$prefix$text$suffix";\n\n if ($item->{current}) {\n $keys->{css_id} = $S->{UI}->{BLOCKS}->{calendar_navigation_hilight};\n $keys->{nav_link} = $text;\n $prefix = \'\';\n $su! ffix = \' >>\';\n }\n $content .= $S->interpolate($string,$keys);\n}\n', 'The navigation bar for the three calendar views.', 'empty_box', '0'); INSERT INTO box VALUES ('hotlist_box_new','Your Hotlist','return unless ($S->{HOTLIST} && $#{$S->{HOTLIST}} >= 0);\n\nmy $box_content;\nmy $sids;\nmy $stories = $S->story_data($S->{HOTLIST});\nmy $show = $S->var(\'show_new_comments\');\nforeach my $story (@$stories) {\n my $num_new = $story->{comments} - $story->{lastseen} if ($show eq \"hotlist\" || $show eq \"all\");\n my $end_s = ($story->{comments} == 1) ? \'\' : \'s\';\n $box_content .= qq~%%dot%% <A CLASS=\"light\" HREF=\"%%rootdir%%/story/$story->{sid}\">$story->{title}</a> ($story->{comments} comment$end_s~;\n $box_content .= \", $num_new new\" if defined($num_new);\n $box_content .= \")<BR>\";\n}\n\nreturn unless $box_content;\nmy $title = \"$S->{NICK}\'s Hotlist\";\nreturn {title => $title, content => $box_content};\n','Replacement hotlist box for new story fetching code','box',0); INSERT INTO box VALUES ('olderlist_box_new','Front Page','my $section = $S->{CGI}->param(\'section\') || \'front\';\nmy $stories = [];\nmy $params;\n$params->{limit} = $S->pref(\'maxtitles\');\n$params->{offset} = $S->pref(\'maxstories\');\n\nif ($section eq \'front\') {\n $params->{displaystatus} = 0;\n} else {\n $params->{displaystatus} = [0,1];\n $params->{section} = $section;\n}\nmy $sids = $S->get_sids($params);\n$stories = $S->story_data($sids);\n\nreturn unless $stories;\n\nmy $box_content;\n\nmy $date = undef;\nforeach my $story (@{$stories}) {\n if (($story->{wmdtime} ne $date) || !$date) {\n $date = $story->{wmdtime};\n $box_content .= qq|\n <B>$story->{wmdtime}</B>|;\n }\n $box_content .= qq|\n <BR>%%dot%% <A CLASS=\"light\" HREF=\"%%rootdir%%/story/$story->{sid}\">$story->{title}</A> ($story->{comments} comments)|;\n \nif ($S->have_perm(\'story_list\')) {\n $box_content .= qq| [<A CLASS=\"light\" HREF=\"%! %rootdir%%/admin/story/$story->{sid}\">edit</A>]|;\n }\n}\n\nmy $offset = $S->{UI}->{VARS}->{maxstories} + length(@$stories) if $stories;\n\nmy $search_url = qq{%%rootdir%%/?op=search;offset=$offset};\n$search_url .= \';section=\'.$section if ($section ne \'front\');\n\n$box_content .= qq|\n <P>\n <A CLASS=\"light\" HREF=\"$search_url\">Older Stories...</A>\n </P>|;\nmy $return = {content => \"%%smallfont%%$box_content%%smallfont_end%%\"};\nif ($section ne \'front\' && $section ne \'__all__\') {\n $return->{title} = $S->{SECTION_DATA}->{$section}->{title};\n} elsif ($section eq \'__all__\') {\n $return->{title} = \'All Stories\';\n}\n\nreturn $return;','Replacement older list box for new story fetching code','box',0); -- User preference INSERT INTO pref_items (prefname,title,description,visible,html,perm_view,perm_edit,var,req_tu,default_value,length,regex,page,field,display_order,template,display_fmt,enabled,signup) VALUES ('calendar_view','Default calendar view','When first loading a calendar, if the view is not explicitly set, this view will be used.','0','0','','','use_calendars','0','monthly','','(daily|weekly|monthly)','Interface','%%BOX,pref_selectbox,calendar_view,%%value%%,daily,weekly,monthly%%','9','selectbox_pref','','1','normal');