aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Little <clittle@users.sourceforge.net>2004-02-09 00:51:48 +0000
committerChad Little <clittle@users.sourceforge.net>2004-02-09 00:51:48 +0000
commitcb7f301d3a39acebecd56fa8d831e275bc8980f0 (patch)
tree59928251987369663bd4de215a63d4bcc23e9809
parentaba3742b77e18aa1001a70a8a87f4a10ccf0531f (diff)
downloadphpicalendar-cb7f301d3a39acebecd56fa8d831e275bc8980f0.tar.gz
phpicalendar-cb7f301d3a39acebecd56fa8d831e275bc8980f0.tar.bz2
phpicalendar-cb7f301d3a39acebecd56fa8d831e275bc8980f0.zip
Initial wiring of rss index and template.
-rw-r--r--admin.php1
-rw-r--r--day.php1
-rw-r--r--languages/english.inc.php19
-rw-r--r--month.php1
-rw-r--r--preferences.php1
-rw-r--r--print.php1
-rw-r--r--rss/index.php137
-rw-r--r--search.php1
-rw-r--r--templates/default/header.tpl2
-rw-r--r--templates/default/rss_index.tpl60
-rw-r--r--week.php1
-rw-r--r--year.php4
12 files changed, 132 insertions, 97 deletions
diff --git a/admin.php b/admin.php
index 1faad28..ae07f18 100644
--- a/admin.php
+++ b/admin.php
@@ -51,6 +51,7 @@ $page->replace_tags(array(
'footer' => BASE.'templates/'.$template.'/footer.tpl',
'sidebar' => BASE.'templates/'.$template.'/sidebar.tpl',
'event_js' => BASE.'functions/event.js',
+ 'default_path' => '',
'template' => $template,
'cal' => $cal,
'getdate' => $getdate,
diff --git a/day.php b/day.php
index 31e1d1c..bfa8d4b 100644
--- a/day.php
+++ b/day.php
@@ -40,6 +40,7 @@ $page->replace_tags(array(
'footer' => BASE.'templates/'.$template.'/footer.tpl',
'sidebar' => BASE.'templates/'.$template.'/sidebar.tpl',
'event_js' => BASE.'functions/event.js',
+ 'default_path' => '',
'template' => $template,
'cal' => $cal,
'getdate' => $getdate,
diff --git a/languages/english.inc.php b/languages/english.inc.php
index 6a41ce3..7db4f98 100644
--- a/languages/english.inc.php
+++ b/languages/english.inc.php
@@ -113,21 +113,24 @@ $lang['l_delete_success'] = 'was deleted successfully.';
$lang['l_action_success'] = 'Your action was successful.';
$lang['l_submit'] = 'Submit';
$lang['l_delete'] = 'Delete';
-$all_cal_comb_lang = 'All calendars combined';
+$all_cal_comb_lang = 'All Combined';
// New for 2.0
$lang['l_legend'] = 'Legend';
$lang['l_admin_subhead'] = 'Manage your calendars from this page';
$lang['l_prefs_subhead'] = 'Sets a cookie for visiting this site';
+$lang['l_rss_info'] = 'RSS Information';
+$lang['l_rss_subhead'] = 'Basic RSS feeds available for each calendar';
+$lang['l_rss_notenabled'] = 'RSS is not enabled on this site';
// - navigation
-$back_lang = 'Back';
-$next_lang = 'Next';
-$prev_lang = 'Prev';
-$day_view_lang = 'Day View';
-$week_view_lang = 'Week View';
-$month_view_lang = 'Month View';
-$year_view_lang = 'Year View';
+$lang['l_back'] = 'Back';
+$lang['l_next'] = 'Next';
+$lang['l_prev'] = 'Prev';
+$lang['l_day_view'] = 'Day View';
+$lang['l_week_view'] = 'Week View';
+$lang['l_month_view'] = 'Month View';
+$lang['l_year_view'] = 'Year View';
// ---------------------------------
diff --git a/month.php b/month.php
index c04781d..017b5a1 100644
--- a/month.php
+++ b/month.php
@@ -60,6 +60,7 @@ $page->replace_tags(array(
'calendar_name' => $calendar_name,
'display_date' => $display_date,
'rss_powered' => $rss_powered,
+ 'default_path' => '',
'rss_available' => '',
'rss_valid' => '',
'todo_js' => '',
diff --git a/preferences.php b/preferences.php
index cb5254c..aed1b9b 100644
--- a/preferences.php
+++ b/preferences.php
@@ -136,6 +136,7 @@ $page->replace_tags(array(
'header' => BASE.'templates/'.$template.'/header.tpl',
'footer' => BASE.'templates/'.$template.'/footer.tpl',
'template' => $template,
+ 'default_path' => '',
'cal' => $cal,
'getdate' => $getdate,
'calendar_name' => $calendar_name,
diff --git a/print.php b/print.php
index f08c89e..16124bb 100644
--- a/print.php
+++ b/print.php
@@ -56,6 +56,7 @@ $page->replace_tags(array(
'footer' => BASE.'templates/'.$template.'/footer.tpl',
'sidebar' => BASE.'templates/'.$template.'/sidebar.tpl',
'event_js' => BASE.'functions/event.js',
+ 'default_path' => '',
'template' => $template,
'cal' => $cal,
'getdate' => $getdate,
diff --git a/rss/index.php b/rss/index.php
index 3163702..fca8327 100644
--- a/rss/index.php
+++ b/rss/index.php
@@ -1,93 +1,56 @@
<?php
define('BASE','../');
-include(BASE.'functions/ical_parser.php');
-include_once(BASE.'functions/calendar_functions.php');
+require_once(BASE.'functions/ical_parser.php');
+require_once(BASE.'functions/calendar_functions.php');
+
$default_path = 'http://'.$HTTP_SERVER_VARS['SERVER_NAME'].substr($HTTP_SERVER_VARS['PHP_SELF'],0,strpos($HTTP_SERVER_VARS['PHP_SELF'], '/rss/'));
-if (isset($HTTP_SERVER_VARS['HTTP_REFERER']) && $HTTP_SERVER_VARS['HTTP_REFERER'] != '') {
- $back_page = $HTTP_SERVER_VARS['HTTP_REFERER'];
-} else {
- $back_page = BASE.$default_view.'.php?cal='.$cal.'&amp;getdate='.$getdate;
-}
+
$current_view = "rssindex";
$display_date = "$calendar_lang - RSS Info";
-include (BASE.'includes/header.inc.php'); ?>
-<center>
-<table border="0" width="700" cellspacing="0" cellpadding="0">
- <tr>
- <td width="520" valign="top" align="center">
- <table width="640" border="0" cellspacing="0" cellpadding="0" class="calborder">
- <tr>
- <td align="center" valign="middle">
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td align="left" width="120" class="navback"><?php echo '<a href="'.$back_page.'"><img src="'.BASE.'styles/'.$style_sheet.'/back.gif" alt=" " border="0" align="left"></a>'; ?></td>
- <td class="navback">
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td align="center" class="navback" nowrap valign="middle"><font class="H20"><?php echo 'RSS Information'; ?></font></td>
- </tr>
- </table>
- </td>
- <td align="right" width="120" class="navback">
- <table width="120" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><?php echo '<a class="psf" href="'.BASE.'day.php?cal='.$cal.'&amp;getdate='.$getdate.'"><img src="'.BASE.'styles/'.$style_sheet.'/day_on.gif" alt=" " border="0"></td>'; ?>
- <td><?php echo '<a class="psf" href="'.BASE.'week.php?cal='.$cal.'&amp;getdate='.$getdate.'"><img src="'.BASE.'styles/'.$style_sheet.'/week_on.gif" alt=" " border="0"></td>'; ?>
- <td><?php echo '<a class="psf" href="'.BASE.'month.php?cal='.$cal.'&amp;getdate='.$getdate.'"><img src="'.BASE.'styles/'.$style_sheet.'/month_on.gif" alt=" " border="0"></td>'; ?>
- <td><?php echo '<a class="psf" href="'.BASE.'year.php?cal='.$cal.'&amp;getdate='.$getdate.'"><img src="'.BASE.'styles/'.$style_sheet.'/year_on.gif" alt=" " border="0"></td>'; ?>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td class="dayborder"><img src="../images/spacer.gif" width="1" height="5" alt=" "></td>
- </tr>
- <?php if ($enable_rss == "yes") { ?>
- <tr>
- <td>
- <table width="100%" border="0" cellspacing="0" cellpadding="0" class="G10B">
- <tr>
- <td width="2%"></td>
- <td width="98%" valign="top" align="left">
- <br>
- <?php echo "$this_site_is_lang "; ?><a class="psf" href="http://www.oreillynet.com/rss/">RSS 0.91 enabled</a>.<br>
- <br>
- <?php
-
- // build the <option> tags
- $filelist = availableCalendarNames($username, $password, $ALL_CALENDARS_COMBINED);
- foreach ($filelist as $file) {
- // $cal_filename is the filename of the calendar without .ics
- // $cal is a urlencoded version of $cal_filename
- // $cal_displayname is $cal_filename with occurrences of "32" replaced with " "
- $cal_filename_tmp = substr($file,0,-4);
- $cal_tmp = urlencode($cal_filename_tmp);
- $cal_displayname_tmp = str_replace("32", " ", $cal_filename_tmp);
- echo '<font class="V12" color="blue"><b>'.$cal_displayname_tmp.' '. $calendar_lang.'</b></font><br>';
- echo $default_path.'/rss/rss.php?cal='.$cal_tmp.'&rssview=day<br>';
- echo $default_path.'/rss/rss.php?cal='.$cal_tmp.'&rssview=week<br>';
- echo $default_path.'/rss/rss.php?cal='.$cal_tmp.'&rssview=month<br>';
- $footer_check = $default_path.'/rss/rss.php?cal='.$default_cal.'&rssview='.$default_view;
- echo '<br><br>';
- }
- ?>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <?php } else { ?>
- <tr>
- <td align="center" class="navback" nowrap valign="middle"><font class="H20">RSS is not enabled on this site.</font></td>
- </tr>
- <?php } ?>
- </table>
- </td>
- </tr>
-</table>
-</center>
-<?php include (BASE.'includes/footer.inc.php'); ?>
+
+$filelist = availableCalendarNames($username, $password, $ALL_CALENDARS_COMBINED);
+foreach ($filelist as $file) {
+ // $cal_filename is the filename of the calendar without .ics
+ // $cal is a urlencoded version of $cal_filename
+ // $cal_displayname is $cal_filename with occurrences of "32" replaced with " "
+ $cal_filename_tmp = substr($file,0,-4);
+ $cal_tmp = urlencode($cal_filename_tmp);
+ $cal_displayname_tmp = str_replace("32", " ", $cal_filename_tmp);
+ $rss_list = '<font class="V12" color="blue"><b>'.$cal_displayname_tmp.' '. $calendar_lang.'</b></font><br>';
+ $rss_list .= $default_path.'/rss/rss.php?cal='.$cal_tmp.'&rssview=day<br>';
+ $rss_list .= $default_path.'/rss/rss.php?cal='.$cal_tmp.'&rssview=week<br>';
+ $rss_list .= $default_path.'/rss/rss.php?cal='.$cal_tmp.'&rssview=month<br>';
+ $footer_check = $default_path.'/rss/rss.php?cal='.$default_cal.'&rssview='.$default_view;
+}
+
+
+$page = new Page(BASE.'templates/'.$template.'/rss_index.tpl');
+
+$page->replace_tags(array(
+ 'header' => BASE.'templates/'.$template.'/header.tpl',
+ 'footer' => BASE.'templates/'.$template.'/footer.tpl',
+ 'sidebar' => BASE.'templates/'.$template.'/sidebar.tpl',
+ 'event_js' => BASE.'functions/event.js',
+ 'default_path' => $default_path,
+ 'template' => $template,
+ 'cal' => $cal,
+ 'getdate' => $getdate,
+ 'calendar_name' => $calendar_name,
+ 'display_date' => $display_date,
+ 'current_view' => $current_view,
+ 'sidebar_date' => $sidebar_date,
+ 'rss_powered' => $rss_powered,
+ 'rss_list' => $rss_list,
+ 'rss_available' => '',
+ 'rssdisable' => '',
+ 'rss_valid' => '',
+ 'todo_js' => '',
+ 'show_search' => ''
+ ));
+
+$page->output();
+
+
+?>
+ \ No newline at end of file
diff --git a/search.php b/search.php
index 89d4f1b..69dbf58 100644
--- a/search.php
+++ b/search.php
@@ -276,6 +276,7 @@ $page->replace_tags(array(
'footer' => BASE.'templates/'.$template.'/footer.tpl',
'sidebar' => BASE.'templates/'.$template.'/sidebar.tpl',
'event_js' => BASE.'functions/event.js',
+ 'default_path' => '',
'template' => $template,
'cal' => $cal,
'getdate' => $getdate,
diff --git a/templates/default/header.tpl b/templates/default/header.tpl
index 9ecc5fc..fefa494 100644
--- a/templates/default/header.tpl
+++ b/templates/default/header.tpl
@@ -4,7 +4,7 @@
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
<title>{CALENDAR_NAME} - {DISPLAY_DATE}</title>
- <link rel="stylesheet" type="text/css" href="templates/{TEMPLATE}/default.css">
+ <link rel="stylesheet" type="text/css" href="{DEFAULT_PATH}templates/{TEMPLATE}/default.css">
<!-- switch rss_available on -->
<link rel="alternate" type="application/rss+xml" title="RSS" href="{DEFAULT_VIEW}/rss/rss.php?cal={CAL}&amp;rssview={CURRENT_VIEW}">
<!-- switch rss_available off -->
diff --git a/templates/default/rss_index.tpl b/templates/default/rss_index.tpl
new file mode 100644
index 0000000..25df995
--- /dev/null
+++ b/templates/default/rss_index.tpl
@@ -0,0 +1,60 @@
+{HEADER}
+<center>
+<table border="0" width="520" cellspacing="0" cellpadding="0">
+ <tr>
+ <td width="520" valign="top" align="center">
+ <table width="100%" border="0" cellspacing="0" cellpadding="0" class="calborder">
+ <tr>
+ <td align="center" valign="middle">
+ <table width="100%" border="0" cellspacing="0" cellpadding="0">
+ <tr valign="top">
+ <td align="left" width="400" class="navback"><div style="padding: 5px;"><span class="H20">{L_RSS_INFO}</span><br /><span class="V9G">{L_RSS_SUBHEAD}</span></div></td>
+ <td valign="top" align="right" width="120" class="navback">
+ <div style="padding-top: 3px;">
+ <table width="120" border="0" cellpadding="0" cellspacing="0">
+ <tr valign="top">
+ <td><a class="psf" href="../day.php?cal={CAL}&amp;getdate={GETDATE}"><img src="../templates/{TEMPLATE}/images/day_on.gif" alt="{L_DAY}" border="0" /></a></td>
+ <td><a class="psf" href="../week.php?cal={CAL}&amp;getdate={GETDATE}"><img src="../templates/{TEMPLATE}/images/week_on.gif" alt="{L_WEEK}" border="0" /></a></td>
+ <td><a class="psf" href="../month.php?cal={CAL}&amp;getdate={GETDATE}"><img src="../templates/{TEMPLATE}/images/month_on.gif" alt="{L_MONTH}" border="0" /></a></td>
+ <td><a class="psf" href="../year.php?cal={CAL}&amp;getdate={GETDATE}"><img src="../templates/{TEMPLATE}/images/year_on.gif" alt="{L_YEAR}" border="0" /></a></td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td class="dayborder"><img src="../images/spacer.gif" width="1" height="5" alt=" "></td>
+ </tr>
+ <tr>
+ <td>
+ <table width="100%" border="0" cellspacing="0" cellpadding="0" class="G10B">
+ <tr>
+ <td width="2%"></td>
+ <td width="98%" valign="top" align="left">
+ <br />
+ {L_THIS_SITE_IS} <a class="psf" href="http://www.oreillynet.com/rss/">RSS 0.91 enabled</a>.<br>
+ <br />
+ {RSS_LIST}
+ <br />
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<table width="520" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="tbll"><img src="../images/spacer.gif" alt="" width="8" height="4" /></td>
+ <td class="tblbot"><img src="../images/spacer.gif" alt="" width="8" height="4" /></td>
+ <td class="tblr"><img src="../images/spacer.gif" alt="" width="8" height="4" /></td>
+ </tr>
+</table>
+</center>
+
+{FOOTER} \ No newline at end of file
diff --git a/week.php b/week.php
index a9c42f9..1bf410d 100644
--- a/week.php
+++ b/week.php
@@ -43,6 +43,7 @@ $page->replace_tags(array(
'footer' => BASE.'templates/'.$template.'/footer.tpl',
'sidebar' => BASE.'templates/'.$template.'/sidebar.tpl',
'event_js' => BASE.'functions/event.js',
+ 'default_path' => '',
'template' => $template,
'cal' => $cal,
'getdate' => $getdate,
diff --git a/year.php b/year.php
index e1bf66d..1c5ed2c 100644
--- a/year.php
+++ b/year.php
@@ -1,7 +1,7 @@
<?php
define('BASE', './');
-include_once(BASE.'functions/ical_parser.php');
+require_once(BASE.'functions/ical_parser.php');
require_once(BASE.'functions/template.php');
$current_view = 'year';
@@ -20,10 +20,12 @@ $page->replace_tags(array(
'header' => BASE.'templates/'.$template.'/header.tpl',
'footer' => BASE.'templates/'.$template.'/footer.tpl',
'template' => $template,
+ 'default_path' => '',
'cal' => $cal,
'getdate' => $getdate,
'calendar_name' => $calendar_name,
'display_date' => $this_year,
+ 'default_path' => '',
'rss_powered' => $rss_powered,
'rss_available' => '',
'rss_valid' => '',

© 2014-2024 Faster IT GmbH | imprint | privacy policy