HuwR
Forum Admin
    
United Kingdom
20592 Posts |
Posted - 13 November 2000 : 08:50:40
|
From a discussion in another Topic with Kat. I thought others might like this too.
basically it will set the Forum date back to it's creation date if you delete all the Topics.
You will need to add a new field in FORUM_FORUM called F_CREATED varchar (20) NULL
Next you will need to make three changes, two in post_info.asp and one in pop_delete.asp
<font color=blue><b>pop_delete.asp</b></font id=blue> <pre id=code><font face=courier size=2 id=code> search for <b>strSql = "UPDATE " & strTablePrefix & "FORUM "</b> look for the lines
if strLast_Post <> "" then strSql = strSql & ", F_LAST_POST = '" & strLast_Post & "' " if strLast_Post_Author <> "" then strSql = strSql & ", F_LAST_POST_AUTHOR = " & strLast_Post_Author end if end if
before the second end if, insert the following.... <font color=red>else strSql = strSql & ", F_LAST_POST = F_CREATED" strSql = strSql & ", F_LAST_POST_AUTHOR = NULL" </font id=red> </font id=code></pre id=code>
<font color=blue><b>post_info.asp</b></font id=blue> Search for <b>strSql = "INSERT INTO " & strTablePrefix & "FORUM "</b> you will find it in two places, the first is for forums, the secound URLs. You can change both it dowesn't matter, but the first is the important one.
Cahnge the INSERT as follows, Red lines denote additions, blue are original. <pre id=code><font face=courier size=2 id=code> <font color=blue> strSql = strSql & ", F_LAST_POST" </font id=blue><font color=red> strSql = strSql & ", F_CREATED" </font id=red><font color=blue> strSql = strSql & ", F_SUBJECT" strSql = strSql & ", F_DESCRIPTION" strSql = strSql & ", F_TYPE" strSql = strSql & ") VALUES (" strSql = strSql & Request.Form("CAT_ID") if strPrivateForums = "1" then strSql = strSql & ", " & Request.Form("AuthType") & "" strSql = strSql & ", '" & ChkString(Request.Form("AuthPassword"),"password") & "'" strSql = strSql & ", '" & ChkString(Request.Form("AuthUsers"),"list") & "'" end if strSql = strSql & ", " & "'" & DateToStr(strForumTimeAdjust) & "'" </font id=blue><font color=red> strSql = strSql & ", " & "'" & DateToStr(strForumTimeAdjust) & "'" </font id=red><font color=blue> strSql = strSql & ", '" & txtSubject & "'" strSql = strSql & ", '" & txtMessage & "'" strSql = strSql & ", " & Request.Form("Type") strSql = strSql & ")" </font id=blue> </font id=code></pre id=code>
That's all folks
<font color=blue>'Resistance is futile'</font id=blue> |
|