Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 add dropdownlist to post.asp

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
tribaliztic 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?
<
15   L A T E S T    R E P L I E S    (Newest First)
tribaliztic Posted - 03 February 2006 : 05:47:29
Okay, txtSubject may be removable, the other I don't know.. It IS working =)
<
cripto9t Posted - 02 February 2006 : 12:45:34
If "modedit" = true, you haven't given a value to "txtMessage" that I can see. Maybe I'm missing it :^)

	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")

also "txtSubject" is defined twice. just extra code<
tribaliztic Posted - 02 February 2006 : 08:53:44
Ok, it IS working though..
Why should it not work?
=)<
cripto9t 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 ########################
<
tribaliztic 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!
<
cripto9t 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"))

<
tribaliztic 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 Posted - 02 February 2006 : 03:11:03
ah, I'll have a look in post_info.asp. Thanks.
<
cripto9t 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 for
if MethodType = "Topic" then
<
tribaliztic Posted - 01 February 2006 : 10:50:11
uuh...?
<
gcoral Posted - 01 February 2006 : 10:40:40
I had no answer!<
tribaliztic 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...
<
laser Posted - 01 February 2006 : 05:38:33
Don't worry mate, it happens to all of us at one time or another.<
tribaliztic Posted - 01 February 2006 : 05:15:32
Yeah, sometimes it would be best if one could think ONE more time before posting =)
<
laser Posted - 01 February 2006 : 04:56:13
All the answers are here on this very page <

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000 Version 3.4.07