aboutsummaryrefslogtreecommitdiff
path: root/data/templates
diff options
context:
space:
mode:
Diffstat (limited to 'data/templates')
-rw-r--r--data/templates/bookmarks-vote.inc.tpl.php26
-rw-r--r--data/templates/bookmarks.tpl.php1
2 files changed, 27 insertions, 0 deletions
diff --git a/data/templates/bookmarks-vote.inc.tpl.php b/data/templates/bookmarks-vote.inc.tpl.php
new file mode 100644
index 0000000..89818f8
--- /dev/null
+++ b/data/templates/bookmarks-vote.inc.tpl.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Bookmark voting badge.
+ * Shows the number of votes and buttons to vote for or
+ * against a bookmark.
+ * Expects a $row variable with bookmark data
+ */
+if (!$GLOBALS['enableVoting']) {
+ return;
+}
+echo '<span class="vote-badge">';
+if (!$row['hasVoted']) {
+ echo '<a class="vote-for" href="'
+ . createVoteURL(true, $row['bId']) . '">+</a>';
+} else {
+ echo '<span class="vote-against-i">+</span>';
+}
+echo '<span class="voting">' . $row['bVoting'] . '</span>';
+if (!$row['hasVoted']) {
+ echo '<a class="vote-against" href="'
+ . createVoteURL(false, $row['bId']) . '">-</a>';
+} else {
+ echo '<span class="vote-against-i">-</span>';
+}
+echo '</span>';
+?> \ No newline at end of file
diff --git a/data/templates/bookmarks.tpl.php b/data/templates/bookmarks.tpl.php
index 2314b75..f35139a 100644
--- a/data/templates/bookmarks.tpl.php
+++ b/data/templates/bookmarks.tpl.php
@@ -301,6 +301,7 @@ if($currenttag!= '') {
//echo '<a href="'. $address .'"'. $rel .' ><img class="thumbnail" src="http://www.artviper.net/screenshots/screener.php?url='.$address.'&w=120&sdx=1280&userID='.$GLOBALS['thumbnailsUserId'].'&hash='.$thumbnailHash.'" />';
echo '<img class="thumbnail" onclick="window.location.href=\''.$address.'\'" src="http://www.artviper.net/screenshots/screener.php?url='.$address.'&w=120&sdx=1280&userID='.$GLOBALS['thumbnailsUserId'].'&hash='.$thumbnailHash.'" />';
}
+ include 'bookmarks-vote.inc.tpl.php';
echo '<div '.$adminBgClass.' >';;