[Php-blog-plugin-cvs] additional_plugins/serendipity_event_cal ChangeLog, 1.3, 1.4 README, 1.7, 1.8
A reliable, secure & extensible PHP blog | Not mainstream since 2002
Brought to you by:
garvinhicking,
jhermanns
Update of /cvsroot/php-blog/additional_plugins/serendipity_event_cal In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv22690 Modified Files: ChangeLog README plugin_eventcal_add.tpl plugin_eventcal_cal.tpl serendipity_event_cal.php style_eventcal_backend.css Log Message: upstream patch Index: serendipity_event_cal.php =================================================================== RCS file: /cvsroot/php-blog/additional_plugins/serendipity_event_cal/serendipity_event_cal.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- serendipity_event_cal.php 30 Apr 2010 08:22:24 -0000 1.7 +++ serendipity_event_cal.php 19 Jan 2011 19:00:36 -0000 1.8 @@ -1,4 +1,4 @@ -<?php # $Id: serendipity_event_cal.php, v.1.62 2010-04-29 19:31 +<?php # $Id: serendipity_event_cal.php, v.1.63 2011-01-19 10:48 ##error_reporting(E_ALL); @@ -24,6 +24,10 @@ $serendipity['eventcal']['pluginpath'] = basename(rtrim($pluginpath['dirname'], '/')) . '/serendipity_event_cal/'; } +if (!is_object($serendipity['smarty'])) { + serendipity_smarty_init(); // if not set to avoid member function assign() on a non-object error, start Smarty templating +} + /* allow browser popup if you use these two S9Y global serendipity['smarty']->debugging functions */ ##$serendipity['smarty']->debugging = true; ##$serendipity['smarty']->debugging_ctrl = true; @@ -39,7 +43,7 @@ function cleanup() { // Cleanup. Remove all empty configs on SAVECONF-Submit. - serendipity_plugin_api::remove_plugin_value($this->instance, array('title', 'description')); + serendipity_plugin_api::remove_plugin_value($this->instance, array('version', '')); return true; } @@ -62,7 +66,6 @@ 'css_backend' => true ) ); - $propbag->add('groups', array('BACKEND_FEATURES')); $propbag->add('configuration', array( 'permalink', 'pagetitle', @@ -77,8 +80,8 @@ ) ); $propbag->add('author', 'ian (Timbalu)'); - $propbag->add('version', '1.62'); - $propbag->add('groups', array('FRONTEND_FEATURES')); + $propbag->add('version', '1.63'); + $propbag->add('groups', array('FRONTEND_FEATURES', 'BACKEND_FEATURES')); $propbag->add('requirements', array( 'serendipity' => '1.4', 'smarty' => '2.6.7', @@ -367,6 +370,13 @@ } } + /* use permalink generally instead of subpage - return permalink or subpage value */ + function fetchPluginUri() { + global $serendipity; + return ($serendipity['rewrite'] != 'errordocs') ? $this->get_config('permalink') : $serendipity['serendipityHTTPPath'] . $serendipity['indexFile'] . '?serendipity[subpage]=' . $this->get_config('pagetitle'); + } + + /* get the right template path - as default in template folder or the fallback plugin folder */ function fetchTemplatePath($filename) { global $serendipity; @@ -376,7 +386,9 @@ } $inclusion = $serendipity['smarty']->security_settings[@INCLUDE_ANY]; $serendipity['smarty']->security_settings[@INCLUDE_ANY] = true; + // make this fetch() method smarty3 compat in future and add parameter 4 $content = $serendipity['smarty']->fetch('file:'. $tfile, null, null, false); + #$content = $serendipity['smarty']->fetch('file:'. $tfile, null, null, null, false); $serendipity['smarty']->security_settings[@INCLUDE_ANY] = $inclusion; return $content; } @@ -1007,7 +1019,7 @@ list($y,$m) = explode('-',$monthdate); $getid = ( isset($id) && $id > 0 ) ? '&calendar[ev]='.$id : ''; // frontend request - uri to frontend - $entryURI = 'http://' . $_SERVER['HTTP_HOST'] . $this->get_config('permalink') . (($serendipity['rewrite'] != 'none') ? '?' : '&') . 'calendar[cm]='.$m.'&calendar[cy]='.$y . $getid; + $entryURI = 'http://' . $_SERVER['HTTP_HOST'] . $this->fetchPluginUri() . (($serendipity['rewrite'] == 'rewrite') ? '?' : '&') . 'calendar[cm]='.$m.'&calendar[cy]='.$y . $getid; } else { // admin panel request - uri to ical backend $entryURI = 'http://' . $_SERVER['HTTP_HOST'] . $serendipity['serendipityHTTPPath'] . 'serendipity_admin.php?serendipity[adminModule]=event_display&serendipity[adminAction]=eventcal&serendipity[eventcalcategory]=adevplad&serendipity[eventcaldbclean]=dbicalall'; @@ -1027,7 +1039,7 @@ $filepath = 'templates_c/eventcal/'; $directory = "eventcal"; if (!is_dir('templates_c/' . $directory)) { - mkdir('templates_c/' . $directory, 0777); + @mkdir('templates_c/' . $directory, 0777); } if( false === ( $wicl = $this->backend_file_write($logstring, $fullpath, $filename, $filepath, 'a') ) ) $nolog = true; @@ -1078,10 +1090,6 @@ $message .= "Here is your requested iCal file / Used for Eventcal Description\n\n"; $message .= "--$mime_boundary\n\n"; - #$message .= "--$mime_boundary\n"; - #$message .= "\n--\n brought to you by S9y.org serendipity_event_cal plugin v." . $serendipity['plugin_eventcal_version'] . "\n\n"; - #$message .= "--$mime_boundary\n\n"; - $message .= "--$mime_boundary\n"; $message .= "Content-Type: text/calendar; name=\"icalendar.ics\"; method=REQUEST; charset=UTF-8\n"; $message .= "Content-Transfer-Encoding: 8bit\n\n"; @@ -1250,7 +1258,7 @@ $tzoffsetto = "+0200"; //$serendipity['serverOffsetHours'] ? $serendipity['serverOffsetHours'] : "+0200"; $tzname = date("T"); - if (!is_object(isset($serendipity['smarty']))) { + if (!is_object($serendipity['smarty'])) { serendipity_smarty_init(); // if not set to avoid member function assign() on a non-object error, start Smarty templating } @@ -1343,7 +1351,7 @@ array( 'plugin_eventcal_cal_preface' => $this->get_config('showintro'), 'plugin_eventcal_cal_admin' => sprintf(PLUGIN_EVENTCAL_HALLO_ADMIN, $serendipity['serendipityUser'], $serendipity['permissionLevels'][$serendipity['serendipityUserlevel']]), - 'plugin_eventcal_cal_path' => $this->get_config('permalink'), + 'plugin_eventcal_cal_path' => $this->fetchPluginUri(), 'plugin_eventcal_cal_imgpath' => $serendipity['serendipityHTTPPath'] . $serendipity['eventcal']['pluginpath'], 'plugin_eventcal_cal_monthviewnav' => true, 'plugin_eventcal_cal_a' => $a, @@ -1535,7 +1543,7 @@ // path settings frontend/backend if($noadmin !== false) { - $entry_path = $this->get_config('permalink'); + $entry_path = $this->fetchPluginUri(); } else $entry_path = $_SERVER['PHP_SELF']; /* assign single entry fulltext to smarty */ @@ -1572,7 +1580,7 @@ // path settings frontend/backend if($events === false) { $events = $this->load_unapproved_events($re); - $apppath = $this->get_config('permalink'); + $apppath = $this->fetchPluginUri(); } else $apppath = $_SERVER['PHP_SELF']; if($events) $events = $this->multi_strip_array_values($events, TRUE, TRUE); @@ -1661,8 +1669,8 @@ $option8 = $this->display_options($fdays, $eday); - // if event edit form submit throws exception return correct tipo to form - if(isset($type)) { + // if event edit form submit throws exception, return correct tipo to form + if(isset($type)) { switch ($type) { case 'single': $tipo = 1; break; case 'multi': $tipo = 2; break; @@ -1687,7 +1695,7 @@ // path settings frontend/backend if($noadmin !== false) { - $formpath = $this->get_config('permalink'); + $formpath = $this->fetchPluginUri(); } else $formpath = $_SERVER['PHP_SELF']; /* assign add form array entries to smarty */ @@ -1701,12 +1709,12 @@ 'plugin_eventcal_add_array_opt6' => $option6, 'plugin_eventcal_add_array_opt7' => $option7, 'plugin_eventcal_add_array_opt8' => $option8, - 'plugin_eventval_add_ap' => $ap, + 'plugin_eventcal_add_ap' => $ap, 'plugin_eventcal_add_app_by' => $app_by, - 'plugin_eventval_add_cm' => isset($cm), - 'plugin_eventval_add_cy' => isset($cy), - 'plugin_eventval_add_id' => $id, - 'plugin_eventval_add_ts' => $tst, + 'plugin_eventcal_add_cm' => sprintf("%02d",$m), + 'plugin_eventcal_add_cy' => $y, + 'plugin_eventcal_add_id' => $id, + 'plugin_eventcal_add_ts' => $tst, 'plugin_eventcal_add_ldesc' => ini_get('magic_quotes_gpc') ? stripslashes($ldesc) : $ldesc, 'plugin_eventcal_add_path' => $formpath, 'plugin_eventcal_add_sdesc' => ini_get('magic_quotes_gpc') ? stripslashes($sdesc) : $sdesc, @@ -1987,8 +1995,8 @@ $a = 1; $_POST['calendar']['a'] = 1; $_POST['calendar']['ldesc'] = str_replace('\n', chr(10), $ldesc); // form textarea needs changed LF - $_POST['calendar']['cm'] = $smonth; - $_POST['calendar']['cy'] = $syear; + #$_POST['calendar']['cm'] = $smonth; // should be $cm, which is already set + #$_POST['calendar']['cy'] = $syear; // should be $cy, which is already set $serendipity['eventcal']['setopen'] = true; } if($showap === true) { @@ -2079,12 +2087,12 @@ } } - /* a authenticated logged-in user tries to change and submit an unapproved event */ + /* an authenticated logged-in user tries to change and submit an unapproved event */ if(isset($isadminid) === true && isset($id)) { /* there was an error changing unapproved entries - get back the original entry */ $event = $this->mysql_db_result_sets('SELECT-KEY', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "id=$id"); // else return db error } - /* a authenticated logged-in user tries to change an nonapproved event via app form */ + /* an authenticated logged-in user tries to change an unapproved event via app form */ elseif( isset($_POST['Change_Selected']) || isset($_POST['Change_Selected_x']) || isset($_POST['Change_Selected_y']) ) { // select a specific unapproved event - check if it is a single entry or has checked multiple checkboxes if(is_array($_POST['calendar']['entries'])) { @@ -2216,17 +2224,18 @@ if ($this->get_config('articleformat') == true) { $serendipity['smarty']->assign('is_eventcal_articleformat', true); } + if ($this->get_config('headline') == true) { $serendipity['smarty']->assign( array( 'is_eventcal_headline' => true, - 'plugin_eventcal_permalink' => $this->get_config('permalink'), + 'plugin_eventcal_permalink' => $this->fetchPluginUri(), 'plugin_eventcal_headline' => $this->get_config('headline') ) ); } // check rewrite status to add the right GET values :: /./eventcal.html? :: index.php?/./eventcal.html& :: index.php?serendipity[subpage]=eventcal& - if ($serendipity['rewrite'] != 'none') { + if ($serendipity['rewrite'] == 'rewrite') { $serendipity['smarty']->assign('eventcal_permalink_add', '?'); } else { $serendipity['smarty']->assign('eventcal_permalink_add', '&'); @@ -2416,10 +2425,13 @@ case 'frontend_configure': /* checking if db tables exists, otherwise install them */ - $cur = $this->get_config('dbversion'); + $cur = $this->get_config('version'); + $cur = (!empty($cur) ? $cur : $this->get_config('dbversion')); if($cur == '1.0') { $this->alter_db($cur); $this->set_config('dbversion', '1.1'); + $this->set_config('version', ''); // remove_plugin_value removes empty vars only + $this->cleanup(); } elseif($cur == '1.1') { //void $this->cleanup(); @@ -2441,11 +2453,11 @@ $icl = $this->draw_icalendar($addData['export'][1], $addData['export'][2], $addData['export'][3], $adminrequest); } - if(isset($icl) && !empty($eventData) && $addData['export'][4] != 'no') { + if(isset($icl) && !empty($eventData) && $addData['export'][4] != 'no') { /* set the ical url location target to s9y/uploads or reload page with sent result */ if($addData['export'][4] == 'ml' && !$addData['export'][6]) { - $url = $_SERVER['HTTP_HOST'] . $this->get_config('permalink') . (($serendipity['rewrite'] != 'none') ? '?' : '&') . 'serendipity[mailData]='; + $url = $_SERVER['HTTP_HOST'] . $this->fetchPluginUri() . (($serendipity['rewrite'] == 'rewrite') ? '?' : '&') . 'serendipity[mailData]='; } elseif($addData['export'][4] == 'ml' && $addData['export'][6] == 'all') { $url = $_SERVER['HTTP_HOST'] . $serendipity['serendipityHTTPPath'] . 'serendipity_admin.php?serendipity[adminModule]=event_display&serendipity[adminAction]=eventcal&serendipity[eventcalcategory]=adevplad&serendipity[eventcaldbclean]=dbicalall&serendipity[mailData]='; } else { @@ -2518,7 +2530,7 @@ case 'genpage': $args = implode('/', serendipity_getUriArguments($eventData, true)); - if ($serendipity['rewrite'] != 'none') { + if ($serendipity['rewrite'] == 'rewrite') { $nice_url = $serendipity['serendipityHTTPPath'] . $args; } else { $nice_url = $serendipity['serendipityHTTPPath'] . $serendipity['indexFile'] . '?/' . $args; @@ -2594,6 +2606,10 @@ case 'backend_sidebar_entries_event_display_eventcal': + if (!is_object($serendipity['smarty'])) { + serendipity_smarty_init(); // if not set to avoid member function assign() on a non-object error, start Smarty templating + } + /* show backend administration menu */ $this->backend_eventcal_menu(); @@ -2658,10 +2674,6 @@ echo '<div class="backend_eventcal_menu"><h3>'. sprintf(PLUGIN_EVENTCAL_ADMIN_NAME_MENU, $serendipity['plugin_eventcal_version']) .'</h3></div>'."\n"; - if (!is_object(isset($serendipity['smarty']))) { - serendipity_smarty_init(); // if not set to avoid member function assign() on a non-object error, start Smarty templating - } - if (!isset($serendipity['POST']['eventcaladmin'])) { echo ' <div class="backend_eventcal_nav"> @@ -2812,7 +2824,7 @@ $adminpath = '?serendipity[adminModule]=event_display&serendipity[adminAction]=eventcal&serendipity[eventcalcategory]=adevview'; $attention = '<img class="backend_attention" src="' . $serendipity['serendipityHTTPPath'] . 'templates/default/admin/img/admin_msg_note.png" alt="" />'; - #echo $tipo .'=tipo & '.$type.'=type<br>'; + /* assign app and add form and main tpl array entries to smarty */ if (is_array($result)) { $serendipity['smarty']->assign( @@ -3168,12 +3180,13 @@ // create external plugin does and donts if(!isset($serendipity['GET']['mailData'])) { if($this->get_config('log_email')) { - $url = $serendipity['rewrite'] != 'none' ? $serendipity['serendipityHTTPPath'] . "plugin/ics_export/0/0/0/ml/" . $this->get_config('log_email') . '/all' : $serendipity['serendipityHTTPPath'] . "index.php?/plugin/ics_export/0/0/0/ml/" . $this->get_config('log_email') . '/all'; + //we use $serendipity['serendipityHTTPPath'] like /http_root better than $serendipity['baseURL'] like http://hostname/... while this gets done somewhere else and depends on differences where to sent + $url = $serendipity['serendipityHTTPPath'] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '') . 'plugin/ics_export/0/0/0/ml/' . $this->get_config('log_email') . '/all'; echo $this->backend_eventcal_smsg() . PLUGIN_EVENTCAL_ADMIN_ICAL_EMAILLINK . '<br /><br /><a href="'.$url.'"><input type="button" class="serendipityPrettyButton" name="ical email" value=" ' . CAL_EVENT_FORM_BUTTON_SUBMIT . ' " /></a>' . $this->backend_eventcal_emsg(); } else { - $url = $serendipity['rewrite'] != 'none' ? $serendipity['serendipityHTTPPath'] . "plugin/ics_export/0/0/0/dl/none/all" : $serendipity['serendipityHTTPPath'] . "index.php?/plugin/ics_export/0/0/0/dl/none/all"; + $url = $serendipity['serendipityHTTPPath'] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '') . 'plugin/ics_export/0/0/0/dl/none/all'; echo $this->backend_eventcal_smsg(); - echo '<form name="checkform" method="post" action="'.$this->get_config('permalink').'">'; + echo '<form name="checkform" method="post" action="'.$this->fetchPluginUri().'">'; echo '<input type="hidden" name="calendar[icseptarget]" value="'.$url.'" />'; echo PLUGIN_EVENTCAL_ADMIN_ICAL_DOWNLINK . '<br /><br /><input type="submit" class="serendipityPrettyButton" name="ical download" value=" ' . CAL_EVENT_FORM_BUTTON_SUBMIT . ' " />'; echo '</form>'; @@ -3299,7 +3312,7 @@ return $str = $this->backend_eventcal_smsg() . $text . '<br /><br /> <a href="'.$url.$addno.'" class="serendipityPrettyButton">' . NOT_REALLY . '</a> - <img src="' . $serendipity['eventcal']['pluginpath'] . "img/blank.png" . '" alt="blank" width="10" height="1" /> + <img src="' . $serendipity['serendipityHTTPPath'] . 'templates/default/img/blank.png" alt="blank" width="10" height="1" /> <a href="'.$url.$addyes.'" class="serendipityPrettyButton">' . DUMP_IT . '</a><br /><br /> ' . $this->backend_eventcal_emsg(); } @@ -3337,7 +3350,7 @@ $serendipity['smarty']->assign( array( 'plugin_eventcal_cal_admin' => sprintf(PLUGIN_EVENTCAL_HALLO_ADMIN, $serendipity['serendipityUser'], $serendipity['permissionLevels'][$serendipity['serendipityUserlevel']]), - 'plugin_eventcal_cal_path' => $this->get_config('permalink'), + 'plugin_eventcal_cal_path' => $this->fetchPluginUri(), 'plugin_eventcal_cal_imgpath' => $serendipity['serendipityHTTPPath'] . $serendipity['eventcal']['pluginpath'], 'plugin_eventcal_admin_add_path' => $adminpath, 'is_eventcal_cal_admin_clear' => true Index: plugin_eventcal_cal.tpl =================================================================== RCS file: /cvsroot/php-blog/additional_plugins/serendipity_event_cal/plugin_eventcal_cal.tpl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- plugin_eventcal_cal.tpl 23 Feb 2010 14:29:18 -0000 1.5 +++ plugin_eventcal_cal.tpl 19 Jan 2011 19:00:36 -0000 1.6 @@ -3,7 +3,7 @@ Wie in PHP wird dieser dann von dem Smarty-System ignoriert. Der Browser bekommt dann diesen Kommentar auch nicht zu sehen, obwohl er direkt im Template steht. - file: plugin_eventcal_cal.tpl - 2010-02-05, ian + file: plugin_eventcal_cal.tpl - 2011-01-09, ian *} {if $is_eventcal_articleformat == true} @@ -17,7 +17,7 @@ <div class='serendipity_entry_body'> {/if} <br class="clear" /> - <div id='eventcal_wrapper'> + <div id='{if $plugin_eventcal_admin_add_path}backend_{/if}eventcal_wrapper'> <!-- plugin_eventcal_cal.tpl start --> @@ -161,7 +161,7 @@ <th class="a0"></th> <!--build weekdaynames start --> - {foreach item=r from=$plugin_eventcal_cal_sed} + {foreach from=$plugin_eventcal_cal_sed item=r} <th class="a0 eventcal_weekhead">{$r.head}</th> {/foreach} @@ -193,7 +193,7 @@ <tr> <td class="eventcal_{$day.col} eventcal_lft" colspan="2">{if !$day.arrdata} {/if} - {foreach from=$day.arrdata item=r start=1} + {foreach from=$day.arrdata item=r} {* removed start=1 *} <span{if $r.tipo == 1 || $r.tipo == 6} class="mono{elseif $r.tipo == 2} class="multi{elseif $r.tipo == 3} class="recm{elseif $r.tipo == 4 || $r.tipo == 5} class="recw{/if} eventtype"> <a class="small_eventcal_link" href="{$plugin_eventcal_cal_path}{$eventcal_permalink_add}calendar[a]={$r.a}&calendar[ap]={$r.ap}&calendar[cm]={$r.m}&calendar[cy]={$r.y}&calendar[ev]={$r.id}" title="open event entry {$r.sdesc}"><b class="eventcal_reiter">{$r.sdesc}</b></a><br /> Index: ChangeLog =================================================================== RCS file: /cvsroot/php-blog/additional_plugins/serendipity_event_cal/ChangeLog,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ChangeLog 30 Apr 2010 08:22:24 -0000 1.3 +++ ChangeLog 19 Jan 2011 19:00:36 -0000 1.4 @@ -1,6 +1,19 @@ *************************************************************************************************** * Legend: ! Bugfix, + New Features, * Changed, - Info Only * +* +* v. 1.63 2011-01-09 Spartacus +* =========================== +* +* 2011-01-09 ADDED - smarty3 compat future use snarty3 code docs +* 2011-01-09 CHANGED - plugin_eventcal_cal.tpl removed start=1 from loop as of smarty3 compat +* 2011-01-08 BUGFIX - eventcal db update didn't work as expected (fixed) +* 2010-07-22 CHANGED - internal url building to be more friendly to mod_rewrite setting via permalink or subpage (rewrite, none, errordocs defines the use of subpage). +* 2010-07-15 BUGFIX - in case of form POST error, the calendar did not point to the referrers calendar month/year and fell back to January/year (fixed) +* 2010-07-15 CHANGED - style_event_backend.css, plugin_eventcal_add.tpl and plugin_eventcal_cal.tpl to be more strict to css rules +* 2010-07-15 CHANGED - some minor cleanups and corrected typos +* +* * v. 1.62 2010-04-30 Spartacus * =========================== * @@ -14,6 +27,7 @@ * * 2010-03-09 ADDED - missing mkdir eventcal directory in templates_c * +* * v. 1.6 2010-02-24 Spartacus * =========================== * Index: plugin_eventcal_add.tpl =================================================================== RCS file: /cvsroot/php-blog/additional_plugins/serendipity_event_cal/plugin_eventcal_add.tpl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- plugin_eventcal_add.tpl 23 Feb 2010 14:29:18 -0000 1.4 +++ plugin_eventcal_add.tpl 19 Jan 2011 19:00:36 -0000 1.5 @@ -3,7 +3,7 @@ Wie in PHP wird dieser dann von dem Smarty-System ignoriert. Der Browser bekommt dann diesen Kommentar auch nicht zu sehen, obwohl er direkt im Template steht. - file: plugin_eventcal_add.tpl - 2010-01-27, ian + file: plugin_eventcal_add.tpl - 2010-07-15, ian *} <!-- plugin_eventcal_add.tpl start --> @@ -19,11 +19,11 @@ <form name="eventcalEntry" id="eventcalEntry" method="post" action="{$plugin_eventcal_add_path}{$plugin_eventcal_admin_add_path}"> <input type="hidden" name="calendar[nomarkup]" value="true" /> <input type="hidden" name="calendar[eventcalform]" value="true" /> - <input type="hidden" name="calendar[id]" value="{$plugin_eventval_add_id}" /> - <input type="hidden" name="calendar[ap]" value="{$plugin_eventval_add_ap}" /> - <input type="hidden" name="calendar[cm]" value="{$plugin_eventval_add_cm}" /> - <input type="hidden" name="calendar[cy]" value="{$plugin_eventval_add_cy}" /> - <input type="hidden" name="calendar[ts]" value="{$plugin_eventval_add_ts}" /> + <input type="hidden" name="calendar[id]" value="{$plugin_eventcal_add_id}" /> + <input type="hidden" name="calendar[ap]" value="{$plugin_eventcal_add_ap}" /> + <input type="hidden" name="calendar[cm]" value="{$plugin_eventcal_add_cm}" /> + <input type="hidden" name="calendar[cy]" value="{$plugin_eventcal_add_cy}" /> + <input type="hidden" name="calendar[ts]" value="{$plugin_eventcal_add_ts}" /> <table class="eventcal_form"> <tbody> @@ -103,7 +103,7 @@ <td class="eventformdesc"> <input type="text" name="calendar[sdesc]" value="{$plugin_eventcal_add_sdesc}" size='16' maxlength='16' /><img src="{serendipity_getFile file="img/blank.png"}" alt="blank" border="0" width="8" height="2" /><font class="eventcal_reiter">{$CONST.CAL_EVENT_FORM_RIGHT_SHORTMAX}</font> </td> - <td align="center" class="eventformdesc eventformbutton"><input type="submit" value=" {$CONST.CAL_EVENT_FORM_BUTTON_SUBMIT} " name="calendar[new_submit]" /></td> + <td align="center" class="eventformdesc eventformbutton"><input class="SerendipityPrettyButton" type="submit" value=" {$CONST.CAL_EVENT_FORM_BUTTON_SUBMIT} " name="calendar[new_submit]" /></td> </tr> <tr class="e0"> <th class="eventformtitle">{$CONST.CAL_EVENT_FORM_LEFT_LINK}</th> Index: README =================================================================== RCS file: /cvsroot/php-blog/additional_plugins/serendipity_event_cal/README,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- README 30 Apr 2010 08:22:24 -0000 1.7 +++ README 19 Jan 2011 19:00:36 -0000 1.8 @@ -1,5 +1,5 @@ /******************************************************************* - * serendipity_event_cal.php, README file 2010-03-09 ian * + * serendipity_event_cal.php, README file 2010-07-22 ian * * if you have a interesting hack or want to help, * * please leave a message at http://www.s9y.org/forums/ * * have fun! Ian (Timbalu) * @@ -94,7 +94,7 @@ * Your email address - if you don't put in an address, default admin iCal setting is as download. *************************************************************************************************** -This plugin is originally based on event calender code at php.net somewhere in 2005/06 +This plugin originally based on some event calender code at php.net, somewhere in 2005/06. Feel free to improve it. Ian, October 31, 2009 @@ -105,6 +105,16 @@ *************************************************************************************************** * Legend: ! Bugfix, + New Features, * Changed, - Info Only * +* +* v. 1.63 2010-07-22 Spartacus +* =========================== +* +* 2010-07-22 CHANGED - internal url building to be more friendly to mod_rewrite setting via permalink or subpage (rewrite, none, errordocs defines the use of subpage). +* 2010-07-15 BUG - in case of form POST error, the calendar did not point to the referrers calendar month/year and fell back to January/year (bug closed) +* 2010-07-15 CHANGED - style_event_backend.css, plugin_eventcal_add.tpl and plugin_eventcal_cal.tpl to be more strict to css rules +* 2010-07-15 CHANGED - some minor cleanups and corrected typos +* +* * v. 1.62 2010-04-30 Spartacus * =========================== * Index: style_eventcal_backend.css =================================================================== RCS file: /cvsroot/php-blog/additional_plugins/serendipity_event_cal/style_eventcal_backend.css,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- style_eventcal_backend.css 30 Apr 2010 08:22:24 -0000 1.6 +++ style_eventcal_backend.css 19 Jan 2011 19:00:36 -0000 1.7 @@ -1,38 +1,38 @@ /************************************************************************************/ -/* style_eventcal_backend.css for serendipity_eventcal_cal.php v.1.6 2010-02-21 ian */ +/* style_eventcal_backend.css for serendipity_eventcal_cal.php v.1.63 2010-07-15 ian */ /************************************************************************************/ #eventcal_wrapper { margin: 0; padding: 0; - background-color: #D5BFC0;/* todays color; #C0C0FF weekly color; #FF7400 orange color */ font: 500 11px/16px 'Vollkorn Regular', arial, helvetica, sans-serif; +} +br.clear { clear: both; } + +#eventcal_wrapper div.eventcal_intro { + padding: 4px; + background-color: #D5BFC0;/* todays color; #C0C0FF weekly color; #FF7400 orange color */ /* mozilla, chrome, safari, ie7+, (opera?) round corners */ border-color: hsl(360,100%,35%); -moz-border-radius: 8px; -webkit-border-radius: 8px; -khtml-border-radius: 8px; border: 1px solid hsl(360,100%,35%); -} - -div.eventcal_intro { - padding: 4px; text-align:justify; } -br.clear { clear: both; } /*********************************************/ /* Backend only styles - colour you life ;-) */ /* background colors used: */ /* #FFB90F DarkGoldenrod1 */ -/* #FFC125 Goldenrod1 */ +/* #FFC125 Goldenrod1 */ /* #FFD700 Gold1 */ -/* #FF8247 Sienna1 */ -/* #ADD8E6 LightBlue */ +/* #FF8247 Sienna1 */ +/* #ADD8E6 LightBlue */ /* #D5BFC0 ~ darkrose */ -/* #6280A2 ~ SkyBlue4 */ -/* #FDECE1 ~ lightrose */ +/* #6280A2 ~ SkyBlue4 */ +/* #FDECE1 ~ lightrose */ /* #F0F0F0 ~ ivory white */ /*********************************************/ @@ -48,9 +48,9 @@ div.backend_eventcal_nav ul li#active { border-bottom:1px solid #888; background-color: #FFD700; background: -moz-linear-gradient(left 20deg, #D5BFC0, #FFD700); } div.backend_eventcal_menu { background-color:#F0F0F0; background: -moz-linear-gradient(left 20deg, #F0F0F0, #D5BFC0); border:1px solid #777; padding:0 0 0 20px; } div.backend_eventcal_head { background-color:#D5BFC0; background: -moz-linear-gradient(left 20deg, #D5BFC0, #F0F0F0); border:1px solid red; margin:30px 0 0 0px; padding: 4px 20px; float:left; } -div.backend_eventcal_paginator { background-color:#6280A2; border:2px solid #555; margin-top:100px; height:25px; } +div.backend_eventcal_paginator { background-color:#6280A2; border:2px solid #555; background-color: transparent; border: 0 none; margin-top:100px; height:25px; } span.backend_eventcal_paginator_left { float:left; width:40%; text-align:left; margin-left:20px; color: #aaa !important; } -span.backend_eventcal_paginator_center { margin:0 20px; width:20%; text-align:center; font-weight: 700 !important; color: #F0F0F0 !important; } +span.backend_eventcal_paginator_center { margin: 5px 20px; width:20%; text-align:center; font-weight: 700 !important; } span.backend_eventcal_paginator_right { float:right; width:40%; text-align:right; margin-right:20px; color: #aaa !important; } div.backend_eventcal_noresult { margin-top:100px; border: 0 none; } div.backend_eventcal_dbclean_title { margin:100px 0 20px 10px; } @@ -290,11 +290,6 @@ td.eventformdesc input { background-color: #fff; } -td.eventformbutton input { - /*background-color: #FF6347; tomato else darkorange #FF8C00;*/ - background: #80B0DA url('{TEMPLATE_PATH}img/button_background.png') repeat-x top; - font-weight: 700 !important; -} td.eventformlink { white-space:nowrap; } @@ -592,30 +587,46 @@ text-decoration: underline; font: xx-small arial, helvetica, sans-serif; } -a:link.serendipityPrettyButton, -a:visited.serendipityPrettyButton, -a:hover.serendipityPrettyButton { - text-decoration: none; - color: #1D2E3F; + +#eventcal_wrapper td.eventformbutton input { + /*background-color: #FF6347; tomato else darkorange #FF8C00;*/ + background: url('{TEMPLATE_PATH}img/button_background.png') repeat scroll 0 50% #80B0DA; + font-weight: 700 !important; } -input.serendipityPrettyButton { +/* Special class if the button is <a> tag */ +#eventcal_wrapper a.serendipityPrettyButton { + padding: 2px 4px 2px 4px; + cursor: pointer; + background:url("{TEMPLATE_PATH}img/button_background.png") repeat scroll 0 50% transparent; +} +#eventcal_wrapper a:link.serendipityPrettyButton, +#eventcal_wrapper a:visited.serendipityPrettyButton, +#eventcal_wrapper a:hover.serendipityPrettyButton { + text-decoration: none; + color: #1D2E3F; +} + +#eventcal_wrapper .serendipityPrettyButton { padding: 1px; - background: #80B0DA url('{TEMPLATE_PATH}img/button_background.png') repeat-x top; color: #1D2E3F; - font-size: 0.9em; font-weight: bold; + font-size: 0.9em; border: 1px outset #000; margin: 2px; } -/* Special class if the button is <a> tag */ -a.serendipityPrettyButton { - padding: 2px 4px 2px 4px; - cursor: pointer; - background: transparent url('{TEMPLATE_PATH}img/button_background.png') repeat-x top; + +#eventcal_wrapper input.serendipityPrettyButton { + background: url('{TEMPLATE_PATH}img/button_background.png') repeat scroll 0 50% #80B0DA; } -input.info { clear: both; font-style: italic; font-size: 8px; height: 12px; width: 12px; vertical-align: bottom;} -input.bbc_i { clear: both; font-style: italic; font-size: 12px;} -input.bbc_b { font-weight: bold; font-size: 12px;} -input.bbc_u { text-decoration: underline; font-size: 12px;} -input.bbc_s { font-style: italic; font-size: 12px;} + +#backend_eventcal_wrapper input.info, +#eventcal_wrapper input.info { clear: both; font-style: italic; font-size: 8px; height: 12px; width: 12px; vertical-align: bottom;} +#backend_eventcal_wrapper input.bbc_i, +#eventcal_wrapper input.bbc_i { margin: 2px 2px 0; padding: 2px; font-style: italic; font-size: 12px; } +#backend_eventcal_wrapper input.bbc_b, +#eventcal_wrapper input.bbc_b { margin: 2px 2px 0; padding: 2px; font-weight: bold; font-size: 12px; } +#backend_eventcal_wrapper input.bbc_u, +#eventcal_wrapper input.bbc_u { margin: 2px 2px 0; padding: 2px; text-decoration: underline; font-size: 12px; } +#backend_eventcal_wrapper input.bbc_s, +#eventcal_wrapper input.bbc_s { margin: 2px 2px 0; padding: 2px; font-style: italic; font-size: 12px; } |