Update of /cvsroot/phpicalendar/phpicalendar/functions
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12793/functions
Modified Files:
template.php
Log Message:
Subscribe and Download links work on all templates.
Index: template.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/functions/template.php,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** template.php 15 May 2004 02:42:15 -0000 1.36
--- template.php 15 May 2004 23:56:19 -0000 1.37
***************
*** 5,8 ****
--- 5,20 ----
class Page {
var $page;
+ function draw_subscribe($template_p) {
+ global $template, $getdate, $cal, $ALL_CALENDARS_COMBINED, $subscribe_path, $download_filename;
+ preg_match("!<\!-- switch display_download on -->(.*)<\!-- switch display_download off -->!is", $this->page, $match1);
+ $subscribe = trim($match2[1]);
+ if ($cal != $ALL_CALENDARS_COMBINED && $subscribe_path != '' && $download_filename != '') {
+ $this->page = str_replace('{SUBSCRIBE_PATH}', $subscribe_path, $this->page);
+ $this->page = str_replace('{DOWNLOAD_FILENAME}', $download_filename, $this->page);
+ } else {
+ $this->page = preg_replace('!<\!-- switch display_download on -->(.*)<\!-- switch display_download off -->!is', '', $this->page);
+ }
+ }
+
function draw_print($template_p) {
global $template, $getdate, $cal, $master_array, $daysofweek_lang, $week_start_day;
|