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/Code)
 User Space 1.1.02 (last update 02/14/08)
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 8

cripto9t
Average Member

USA
881 Posts

Posted - 13 January 2008 :  10:54:26  Show Profile  Reply with Quote
I missed my due date by a few weeks but better late than never .

Let me just say that coding is a hobby of mine that I do when its to wet or cold to get outside and make my money. So any code that I post is "use at your own risk" .

1.1.02 - User posts sql bug fixed. Now uses date as a delimiter instead of a max value. To update replace "user_space.asp" and "admin_user_space.asp" with the new files.
All other bugs pointed out so far and then some have been addressed.
Also added some more constants to "user_space.asp" to make customization a little easier.

1.1.01 - updated with numerous bug fixes and contains the addon features drafts, bookmarks and friends/buddies. It also looks a little neater than the last one.

1.1.00 - Initial release

From the readme...
quote:

User Space Mod for Snitz Forums

Author: cripto9t

Version: 1.1.01

Date Released: 15 January 2008

History
----------------
Version: 1.1.01 01/15/08

Bookmarks dbs typing error - Fixed

Issue with Friends db table setup in user space setup - Fixed

Reply draft quote issue - Fixed

Version: 1.1.00 01/10/08

Bookmark manager (unfinished in ver. 1.0.00) - Finished

New feature - Friends/Buddies List

Security issue with bookmarks addon - Fixed

Security issue with drafts addon - Fixed

Flood control issue with drafts addon - Fixed

Drafts causing error when creating new forum - Fixed

Reworked the code in "user_space.asp" and "pop_user_space.asp" to make it easier to add new features

Some issues with admin editing members space - Fixed

Made some new icons for the user space page

Redid the subhead table (menu tree, etc...) menu tree looks alot nicer

Admin link to view a members "User Space" page (missing in ver. 1.0.00) - Added to "members" and "admin search" pages

New Drafts feature - If Draft auto-delete is "On" a message is displayed informing members

New Drafts feature - If Draft auto-delete is "On" drafts close to being auto-deleted are marked

Check for maximum bookmarks (missing in ver. 1.0.00) - Hard coded in pop_user_space

Top to bottom redo on user_space_setup. Making it alot easier to read.

Another security issue with bookmarks found - Fixed

Bookmark # issue when adding an outside url - Fixed

Version: 1.0.00 11/16/07 - Initial Release


----------------
Description:

This mod adds a link in the forum menu that takes forum members to a private personal page
viewable only by the member and the forum administrator(s). The mod consists of "features" that
you add to it.

The default feature "User Posts" shows recent topics that the member has participated in. Other
features can be added later. Meaning that you don't have to add a feature if you don't want it.

Version 1.1.00 supports these addon features:

User Drafts 1.0.01: Allows members to save posts as drafts to be posted later.

User Bookmarks 1.0.01: Allows members to bookmark topics, replies and outside urls for later reference.

User Friends 1.0.00: Allows members to add other members to a friends/buddies list with thier
forum contact information. Saves member from having to look for contact info
through a post or the members page.

Any questions or problems, just ask .

<

    _-/Cripto9t\-_

Edited by - cripto9t on 14 February 2008 10:00:26

CodeMan7
New Member

USA
88 Posts

Posted - 13 January 2008 :  14:01:49  Show Profile  Reply with Quote
Good job!

I did find one problem though.

If there is a single, or double, quote in the subject line of the post, it will produce an error when you try to save it as a draft. (This only applies when you are replying to a post with quotes in it.)

It shows the error at line 229 in inc_draft_info.asp.

It took a while to track it down. Some posts saved as drafts and other posts gave the error.

<
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 13 January 2008 :  15:03:52  Show Profile  Reply with Quote
Thanks codeman, I'll give it a look when todays games are over.
Go Colts! I hope<

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

cripto9t
Average Member

USA
881 Posts

Posted - 14 January 2008 :  11:50:46  Show Profile  Reply with Quote
I can't believe I missed this .
else
      txtSubject = "re: " & rs("T_SUBJECT")
end if

needs to be
else
      txtSubject = chkString("re: " & rs("T_SUBJECT"),"sqlstring")
end if
<

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

CodeMan7
New Member

USA
88 Posts

Posted - 14 January 2008 :  12:42:26  Show Profile  Reply with Quote
Thanks Cripto9t!

That did the trick.

Sorry about the Colts. At least they looked better than my Cowboys.
<
Go to Top of Page

texanman
Junior Member

United States
410 Posts

Posted - 14 January 2008 :  13:50:58  Show Profile  Reply with Quote
I am getting this error in Friends addon:

Microsoft OLE DB Provider for SQL Server error '80040e37'

Invalid object name 'FORUM_FRIENDS'.

/user_space.asp, line 356

That line is: rs.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText

Any idea what the problem is? I am using MS SQL


Also, the links in User Space Management do not work i.e. Add Feature and Trim Friends.

Here is the database update msg:


Friends

Creating table(s)...
CREATE TABLE FORUM_FRIENDS( FRIEND_ID int IDENTITY (1, 1) PRIMARY KEY NOT NULL , F_MEMBER int (11) NOT NULL DEFAULT 0, F_FRIEND int (11) NOT NULL DEFAULT 0, F_LEVEL smallint (6) NOT NULL DEFAULT 0, F_DATE nvarchar (14) NOT NULL DEFAULT '')
Table already exists

