From c0c6e8aebc8eaf7f4c4b5d9398164d727dcb7330 Mon Sep 17 00:00:00 2001 From: Ian Date: Sat, 5 Jul 2014 11:40:00 +0200 Subject: [PATCH] try to remove bigger parts of inline css (untested) --- .../serendipity_event_karma.php | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/plugins/serendipity_event_karma/serendipity_event_karma.php b/plugins/serendipity_event_karma/serendipity_event_karma.php index 21983c89..8608a288 100644 --- a/plugins/serendipity_event_karma/serendipity_event_karma.php +++ b/plugins/serendipity_event_karma/serendipity_event_karma.php @@ -861,6 +861,11 @@ function vote(karmaVote,karmaId) { margin: 5px; } "); + if ($serendipity['version'][0] > 1) { + print("\n\n"); + break; + } + case 'css': // Some CSS notes: // @@ -939,6 +944,8 @@ function vote(karmaVote,karmaId) { } --JAM: END COMMENT BLOCK */ + ob_start(); + // Since errors might be printed at any time, always // output the text-mode CSS print << 1) { + // add replaced css content to the end of serendipity_admin.css, since with 2.0 the cached issue should be removed + $this->cssEventData($eventData, $karmacss); + } else { + echo $karmacss; + } + + + if ($event == 'backend_header' && $serendipity['version'][0] < 2) { print("\n\n"); } return true; @@ -1784,6 +1802,18 @@ END_IMG_CSS; } } + /** + * Add front- and backend css to serendipity(_admin).css + * + * @param array $eventData + * @param array $addData + * + */ + function cssEventData(&$eventData, &$becss) { + $eventData .= $becss; + } + + /** * Check, if visit counting for the actual visitor should be done. */