Custom Fields in Topic - Posted (2425 Views)
Starting Member
sgoode
Posts: 22
22
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<
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Advanced Member
Carefree
Posts: 4224
4224
Right place. Yes it can be (and has been) done.<
Posted
Starting Member
sgoode
Posts: 22
22
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<
Posted
Junior Member
texanman
Posts: 410
410
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. <
Posted
Starting Member
sgoode
Posts: 22
22
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<
Posted
Junior Member
texanman
Posts: 410
410
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 " & _
<
Posted
Starting Member
sgoode
Posts: 22
22
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<
Posted
Starting Member
sgoode
Posts: 22
22
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<
Posted
Junior Member
texanman
Posts: 410
410
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.<
Posted
Junior Member
texanman
Posts: 410
410
Can you put your line 196 in post.info here?<
Posted
Starting Member
sgoode
Posts: 22
22
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<
You Must enter a message