Custom Fields in Topic

Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/67243?pagenum=1
05 November 2025, 03:31

Topic


sgoode
Custom Fields in Topic
11 June 2008, 17:29


I hope that I have posted this in the right place?
Is there any way that I can add 2 or 3 extra fields to the topic? I would like to add 2 or 3 fields between the subject and the message.
I hope that somebody can help.
Thanks
Steve<

 

Replies ...


Carefree
12 June 2008, 05:47


Right place. Yes it can be (and has been) done.<
sgoode
12 June 2008, 11:37


Hi Carefree

Thanks....again.
I have looked at the install instructions and I am struggling to see what the actual changes are I need to make. Can you point me in the right direction?
Here they are:

Code:
###########################################################
# Mod Install Instruction: #
###########################################################
(below code modified base on a clean v3.4.03 files)

dbs_topic_notelet.asp
==================================
copy to your forum folder, then from Admin Section running MOD Setup to update the db table fields. it add two new fields to FORUM table.. F_NOTELET_ALLOWED
F_NOTELET_VISIBLE
and four new fields to TOPICS table & A_TOPICS table.. T_NOTELET_STATUS
T_NOTELET_LAST_DATE
T_NOTELET_EDITBY
T_NOTELET_MESSAGE



pop_notelet.asp
inc_notelet.asp
icon_notelet_xxxx.gif
==================================
two new files and 18 notelet icon files, copy all to your forum folder.


inc_func_common.asp
==================================
'##### Topic Notelet 1-1: add one new function
'##### Topic Notelet 1-2: 6 lines added to chkString function



post.asp
==================================
'##### Topic Notelet 1-1: add F.F_NOTELET_ALLOWED to strSql
'##### Topic Notelet 1-2: add F.F_NOTELET_ALLOWED to strSql
'##### Topic Notelet 1-3: 1 line added
'##### Topic Notelet 1-4: 3 lines added
'##### Topic Notelet 1-5: replace above 1 line with below 2 lines (be careful the , in strSql)
'##### Topic Notelet 1-6: 13 lines added
'##### Topic Notelet 1-7: add two items F_NOTELET_xxx to strSql
'##### Topic Notelet 1-8: 2 lines added
'##### Topic Notelet 1-9: add one section (43 lines)
'##### Topic Notelet 1-10: 5 lines added



post_info.asp
==================================
'##### Topic Notelet 1-1: add F.F_NOTELET_ALLOWED to strSql
'##### Topic Notelet 1-2: add F.F_NOTELET_ALLOWED to strSql
'##### Topic Notelet 1-3: 1 line added
'##### Topic Notelet 1-4: 13 lines added
'##### Topic Notelet 1-5: 6 lines added
'##### Topic Notelet 1-6: 21 lines added
'##### Topic Notelet 1-7: 6 lines added
'##### Topic Notelet 1-8: 6 lines added
'##### Topic Notelet 1-9: 2 lines added
'##### Topic Notelet 1-10: 2 lines added
'##### Topic Notelet 1-11: 4 lines added



forum.asp
==================================
'##### Topic Notelet 1-1: add F.F_NOTELET_ALLOWED, F.F_NOTELET_VISIBLE to strSql
'##### Topic Notelet 1-2: 2 lines added
'##### Topic Notelet 1-3: 1 line added (be careful the , in strSql)
'##### Topic Notelet 1-4: 4 lines added (be careful the number order...)
'##### Topic Notelet 1-5: 14 lines added
'##### Topic Notelet 1-6: 3 lines added
'##### Topic Notelet 1-7: 3 lines added
'##### Topic Notelet 1-8: add two new sub functions



THAT'S ALL !!!! ###########################################################

Thanks

Steve<
texanman
12 June 2008, 13:39


There are 4 files to be changed:
1. inc_func_common
2. post_info
3. post
4. forum

These files are named in the Mod as:

1. tn_inc_func_common
2. tn_post_info
3. tn_post
4. tn_forum

Open these files one by one search for the changes using: '##### Topic Notelet

Apply the changes to your 4 files

It will be a good idea to save your original four files somewhere just in case something goes wrong. <
sgoode
12 June 2008, 15:02