--------------------------------------------------------------------------------

Adding new records..
INSERT INTO FORUM_CONFIG_NEW (C_VARIABLE,C_VALUE) VALUES ('STRUSFRIENDSWITCH','1')

Value(s) updated successfully
--------------------------------------------------------------------------------


Database setup finished


Thanks
<

Edited by - texanman on 14 January 2008 15:16:38
Go to Top of Page

texanman
Junior Member

United States
410 Posts

Posted - 14 January 2008 :  15:29:28  Show Profile  Reply with Quote
Ok all fine now. I was missing two files from the addon folder.
Thanks<
Go to Top of Page

texanman
Junior Member

United States
410 Posts

Posted - 14 January 2008 :  16:02:40  Show Profile  Reply with Quote
Getting the following error when trying to add a new friend:

Microsoft OLE DB Provider for SQL Server error '80040e57'

String or binary data would be truncated.

/pop_user_space.asp, line 833

That line is: my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords

Thanks<
Go to Top of Page

texanman
Junior Member

United States
410 Posts

Posted - 14 January 2008 :  18:11:49  Show Profile  Reply with Quote
There is only one simple change in post_info.asp where you add a link to inc_draft_info.asp. I double checked 3 times to make sure I have it in the right spot. Still, a draft is not saved in the draft section of the user space. It is rather published.
Any idea why this is happening?
Thanks

Update: It had to do with translating the string "save as draft" in post.asp. I even tried tries the same thing in inc_draft_info still the same. Translating other value strings cause no problem. Only 'save as draft" causes this.<

Edited by - texanman on 14 January 2008 23:06:56
Go to Top of Page

CodeMan7
New Member

USA
88 Posts

Posted - 14 January 2008 :  18:43:21  Show Profile  Reply with Quote
Did you make the 9 changes in post.asp?

And did you add all of the necessary "user space" files to your directory?

<
Go to Top of Page

texanman
Junior Member

United States
410 Posts

Posted - 14 January 2008 :  19:10:25  Show Profile  Reply with Quote
Yeap! It took over an hour just to make those 9 changes. Did you try the addons and they are working fine for you?
Thanks<
Go to Top of Page

CodeMan7
New Member

USA
88 Posts

Posted - 14 January 2008 :  19:35:29  Show Profile  Reply with Quote
The only addon I have installed is the drafts. It is working fine.

Are you getting an error when you try to save a draft?

<
Go to Top of Page

texanman
Junior Member

United States
410 Posts

Posted - 14 January 2008 :  19:53:14  Show Profile  Reply with Quote
There is no error. When I open a new topic or reply to a topic and click on "Save as Draft" it publishes the post rather than saving it as a draft. When I check in the darft folder there is nothing.<
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 15 January 2008 :  09:04:48  Show Profile  Reply with Quote
quote:
Originally posted by texanman

Getting the following error when trying to add a new friend:

Microsoft OLE DB Provider for SQL Server error '80040e57'

String or binary data would be truncated.

/pop_user_space.asp, line 833

That line is: my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords


I must have screwed up the friends table when I was cleaning up the code.

copy the red text and save as dbs_uninstall.asp
Uninstall friends

[DROP]
FRIENDS
[END]
go to Mod Setup in Admin Options and find Uninstall friends in dropdown and Update. That should drop the Friends table.

In "user_space_setup.asp" find this code around line 494
"F_DATE " & strN & "varchar NULL )"

change or replace it so it looks like this
"F_DATE " & strN & "varchar (14) NULL )"

Find this code around line 508
"CONSTRAINT " & strTablePrefix & "usC14 DEFAULT 0 FOR F_FRIEND, " & _

Right under that add this code
"CONSTRAINT " & strTablePrefix & "usC15 DEFAULT '' FOR F_DATE, " & _

Save the changes and go to the add a feature in user space setup and Add friends again.

If you don't get any red error messages that should fix it .

<

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

cripto9t
Average Member

USA
881 Posts

Posted - 15 January 2008 :  10:13:36  Show Profile  Reply with Quote
quote:
Originally posted by texanman

Update: It had to do with translating the string "save as draft" in post.asp. I even tried tries the same thing in inc_draft_info still the same. Translating other value strings cause no problem. Only 'save as draft" causes this.


In "inc_draft_info.asp" Add
Response.Write Request.Form("Submit")
Response.End

Right after
case "Topic", "TopicQuote", "Reply", "ReplyQuote"

You should get "Save as Draft" or "Post New Topic" depending on which submit button you push.


<

    _-/Cripto9t\-_

Edited by - cripto9t on 15 January 2008 10:21:00
Go to Top of Page

texanman
Junior Member

United States
410 Posts

Posted - 15 January 2008 :  15:15:39  Show Profile  Reply with Quote
Thanks cripto9t!
That takes care of friends. Everything works fine now. I will try the draft now. :)<
Go to Top of Page
Page: of 8 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.2 seconds. Powered By: Snitz Forums 2000 Version 3.4.07