summaryrefslogtreecommitdiff
path: root/includes/structure.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-04-19 19:59:48 +0000
committerDries Buytaert <dries@buytaert.net>2001-04-19 19:59:48 +0000
commit3f1979aa3cfa2d50789e88bd0a857dec6babb44b (patch)
tree00a5170b8db220163950343292e0e7f966c80549 /includes/structure.inc
parenta6e6dfb9219ebea34331ad46c9c43d53f7c3ca6f (diff)
downloadbrdo-3f1979aa3cfa2d50789e88bd0a857dec6babb44b.tar.gz
brdo-3f1979aa3cfa2d50789e88bd0a857dec6babb44b.tar.bz2
- Addition: made it so that comments can be enabled/disabled on
a node per node basis, rather then on a category per category basis. The default settings for each individual category can be changed though. Example: it can be setup so that - by default - all stories posted to the category "article" will have comments enabled but stories submitted to "announcement" not. Different configuration schemes can easily be added later. Requires a SQL update, see 2.00-to-x.xx.sql/database.mysql. - Addition: made submit.php only use categories that users can actually submit new content to.
Diffstat (limited to 'includes/structure.inc')
-rw-r--r--includes/structure.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/includes/structure.inc b/includes/structure.inc
index 6d6655a3e..94c14ad6d 100644
--- a/includes/structure.inc
+++ b/includes/structure.inc
@@ -47,6 +47,12 @@ function category_expire_threshold($cid) {
return $category->threshold;
}
+// return default comment status of category $cid:
+function category_comment($cid) {
+ $category = category_get_object("cid", $cid);
+ return $category->comment;
+}
+
// return linked string with name of category $cid:
function category_name($cid) {
$category = category_get_object("cid", $cid);