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 editable field like to mesaage area
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

uraken
New Member

United Kingdom
75 Posts

Posted - 15 October 2003 :  16:10:57  Show Profile
is there a way that in which i can add an editable field like drop down lists to the message area or how do i include a new field on the post.asp so that it would appear in the message when posted? i want to be able to assign a number to the message.
i thank you in advance.


cripto9t
Average Member

USA
881 Posts

Posted - 15 October 2003 :  18:11:59  Show Profile
Hi uraken, I take it that you want to add something like a dropdown box to the post.asp and the selection will be added to the message? Do you want this for new topics or for replies as well? Anyway I should be posting a mod in the next day or so that I believe does something similar to what you want. After I release the mod I should be able to help you or you can look at the code I added in the mod and figure it out for yourself .

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

StephenD
Senior Member

Australia
1044 Posts

Posted - 15 October 2003 :  19:23:06  Show Profile  Send StephenD a Yahoo! Message
I did something similar with help from SteveD a while ago. I created a new post_customer.asp and post_info_customer.asp + added some new code to inc_code.js. Here is a link to a zip with the files for you have a look at:
www.cashbackaustralia.com/extra_fields_in_post.zip
Go to Top of Page

uraken
New Member

United Kingdom
75 Posts

Posted - 16 October 2003 :  15:37:10  Show Profile
Firstly thanks for both of your responses stevend i ooked at your files that is the sort of thing i'm looking at having extra fields but how do i get them to appear in the forum/message i'm asuming they need to be linked to the database somehow?
Cripto9t you understood me perfectly as well thats how i would like it which ever way it happens i would like the aditional feilds to be added either to the message itself or an aded field in the forum itself.
Let me give you some background info i'm trying to create an online student behaviour referal form for teachers in my school (i'm network admin)so they can use the forum to report on student behavour so the message will include
where:
when:
what did they do wrong:
severity:

all this info hopefully be either added to message or separate fields
Go to Top of Page

StephenD
Senior Member

Australia
1044 Posts

Posted - 16 October 2003 :  21:15:07  Show Profile  Send StephenD a Yahoo! Message
Uraken, that code in the zip adds text to the message field only and not new fields in the db. I'd suggest uploading both .asp files and open post_customer.asp directly to have a play around with. I've got new icon links in my topic.asp and forum.asp to this file.

Or you can simply cut and and paste the code (look for ######CUSTOMER MOD#####) into your own files.
Go to Top of Page

uraken
New Member

United Kingdom
75 Posts

Posted - 17 October 2003 :  06:14:39  Show Profile
cripto9t i wait with anticipation for your mod..
Stephend i am grateful to you for the files although i'm in need of a little more help as to what goes where and how to get it all working i copied the ######CUSTOMER MOD##### into my post.asp expecting to see a change ? (i'm not very good at all this am i sorry) but nothing happened. I then renamed your post_customer.asp to post.asp and i now get your mod on new topics (brilliant, obviously i will change it with your kind permission to suit my needs) but when i enter the details they don't get posted anywhere though when i hit post reply i get http://localhost/post_info_customer.asp with the header info but no message board i assume i need to have your post_info_customer.asp included somewhere so that it shows?
please help
thanks in advance
uraken
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 17 October 2003 :  07:36:29  Show Profile
Hi again,my mods going to be a few more days yet (found some bugs). StephenDs files should give you what you are after. I see you have the input boxes showing up in post.asp so all you need is post.info.asp.
Open up your post_info.asp and find these lines-
if MethodType = "Topic" then
	'## Forum_SQL
	strSql = "SELECT MEMBER_ID, M_LEVEL, M_EMAIL, M_LASTPOSTDATE, " & strDBNTSQLName
	if strAuthType = "db" then
		strSql = strSql & ", M_PASSWORD "
	end if
	strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
	strSql = strSql & " WHERE " & strDBNTSQLName & " = '" & ChkString(strDBNTUserName, "SQLString") & "'"
	strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.M_STATUS = " & 1
	if strAuthType = "db" then
		strSql = strSql & " AND   M_PASSWORD = '" & ChkString(strPassword, "SQLString") &"'"
		QuoteOk = (ChkQuoteOk(strDBNTUserName) and ChkQuoteOk(strPassword))
	else
		QuoteOk = ChkQuoteOk(strDBNTUserName)
	end if

	set rs = my_Conn.Execute (strSql)

	if rs.BOF or rs.EOF or not(QuoteOk) or not (ChkQuoteOk(strPassword))then '##  Invalid Password
		Go_Result "Invalid UserName or Password!", 0
		Response.End
	else
		if strPrivateForums = "1" and ForumChkSkipAllowed = 0 then
			if not(chkForumAccess(Forum_ID, MemberID,false)) then
				Go_Result "You are not allowed to post in this forum !", 0
			end if
		end if
		if strFloodCheck = 1 then
			if rs("M_LASTPOSTDATE") > DateToStr(DateAdd("s",strFloodCheckTime,strForumTimeAdjust)) and mLev < 3 then
				strTimeLimit = replace(strFloodCheckTime, "-", "")
				Go_Result "Sorry! We have flood control activated.<br />You cannot post within " & strTimeLimit & " seconds of your last post.<br />Please try again after this period of time elapses.", 0
			end if
		end if

