From a6f61de003bbeff5fff56f1bef41198cc64ccb53 Mon Sep 17 00:00:00 2001 From: Ian Date: Sat, 5 Dec 2015 14:05:04 +0100 Subject: [PATCH] eventcal 1.71 --- serendipity_event_cal/ChangeLog | 10 + serendipity_event_cal/README | 10 + serendipity_event_cal/UTF-8/lang_de.inc.php | 2 + serendipity_event_cal/backend_inherits.css | 6 +- serendipity_event_cal/lang_de.inc.php | 3 + serendipity_event_cal/lang_en.inc.php | 3 + serendipity_event_cal/plugin_eventcal_add.tpl | 28 +- serendipity_event_cal/plugin_eventcal_app.tpl | 10 +- serendipity_event_cal/plugin_eventcal_cal.tpl | 321 ++++++++++-------- .../plugin_eventcal_calweek.tpl | 98 +++--- .../plugin_eventcal_entry.tpl | 6 +- .../serendipity_event_cal.php | 68 +++- serendipity_event_cal/style_eventcal.css | 309 +++++++++++------ 13 files changed, 543 insertions(+), 331 deletions(-) diff --git a/serendipity_event_cal/ChangeLog b/serendipity_event_cal/ChangeLog index 8e40b220..09e408ac 100644 --- a/serendipity_event_cal/ChangeLog +++ b/serendipity_event_cal/ChangeLog @@ -2,6 +2,16 @@ * Legend: ! Bugfix, + New Features, * Changed, - Info Only * +v.1.71: +------- + + * Remove an old file for updaters, which could overwrite new settings + * Some more frontend and theme specific CSS cleanup + * Moved eventcal CSS to apply after theme CSS + * Added new config Option, to allow monthly events faked sidebar plugin + output with plugin_eventwrapper. (Do not set true, if not using this latter!) + + v.1.70: ------- diff --git a/serendipity_event_cal/README b/serendipity_event_cal/README index 17777a65..6b69dc91 100644 --- a/serendipity_event_cal/README +++ b/serendipity_event_cal/README @@ -106,6 +106,16 @@ ChangeLOG: * Legend: ! Bugfix, + New Features, * Changed, - Info Only * * +* v.1.71 2015-12-06 +* =========================== +* +* Remove an old file for updaters, which could overwrite new settings +* Some more frontend and theme specific CSS cleanup +* Moved eventcal CSS to apply after theme CSS +* Added new config Option, to allow monthly events faked sidebar plugin +* output with plugin_eventwrapper. (Do not set true, if not using this latter!) +* +* * v.1.70 2015-11-30 * =========================== * diff --git a/serendipity_event_cal/UTF-8/lang_de.inc.php b/serendipity_event_cal/UTF-8/lang_de.inc.php index 6e651efc..718521cd 100644 --- a/serendipity_event_cal/UTF-8/lang_de.inc.php +++ b/serendipity_event_cal/UTF-8/lang_de.inc.php @@ -213,3 +213,5 @@ @define('PLUGIN_EVENTCAL_ADMIN_DBC_NIXDA_DESC', 'Es ist keine Eventcal Datenbanktabelle vorhanden'); @define('PLUGIN_EVENTCAL_ADMIN_DBC_NIXDA_TITLE', 'Administration - error'); +@define('PLUGIN_EVENTCAL_EVENTWRAPPER', 'Erlaube Eventwrapper Plugin Ausgabe?'); +@define('PLUGIN_EVENTCAL_EVENTWRAPPER_BLAHBLAH', 'Plaziert mit Hilfe des serendipity_plugin_eventwrapper Seitenleisten-Plugins die Kalender Ereignisse des aktuellen Monats als Links in die Seitenleiste. Aus Performancegründen bitte nur dann erlauben!'); diff --git a/serendipity_event_cal/backend_inherits.css b/serendipity_event_cal/backend_inherits.css index 480adb8a..1e943cd7 100644 --- a/serendipity_event_cal/backend_inherits.css +++ b/serendipity_event_cal/backend_inherits.css @@ -88,6 +88,7 @@ br { } .backend_eventcal_linenum br, .backend_eventcal_linetxt br, +.addform_areainfo br, .eventcal_appldesc br, .eventcal_tpl_message_inner br { display: inherit; @@ -170,7 +171,10 @@ abbr[title] { #backend_eventcal_wrapper .eventformdesc abbr[title] { border-bottom: 0 none; font-size: 1.2em; - vertical-align: top; + vertical-align: middle; +} +#backend_eventcal_wrapper .eventformdesc .eventcal_tab { + vertical-align: initial; } td.eventformdesc { font: inherit; diff --git a/serendipity_event_cal/lang_de.inc.php b/serendipity_event_cal/lang_de.inc.php index 368cd45e..30107e9b 100644 --- a/serendipity_event_cal/lang_de.inc.php +++ b/serendipity_event_cal/lang_de.inc.php @@ -212,3 +212,6 @@ @define('PLUGIN_EVENTCAL_ADMIN_DBC_ILOG_MSG', 'Die iLog Datei existiert nicht!'); @define('PLUGIN_EVENTCAL_ADMIN_DBC_NIXDA_DESC', 'Es ist keine Eventcal Datenbanktabelle vorhanden'); @define('PLUGIN_EVENTCAL_ADMIN_DBC_NIXDA_TITLE', 'Administration - error'); + +@define('PLUGIN_EVENTCAL_EVENTWRAPPER', 'Erlaube Eventwrapper Plugin Ausgabe?'); +@define('PLUGIN_EVENTCAL_EVENTWRAPPER_BLAHBLAH', 'Plaziert mit Hilfe des serendipity_plugin_eventwrapper Seitenleisten Plugins die Kalender Ereignisse des aktuellen Monats als Links in die Seitenleiste. Aus Performancegründen bitte nur dann erlauben!'); diff --git a/serendipity_event_cal/lang_en.inc.php b/serendipity_event_cal/lang_en.inc.php index d706956f..451b954c 100644 --- a/serendipity_event_cal/lang_en.inc.php +++ b/serendipity_event_cal/lang_en.inc.php @@ -212,3 +212,6 @@ @define('PLUGIN_EVENTCAL_ADMIN_DBC_ILOG_MSG', 'The ilog file does not exist!'); @define('PLUGIN_EVENTCAL_ADMIN_DBC_NIXDA_DESC', 'there is no eventcal table in database'); @define('PLUGIN_EVENTCAL_ADMIN_DBC_NIXDA_TITLE', 'Administration - error'); + +@define('PLUGIN_EVENTCAL_EVENTWRAPPER', 'Allow Eventwrapper Plugin?'); +@define('PLUGIN_EVENTCAL_EVENTWRAPPER_BLAHBLAH', 'Allows to fake a sidebar Plugin output with serendipity_plugin_eventwrapper, which places the current month events as links to the sidebar. Only allow this when really in need, performancewise!'); diff --git a/serendipity_event_cal/plugin_eventcal_add.tpl b/serendipity_event_cal/plugin_eventcal_add.tpl index 09aa6ccc..1f6c64a6 100644 --- a/serendipity_event_cal/plugin_eventcal_add.tpl +++ b/serendipity_event_cal/plugin_eventcal_add.tpl @@ -1,9 +1,9 @@ -{* file: plugin_eventcal_add.tpl - 2010-07-15, Ian *} +{* file: plugin_eventcal_add.tpl - 2015-12-04, Ian *} - + {if $is_eventcal_add_debug_fda}
  function: {$is_eventcal_add_debug_fda}
@@ -18,7 +18,7 @@ if (txtarea.scrollTop) { scrollPos = txtarea.scrollTop; } - var $txtarea = $(txtarea); + var $txtarea = jQuery(txtarea); if (!$txtarea.length) { return; } var len = $txtarea.val().length; var start = $txtarea[0].selectionStart; @@ -37,7 +37,7 @@ {/literal} -
+ @@ -52,13 +52,13 @@ {$CONST.CAL_EVENT_FORM_LEFT_SINGLE} @@ -69,13 +69,13 @@ {$CONST.CAL_EVENT_FORM_LEFT_MULTI} @@ -86,10 +86,10 @@ {$CONST.CAL_EVENT_FORM_LEFT_RECUR} @@ -135,9 +135,9 @@ {$CONST.CAL_EVENT_FORM_LEFT_DESC} - + - {$CONST.CAL_EVENT_FORM_RIGHT_DETAILDESC} + {$CONST.CAL_EVENT_FORM_RIGHT_DETAILDESC} {if $is_logged_in}

{$CONST.CAL_EVENT_FORM_RIGHT_BBC}
diff --git a/serendipity_event_cal/plugin_eventcal_app.tpl b/serendipity_event_cal/plugin_eventcal_app.tpl index 8035f78d..f9039846 100644 --- a/serendipity_event_cal/plugin_eventcal_app.tpl +++ b/serendipity_event_cal/plugin_eventcal_app.tpl @@ -1,4 +1,4 @@ -{* file: plugin_eventcal_app.tpl - 2009-02-22, Ian *} +{* file: plugin_eventcal_app.tpl - 2015-12-04, Ian *} @@ -26,7 +26,7 @@ function chkAll(frm, arr, mark) { - + @@ -36,7 +36,7 @@ function chkAll(frm, arr, mark) { - {foreach from=$plugin_eventcal_app_array_events item=e} + {foreach from=$plugin_eventcal_app_array_events item="e"} @@ -52,8 +52,8 @@ function chkAll(frm, arr, mark) { {/foreach} - - + diff --git a/serendipity_event_cal/plugin_eventcal_cal.tpl b/serendipity_event_cal/plugin_eventcal_cal.tpl index da41327a..d2027270 100644 --- a/serendipity_event_cal/plugin_eventcal_cal.tpl +++ b/serendipity_event_cal/plugin_eventcal_cal.tpl @@ -1,17 +1,18 @@ -{* file: plugin_eventcal_cal.tpl - 2011-01-19, Ian *} - +{* file: plugin_eventcal_cal.tpl - 2015-12-04, Ian *} {if $is_eventcal_articleformat == true} -
  {$CONST.CAL_EVENT_FORM_TITLE_DATE} {$CONST.CAL_EVENT_FORM_TITLE_TITLE}{$CONST.CAL_EVENT_FORM_TITLE_EDIT} {$CONST.CAL_EVENT_FORM_TITLE_DEL}
{$e.tipodate}{if $e.tipo == 5} ({$CONST.CAL_EVENT_FORM_RIGHT_RECUR_BIWEEK}){/if}    
+
{$CONST.CAL_EVENT_FORM_BUTTON_MARK}
- - + + {foreach key="icsktype" item="icsvtype" from=$plugin_eventcal_ical_types} - + + + {/foreach} - - + + +
- - + + + {if $icsktype == 'ml'} - To: {$CONST.EMAIL} - + To: {$CONST.EMAIL} + {else} - + {/if} - -
{/if}{* icalswitch end *} - + {if $plugin_eventcal_cal_monthviewnav} - - - + + {/if}{* monthviewnav end *} {if $is_eventcal_cal_admin_clear != true} - - - + + {/if}{* admin clear end *} {* now we include the separate build single event day entry - plugin_eventcal_entry.tpl *} @@ -230,6 +248,7 @@ {if $is_eventcal_cal_buildbuttonadd == true} {if $is_eventcal_cal_admin_clear != true} + {/if}{* admin clear end *} - + {* now we include the open form table - plugin_eventcal_add.tpl *} {if $plugin_eventcal_cal_buildaddtable} {$plugin_eventcal_cal_buildaddtable} {/if} - + {/if}{* buildbuttonadd end *} - + {if $is_eventcal_cal_buildbuttonapp == true} {if $is_eventcal_cal_admin_clear != true} + {/if}{* admin clear end *} - + {* now we include the lookout for unapproved events table - plugin_eventcal_app.tpl *} - + {if $plugin_eventcal_cal_buildapptable} {$plugin_eventcal_cal_buildapptable} {/if} - + {/if}{* buildbuttonapp end *} - + {/if}{* buildbuttons end *} - + - +
- - - - + + + - - + + + + +
-
- - - - - - -
-
+ + + + {if $plugin_eventcal_cal_sedweek} - + + {else} - + + {/if} - - - -
+
+ + + + + + +
+
-
- - - - - - -
-
+
+ + + + + + +
+
{$plugin_eventcal_cal_cmonth}{$plugin_eventcal_cal_cmonth} -
- - - - - - -
-
-
+
+ + + + + + +
+
+
- {if $plugin_eventcal_cal_sed} - - - - - - + + + {/foreach} + + + + {/if} + {/foreach} + + +
+ {if $plugin_eventcal_cal_sed} + + + + + + - {foreach item=r from=$plugin_eventcal_cal_sed} - - {/foreach} + {foreach from=$plugin_eventcal_cal_sed item="r"} + + {/foreach} - - - + + + - - {foreach from=$plugin_eventcal_cal_sed item="week"} - {if $week.days} - - + + {foreach from=$plugin_eventcal_cal_sed item="week"} + {if $week.days} + + + - - - + + + - {foreach from=$week.days item="day"} + {foreach from=$week.days item="day"} - + + +
{$r.head}{$r.head}
- {$week.cwnm} - + {$week.cwnm} + - - - - - - - - - {/foreach} - - - {/if} - {/foreach} - -
{if $day.today == 'today'}
{$CONST.CAL_EVENT_TODAY}
{elseif $day.today == 'blank'} {else} {/if}
{$day.label|default:' '}
{if !$day.arrdata} {/if} + + + + + + + + + - - -
{if $day.today == 'today'}
{$CONST.CAL_EVENT_TODAY}
{elseif $day.today == 'blank'} {else} {/if}
{$day.label|default:' '}
{if !$day.arrdata} {/if} + {foreach from=$day.arrdata item="r"}{* start=1 *} + + + {$r.sdesc}
+ + {/foreach} - {foreach from=$day.arrdata item=r}{* start=1 *} - - - {$r.sdesc}
- - {/foreach} - -
-
- +
+
+ {/if}{* sed end *} {* now we include the weekly event table if there is - plugin_eventcal_calweek.tpl *} @@ -214,8 +232,8 @@ {$plugin_eventcal_cal_buildweektable} {/if} -
@@ -239,17 +258,18 @@
@@ -259,23 +279,23 @@
 
- +
@@ -297,15 +317,16 @@ {* placeholder admin links *} - +
Single Events
- -
+ +
+ {if $is_eventcal_articleformat == true} - - + + -{/if}{* articleformat end *} \ No newline at end of file +{/if}{* articleformat end *} diff --git a/serendipity_event_cal/plugin_eventcal_calweek.tpl b/serendipity_event_cal/plugin_eventcal_calweek.tpl index 59de4c3e..bbf9171a 100644 --- a/serendipity_event_cal/plugin_eventcal_calweek.tpl +++ b/serendipity_event_cal/plugin_eventcal_calweek.tpl @@ -1,4 +1,4 @@ -{* file: plugin_eventcal_calweek.tpl - 2010-02-08, Ian *} +{* file: plugin_eventcal_calweek.tpl - 2015-12-04, Ian *} {if $plugin_eventcal_cal_sedweek} @@ -22,7 +22,7 @@ {/if}
{$CONST.PLUGIN_EVENTCAL_TEXT_CW}№: {$plugin_eventcal_cal_sedweek.0.cwnm}
{$plugin_eventcal_cal_cmonth}
{$CONST.PLUGIN_EVENTCAL_TEXT_CW}{$plugin_eventcal_cal_sedweek.0.cwnm}
{$plugin_eventcal_cal_cmonth}
{* cwnm_month eq = equal in php write == eventcal_month *} {if $plugin_eventcal_cal_sedweek.0.cwnm_m eq $plugin_eventcal_cal_m} @@ -44,20 +44,20 @@ - {foreach from=$plugin_eventcal_cal_sedweek.0.days item=day name=weeknum} + {foreach from=$plugin_eventcal_cal_sedweek.0.days item="day" name="weeknum"} {if $plugin_eventcal_cal_sedweek.0.cwnm_days[$smarty.foreach.weeknum.iteration] != 0} - + {/if} {if $day.arrdata} - {foreach from=$day.arrdata item=ad name=daynum} + {foreach from=$day.arrdata item="ad" name="daynum"} @@ -88,54 +88,16 @@ {/foreach} - - - - - + {* now build the selected week like it is in month table *} - - - {foreach from=$plugin_eventcal_cal_sedweek.0.head item=r} + + + {foreach from=$plugin_eventcal_cal_sedweek.0.head item="r"} {/foreach} - + {foreach from=$plugin_eventcal_cal_sedweek item="week"} {if $week.days} @@ -159,8 +121,8 @@ {/foreach} + + {/if} {/foreach} @@ -183,6 +147,40 @@ +
{$CONST.PLUGIN_EVENTCAL_TEXT_CW}№: {$plugin_eventcal_cal_sedweek.0.cwnm} :: {$plugin_eventcal_cal_sedweek.0.head[$smarty.foreach.weeknum.iteration]}, {if $plugin_eventcal_cal_sedweek.0.cwnm_days[$smarty.foreach.weeknum.iteration] le $plugin_eventcal_cal_sedweek.0.cwnm_lastday}{$plugin_eventcal_cal_sedweek.0.cwnm_days[$smarty.foreach.weeknum.iteration]}{/if}{$CONST.PLUGIN_EVENTCAL_TEXT_CW}{$plugin_eventcal_cal_sedweek.0.cwnm} :: {$plugin_eventcal_cal_sedweek.0.head[$smarty.foreach.weeknum.iteration]}, {if $plugin_eventcal_cal_sedweek.0.cwnm_days[$smarty.foreach.weeknum.iteration] le $plugin_eventcal_cal_sedweek.0.cwnm_lastday}{$plugin_eventcal_cal_sedweek.0.cwnm_days[$smarty.foreach.weeknum.iteration]}{/if}
{$smarty.foreach.daynum.iteration}
- - - - - - - - -
{* cwnm gt = greater than in php write > cwnm_first *} - {if $plugin_eventcal_cal_sedweek.0.cwnm gt $plugin_eventcal_cal_sedweek.0.cwnm_first} - -
- - - - - -
- {/if} - -
{$CONST.PLUGIN_EVENTCAL_TEXT_CW}№: {$plugin_eventcal_cal_sedweek.0.cwnm}
{$plugin_eventcal_cal_cmonth}
{* cwnm_month eq = equal in php write == eventcal_month *} - {if $plugin_eventcal_cal_sedweek.0.cwnm_m eq $plugin_eventcal_cal_m} - -
- - - - - -
- {/if} - -
-
{$r}
{if !$day.arrdata} {/if} - - {foreach from=$day.arrdata item=r start=1} + + {foreach from=$day.arrdata item="r"}{* start=1 *} {$r.sdesc}
@@ -174,7 +136,9 @@
+ + + + + + + +
{* cwnm gt = greater than in php write > cwnm_first *} + {if $plugin_eventcal_cal_sedweek.0.cwnm gt $plugin_eventcal_cal_sedweek.0.cwnm_first} + +
+ + + + + +
+ {/if} + +
{$CONST.PLUGIN_EVENTCAL_TEXT_CW}{$plugin_eventcal_cal_sedweek.0.cwnm}
{$plugin_eventcal_cal_cmonth}
{* cwnm_month eq = equal in php write == eventcal_month *} + {if $plugin_eventcal_cal_sedweek.0.cwnm_m eq $plugin_eventcal_cal_m} + +
+ + + + + +
+ {/if} + +
+ {/if} diff --git a/serendipity_event_cal/plugin_eventcal_entry.tpl b/serendipity_event_cal/plugin_eventcal_entry.tpl index 9270e988..5553347e 100644 --- a/serendipity_event_cal/plugin_eventcal_entry.tpl +++ b/serendipity_event_cal/plugin_eventcal_entry.tpl @@ -1,4 +1,4 @@ -{* file: plugin_eventcal_entry.tpl - 2010-02-07, Ian *} +{* file: plugin_eventcal_entry.tpl - 2015-12-05, Ian *} @@ -38,7 +38,7 @@ - + {$CONST.CAL_EVENT_FORM_TITLE_EDIT|nl2br|spacify} @@ -49,7 +49,7 @@ - + diff --git a/serendipity_event_cal/serendipity_event_cal.php b/serendipity_event_cal/serendipity_event_cal.php index d2029250..d3a79147 100644 --- a/serendipity_event_cal/serendipity_event_cal.php +++ b/serendipity_event_cal/serendipity_event_cal.php @@ -71,11 +71,12 @@ class serendipity_event_cal extends serendipity_event { 'showical', 'ical_icsurl', 'log_ical', - 'log_email' + 'log_email', + 'eventwrapper' ) ); $propbag->add('author', 'Ian (Timbalu)'); - $propbag->add('version', '1.70'); + $propbag->add('version', '1.71'); $propbag->add('groups', array('FRONTEND_FEATURES', 'BACKEND_FEATURES')); $propbag->add('requirements', array( 'serendipity' => '1.4', @@ -171,6 +172,13 @@ class serendipity_event_cal extends serendipity_event { $propbag->add('default', ''); break; + case 'eventwrapper': + $propbag->add('type', 'boolean'); + $propbag->add('name', PLUGIN_EVENTCAL_EVENTWRAPPER); + $propbag->add('description', PLUGIN_EVENTCAL_EVENTWRAPPER_BLAHBLAH); + $propbag->add('default', 'false'); + break; + default: return false; @@ -484,9 +492,15 @@ class serendipity_event_cal extends serendipity_event { } /** - * build events array for monthly view + * build events array for monthly view as Calendar view + * + * @param int $year + * @param int $month + * @param bool $asCalDays + * + * @return array for Calendar or as a monthly selection */ - function load_monthly_events($year, $month) { + function load_monthly_events($year, $month, $asCalDays=true) { global $serendipity; $last = $this->last_day($year,$month); // set last day of current month @@ -505,11 +519,12 @@ class serendipity_event_cal extends serendipity_event { OR ( '$sel_ym' BETWEEN DATE_FORMAT(sdato,'%Y%m') AND DATE_FORMAT(edato,'%Y%m') AND tipo BETWEEN 2 AND 5 ) OR ( sdato BETWEEN '$year-$month-01' AND '$year-$month-$last' AND tipo=1 ) OR ( DATE_FORMAT(sdato,'%m%d') BETWEEN '$sel_ms' AND '$sel_ml' AND tipo=6 AND DATE_FORMAT(sdato,'%Y') <= '$year' ) - ) ORDER BY tipo ASC"; + )"; + $s .= $asCalDays ? " ORDER BY tipo ASC" : " ORDER BY tipo, sdato ASC"; $result = $this->mysql_db_result_sets('SELECT-ARRAY', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "approved=1 AND $s"); // else return db error - if (is_array($result)) { + if (is_array($result) && $asCalDays) { for($i=1; $i<32; ++$i) { $events[$i][] = $i; } // this is for undefinied offsets in all non db result days $last = $this->last_day($year,$month); // set last day of current month @@ -597,7 +612,10 @@ class serendipity_event_cal extends serendipity_event { break; } } + } else { + $events = $result; } + return($events); } // load_monthly_events() end @@ -944,6 +962,12 @@ class serendipity_event_cal extends serendipity_event { /* method "example" creates the file upon configuration */ function example() { global $serendipity; + + // remove an old lang file + if (is_file(dirname(__FILE__) . '/UTF-8/lang_en.inc.php')) { + @unlink(dirname(__FILE__) . '/UTF-8/lang_en.inc.php'); + } + $file = $serendipity['serendipityPath'] . 'uploads/icalendar.ics'; if (!file_exists($file)) { $fp = fopen($file, 'w'); @@ -2219,6 +2243,7 @@ class serendipity_event_cal extends serendipity_event { if (serendipity_db_bool($this->get_config('showical', 'false'))) { /* case export ics file - set export call on "ud" (user decisions::config) and send to external_plugin hook */ if ($this->get_config('ical_icsurl') == 'ud') { + $icaldl_types = array( 'dl' => PLUGIN_EVENTCAL_ICAL_ICSURL_INLIST_DL, 'wc' => PLUGIN_EVENTCAL_ICAL_ICSURL_INLIST_WEBCAL, @@ -2389,6 +2414,31 @@ class serendipity_event_cal extends serendipity_event { function generate_content(&$title) { $title = PLUGIN_EVENTCAL_TITLE.' (' . $this->get_config('pagetitle') . ')'; + + // fake sidebar plugin output with enabled serendipity_plugin_eventwrapper for eventcal + if (serendipity_db_bool($this->get_config('eventwrapper', 'false'))) { + + global $serendipity; + $y = date("Y"); + $m = date("m"); + $months = $this->months(); + $monthName = $months[$m]; + $currmonth = $this->load_monthly_events($y, $m, false); // ORDERed BY tipo, sdato + $entryURI = '//' . $_SERVER['HTTP_HOST'] . $this->fetchPluginUri() . (($serendipity['rewrite'] == 'rewrite') ? '?' : '&') . 'calendar[cm]='.$month.'&calendar[cy]='.$year.'&calendar[ev]='; + + // some content output for the eventcalwrapper faking sidebar plugin + echo '
+

Events '.$monthName.' '.$y.'

+
    + '; + + foreach ($currmonth AS $event) { + echo '
  • '.$event['sdato'].' '.$event['sdesc']."
  • \n"; + } + echo " +
+
\n"; + } } function event_hook($event, &$bag, &$eventData, $addData = null) { @@ -2573,8 +2623,9 @@ class serendipity_event_cal extends serendipity_event { if (!$tfile || $tfile == 'style_eventcal.css') { $tfile = dirname(__FILE__) . '/style_eventcal.css'; - echo str_replace('{TEMPLATE_PATH}', $serendipity['eventcal']['pluginpath'], @file_get_contents($tfile)); + $frontend_css = str_replace('{TEMPLATE_PATH}', $serendipity['eventcal']['pluginpath'], @file_get_contents($tfile)); } + if (!empty($frontend_css)) $this->backend_eventcal_css($eventData, $frontend_css); return true; break; @@ -3240,7 +3291,8 @@ class serendipity_event_cal extends serendipity_event { case 'dberase': - echo '

' . strtoupper(PLUGIN_EVENTCAL_ADMIN_DBC_ERASE_TITLE) . '

'; + echo '

' . strtoupper(PLUGIN_EVENTCAL_ADMIN_DBC_ERASE_TITLE) . '

'."\n"; + $isTable = $this->droptable() ? true : false; // ok, questionaire // give back ok diff --git a/serendipity_event_cal/style_eventcal.css b/serendipity_event_cal/style_eventcal.css index 27d25dc3..b2531077 100644 --- a/serendipity_event_cal/style_eventcal.css +++ b/serendipity_event_cal/style_eventcal.css @@ -1,25 +1,88 @@ /************************************************************************************/ -/* style_eventcal.css for serendipity_eventcal_cal.php v.1.68 2015-11-28 Ian */ +/* style_eventcal.css for serendipity_eventcal_cal.php v.1.71 2015-12-04 Ian */ /************************************************************************************/ -/* disable 2k11 settings */ +/*****************************************/ +/* THEME resets and articleformat rules */ +/* You may overwrite this by a user.css, */ +/* or a template copy of this file */ +/*****************************************/ + +/* 2k11 theme conflict settings */ +.col2r #content { + min-width: 48em; +} +.col2r #searchform, .col2r #sidebar_left, .col2r #sidebar_right { + width: auto; +} +.serendipity_Entry_Date h3 { + margin: 0px 0.8em 0.8em; +} +.serendipity_entry { + margin: 0px 0.8em 3em; +} table { border-collapse: separate; border-spacing: 1px; } .serendipity_entry table { - border: 0 none; + border: inherit; margin: 0; } .serendipity_entry tbody td { padding: inherit; } +.serendipity_entry th, +.serendipity_entry tfoot td { padding: .125em 1em; } + +.serendipity_entry tbody td { padding: .1875em .5em; } + +.serendipity_entry thead, +.serendipity_entry tfoot { background: inherit; } + +.serendipity_entry thead { border-bottom: inherit; } +.serendipity_entry tfoot { border-top: inherit; } + +.serendipity_entry tbody tr:nth-child(odd) { background: inherit; } +.serendipity_entry tbody tr:nth-child(even) { background: inherit; } + +/* Next theme w/o articleformat */ +#primary #eventcal_wrapper { + margin-top: 3em +} +#primary .serendipity_Entry_Date h3 { + margin: 1rem 0.8rem; +} + +/* Bulletproof theme */ +div#content.threemain .serendipity_entry, +div#content.twomain .serendipity_entry { + margin: 0px; +} +div#content.threemain #eventcal_wrapper, +div#content.twomain #eventcal_wrapper { + margin-top: 1em; +} + +/* Sliver theme */ +#section_hookPlugin_entries .serendipity_Entry_Date { + margin: 1em 0; +} + + +/**********************************/ +/* Eventcal Plugin wrappers and tags */ +/**********************************/ -/* wraps and tags */ #eventcal_wrapper { - margin: 0; + margin: 0px 0.8em; padding: 0; font: 500 11px/16px Verdana,Arial,Helvetica,sans-serif; + max-width: 80em; /* 880px */ + min-width: 54em; /* 594px */ +} +.serendipity_entry_body #eventcal_wrapper { + margin: 0px; } br.clear { clear: both; } @@ -98,7 +161,8 @@ br.clear { clear: both; } /* eventcal TABLE classes /*******************************/ table.questionaire { - width: auto;padding: 2px; + width: auto; + padding: 2px; color: #333; border: 1px solid #6280A2; border-collapse: separate; /*no cellspacing: collapse;*/ @@ -106,19 +170,20 @@ table.questionaire { background-color: #C6C6DE; } table.eventborder { - margin: 20px 0 0 0; + margin: auto; padding: 0; border: 1px solid #999; - background: #d0d0d0 !important; + background: #d0d0d0; width: 100%; /*min-width:770px !important;*/ } +.serendipity_entry table.eventcal_monthbutton, table.eventcal_monthbutton { padding: 0; margin: 0; width: 100%; background: #d0d0d0; - border: 0; + border: 0 none; border-collapse: collapse; border-spacing: 0; } @@ -136,40 +201,45 @@ table.innereventborder { border-spacing: 1px 1px; /*empty-cells: hide;*/ } -table.innereventborder td { padding:1px; } table.innereventborder td.eventcal_weekly_eventlabel { width:2%; background-color: #555; text-align:center; color: #FF7400; } table.innereventborder td.eventcal_weekly_eventtitle { width:45%; } table.innereventborder td.eventcal_weekly_eventical { width:15%; text-align:center; font-weight:700; } -table.innereventborder td.eventcal_weekly_eventical img { border:1px solid #D5BFC0; width:28px; height:12px; } +table.innereventborder td.eventcal_weekly_eventical img { border:1px solid #D5BFC0; } table.innereventborder td.eventcal_weekly_eventdate { width:30%; text-align:center; font-size: xx-small; } table.innereventborder td.eventcal_weekly_eventappby { width:8%; text-align:center; } table.innereventborder td.eventcal_weekly_eventtext { width:98%; padding: 4px; } table.innereventborder td.eventcal_weekly_eventtext div.eventcal_weekly_eventurl { float:right;padding:1px 3px;border:1px dashed #333;background-color:#FF7400; } /* colors of day in monthview */ +.serendipity_entry table.eventcal_today, table.eventcal_today { width: 100%; background: #D5BFC0; + border: 0 none; border-collapse: collapse; border-spacing: 0; } td.eventcal_today { - background: #D5BFC0 !important; /* make sure the full cell has the same color */ + background: #D5BFC0; /* make sure the full cell has the same color */ } +.serendipity_entry table.eventcal_isday, table.eventcal_isday { width: 100%; background: #f0f0f0; + border: 0 none; border-collapse: collapse; border-spacing: 0; } +.serendipity_entry table.eventcal_noday, table.eventcal_noday { width: 100%; - background: #d0d0d0 !important; + background: #d0d0d0; + border: 0 none; border-collapse: collapse; border-spacing: 0; } td.eventcal_noday { - background: #d0d0d0 !important; /* make sure the full cell has the same color */ + background: #d0d0d0; /* make sure the full cell has the same color */ } table.eventcal_isday tr, table.eventcal_today tr, @@ -183,10 +253,13 @@ table.eventcal_weeknav { table.eventcal_weeknav_top { border-bottom: 0; } +table.eventcal_weeknav_bottom { + border-top: 0; +} /* be sure to have Weekday headers be near width 100% */ th.eventcal_weekhead { font: 500 11px/16px Verdana,Arial,Helvetica,sans-serif; - width: 14.2% !important; + width: 10.8em; /* 14.2% */ } tr.d0 { background-color: #d0d0d0; @@ -204,16 +277,21 @@ tr.a0, th.a0 { background-color: #a0a0a0; } td.weekcw { - width: 2% !important; + width: 2%; +} +.serendipity_entry table.eventcal_helptips, +table.eventcal_helptips { + width: 100%; + border: 0 none; + border-collapse: collapse; + border-spacing: 0; } - /****************************************/ /* eventcal single entry table settings */ /****************************************/ table.eventtext_entry { width: 100%; - padding: 6px 2px; border-collapse: separate; /* no cellspacing: collapse; */ border-spacing: 2px; font-size: 10px; @@ -224,30 +302,47 @@ table.eventtext_entry tr { table.eventtext_entry th { /* single entry shorttitle, date, app_by */ border: 1px solid navy; - text-align:left; + text-align: left; font: 500 9.5px verdana, arial, geneva, helvetica, sans-serif; - color: #BFB; /* some light-green color */ + background: #aaa; + color: navy; padding: 0 1px; } table.eventtext_entry td.entry { - background-color:#FDFDFD; + background-color: #FDFDFD; border: 1px solid navy; - width:78%; - padding: 2px; + width: 78%; + padding: .25em; } -table.eventtext_entry th.eventcal_links { height:12px; } -table.eventtext_entry th.center { text-align:center; } -table.eventtext_entry th.eventcal_links img { border:1px solid #D5BFC0; width:28px; height:12px; } +table.eventtext_entry th.eventcal_links { height: 2em; } +table.eventtext_entry th.center { clear: both; text-align:center; } +table.eventtext_entry th.eventcal_links img { border:1px solid #D5BFC0; } +.eventcal_links form input[type="image"] { + vertical-align: middle; +} +.eventcal_links form sup { + top: 0; +} /********************************/ /* eventcal form table settings */ /********************************/ +#eventcalEntry { + background: #f0f0f0; +} table.eventcal_form { width: 100%; - border: 1px solid #999; border-collapse: separate; /* no cellspacing: collapse; */ border-spacing: 1px 0; + padding: 0.1875em; +} +table.eventcal_form tbody { + -webkit-box-shadow: 0 2px 3px 0 #666; + -moz-box-shadow: 0 2px 3px 0 #666; + -o-box-shadow: 0 2px 3px 0 #666; + box-shadow: 0 2px 3px 0 #666; + border-radius: 0.1em; } th.eventformtitle { font: 600 11.5px verdana, arial, geneva, helvetica, sans-serif; @@ -256,11 +351,19 @@ th.eventformtitle { } .serendipity_entry tbody td.eventformdesc, td.eventformdesc { - padding: 2px 0; font: 500 11px verdana, arial, geneva, helvetica, sans-serif; text-align: left; background-color: #e0e0e0; /* form gray */ } +table.eventcal_form tbody td { + padding: 0.1875em 0.5em; +} +.serendipity_entry tbody .eventformdesc.addform_areainfo { + padding: 3em .5em; +} +.addform_areainfo { + vertical-align: middle; +} .formfield textarea { width: 98%; overflow: auto; /* in html wrap=virtual is not XHTML */ @@ -289,17 +392,21 @@ td.eventformdesc .icon-info-circled::before{ background-image: -o-radial-gradient(55% 50%, ellipse farthest-corner, #367e98, rgba(247, 255, 224, 0.5) 50%); background-image: -ms-radial-gradient(55% 50%, ellipse farthest-corner, #367e98, rgba(247, 255, 224, 0.5) 50%); background-image: radial-gradient(55% 50%, ellipse farthest-corner, #367e98, rgba(247, 255, 224, 0.5) 50%) rgba(199, 238, 252, 0.60); - border-radius: 0.8125em 0.8125em 0.8125em 0.8125em; - padding: 0.1em 0.5em; + border-radius: 0.8125em; + padding: 0.1825em 6px; -webkit-box-shadow: 0 0 2px 1px rgba(41, 69, 100, 0.5); -moz-box-shadow: 0 0 2px 1px rgba(41, 69, 100, 0.5); -o-box-shadow: 0 0 2px 1px rgba(41, 69, 100, 0.5); box-shadow: 0 0 2px 1px rgba(41, 69, 100, 0.5); outline: 0 none; + border-spacing: 0; + cursor: help; + vertical-align: middle; } -td.eventformdesc abbr[title] { +#eventcal_wrapper .eventformdesc abbr[title] { border-bottom: 0 none; text-decoration: none; + vertical-align: middle; } td.eventformdesc sub, td.eventformdesc sup { @@ -322,29 +429,46 @@ table.eventcal_appform { border-collapse: separate; /* no cellspacing: collapse; */ border-spacing: 0 2px; } + +table.eventcal_appform tbody tr.f0:nth-child(odd) { background: #f0f0f0; } +table.eventcal_appform tbody tr.f0:nth-child(even) { background: #ccc; } + th.eventcal_appform_title_lft { - padding-left:7px; + padding-left: .5em; text-align: left; } th.eventcal_appform_title_rgt { - padding-right:12px; + padding-right: 1em; text-align: right; } td.eventcal_appform_validation { - padding: 4px 2px 4px 7px; text-align: left; border-top: 1px solid #ff8040; - vertical-align: middle; - white-space:nowrap; + vertical-align: top; + white-space: nowrap; + padding: .1875em .5em; + width: auto; } -td.eventcal_appform_validation .eventcal_appdate { - white-space:normal; +td.eventcal_appform_validation input[type="checkbox"] { + margin: 0; + vertical-align: bottom; } -td.eventcal_appform_validation .eventcal_appldesc { - width:57%; +td.eventcal_appform_validation_last input[type="checkbox"] { + box-sizing: border-box; + margin: .1875em auto; + vertical-align: top; + margin-right: 1em; } -input.eventcal_appform_move, img.eventcal_appform_move { - margin-right:10px;float:right; +td.eventcal_appdate { + white-space: normal; + width: 16.4%; +} +td.eventcal_appldesc { + width: 100%; +} +input.eventcal_appform_move, +img.eventcal_appform_move { + padding-right: initial; } /*******************************/ @@ -354,21 +478,29 @@ input.eventcal_appform_move, img.eventcal_appform_move { font-weight: bold; text-shadow: 0px 2px 3px #555; color: #222; - vertical-align: bottom; /* depends on th.eventtext */ + vertical-align: top; /* depends on th.eventtext */ } #eventcal_wrapper .entryadmin span { - padding:0 0 0 3px; - border:1px solid #ccc; - background-color:#eee; + padding: 0 0 0 3px; + border: 1px solid #ccc; + background-color: #eee; + -webkit-box-shadow: 0 2px 3px 0 #666; + -moz-box-shadow: 0 2px 3px 0 #666; + -o-box-shadow: 0 2px 3px 0 #666; + box-shadow: 0 2px 3px 0 #666; + display: inline-block; + width: 6em; + height: 1.6em; + white-space: nowrap; } #eventcal_wrapper .entryadmin span.left { - display:block;float:left;width:33%;height:15px;white-space:nowrap; + float: left; } #eventcal_wrapper .entryadmin span.right { - display:block;float:right;width:33%;height:15px;text-align:right;padding-right:2px;white-space:nowrap; + float: right; } #eventcal_wrapper .entryadmin input { - background-color:#FFABAB; + background-color: #FFABAB; padding: 0; } .eventcal_todaycell { @@ -378,17 +510,17 @@ input.eventcal_appform_move, img.eventcal_appform_move { } .eventcal_lft { text-align: left; - vertical-align:top; + vertical-align: top; } .eventcal_rgt { text-align: right; - vertical-align:top; + vertical-align: top; } .serendipity_commentDirection { - text-align:justify; + text-align: justify; } .captcha { - border:1px solid #777; + border: 1px solid #777; } .eventcal_msg { text-align: center; @@ -408,31 +540,12 @@ input.eventcal_appform_move, img.eventcal_appform_move { .eventcal_button img { vertical-align: middle; } -.eventcal_entrytop { - padding: 4px; - font: 500 11px arial,helvetica,sans-serif; - color: #800040; - text-align: left; - white-space:nowrap; -} -.eventcal_entrybottom { - padding: 4px; - background: #e1e5de; - border-top: 1px solid #996; - border-bottom: 1px solid #996; - margin-bottom: 6px; - font: 500 11px verdana,arial,helvetica,sans-serif; - text-align: left; -} -.eventcal_splitentries { - clear: both; - background-color: #e1e5de; -} .eventcal_day { margin: 0; padding: 2px; text-align: center; - background-color: #f0f0f0;/*#d0d0d0;*/ + background-color: #f0f0f0; + border: 0 none; } .eventcal_week_cw { margin: 0; @@ -447,16 +560,21 @@ input.eventcal_appform_move, img.eventcal_appform_move { vertical-align: bottom; /*depends on eventcal_lft/rgt which sets to top*/ } .eventcal_weekly_title { - color: #800060; - font-weight: 800; + font-weight: 600; text-align: center; } +.eventcal_weekly_eventtext, .eventcal_weekly_daytitel { + background: #F0F0F0; text-align: left; - font-weight: 700; - color: #800060; width: 100%; } +.eventcal_weekly_eventtitle, +.eventcal_weekly_eventical, +.eventcal_weekly_eventappby { + background: #D5D5D5; +} + .eventcal_input { font: 500 11px verdana,arial,helvetica,sans-serif; border: 1px solid #333; @@ -475,6 +593,9 @@ input.eventcal_appform_move, img.eventcal_appform_move { text-decoration: none; vertical-align: middle; } +#eventcal_wrapper .eventformdesc .eventcal_tab { + vertical-align: initial; +} .eventcal_tab_dim { color: #888; font-weight: 500; @@ -512,22 +633,19 @@ span.eventtype { border: 1px solid #808080;border-width: 0 0 1px 0; } /* the help color buttons at bottom */ -span.mono { - display:block;float:left;width:100%;white-space:nowrap; -} -span.multi { - display:block;float:left;width:100%;white-space:nowrap; -} -span.recm { - display:block;float:left;width:100%;white-space:nowrap; -} +span.mono, +span.multi, +span.recm, span.recw { - display:block;float:left;width:100%;white-space:nowrap; + display: block; + float: left; + width: 100%; + white-space: nowrap; } span.tip { font: xx-small arial, helvetica, sans-serif; - text-align:center; - border:1px solid #000080; + text-align: center; + border: 1px solid #000080; } /* obfuscating spamblock markup and emoticate text */ .serendipity_comment_s9ymarkup { @@ -550,15 +668,6 @@ span.tip { /**************************/ /* link & button settings */ /**************************/ -.eventcal_entrytop a, -.eventcal_entrytop a:link, -.eventcal_entrytop a:visited, -.eventcal_entrytop a:hover, -.eventcal_entrytop a:active, -.eventcal_entrytop a:focus { - font: 700 12px arial,helvetica,sans-serif; - text-decoration: none; -} a.small_eventcal_link:link { color: #0000df; text-decoration: none; @@ -587,7 +696,7 @@ a.small_eventcal_link:focus { #eventcal_wrapper td.eventformbutton input { background: url('{TEMPLATE_PATH}img/button_background.png') repeat scroll 0 50% #80B0DA; - font-weight: 700 !important; + font-weight: 700; } /* Special class if the button is tag */ #eventcal_wrapper a.serendipityPrettyButton {