Author |
Topic  |
tribaliztic
Senior Member
   
Sweden
1532 Posts |
Posted - 01 February 2006 : 04:02:34
|
I would like to add a dropdownlist where the user can select stuff when starting a topic IF the topic is placed in a certain forum.
So: user 1 start a topic in forum with id 85, the dropdownlist is shown and the selection is entered in the db user 2 post a reply to the topic and NO dropdownlist is shown.
How do I check if the post is the first post or a reply? How do I check if the post is done in forum with id 85? < |
/Tribaliztic - www.gotlandrace.se -
|
|
laser
Advanced Member
    
Australia
3859 Posts |
Posted - 01 February 2006 : 04:35:01
|
How do I check if the post is the first post or a reply? Check the method variable that is passed to post.asp
How do I check if the post is done in forum with id 85? Check the FORUM_ID variable that is passed to post.asp< |
 |
|
tribaliztic
Senior Member
   
Sweden
1532 Posts |
Posted - 01 February 2006 : 04:44:11
|
*doh* Thanks... < |
/Tribaliztic - www.gotlandrace.se -
|
 |
|
laser
Advanced Member
    
Australia
3859 Posts |
Posted - 01 February 2006 : 04:56:13
|
All the answers are here on this very page < |
 |
|
tribaliztic
Senior Member
   
Sweden
1532 Posts |
Posted - 01 February 2006 : 05:15:32
|
Yeah, sometimes it would be best if one could think ONE more time before posting =) < |
/Tribaliztic - www.gotlandrace.se -
|
 |
|
laser
Advanced Member
    
Australia
3859 Posts |
Posted - 01 February 2006 : 05:38:33
|
Don't worry mate, it happens to all of us at one time or another.< |
 |
|
tribaliztic
Senior Member
   
Sweden
1532 Posts |
Posted - 01 February 2006 : 07:28:07
|
So I got this working.. I stole the code for selecting forum in edit-mode. But where is this saved to the db? I have to add this to the sql-string but can't find it... < |
/Tribaliztic - www.gotlandrace.se -
|
 |
|
gcoral
Starting Member
Switzerland
1 Posts |
Posted - 01 February 2006 : 10:40:40
|
I had no answer!< |
 |
|
tribaliztic
Senior Member
   
Sweden
1532 Posts |
Posted - 01 February 2006 : 10:50:11
|
uuh...? < |
/Tribaliztic - www.gotlandrace.se -
|
 |
|
cripto9t
Average Member
  
USA
881 Posts |
Posted - 01 February 2006 : 12:20:19
|
not exactly sure what you want, but everything entered in post.asp is entered using post_info.asp. Look forif MethodType = "Topic" then < |
_-/Cripto9t\-_ |
 |
|
tribaliztic
Senior Member
   
Sweden
1532 Posts |
Posted - 02 February 2006 : 03:11:03
|
ah, I'll have a look in post_info.asp. Thanks. < |
/Tribaliztic - www.gotlandrace.se -
|
 |
|
tribaliztic
Senior Member
   
Sweden
1532 Posts |
Posted - 02 February 2006 : 07:13:03
|
I'm getting an sql-error on this...
----------------- UPDATE FORUM_TOPICS SET T_MESSAGE = 'actual message', SET T_PICLINK = 'picture.gif', SET T_INGRESS = 'new test of ingress', SET T_ARTICLECAT = 'blah category', T_SUBJECT = 'ny test', T_MSGICON = 1, T_POLLSTATUS = 1, T_SIG = 1, T_LAST_EDIT = '20060202131103', T_LAST_EDITBY = 20, T_STICKY = 0 WHERE TOPIC_ID = 3616 ----------------- the sql starts on line 680 in this file: http://www.gotlandrace.se/tabort/post_info.txt
What's wrong? The code looks the same (I think..) for "if MethodType = "Topic" then" and that works... < |
/Tribaliztic - www.gotlandrace.se -
|
 |
|
cripto9t
Average Member
  
USA
881 Posts |
Posted - 02 February 2006 : 07:48:15
|
Remove Set. You only need one ;)
'## Forum_SQL
strSql = "UPDATE " & strActivePrefix & "TOPICS "
strSql = strSql & " SET T_MESSAGE = '" & txtMessage & "'"
strSql = strSql & ", SET T_PICLINK = '" & PicLink & "'"
strSql = strSql & ", SET T_INGRESS = '" & Ingress & "'"
strSql = strSql & ", SET T_ARTICLECAT = '" & ArticleCat & "'"
strSql = strSql & ", T_SUBJECT = '" & txtSubject & "'"
' strSql = strSql & ", T_EVENT_DATE = '" & dateHolder & "'"
strSql = strSql & ", T_MSGICON = " & cLng(Request.Form("strMessageIcon")) < |
_-/Cripto9t\-_ |
 |
|
tribaliztic
Senior Member
   
Sweden
1532 Posts |
Posted - 02 February 2006 : 08:00:10
|
DOH!! That's how a real copy-paste-coder does =) Thanks for pointing out what I sould've seen already! < |
/Tribaliztic - www.gotlandrace.se -
|
 |
|
cripto9t
Average Member
  
USA
881 Posts |
Posted - 02 February 2006 : 08:14:35
|
The "Topic" part looks ok except I didn't see your error msg fo ingress.
This part don't look right in "EditTopic"
if Request.Form("modedit") = "true" then
txtMessage = txtMessage & "<br>This post was edited by a moderator at " & DateToStr(strForumTimeAdjust)
ArticleCat = ChkString(Request.Form("ArticleCat"),"SQLString")
PicLink = ChkString(Request.Form("PicLink"),"SQLString")
Ingress = ChkString(Request.Form("Ingress"),"SQLString")
txtSubject = ChkString(Request.Form("Subject"),"SQLString")
else
txtMessage = chkString(Request.Form("Message"),"message")
ArticleCat = ChkString(Request.Form("ArticleCat"),"SQLString")
PicLink = ChkString(Request.Form("PicLink"),"SQLString")
Ingress = ChkString(Request.Form("Ingress"),"SQLString")
txtSubject = ChkString(Request.Form("Subject"),"SQLString")
end if
txtSubject = chkString(Request.Form("Subject"),"SQLString")
' ######################### Poll Mod ######################## It would work unless a mod edited. Maybe this
txtMessage = chkString(Request.Form("Message"),"message")
ArticleCat = ChkString(Request.Form("ArticleCat"),"SQLString")
PicLink = ChkString(Request.Form("PicLink"),"SQLString")
Ingress = ChkString(Request.Form("Ingress"),"SQLString")
txtSubject = ChkString(Request.Form("Subject"),"SQLString")
if Request.Form("modedit") = "true" then
txtMessage = txtMessage & "<br>This post was edited by a moderator at " & DateToStr(strForumTimeAdjust)
end if
' ######################### Poll Mod ######################## < |
_-/Cripto9t\-_ |
 |
|
tribaliztic
Senior Member
   
Sweden
1532 Posts |
Posted - 02 February 2006 : 08:53:44
|
Ok, it IS working though.. Why should it not work? =)< |
/Tribaliztic - www.gotlandrace.se -
|
 |
|
Topic  |
|