From c1c71b3b64735582314f96655af73a5eb46c6724 Mon Sep 17 00:00:00 2001 From: Matthias Mees Date: Thu, 6 Mar 2014 18:08:42 +0100 Subject: [PATCH] Adapted backend markup + styles for serendipity_event_karma. --- .../serendipity_event_karma.php | 132 +++++++++--------- .../2k11/admin/serendipity_editor.js.tpl | 1 + templates/2k11/admin/style.css | 43 +++++- 3 files changed, 103 insertions(+), 73 deletions(-) diff --git a/plugins/serendipity_event_karma/serendipity_event_karma.php b/plugins/serendipity_event_karma/serendipity_event_karma.php index 3a612122..544e18f3 100644 --- a/plugins/serendipity_event_karma/serendipity_event_karma.php +++ b/plugins/serendipity_event_karma/serendipity_event_karma.php @@ -1001,7 +1001,7 @@ EOS; overflow: hidden; list-style: none; margin: $margin; - padding: 0px; + padding: 0; background-position: left top; text-align: center; } @@ -1011,8 +1011,8 @@ EOS; .serendipity_karmaVoting_links a , .serendipity_karmaVoting_current-rating { position:absolute; - top: 0px; - left: 0px; + top: 0; + left: 0; text-indent: -9000em; height: {$h}px; line-height: {$h}px; @@ -1657,14 +1657,14 @@ END_IMG_CSS; // Variables for display if ($linkPrevious) { - $linkPrevious = ''; + $linkPrevious = ' '. PREVIOUS .''; } else { - $linkPrevious = ' '; + $linkPrevious = ''. NO_ENTRIES_TO_PRINT .''; } if ($linkNext) { - $linkNext = ''; + $linkNext = ''. NEXT .' '; } else { - $linkNext = ' '; + $linkNext = ''. NO_ENTRIES_TO_PRINT .''; } $paging = sprintf(PAGE_BROWSE_COMMENTS, $page, $pages, $totalVotes); @@ -1677,91 +1677,91 @@ END_IMG_CSS; // Start the form for display and deleting if (is_array($sql)) { - print("
\n".serendipity_setFormToken()." - -"); + print("\n".serendipity_setFormToken()); - // Print the header paging table - print(" - - - - - - -
$linkPrevious$paging$linkNext
-"); // Start the vote table print(" - +
+
    "); // Print each vote $i = 0; foreach ($sql as $vote) { $i++; // entryid, title, points, ip, user_agent, votetime + if (strlen($vote['title']) > 40) { + $votetitle = substr($vote['title'], 0, 40) . '…'; + } else { + $votetitle = $vote['title']; + } $entrylink = serendipity_archiveURL($vote['entryid'], $vote['title'], 'serendipityHTTPPath', true); - $entryFilterHtml = ""; - $ipFilterHtml = ""; - $timestr = strftime('%H:%M:%S
    %n%a %b %d %Y', $vote['votetime']); - $cssClass = 'serendipity_admin_list_item serendipity_admin_list_item_'; - $cssClass .= (($i % 2 ==0)?'even':'uneven'); + $entryFilterHtml = "". FILTERS .""; + $ipFilterHtml = "". FILTERS .""; + $timestr = strftime('%a %b %d %Y, %H:%M:%S', $vote['votetime']); + $cssClass = (($i % 2 ==0)?'even':'odd'); $barClass = str_replace(array('.',' '), array('_','_'), $this->image_name); $barHtml = $this->createRatingBar(null, $vote['points'], 1, $barClass); $barHtml = sprintf($barHtml, 'what', $vote['points'], '1'); print(" -
- - - - - - - - - +
  • + + + + + + +
    + + +
    + +

    {$votetitle} + + $entryFilterHtml +

    + + $barHtml + +
    +
    +
    ". ON ."
    +
    $timestr
    +
    IP
    +
    {$vote['ip']} $ipFilterHtml
    +
    UA
    +
    {$vote['user_agent']}
    +
    +
    +
  • "); } // End the vote table print(" -
    - - - - - - - $barHtml{$vote['title']} $entryFilterHtml
    $timestr{$vote['ip']} $ipFilterHtml{$vote['user_agent']}
    + "); + // Print the footer paging table + print(" +