The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
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? <
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 -
- www.gotlandrace.se -
Posted
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... <
-----------------
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 -
- www.gotlandrace.se -
Posted
Remove Set. You only need one ;)
<
Code:
'## 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\-_
Posted
DOH!!
That's how a real copy-paste-coder does =)
Thanks for pointing out what I sould've seen already! <
Thanks for pointing out what I sould've seen already! <
/Tribaliztic
- www.gotlandrace.se -
- www.gotlandrace.se -
Posted
The "Topic" part looks ok except I didn't see your error msg fo ingress.
This part don't look right in "EditTopic"
It would work unless a mod edited.
Maybe this
<
This part don't look right in "EditTopic"
Code:
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 ########################Code:
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\-_
Posted
Ok, it IS working though..
Why should it not work?
=)<
/Tribaliztic
- www.gotlandrace.se -
- www.gotlandrace.se -
Posted
If "modedit" = true, you haven't given a value to "txtMessage" that I can see. Maybe I'm missing it :^)
also "txtSubject" is defined twice. just extra code<
Code:
if Request.Form("modedit") = "true" then
'You haven't pulled it from the form yet, so txtMessage = "" at this point
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") 'Works here
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")
_-/Cripto9t\-_
Last edited by cripto9t on 02 February 2006, 12:47
Posted
Okay, txtSubject may be removable, the other I don't know.. It IS working =)
<
<
/Tribaliztic
- www.gotlandrace.se -
- www.gotlandrace.se -
Email Member
Message Member
Post Moderation
FileUpload
If you're having problems uploading, try choosing a smaller image.
Preview post
Send Topic
Loading...