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)
 Additional textbox in Topic
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Ranko
Junior Member

400 Posts

Posted - 22 January 2005 :  06:55:09  Show Profile
I am writing a small MOD for myself, and I need to have another text field when I type in a new topic.

I am using the Category ID string to show/hide the field in post.asp and the SQL in the post_info.asp.

Now my problem is that it dosen't get to the databese, it is ignored, and I have no idea what I missed. Thus this post


I have the textarea in post.asp, named "Short"; nothing more was changed IIRC
I added the SQL for the table field in the appropriate place (Insert, for Topic).
Added errorr message, just because , not like I'll need it.

Now what did I miss?

red1
Junior Member

355 Posts

Posted - 22 January 2005 :  07:28:12  Show Profile
maybe you should post your code here so we can see?
Go to Top of Page

Ranko
Junior Member

400 Posts

Posted - 22 January 2005 :  07:50:24  Show Profile
Sure, as soon as I get home. It is bugging me so much I keep thinking about it on the bus, while visiting my parents ...
Go to Top of Page

Ranko
Junior Member

400 Posts

Posted - 26 January 2005 :  19:51:44  Show Profile
The files are up: www.krug-x.net/post.txt and www.krug-x.net/post_info.txt

The field is named T.T_ SHORT

Again, thanks for any help.
Go to Top of Page

red1
Junior Member

355 Posts

Posted - 26 January 2005 :  22:55:47  Show Profile
i'm looking at the code and I don't see any references to T.T_ SHORT
Go to Top of Page

Ranko
Junior Member

400 Posts

Posted - 27 January 2005 :  05:42:10  Show Profile
True, me - idiot. Just look for short in the post_info and Futura in post; those are the modifications I made.
Go to Top of Page

Raavin
Starting Member

16 Posts

Posted - 17 May 2005 :  01:04:56  Show Profile
It seems to works fine. I have a couple of ideas of what might be going wrong.

1. You haven't added it to the display in topic.asp so it won't show in your display.
2. You are looking in the wrong place in the database, you'll find the entry in the FORUM_TOPICS table in the T_SHORT column

I used 'beyond compare' to compare the original and your files then transferred only your bits over. Here are the differences


FILE COMPARISON
Produced: 17/05/2005 2:09:07 PM

Mode:  Just Differences

Left file: C:\Documents and Settings\jason\Desktop\sf2k_v34_05\post_info.asp     Right file: ftp://..../post_info.asp
                                    -+ 56  Dim txtAns()
------------------------------------------------------------------------
------------------------------------------------------------------------
                                    -+ 800                 txtShort = ChkString(Request.Form("Short"), "SQLString")
------------------------------------------------------------------------
------------------------------------------------------------------------
                                    -+ 811                         Response.End
                                       812                 end if
                                       813                 if txtShort = " " then
                                       814                         Go_Result "You must post an intoduction!", 0
------------------------------------------------------------------------
------------------------------------------------------------------------
810                 end if          <> 816                 end if
------------------------------------------------------------------------
------------------------------------------------------------------------
                                    -+ 831                 strSql = strSql & ", T_SHORT"
------------------------------------------------------------------------
------------------------------------------------------------------------
                                    -+ 852                         strSql = strSql & ", '" & txtShort & "'"
------------------------------------------------------------------------


FILE COMPARISON
Produced: 17/05/2005 2:10:18 PM

Mode:  Just Differences

Left file: C:\Documents and Settings\jason\Desktop\sf2k_v34_05\post.asp     Right file: ftp://..../post.asp
  <> 43  dim txtAns()
     44  dim nCount
     45
     46  dim Short
------------------------------------------------------------------------
------------------------------------------------------------------------
  -+ 787 '###Futura Edit
     788 'if strRqMethod = "Topic" and strRqCatID = "2" then
     789 Response.Write "<tr bgColor=""" & strPopUpTableColor & """>" & _
     790 "<td noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Cash:</b></font></td>" & _
     791         "<td><textarea cols=""" & intCols & """ name=""Short"" rows=""1"" wrap=""VIRTUAL"">" & Trim(CleanCode(TxtMsg)) & "</textarea><br /></td>" & _
     792 "</tr>"
     793 'end if
------------------------------------------------------------------------


Nicely done. I was looking for some idea about how to do this myself but in the FORUM_REPLY area

Cheers,

Raavin ;)

PS

To confirm what I'm saying, enter some data then go back and edit. This will place the data you just entered in the post page ;) I've also changed some of the text and commented out the conditional display bits.

Edited by - Raavin on 17 May 2005 01:12:20
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.28 seconds. Powered By: Snitz Forums 2000 Version 3.4.07