diff options
author | Chad Little <clittle@users.sourceforge.net> | 2004-01-28 07:27:23 +0000 |
---|---|---|
committer | Chad Little <clittle@users.sourceforge.net> | 2004-01-28 07:27:23 +0000 |
commit | c5e73fa883662edaeef6da6a308f6631b6f0eca5 (patch) | |
tree | 42d148f0935a961f8bcc02514c0f04f946dfc5ea /functions | |
parent | 603060dd7b43d47ac4637fee17b818cba6dff3c8 (diff) | |
download | phpicalendar-c5e73fa883662edaeef6da6a308f6631b6f0eca5.tar.gz phpicalendar-c5e73fa883662edaeef6da6a308f6631b6f0eca5.tar.bz2 phpicalendar-c5e73fa883662edaeef6da6a308f6631b6f0eca5.zip |
Major checkin, modified english to new language style. Preferences now
template driven along with event and todo. Header and footer seem to work
as well.
Diffstat (limited to 'functions')
-rw-r--r-- | functions/calendar_functions.php | 10 | ||||
-rw-r--r-- | functions/init.inc.php | 3 | ||||
-rw-r--r-- | functions/template.php | 8 |
3 files changed, 16 insertions, 5 deletions
diff --git a/functions/calendar_functions.php b/functions/calendar_functions.php index 56b0fa2..1602f2f 100644 --- a/functions/calendar_functions.php +++ b/functions/calendar_functions.php @@ -179,16 +179,18 @@ function display_ical_list($cals) { // trying to figure out if this is the selected calendar. $cal_httpPrefix_tmp = str_replace('webcal://', 'http://', $cal_tmp); if ($cal_httpPrefix_tmp == urldecode($cal)) { - print "<option value=\"$current_view.php?cal=$cal_encoded_tmp&getdate=$getdate\" selected>$cal_displayname_tmp</option>"; + $return .= "<option value=\"$current_view.php?cal=$cal_encoded_tmp&getdate=$getdate\" selected>$cal_displayname_tmp</option>"; } else { - print "<option value=\"$current_view.php?cal=$cal_encoded_tmp&getdate=$getdate\">$cal_displayname_tmp</option>"; + $return .= "<option value=\"$current_view.php?cal=$cal_encoded_tmp&getdate=$getdate\">$cal_displayname_tmp</option>"; } } // option to open all (non-web) calenders together if ($cal == $ALL_CALENDARS_COMBINED) { - print "<option value=\"$current_view.php?cal=$ALL_CALENDARS_COMBINED&getdate=$getdate\" selected>$all_cal_comb_lang</option>"; + $return .= "<option value=\"$current_view.php?cal=$ALL_CALENDARS_COMBINED&getdate=$getdate\" selected>$all_cal_comb_lang</option>"; } else { - print "<option value=\"$current_view.php?cal=$ALL_CALENDARS_COMBINED&getdate=$getdate\">$all_cal_comb_lang</option>"; + $return .= "<option value=\"$current_view.php?cal=$ALL_CALENDARS_COMBINED&getdate=$getdate\">$all_cal_comb_lang</option>"; } + + return $return; }
\ No newline at end of file diff --git a/functions/init.inc.php b/functions/init.inc.php index d2b2d90..e6ba8e2 100644 --- a/functions/init.inc.php +++ b/functions/init.inc.php @@ -176,4 +176,7 @@ if ($is_webcal) { } } } + +$rss_powered = ($enable_rss == 'yes') ? 'yes' : ''; + ?> diff --git a/functions/template.php b/functions/template.php index ebecf7a..68f4b81 100644 --- a/functions/template.php +++ b/functions/template.php @@ -35,7 +35,13 @@ class Page { else die('No tags designated for replacement.'); } - + + function replace_langs($langs = array()) { + foreach ($langs as $tag => $data) { + $this->page = eregi_replace('{' . $tag . '}', $data, $this->page); + } + } + function output() { print($this->page); } |