This is going to sound really dumb but......
When I see:

'##### Topic Notelet 1-7: add two items F_NOTELET_xxx to strSql

sghould I be replacing the xxx and if so what with?
Thanks
Steve<
texanman
12 June 2008, 16:01


Originally posted by sgoode
This is going to sound really dumb but......
When I see:

'##### Topic Notelet 1-7: add two items F_NOTELET_xxx to strSql

sghould I be replacing the xxx and if so what with?
Thanks
Steve

Just add those in red. What is added is shown in the strSql

strSql = "SELECT F_SUBJECT, F_URL, F_PRIVATEFORUMS, F_PASSWORD_NEW, " & _
"F_DEFAULTDAYS, F_COUNT_M_POSTS, F_NOTELET_ALLOWED, F_NOTELET_VISIBLE, F_SUBSCRIPTION, F_MODERATION, F_DESCRIPTION " & _
<
sgoode
12 June 2008, 16:46


Sorry, I probably didn't explain myself properly. All changes are done. However, in post.asp there is a change that I am unsure of:

Code:
post.asp
==================================
'##### Topic Notelet 1-1: add F.F_NOTELET_ALLOWED to strSql
'##### Topic Notelet 1-2: add F.F_NOTELET_ALLOWED to strSql
'##### Topic Notelet 1-3: 1 line added
'##### Topic Notelet 1-4: 3 lines added
'##### Topic Notelet 1-5: replace above 1 line with below 2 lines (be careful the , in strSql)
'##### Topic Notelet 1-6: 13 lines added
'##### Topic Notelet 1-7: add two items F_NOTELET_xxx to strSql
'##### Topic Notelet 1-8: 2 lines added
'##### Topic Notelet 1-9: add one section (43 lines)
'##### Topic Notelet 1-10: 5 lines added

I get the impression that I should replace the xxx with something.
Cheers

Steve<
sgoode
12 June 2008, 16:51


Also, when adding a new topic I get the notelet field with icons but when I choose Post, I get the following message:

Microsoft JET Database Engine error '80040e14'

Syntax error (missing operator) in query expression 'F.F_NOTELET_ALLOWED to strSql'.

post_info.asp, line 196


Any ideas?
Steve<
texanman
12 June 2008, 17:55


You were asking about 1-7 changes in post.asp and those are the ones in red in the previous post. The two items F_NOTELET_xxx are meant to be F_NOTELET_ALLOWED and F_NOTELET_VISIBLE. I have to look at the changes in post.info.<
texanman
12 June 2008, 18:00


Can you put your line 196 in post.info here?<
sgoode
13 June 2008, 02:45


Here is 166-216 and 196 is highlighted in red. (Line numbers are according to Aranae, the editor I am using.)

Code:
   set rsStatus = my_Conn.Execute(strSql)
if rsStatus.EOF or rsStatus.BOF then
rsStatus.close
set rsStatus = nothing
Go_Result "Please don't attempt to edit the URL<br />to gain access to locked Forums/Categories."
else
'## Subscribe checkbox start ##
PostCat_subscription = rsStatus("CAT_SUBSCRIPTION")
PostForum_subscription = rsStatus("F_SUBSCRIPTION")
'## Subscribe checkbox end ##
blnCStatus = rsStatus("CAT_STATUS")
blnFStatus = rsStatus("F_STATUS")
strRqForumID = rsStatus("FORUM_ID")
strRqCatID = rsStatus("CAT_ID")
Cat_Name = rsStatus("CAT_NAME")
Forum_Type = rsStatus("F_TYPE")
Forum_Subject = rsStatus("F_SUBJECT")
Notelet_Allowed = rsStatus("F_NOTELET_ALLOWED")
if strRqMethod <> "Topic" then
blnTStatus = rsStatus("T_STATUS")
Topic_Title = rsStatus("T_SUBJECT")
else
blnTStatus = 1
end if
rsStatus.close
set rsStatus = nothing
end if