Right after those lines is this line
txtMessage = ChkString(Request.Form("Message"),"message")

Replace that line with StephenDs

'**************CUSTOM POST FIELDS STEVE D ************
				dim CustomerMessage
				CustomerMessage = "Customer Name:  " & Request.Form("subject") & vbNewLine
				CustomerMessage = CustomerMessage & "Mailing Address:  " & Request.Form("mailing_address") & vbNewLine
				CustomerMessage = CustomerMessage & "Suburb:  " & Request.Form("suburb") & vbNewLine
				CustomerMessage = CustomerMessage & "State:  " & Request.Form("state") & vbNewLine
				CustomerMessage = CustomerMessage & "Post Code:  " & Request.Form("postal_code") & vbNewLine
				CustomerMessage = CustomerMessage & "Cashback Voucher Value:  " & Request.Form("cheque_amount") & vbNewLine
				CustomerMessage = CustomerMessage & "Payment due Cashback:  " & Request.Form("pay_cashback") & vbNewLine

				txtMessage = ChkString(CustomerMessage & vbNewLine & Request.Form("Message"),"message")

'******************************	

If you change the names
Request.Form("Where") make sure it matches in post.asp <input maxLength=""70"" name=""where""
that should do it .

    _-/Cripto9t\-_

Edited by - cripto9t on 18 October 2003 06:39:18
Go to Top of Page

uraken
New Member

United Kingdom
75 Posts

Posted - 17 October 2003 :  11:34:32  Show Profile
no joy still the post.asp is still ok but after making the changes to post_info it comes back with a blank page (except the links at froum image up top)and no confirmation of post.
Go to Top of Page

uraken
New Member

United Kingdom
75 Posts

Posted - 17 October 2003 :  11:38:57  Show Profile
all change it now works but its not processing the new fields only the message is showing up in the forum?
Go to Top of Page

uraken
New Member

United Kingdom
75 Posts

Posted - 17 October 2003 :  11:51:34  Show Profile
one thing i noticed now is that i can create a new message that only has the message text inside but when i reply to that message the extra fields are preinserted int the message text?
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 18 October 2003 :  06:38:12  Show Profile
Not sure but it sounds like you might have put it in the wrong place. Make sure you put it in strRequireMethod = "Topic" and not "reply".
They look similar.
if MethodType = "Topic" then 
	'## Forum_SQL
	strSql = "SELECT MEMBER_ID, M_LEVEL, M_EMAIL, M_LASTPOSTDATE, " & strDBNTSQLName
	if strAuthType = "db" then
		strSql = strSql & ", M_PASSWORD "
	end if


I've highlighted it in my previous post also.

If thats not the problem try using stephenDs post_info but save your original just in case

The new inputs should only show in a new topic and not replies. They are added to the database as part of the message, which means they can be edited when the poster or admin edits the topic

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

uraken
New Member

United Kingdom
75 Posts

Posted - 19 October 2003 :  12:52:51  Show Profile
good call cripto9t you were right i was putting it in the wrong place it all works fine now as always everyones time and efforts are hugely apreciated, many thanks.
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 19 October 2003 :  17:43:13  Show Profile
Your Welcome, I'm glad you got it going .

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

uraken
New Member

United Kingdom
75 Posts

Posted - 20 October 2003 :  04:41:52  Show Profile
now that its all working does anyone know how i could get one of my fields to pre-insert the system time into it is there some code?
p.s i have kept it the question here rather than startinga new one as it seems to make sense if this is wrong can someone tell me please.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.3 seconds. Powered By: Snitz Forums 2000 Version 3.4.07