hide bookmarks below a configurable threshold
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@507 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
parent
ed1636cb51
commit
79b28ed45c
4 changed files with 18 additions and 2 deletions
|
@ -431,6 +431,14 @@ $enableVoting = true;
|
||||||
*/
|
*/
|
||||||
$votingMode = 2;
|
$votingMode = 2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hide bookmarks below a certain voting from all users.
|
||||||
|
* Null to deactivate it.
|
||||||
|
*
|
||||||
|
* @var integer
|
||||||
|
*/
|
||||||
|
$hideBelowVoting = null;
|
||||||
|
|
||||||
|
|
||||||
/****************************
|
/****************************
|
||||||
* Website Thumbnails
|
* Website Thumbnails
|
||||||
|
|
|
@ -8,6 +8,7 @@ ChangeLog for SemantiScuttle
|
||||||
- Configuration option to disable registration
|
- Configuration option to disable registration
|
||||||
- Implement request #2874049: "Feeling lucky" button
|
- Implement request #2874049: "Feeling lucky" button
|
||||||
just add "?lucky=1" as parameter to search page
|
just add "?lucky=1" as parameter to search page
|
||||||
|
- Hide bookmarks with vote < $threshold from users (not admins)
|
||||||
|
|
||||||
|
|
||||||
0.94 - 2009-10-02
|
0.94 - 2009-10-02
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
logged in anymore (name not shown on top right)
|
logged in anymore (name not shown on top right)
|
||||||
- Make users inactive by default when registered newly
|
- Make users inactive by default when registered newly
|
||||||
- have to be activated by admins
|
- have to be activated by admins
|
||||||
- Hide bookmarks with vote < 0 (or threshold) from unregistered users
|
|
||||||
- Add RDFa to user profile page
|
- Add RDFa to user profile page
|
||||||
- use recaptcha or alike
|
- use recaptcha or alike
|
||||||
|
|
||||||
|
|
|
@ -550,9 +550,17 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
|
||||||
}
|
}
|
||||||
$query_1 .= 'B.*, U.'. $userservice->getFieldName('username');
|
$query_1 .= 'B.*, U.'. $userservice->getFieldName('username');
|
||||||
|
|
||||||
$query_2 = ' FROM '. $userservice->getTableName() .' AS U, '. $this->getTableName() .' AS B';
|
$query_2 = ' FROM '. $userservice->getTableName() .' AS U'
|
||||||
|
. ', '. $this->getTableName() .' AS B';
|
||||||
|
|
||||||
$query_3 = ' WHERE B.uId = U.'. $userservice->getFieldName('primary') . $privacy;
|
$query_3 = ' WHERE B.uId = U.'. $userservice->getFieldName('primary') . $privacy;
|
||||||
|
|
||||||
|
if ($GLOBALS['enableVoting'] && $GLOBALS['hideBelowVoting'] !== null
|
||||||
|
&& !$userservice->isAdmin($userservice->getCurrentUserId())
|
||||||
|
) {
|
||||||
|
$query_3 .= ' AND B.bVoting >= ' . (int)$GLOBALS['hideBelowVoting'];
|
||||||
|
}
|
||||||
|
|
||||||
if (is_null($watched)) {
|
if (is_null($watched)) {
|
||||||
if (!is_null($user)) {
|
if (!is_null($user)) {
|
||||||
$query_3 .= ' AND B.uId = '. $user;
|
$query_3 .= ' AND B.uId = '. $user;
|
||||||
|
|
Loading…
Reference in a new issue