$output.=form_select(t("Default threshold"),"comment_default_threshold",variable_get("comment_default_threshold",0),$thresholds,t("Thresholds are values below which comments are hidden. These thresholds are useful for busy sites which want to hide poor comments from most users."));
$output.=form_radios(t("Preview comment"),"comment_preview",variable_get("comment_preview",1),array(t("Optional"),t("Required")),t("Must users preview comments before submitting?"));
$output.=form_radios(t("Location of comment submission form"),"comment_form_location",variable_get("comment_form_location",0),array(t("Display below post or comments"),t("Display on separate page")),t("The location of the comment submission form."));
$output.=form_radios(t("Location of comment submission form"),"comment_form_location",variable_get("comment_form_location",0),array(t("Display on separate page"),t("Display below post or comments")),t("The location of the comment submission form."));
$output.=form_radios(t("Comment controls"),"comment_controls",variable_get("comment_controls",0),array(t("Display above the comments"),t("Display below the comments"),t("Display above and below the comments"),t("Do not display")),t("Position of the comment controls box."));
return$output;
...
...
@@ -219,12 +219,13 @@ function comment_edit($cid) {
$comment=db_fetch_object(db_query("SELECT c.*, u.uid, u.name, u.data FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status != 2",$cid));
if(comment_access("edit",$comment)){
comment_preview(object2array($comment));
returncomment_preview(object2array($comment));
}
}
functioncomment_reply($pid,$nid){
$output="";
if(user_access("access comments")){
...
...
@@ -234,10 +235,10 @@ function comment_reply($pid, $nid) {
if($pid){
$comment=db_fetch_object(db_query("SELECT c.*, u.uid, u.name, u.data FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status = 0",$pid));
$comment=db_fetch_object(db_query("SELECT c.*, u.uid, u.name, u.data FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status = 0",$edit["pid"]));
$output.=form_select(t("Default threshold"),"comment_default_threshold",variable_get("comment_default_threshold",0),$thresholds,t("Thresholds are values below which comments are hidden. These thresholds are useful for busy sites which want to hide poor comments from most users."));
$output.=form_radios(t("Preview comment"),"comment_preview",variable_get("comment_preview",1),array(t("Optional"),t("Required")),t("Must users preview comments before submitting?"));
$output.=form_radios(t("Location of comment submission form"),"comment_form_location",variable_get("comment_form_location",0),array(t("Display below post or comments"),t("Display on separate page")),t("The location of the comment submission form."));
$output.=form_radios(t("Location of comment submission form"),"comment_form_location",variable_get("comment_form_location",0),array(t("Display on separate page"),t("Display below post or comments")),t("The location of the comment submission form."));
$output.=form_radios(t("Comment controls"),"comment_controls",variable_get("comment_controls",0),array(t("Display above the comments"),t("Display below the comments"),t("Display above and below the comments"),t("Do not display")),t("Position of the comment controls box."));
return$output;
...
...
@@ -219,12 +219,13 @@ function comment_edit($cid) {
$comment=db_fetch_object(db_query("SELECT c.*, u.uid, u.name, u.data FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status != 2",$cid));
if(comment_access("edit",$comment)){
comment_preview(object2array($comment));
returncomment_preview(object2array($comment));
}
}
functioncomment_reply($pid,$nid){
$output="";
if(user_access("access comments")){
...
...
@@ -234,10 +235,10 @@ function comment_reply($pid, $nid) {
if($pid){
$comment=db_fetch_object(db_query("SELECT c.*, u.uid, u.name, u.data FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status = 0",$pid));
$comment=db_fetch_object(db_query("SELECT c.*, u.uid, u.name, u.data FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status = 0",$edit["pid"]));