aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin.php1
-rw-r--r--admin/cat_options.php41
-rw-r--r--admin/configuration.php39
-rw-r--r--language/en_UK.iso-8859-1/help/cat_options.html6
-rw-r--r--language/en_UK.iso-8859-1/help/configuration.html3
-rw-r--r--language/fr_FR.iso-8859-1/help/cat_options.html5
-rw-r--r--language/fr_FR.iso-8859-1/help/configuration.html3
-rw-r--r--template/yoga/admin.tpl3
-rw-r--r--template/yoga/admin/configuration.tpl32
9 files changed, 49 insertions, 84 deletions
diff --git a/admin.php b/admin.php
index 9282f3430..90a6d63b2 100644
--- a/admin.php
+++ b/admin.php
@@ -94,6 +94,7 @@ $template->assign_vars(
'U_CATEGORIES'=> $link_start.'cat_list',
'U_MOVE'=> $link_start.'cat_move',
'U_CAT_UPLOAD'=> $opt_link.'upload',
+ 'U_CAT_COMMENTS'=> $opt_link.'comments',
'U_CAT_VISIBLE'=> $opt_link.'visible',
'U_CAT_STATUS'=> $opt_link.'status',
'U_CAT_OPTIONS'=> $link_start.'cat_options',
diff --git a/admin/cat_options.php b/admin/cat_options.php
index 305c764c1..8aaf4ad14 100644
--- a/admin/cat_options.php
+++ b/admin/cat_options.php
@@ -60,6 +60,16 @@ UPDATE '.CATEGORIES_TABLE.'
pwg_query($query);
break;
}
+ case 'comments' :
+ {
+ $query = '
+UPDATE '.CATEGORIES_TABLE.'
+ SET commentable = \'false\'
+ WHERE id IN ('.implode(',', $_POST['cat_true']).')
+;';
+ pwg_query($query);
+ break;
+ }
case 'visible' :
{
set_cat_visible($_POST['cat_true'], 'false');
@@ -98,6 +108,16 @@ UPDATE '.CATEGORIES_TABLE.'
pwg_query($query);
break;
}
+ case 'comments' :
+ {
+ $query = '
+UPDATE '.CATEGORIES_TABLE.'
+ SET commentable = \'true\'
+ WHERE id IN ('.implode(',', $_POST['cat_false']).')
+;';
+ pwg_query($query);
+ break;
+ }
case 'visible' :
{
set_cat_visible($_POST['cat_false'], 'true');
@@ -185,6 +205,27 @@ SELECT id,name,uppercats,global_rank
);
break;
}
+ case 'comments' :
+ {
+ $query_true = '
+SELECT id,name,uppercats,global_rank
+ FROM '.CATEGORIES_TABLE.'
+ WHERE commentable = \'true\'
+;';
+ $query_false = '
+SELECT id,name,uppercats,global_rank
+ FROM '.CATEGORIES_TABLE.'
+ WHERE commentable = \'false\'
+;';
+ $template->assign_vars(
+ array(
+ 'L_SECTION' => $lang['cat_comments_title'],
+ 'L_CAT_OPTIONS_TRUE' => $lang['authorized'],
+ 'L_CAT_OPTIONS_FALSE' => $lang['forbidden'],
+ )
+ );
+ break;
+ }
case 'visible' :
{
$query_true = '
diff --git a/admin/configuration.php b/admin/configuration.php
index c45fddc85..12235cce6 100644
--- a/admin/configuration.php
+++ b/admin/configuration.php
@@ -158,32 +158,6 @@ UPDATE '.CONFIG_TABLE.'
load_conf_from_db();
}
-if ( $page['section']=='comments' and !is_adviser() )
-{
- if (isset($_POST['falsify'])
- and isset($_POST['cat_true'])
- and count($_POST['cat_true']) > 0)
- {
- $query = '
-UPDATE '.CATEGORIES_TABLE.'
- SET commentable = \'false\'
- WHERE id IN ('.implode(',', $_POST['cat_true']).')
-;';
- pwg_query($query);
- }
- if (isset($_POST['trueify'])
- and isset($_POST['cat_false'])
- and count($_POST['cat_false']) > 0)
- {
- $query = '
-UPDATE '.CATEGORIES_TABLE.'
- SET commentable = \'true\'
- WHERE id IN ('.implode(',', $_POST['cat_false']).')
-;';
- pwg_query($query);
- }
-}
-
//----------------------------------------------------- template initialization
$template->set_filenames( array('config'=>'admin/configuration.tpl') );
@@ -252,19 +226,6 @@ switch ($page['section'])
)
);
}
-
- $query_true = '
-SELECT id,name,uppercats,global_rank
- FROM '.CATEGORIES_TABLE.'
- WHERE commentable = \'true\'
-;';
- $query_false = '
-SELECT id,name,uppercats,global_rank
- FROM '.CATEGORIES_TABLE.'
- WHERE commentable = \'false\'
-;';
- display_select_cat_wrapper($query_true,array(),'comments.category_option_true');
- display_select_cat_wrapper($query_false,array(),'comments.category_option_false');
break;
}
case 'default' :
diff --git a/language/en_UK.iso-8859-1/help/cat_options.html b/language/en_UK.iso-8859-1/help/cat_options.html
index 2db75ed0a..c79d3aac3 100644
--- a/language/en_UK.iso-8859-1/help/cat_options.html
+++ b/language/en_UK.iso-8859-1/help/cat_options.html
@@ -10,9 +10,9 @@ categories at once.</p>
non remote categories are shown.</dd>
<dt>Comments</dt>
- <dd>Authorize users to add comments on selected categories. By
- inheritance, an element is commentable if it belongs at least to one
- commentable category.</dd>
+ <dd>Authorize users to add comments on selected categories.
+Selects the categories which are commentable.
+An image is commentable if it belongs to at least one category that is commentable.</dd>
<dt>Lock</dt>
<dd>Selected categories will temporary been disabled for maintenance. If
diff --git a/language/en_UK.iso-8859-1/help/configuration.html b/language/en_UK.iso-8859-1/help/configuration.html
index be92d9a9c..14da93362 100644
--- a/language/en_UK.iso-8859-1/help/configuration.html
+++ b/language/en_UK.iso-8859-1/help/configuration.html
@@ -116,7 +116,4 @@ Sends an email to the administrators when a user enters a comment and this comme
Sends an email to the administrators when a user enters a comment that requires validation by the admin.
User comments validation takes place in the screen <span class="pwgScreen">Administration, Pictures, Comments</span>.</li>
- <li><strong>Authorize users to add comments on selected categories</strong>:
- Selects the categories which are commentable. An image is commentable if it belongs to at least one category that is commentable.</li>
-
</ul>
diff --git a/language/fr_FR.iso-8859-1/help/cat_options.html b/language/fr_FR.iso-8859-1/help/cat_options.html
index ba76617f5..e06e47e6e 100644
--- a/language/fr_FR.iso-8859-1/help/cat_options.html
+++ b/language/fr_FR.iso-8859-1/help/cat_options.html
@@ -12,9 +12,8 @@ distantes.</dd>
<dt>Commentaires utilisateur</dt>
- <dd>Autoriser les utilisateurs à commenter les images des catégories
-sélectionnées. Par héritage, une image est commentable si elle appartient à
-au moins une catégorie commentable.</dd>
+ <dd>Autoriser les utilisateurs à ajouter des commentaires dans les catégories sélectionnée.
+Par héritage, une image est commentable si elle appartient à au moins une catégorie commentable.</dd>
<dt>Verrouiller</dt>
diff --git a/language/fr_FR.iso-8859-1/help/configuration.html b/language/fr_FR.iso-8859-1/help/configuration.html
index 32cf50352..1ed295524 100644
--- a/language/fr_FR.iso-8859-1/help/configuration.html
+++ b/language/fr_FR.iso-8859-1/help/configuration.html
@@ -121,7 +121,4 @@ Envoi un courriel aux administrateurrs lorsqu'un utilisateur enregistre un comme
Envoi un courriel aux administrateurrs lorsqu'un utilisateur enregistre un commentaire qui demande une validation de la part des administrateurs.
La validation des commentaires utilisateurs a lieu dans l'écran <span class="pwgScreen">Administration, Images, Commentaires</span>.</li>
-<li><strong>Autoriser les utilisateurs à ajouter des commentaires dans les catégories sélectionnées</strong>:
-Une image est commentable si elle appartient à au moins une catégorie commentable.</li>
-
</ul>
diff --git a/template/yoga/admin.tpl b/template/yoga/admin.tpl
index 5920f4e95..e3f34c2d2 100644
--- a/template/yoga/admin.tpl
+++ b/template/yoga/admin.tpl
@@ -15,8 +15,8 @@
<dd>
<ul>
<li><a href="{U_CONFIG_GENERAL}">{lang:general}</a></li>
- <li><a href="{U_CONFIG_DISPLAY}">{lang:conf_default}</a></li>
<li><a href="{U_CONFIG_COMMENTS}">{lang:comments}</a></li>
+ <li><a href="{U_CONFIG_DISPLAY}">{lang:conf_default}</a></li>
</ul>
</dd>
</dl>
@@ -29,6 +29,7 @@
<li><a href="{U_CATEGORIES}">{lang:manage}</a></li>
<li><a href="{U_MOVE}">{lang:Move}</a></li>
<li><a href="{U_CAT_UPLOAD}">{lang:upload}</a></li>
+ <li><a href="{U_CAT_COMMENTS}">{lang:comments}</a></li>
<li><a href="{U_CAT_VISIBLE}">{lang:lock}</a></li>
<li><a href="{U_CAT_STATUS}">{lang:cat_security}</a></li>
<!-- BEGIN representative -->
diff --git a/template/yoga/admin/configuration.tpl b/template/yoga/admin/configuration.tpl
index 7622564d4..a6b14e1e5 100644
--- a/template/yoga/admin/configuration.tpl
+++ b/template/yoga/admin/configuration.tpl
@@ -221,35 +221,3 @@
<input class="submit" type="reset" name="reset" value="{lang:Reset}">
</p>
</form>
-
-
-<!-- BEGIN comments -->
-<form method="post" action="{F_ACTION}" class="properties">
-<fieldset>
- <legend>{lang:cat_comments_title}</legend>
- <table class="doubleSelect">
- <tr>
- <td>
- <h3>{lang:authorized}</h3>
- <select class="categoryList" name="cat_true[]" multiple="multiple" size="30">
- <!-- BEGIN category_option_true -->
- <option {comments.category_option_true.SELECTED} value="{comments.category_option_true.VALUE}">{comments.category_option_true.OPTION}</option>
- <!-- END category_option_true -->
- </select>
- <p><input class="submit" type="submit" value="&raquo;" name="falsify" style="font-size:15px;" {TAG_INPUT_ENABLED}/></p>
- </td>
-
- <td>
- <h3>{lang:forbidden}</h3>
- <select class="categoryList" name="cat_false[]" multiple="multiple" size="30">
- <!-- BEGIN category_option_false -->
- <option {comments.category_option_false.SELECTED} value="{comments.category_option_false.VALUE}">{comments.category_option_false.OPTION}</option>
- <!-- END category_option_false -->
- </select>
- <p><input class="submit" type="submit" value="&laquo;" name="trueify" style="font-size:15px;" {TAG_INPUT_ENABLED}/></p>
- </td>
- </tr>
- </table>
-</fieldset>
-</form>
-<!-- END comments -->