if mLev = 4 then
AdminAllowed = 1
ForumChkSkipAllowed = 1 elseif mLev = 3 then
if chkForumModerator(strRqForumID, ChkString(strDBNTUserName, "decode")) = "1" then
AdminAllowed = 1
ForumChkSkipAllowed = 1
else
if lcase(strNoCookies) = "1" then
AdminAllowed = 1
ForumChkSkipAllowed = 0
else
AdminAllowed = 0
ForumChkSkipAllowed = 0
end if
end if
elseif lcase(strNoCookies) = "1" then
AdminAllowed = 1
ForumChkSkipAllowed = 0
else
AdminAllowed = 0
ForumChkSkipAllowed = 0
end if

Steve<
sgoode
17 June 2008, 03:06


Not wishing to be a pain but did anybody have any ideas on this? It looks sooo close.smile
Steve<
Carefree
18 June 2008, 06:35


[quote
Code:
'##### Topic Notelet 1-7: add two items F_NOTELET_xxx  to strSql

I get the impression that I should replace the xxx with something.
Cheers

Steve

Any time a line begins with an apostrophe character in asp, it is a remark and has no program function (just let's you keep notes in the code). So changing the value of "XXX" to anything would not make that line contribute to the software.<
Carefree
18 June 2008, 06:41


Put links to three files: post.asp, post_info.asp, & inc_func_common.asp in txt format.
The error is in one of them.<
sgoode
18 June 2008, 08:02


Hi Carefree

I seem to be misunderstanding everything else so I hope these links are what you wanted.
http://www.qwiksites4u.com/text_docs/post.txt http://www.qwiksites4u.com/text_docs/post_info.txt http://www.qwiksites4u.com/text_docs/inc_func_common.txt
Your help is really appreciated. Steve<
Carefree
18 June 2008, 08:24


Just what the doctor ordered. I'll have a quick peek.<
Carefree
18 June 2008, 08:40


Your error is in post_info.asp

Line 177-178

Code:

		strSql = "SELECT C.CAT_STATUS, C.CAT_NAME, F.F_NOTELET_ALLOWED to strSql, " &_
"F.FORUM_ID, F.F_STATUS, F.F_TYPE, F.F_SUBJECT, " &_

Change them to say:
Code:
		strSql = "SELECT C.CAT_STATUS, C.CAT_NAME, " &_
"F.FORUM_ID, F.F_STATUS, F.F_TYPE, F.F_SUBJECT, F.F_NOTELET_ALLOWED, " &_
<
sgoode
18 June 2008, 09:21


Hi Carefree

I made the change exactly as you posted, however, I am still getting the error message:

Microsoft JET Database Engine error '80040e14'

Syntax error (missing operator) in query expression 'F.F_NOTELET_ALLOWED to strSQL'

/housing/post_info.asp, line 196

sad
Steve<
Carefree
18 June 2008, 09:25


I didn't notice before, but you have the same error in lines 188-189. Fix the same way.<
sgoode
18 June 2008, 09:39


Slightly different eroor message in same area:

Microsoft JET Database Engine error '80040e14'

The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect.

/housing/post_info.asp, line 196

Steve<
Carefree
18 June 2008, 10:01


Post a link to your latest modified post_info.txt.<
sgoode
19 June 2008, 03:00


Latest post_info.txt posted.
http://www.qwiksites4u.com/text_docs/post_info.txt
Steve<
Carefree
19 June 2008, 05:46


Line 189, remove the last comma.<
sgoode
19 June 2008, 06:36


Carefree

That got it. I really appreciate the time and the help.
I'm not sure if what I have ended up with is what I was expecting; might just be my expectations.
The Notelet field is available on posting. However, It does not appear when viewing a post and also it is not searchable. I was hoping that I would have an extra field that I could use in a similar way to the Subject field.
I wanted a field (two would have been better) that would allow people to be more specific about their topic and could also be added to the search form.
Did I misunderstand the mod?
Thanks
Steve<
Carefree
19 June 2008, 09:50


To make notelets searchable would require modifying the search form, and you'd have to allow all members access to them.
That may not be the best solution to what you want, though. Adding additional fields (other than subject and message) would also require modifying the search form. Maybe the best solution would be educating the users to be more descriptive?<
© 2000-2021 Snitz™ Communications