move bookmark thumbnail code in separate template file
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@436 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
parent
10f59ea771
commit
f01fb13622
2 changed files with 18 additions and 12 deletions
|
@ -8,19 +8,24 @@
|
||||||
if (!$GLOBALS['enableVoting']) {
|
if (!$GLOBALS['enableVoting']) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
echo '<span class="vote-badge">';
|
if ($row['hasVoted']) {
|
||||||
|
$classes = 'vote-badge vote-badge-inactive';
|
||||||
|
} else {
|
||||||
|
$classes = 'vote-badge';
|
||||||
|
}
|
||||||
|
echo '<span class="' . $classes . '">';
|
||||||
if (!$row['hasVoted']) {
|
if (!$row['hasVoted']) {
|
||||||
echo '<a class="vote-for" href="'
|
echo '<a class="vote-for" href="'
|
||||||
. createVoteURL(true, $row['bId']) . '">+</a>';
|
. createVoteURL(true, $row['bId']) . '">+</a>';
|
||||||
} else {
|
} else {
|
||||||
echo '<span class="vote-against-i">+</span>';
|
echo '<span class="vote-for-inactive">+</span>';
|
||||||
}
|
}
|
||||||
echo '<span class="voting">' . $row['bVoting'] . '</span>';
|
echo '<span class="voting">' . $row['bVoting'] . '</span>';
|
||||||
if (!$row['hasVoted']) {
|
if (!$row['hasVoted']) {
|
||||||
echo '<a class="vote-against" href="'
|
echo '<a class="vote-against" href="'
|
||||||
. createVoteURL(false, $row['bId']) . '">-</a>';
|
. createVoteURL(false, $row['bId']) . '">-</a>';
|
||||||
} else {
|
} else {
|
||||||
echo '<span class="vote-against-i">-</span>';
|
echo '<span class="vote-against-inactive">-</span>';
|
||||||
}
|
}
|
||||||
echo '</span>';
|
echo '</span>';
|
||||||
?>
|
?>
|
|
@ -184,7 +184,7 @@ if($currenttag!= '') {
|
||||||
|
|
||||||
$pagesBanner = '<p class="paging">'. $bfirst .'<span> / </span>'. $bprev .'<span> / </span>'. $bnext .'<span> / </span>'. $blast .'<span> / </span>'. sprintf(T_('Page %d of %d'), $page, $totalpages) ." ". $brss ." </p>\n";
|
$pagesBanner = '<p class="paging">'. $bfirst .'<span> / </span>'. $bprev .'<span> / </span>'. $bnext .'<span> / </span>'. $blast .'<span> / </span>'. sprintf(T_('Page %d of %d'), $page, $totalpages) ." ". $brss ." </p>\n";
|
||||||
|
|
||||||
if(getPerPageCount($currentUser) > 10) {
|
if (getPerPageCount($currentUser) > 10) {
|
||||||
echo $pagesBanner; // display a page banner if too many bookmarks to manage
|
echo $pagesBanner; // display a page banner if too many bookmarks to manage
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -261,8 +261,13 @@ if($currenttag!= '') {
|
||||||
// Copy link
|
// Copy link
|
||||||
if ($userservice->isLoggedOn()
|
if ($userservice->isLoggedOn()
|
||||||
&& ($currentUser->getId() != $row['uId'])
|
&& ($currentUser->getId() != $row['uId'])
|
||||||
&& !$bookmarkservice->bookmarkExists($row['bAddress'], $currentUser->getId())) {
|
&& !$bookmarkservice->bookmarkExists($row['bAddress'], $currentUser->getId())
|
||||||
$copy .= ' - <a href="'. createURL('bookmarks', $currentUser->getUsername() .'?action=add&copyOf='. $row['bId']) .'" title="'.T_('Copy this bookmark to YOUR bookmarks.').'">'. T_('Copy') .'</a>';
|
) {
|
||||||
|
$copy .= ' - <a href="'
|
||||||
|
. createURL('bookmarks', $currentUser->getUsername() .'?action=add&copyOf='. $row['bId'])
|
||||||
|
. '" title="'.T_('Copy this bookmark to YOUR bookmarks.').'">'
|
||||||
|
. T_('Copy')
|
||||||
|
. '</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Nofollow option
|
// Nofollow option
|
||||||
|
@ -296,11 +301,7 @@ if($currenttag!= '') {
|
||||||
|
|
||||||
// Output
|
// Output
|
||||||
echo '<li class="xfolkentry'. $access .'" >'."\n";
|
echo '<li class="xfolkentry'. $access .'" >'."\n";
|
||||||
if ($GLOBALS['enableWebsiteThumbnails']) {
|
include 'bookmarks-thumbnail.inc.tpl.php';
|
||||||
$thumbnailHash = md5($address.$GLOBALS['thumbnailsUserId'].$GLOBALS['thumbnailsKey']);
|
|
||||||
//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';
|
include 'bookmarks-vote.inc.tpl.php';
|
||||||
|
|
||||||
echo '<div '.$adminBgClass.' >';;
|
echo '<div '.$adminBgClass.' >';;
|
||||||
|
|
Loading…
Reference in a new issue