Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 add dropdownlist to post.asp
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 01 February 2006 :  04:02:34  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
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  Show Profile  Reply with Quote
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<
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 01 February 2006 :  04:44:11  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
*doh*
Thanks...
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 01 February 2006 :  04:56:13  Show Profile  Reply with Quote
All the answers are here on this very page <
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 01 February 2006 :  05:15:32  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
Yeah, sometimes it would be best if one could think ONE more time before posting =)
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 01 February 2006 :  05:38:33  Show Profile  Reply with Quote
Don't worry mate, it happens to all of us at one time or another.<
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 01 February 2006 :  07:28:07  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
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 -
Go to Top of Page

gcoral
Starting Member

Switzerland
1 Posts

Posted - 01 February 2006 :  10:40:40  Show Profile  Reply with Quote
I had no answer!<
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 01 February 2006 :  10:50:11  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
uuh...?
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 01 February 2006 :  12:20:19  Show Profile  Reply with Quote
not exactly sure what you want, but everything entered in post.asp is entered using post_info.asp.
Look for
if MethodType = "Topic" then
<

    _-/Cripto9t\-_
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 02 February 2006 :  03:11:03  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
ah, I'll have a look in post_info.asp. Thanks.
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 02 February 2006 :  07:13:03  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
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 -
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 02 February 2006 :  07:48:15  Show Profile  Reply with Quote
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\-_
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 02 February 2006 :  08:00:10  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
DOH!!
That's how a real copy-paste-coder does =)
Thanks for pointing out what I sould've seen already!
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 02 February 2006 :  08:14:35  Show Profile  Reply with Quote
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\-_
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 02 February 2006 :  08:53:44  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
Ok, it IS working though..
Why should it not work?
=)<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.18 seconds. Powered By: Snitz Forums 2000 Version 3.4.07