Minor Fix: improve common description of tags and add variable into config file to allow or not everybody to edit these descriptions [Config file modified: ]
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@263 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
parent
6a7316fe01
commit
3a5dafcdc4
6 changed files with 23 additions and 17 deletions
|
@ -15,7 +15,7 @@ $usecache = false; # use cache ? {true,false}
|
||||||
$dir_cache = dirname(__FILE__) .'/cache/'; # directory where cache files will be stored
|
$dir_cache = dirname(__FILE__) .'/cache/'; # directory where cache files will be stored
|
||||||
$cleanurls = false; # Use mod_rewrite to hide PHP extensions {true,false[default]}
|
$cleanurls = false; # Use mod_rewrite to hide PHP extensions {true,false[default]}
|
||||||
# be cautious, doesn't work for all hosts, you may need to modify the .htaccess file
|
# be cautious, doesn't work for all hosts, you may need to modify the .htaccess file
|
||||||
$debugMode = false; # if true, show debug messages
|
$debugMode = false; # if true, show debug messages
|
||||||
|
|
||||||
#### Database ####
|
#### Database ####
|
||||||
$dbtype = 'mysql4'; # Database driver {mysql, mysqli, mysql4, oracle, postgres, sqlite, db2, firebird, mssql, mssq-odbc}
|
$dbtype = 'mysql4'; # Database driver {mysql, mysqli, mysql4, oracle, postgres, sqlite, db2, firebird, mssql, mssq-odbc}
|
||||||
|
@ -78,6 +78,7 @@ $thumbnailsKey = ''; #then artviper.net send you a UserId and a secretKey
|
||||||
|
|
||||||
### Tags ###
|
### Tags ###
|
||||||
$enableCommonTagDescription = true; # enableCommonTagDescription {true, false}
|
$enableCommonTagDescription = true; # enableCommonTagDescription {true, false}
|
||||||
|
$enableCommonTagDescriptionEditedByAll = true; #true mean everybody can edit common description. Else just the admins can do it.
|
||||||
$menuTag = 'menu'; # name of the tag whose subtags will appear into the menu box
|
$menuTag = 'menu'; # name of the tag whose subtags will appear into the menu box
|
||||||
$maxSizeMenuBlock = 7; # maximum number of items (tags) appearing into menu box
|
$maxSizeMenuBlock = 7; # maximum number of items (tags) appearing into menu box
|
||||||
$menu2Tags = array('example', 'of', 'menu', 'tags'); # list of tags used by menu2 sidebar box (void list = hidden menu2 box)
|
$menu2Tags = array('example', 'of', 'menu', 'tags'); # list of tags used by menu2 sidebar box (void list = hidden menu2 box)
|
||||||
|
|
|
@ -302,6 +302,7 @@ p.commondescription {
|
||||||
padding-left:5px;
|
padding-left:5px;
|
||||||
color: #555;
|
color: #555;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
font-size: medium;
|
||||||
border-left: 1px solid #CC8;
|
border-left: 1px solid #CC8;
|
||||||
width: 70%;
|
width: 70%;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ $currentUser = $userservice->getCurrentObjectUser();
|
||||||
list ($url, $tag) = explode('/', $_SERVER['PATH_INFO']);
|
list ($url, $tag) = explode('/', $_SERVER['PATH_INFO']);
|
||||||
|
|
||||||
//permissions
|
//permissions
|
||||||
if(!$userservice->isLoggedOn()) {
|
if(!$userservice->isLoggedOn() || (!$GLOBALS['enableCommonTagDescriptionEditedByAll'] && !$currentUser->isAdmin())) {
|
||||||
$tplVars['error'] = T_('Permission denied.');
|
$tplVars['error'] = T_('Permission denied.');
|
||||||
$templateservice->loadTemplate('error.500.tpl', $tplVars);
|
$templateservice->loadTemplate('error.500.tpl', $tplVars);
|
||||||
exit();
|
exit();
|
||||||
|
|
|
@ -35,23 +35,25 @@ if(($currenttag!= '' && $GLOBALS['enableCommonTagDescription'])
|
||||||
|
|
||||||
|
|
||||||
<p class="commondescription"><?php
|
<p class="commondescription"><?php
|
||||||
|
$cDescription = '';
|
||||||
if($currenttag!= '' && $cdservice->getLastTagDescription($currenttag)) {
|
if($currenttag!= '' && $cdservice->getLastTagDescription($currenttag)) {
|
||||||
$description = $cdservice->getLastTagDescription($currenttag);
|
$cDescription = $cdservice->getLastTagDescription($currenttag);
|
||||||
echo nl2br(filter($description['cdDescription']));
|
echo nl2br(filter($cDescription['cdDescription']));
|
||||||
} elseif(isset($hash) && $cdservice->getLastBookmarkDescription($hash)) {
|
} elseif(isset($hash) && $cdservice->getLastBookmarkDescription($hash)) {
|
||||||
$description = $cdservice->getLastBookmarkDescription($hash);
|
$cDescription = $cdservice->getLastBookmarkDescription($hash);
|
||||||
echo nl2br(filter($description['cdTitle'])). "<br/>";
|
echo nl2br(filter($cDescription['cdTitle'])). "<br/>";
|
||||||
echo nl2br(filter($description['cdDescription'])). "<br/>";
|
echo nl2br(filter($cDescription['cdDescription'])). "<br/>";
|
||||||
}
|
}
|
||||||
|
|
||||||
//common tag description edit
|
//common tag description edit
|
||||||
if($userservice->isLoggedOn()) {
|
if($userservice->isLoggedOn()) {
|
||||||
if($currenttag!= '') {
|
if($currenttag!= '' && ($GLOBALS['enableCommonTagDescriptionEditedByAll'] || $currentUser->isAdmin())) {
|
||||||
echo ' <a href="'. createURL('tagcommondescriptionedit', $currenttag).'">';
|
echo ' <a href="'. createURL('tagcommondescriptionedit', $currenttag).'" title="'.T_('Edit the common description of this tag').'">';
|
||||||
echo T_('common description').' <img src="'.ROOT.'images/b_edit.png" /></a>';
|
echo !is_array($cDescription) || strlen($cDescription['cdDescription'])==0?T_('Edit the common description of this tag'):'';
|
||||||
|
echo ' <img src="'.ROOT.'images/b_edit.png" /></a>';
|
||||||
} elseif(isset($hash)) {
|
} elseif(isset($hash)) {
|
||||||
echo ' (<a href="'.createURL('bookmarkcommondescriptionedit', $hash).'">';
|
echo ' (<a href="'.createURL('bookmarkcommondescriptionedit', $hash).'" title="'.T_('Edit the common description of this bookmark').'">';
|
||||||
echo T_('edit common description').'</a>)';
|
echo T_('Edit the common description of this bookmark').'</a>)';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?></p>
|
?></p>
|
||||||
|
@ -65,14 +67,15 @@ if($currenttag!= '' && $user!='') {
|
||||||
if($tagservice->getDescription($currenttag, $userObject['uId'])) { ?>
|
if($tagservice->getDescription($currenttag, $userObject['uId'])) { ?>
|
||||||
|
|
||||||
<p class="commondescription"><?php
|
<p class="commondescription"><?php
|
||||||
$description = $tagservice->getDescription($currenttag, $userObject['uId']);
|
$pDescription = $tagservice->getDescription($currenttag, $userObject['uId']);
|
||||||
echo nl2br(filter($description['tDescription']));
|
echo nl2br(filter($pDescription['tDescription']));
|
||||||
|
|
||||||
//personal tag description edit
|
//personal tag description edit
|
||||||
if($userservice->isLoggedOn()) {
|
if($userservice->isLoggedOn()) {
|
||||||
if($currenttag!= '') {
|
if($currenttag!= '') {
|
||||||
echo ' <a href="'. createURL('tagedit', $currenttag).'">';
|
echo ' <a href="'. createURL('tagedit', $currenttag).'" title="'.T_('Edit your personal description of this tag').'" >';
|
||||||
echo T_('personal description').' <img src="'.ROOT.'images/b_edit.png" /></a>';
|
echo strlen($pDescription['tDescription'])==0?T_('Edit your personal description of this tag'):'';
|
||||||
|
echo ' <img src="'.ROOT.'images/b_edit.png" /></a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?></p>
|
?></p>
|
||||||
|
|
|
@ -22,7 +22,7 @@ if ($userservice->isLoggedOn()) {
|
||||||
<li><a href="<?php echo $deletelink; ?>"><?php echo T_('Delete Tag') ?></a></li>
|
<li><a href="<?php echo $deletelink; ?>"><?php echo T_('Delete Tag') ?></a></li>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<li><a href="<?php echo $tagdesclink; ?>"><?php echo T_('Edit Tag Description') ?></a></li>
|
<li><a href="<?php echo $tagdesclink; ?>"><?php echo T_('Edit Tag Description') ?></a></li>
|
||||||
<?php if ($GLOBALS['enableCommonTagDescription']): ?>
|
<?php if ($GLOBALS['enableCommonTagDescription'] && ($GLOBALS['enableCommonTagDescriptionEditedByAll'] || $currentUser->isAdmin() )): ?>
|
||||||
<li><a href="<?php echo $commondesclink; ?>"><?php echo T_('Edit Tag Common Description') ?></a></li>
|
<li><a href="<?php echo $commondesclink; ?>"><?php echo T_('Edit Tag Common Description') ?></a></li>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<li><a href="<?php echo $addtag2taglinklink; ?>"><?php echo T_('Create a link to another tag') ?></a></li>
|
<li><a href="<?php echo $addtag2taglinklink; ?>"><?php echo T_('Create a link to another tag') ?></a></li>
|
||||||
|
|
|
@ -95,6 +95,7 @@ ALTER TABLE `sc_searchhistory` CHARACTER SET utf8 COLLATE utf8_general_ci;
|
||||||
|
|
||||||
- Upgrade your current configuration file (config.inc.php) with respect to config.inc.php.example
|
- Upgrade your current configuration file (config.inc.php) with respect to config.inc.php.example
|
||||||
* Add variable : $descriptionAnchors = array("author", "isbn", "address"=>"[address][street][/street][city][/city][/address]"); #add a possible anchor (structured content) for bookmarks' description field
|
* Add variable : $descriptionAnchors = array("author", "isbn", "address"=>"[address][street][/street][city][/city][/address]"); #add a possible anchor (structured content) for bookmarks' description field
|
||||||
|
* Add variable : $enableCommonTagDescriptionEditedByAll = true; #true mean everybody can edit common description. Else just the admins can do it.
|
||||||
|
|
||||||
=== From version 0.90 to 0.91 ===
|
=== From version 0.90 to 0.91 ===
|
||||||
- Backup you database
|
- Backup you database
|
||||||
|
|
Loading…
Reference in a new issue