aboutsummaryrefslogtreecommitdiff
path: root/data/templates
diff options
context:
space:
mode:
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-10-26 21:55:43 +0000
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-10-26 21:55:43 +0000
commitaf157c6bb72518f8ee3096f6370c920ef9b965a3 (patch)
tree74c2ef2e92825ac5b8bae214fb93680774733724 /data/templates
parent44fd0e29f4d856058f3bac3a3581d00919420169 (diff)
downloadsemanticscuttle-af157c6bb72518f8ee3096f6370c920ef9b965a3.tar.gz
semanticscuttle-af157c6bb72518f8ee3096f6370c920ef9b965a3.tar.bz2
basic voting system works; but layout is missing
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@432 b3834d28-1941-0410-a4f8-b48e95affb8f
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.' >';;