TaP
07-17-2002, 07:12 AM
ok... i want to modify the close thread button but i want it not to close the thread just update the extra stuff i added to the code
// ############################### update ###############################
if ($action=="openclosethread2") {
$threadid=verifyid("thread",$threadid);
$threadinfo=getthreadinfo($threadid);
if (!ismoderator($threadinfo[forumid],"canopenclose")) {
$permissions=getpermissions($threadinfo[forumid]);
if (!$permissions[canview] or !$permissions[canopenclose]) {
show_nopermission();
} else {
$firstpostinfo=$DB_site->query_first("SELECT userid FROM post WHERE threadid='$threadid' ORDER BY dateline LIMIT 1");
if ($bbuserinfo[userid]!=$firstpostinfo[userid]) {
show_nopermission();
}
}
}
updateuserforum($threadinfo['forumid']);
if ($threadinfo[open]) {
if($reasonentered==1) {
$threadinfo[open]=0;
} else {
eval("dooutput(\"".gettemplate("update")."\");");
exit;
}
} else {
$threadinfo[open]=1;
$action="open";
}
$threadinfo[notes] = "Thread $action by $bbuserinfo[username] on ".vbdate($dateformat." ".$timeformat,time()).". $threadinfo[notes]";
if($threadinfo[open]==0) {
$closereason=" closereason='".addslashes($reason)."',who='".addslashes($bbuserinfo[username])."',time='".addslashes($postinfo[posttime])."', ";
} else {
$closereason="";
}
$DB_site->query("UPDATE thread SET ".$closereason." open=$threadinfo[open],notes='".addslashes($threadinfo[notes])."' WHERE threadid='$threadid'");
eval("standardredirect(\"".gettemplate("redirect_openclose")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");");
}
what would i change in there to make it soo it doesnt close the thread but performs all other actions??
thanks for your help on this one
// ############################### update ###############################
if ($action=="openclosethread2") {
$threadid=verifyid("thread",$threadid);
$threadinfo=getthreadinfo($threadid);
if (!ismoderator($threadinfo[forumid],"canopenclose")) {
$permissions=getpermissions($threadinfo[forumid]);
if (!$permissions[canview] or !$permissions[canopenclose]) {
show_nopermission();
} else {
$firstpostinfo=$DB_site->query_first("SELECT userid FROM post WHERE threadid='$threadid' ORDER BY dateline LIMIT 1");
if ($bbuserinfo[userid]!=$firstpostinfo[userid]) {
show_nopermission();
}
}
}
updateuserforum($threadinfo['forumid']);
if ($threadinfo[open]) {
if($reasonentered==1) {
$threadinfo[open]=0;
} else {
eval("dooutput(\"".gettemplate("update")."\");");
exit;
}
} else {
$threadinfo[open]=1;
$action="open";
}
$threadinfo[notes] = "Thread $action by $bbuserinfo[username] on ".vbdate($dateformat." ".$timeformat,time()).". $threadinfo[notes]";
if($threadinfo[open]==0) {
$closereason=" closereason='".addslashes($reason)."',who='".addslashes($bbuserinfo[username])."',time='".addslashes($postinfo[posttime])."', ";
} else {
$closereason="";
}
$DB_site->query("UPDATE thread SET ".$closereason." open=$threadinfo[open],notes='".addslashes($threadinfo[notes])."' WHERE threadid='$threadid'");
eval("standardredirect(\"".gettemplate("redirect_openclose")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");");
}
what would i change in there to make it soo it doesnt close the thread but performs all other actions??
thanks for your help on this one