summaryrefslogtreecommitdiff
path: root/includes/theme.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/theme.inc')
-rw-r--r--includes/theme.inc15
1 files changed, 15 insertions, 0 deletions
diff --git a/includes/theme.inc b/includes/theme.inc
index e1d32fdc2..6950e9712 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -8,6 +8,21 @@ class BaseTheme {
function image($name) {
return "misc/$name";
}
+
+ function comment_controls($threshold = 1, $mode = 3, $order = 1) {
+ global $REQUEST_URI, $user;
+ $output .= "<DIV ALIGN=\"CENTER\">\n";
+ $output .= "<FORM METHOD=\"post\" ACTION=\"$REQUEST_URI\">\n";
+ $output .= comment_mode(($user->id ? $user->mode : $mode));
+ $output .= comment_order(($user->id ? $user->sort : $order));
+ $output .= comment_threshold(($user->id ? $user->threshold : $threshold));
+ $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"". t("Update settings") ."\">\n";
+ $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"". t("Add comment") ."\">\n";
+ $output .= "</FORM>\n";
+ $output .= "</DIV>\n";
+ return $output;
+ }
+
}
function theme_init() {