1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 14 => 14, 15 => 15, 20 => 20, 25 => 25, 30 => 30, 35 => 35, 40 => 40, 45 => 45, 50 => 50, 60 => 60, 70 => 70, 80 => 80, 90 => 90, 100 => 100); $threshold_dump = array(-1 => -1, -2 => -2, -3 => -3, -4 => -4, -5 => -5, -6 => -6, -7 => -7, -8 => -8, -9 => -9, -10 => -10, -11 => -11, -12 => -12, -13 => -13, -14 => -14, -15 => -15, -20 => -20, -25 => -25, -30 => -30); $threshold_expire = array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 14 => 14, 15 => 15, 20 => 20, 25 => 25, 30 => 30, 35 => 35, 40 => 40, 45 => 45, 50 => 50, 60 => 60, 70 => 70, 80 => 80, 90 => 90, 100 => 100); module_iterate("content_types"); $form .= form_textfield(t("Name"), "name", $edit[name], 30, 55, t("A unique name for this category like 'announcement', 'article', 'column', 'review', etc.")); $form .= form_select(t("Content type"), "type", $edit[type], $types, t("The content type to bind or associate this category with.")); $form .= form_select(t("Comment"), "comment", $edit[comment], node_comment_status(), t("By default, allow or dissallow users to post comments in this category.")); $form .= form_select(t("Promote"), "promote", $edit[promote], node_promote_status(), t("By default, promote new submissions in this category to the front page.")); $form .= form_select(t("Submission"), "submission", $edit[submission], node_submission_status(), t("What to do with new submissions in this category?")); $form .= form_select(t("Post threshold"), "post", $edit[post], $threshold_post, t("If new submissions are subject to moderation, select a post threshold.")); $form .= form_select(t("Dump threshold"), "dump", $edit[dump], $threshold_dump, t("If new submissions are subject to moderation, select a dump threshold.")); $form .= form_select(t("Expiration threshold"), "expire", $edit[expire], $threshold_expire, t("If new submissions are subject to moderation, select a expiration threshold.")); if ($edit[cid]) { $form .= form_hidden("cid", $edit[cid]); $form .= form_submit(t("Save category")); $form .= form_submit(t("Delete category")); } else { $form .= form_submit(t("Save category")); } return form("admin.php?mod=structure&type=category", $form); } function category_overview() { $result = db_query("SELECT * FROM category ORDER BY name"); $output .= "
name | type | comment | promote | submissions | operations |
---|---|---|---|---|---|
". check_output($category->name) ." | ". check_output($category->type) ." | ". node_comment_status($category->comment) ." | ". node_promote_status($category->promote) ." | ". node_submission_status($category->submission) ."". ($category->submission ? " post: $category->post, dump: $category->dump, expire: $category->expire" : "") ." | cid\">edit category |
name | moderators | operations |
---|---|---|
". check_output($name) ." | ". check_output($topic->moderate) ." | tid\">edit topic |