User Space 1.1.02 (last update 02/14/08)

Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/66286?pagenum=1
05 November 2025, 08:45

Topic


cripto9t
User Space 1.1.02 (last update 02/14/08)
13 January 2008, 10:54


I missed my due date by a few weeks but better late than never smile.
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" smile.

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...
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 smile.
<

 

Replies ...


CodeMan7
13 January 2008, 14:01


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.
<
cripto9t
13 January 2008, 15:03


Thanks codeman, I'll give it a look when todays games are over. Go Colts! I hope<
cripto9t
14 January 2008, 11:50


I can't believe I missed this dissapprove.
Code:
else
txtSubject = "re: " & rs("T_SUBJECT")
end if
needs to be
Code:
else
txtSubject = chkString("re: " & rs("T_SUBJECT"),"sqlstring") end if
<
CodeMan7
14 January 2008, 12:42


Thanks Cripto9t!
That did the trick.
Sorry about the Colts. At least they looked better than my Cowboys. <
texanman
14 January 2008, 13:50


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
<
texanman
14 January 2008, 15:29


Ok all fine now. I was missing two files from the addon folder. Thanks<
texanman
14 January 2008, 16:02


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<
texanman
14 January 2008, 18:11


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.<
CodeMan7
14 January 2008, 18:43


Did you make the 9 changes in post.asp?
And did you add all of the necessary "user space" files to your directory?
<
texanman
14 January 2008, 19:10


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<
CodeMan7
14 January 2008, 19:35


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?
<
texanman
14 January 2008, 19:53


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.<
cripto9t
15 January 2008, 09:04


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
Code:
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
Code:
"F_DATE " & strN & "varchar NULL )"
change or replace it so it looks like this
Code:
"F_DATE " & strN & "varchar (14) NULL )"
Find this code around line 508
Code:
"CONSTRAINT " & strTablePrefix & "usC14 DEFAULT 0 FOR F_FRIEND, " & _
Right under that add this code
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 smile.
<
cripto9t
15 January 2008, 10:13


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.

<
texanman
15 January 2008, 15:15


Thanks cripto9t! That takes care of friends. Everything works fine now. I will try the draft now. :)<
cripto9t
15 January 2008, 17:41


Thanks Image.
Because of the db issues I updated the zip - v 1.1.01

I also added uninstall files for each feature.<
NiteOwl
16 January 2008, 19:12


I love it!! BTW Crypto9t I found that the readme in the friends folder appears to be the readme for the bookmark addon. <
cripto9t
17 January 2008, 08:47


Thanks NiteOwl
Originally posted by NiteOwl
BTW Crypto9t I found that the readme in the friends folder appears to be the readme for the bookmark addon.
I used the bookmark readme to write the friends readme and went through it and replaced "bookmarks" with "friends". I missed a few spots :). Just think "friends" when you see the word "bookmarks".<
cripto9t
17 January 2008, 09:17


Heres something thats missing from the readme. I hard coded some constraints in the files instead of adding them to config_new table. You can change these to suit your needs.
In user_space.asp near the top of the file.
Code:
Const strUSTxt = "Your Space"       ' Main page title
Const strPostTxt = "Posts" ' Post page title
Const strDraftTxt = "Drafts" ' Draft page title
Const intDraftWarn = 5 ' Days till auto delete - warns member that a draft is close to deletion
Const strBookmarkTxt = "Bookmarks" ' Bookmark page title
Const intIsNew = 7 ' Number of days to display the new icon - used for bookmarks, friends
Const strFriendTxt = "Friends" ' Friend page title
Const strFriendLev1 = "Level 1" ' Friend Level 1
Const strFriendLev2 = "Level 2" ' Friend Level 2
Const strFriendLev3 = "Level 3" ' Friend Level 3
For example, if you would rather use "Buddy List" instead of "Friends" just change the value of strFriendTxt.
Where it says don't edit, don't :).
Code:
'## DO NOT EDIT BELOW THIS LINE!!

Const intFRow = 4 ' !!! Do Not Edit This Line !!!! Holds # of feature rows
Const intFCol = 6 ' !!! Do Not Edit This Line !!!! Holds # of feature cols
Most of the file depends on those two numbers.
There are also a few in pop_user_space.asp that limit the amount of bookmarks and friends a member can have.
Code:
'Set values to suit your needs
'Values do not apply to mods and admins
Const blnLimit = true 'boolean holds member limits switch
Const intBookmarkMax = 100 'numeric holds max num of bookmarks a member can have
Const intFriendMax = 100 'numeric holds max num of friends a member can have
blnLimit is true/false. It applies to both bookmarks and friends. true - limits | false - no limits

<
texanman
17 January 2008, 19:38


Thanks cripto9t
Is there a way to reduce the fonts in New topic, new friend, old topics (20 or more) etc to footer font size instead of default font?<
bobby131313
17 January 2008, 19:46


I just noticed that the category font size seems to be missing, I'm installing this mod now.
I changed all instances of....
strCategoryFontColor &

To....
strCategoryFontColor & """ size=""" & strDefaultFontSize &

Should be 8 of them in user_space.asp, looks mucho better now. bigsmile<
bobby131313
17 January 2008, 21:30


Hmmm, bookmarks seem to be clashing with OWM's Today/Yesterday mod... Microsoft VBScript runtime error '800a000d'

Type mismatch: '[string: "Today 9:26:15 PM"]'

/user_space.asp, line 1203

Got then when adding a bookmark from the link on user_space.asp

Fixed in inc_function_common.asp around line 940. Search for....
' For any page that needs the actual date, add the file name to the above case statement.
Add user_space.asp to the list. I do believe that was part of the previously mentioned mod.<
bobby131313
17 January 2008, 23:12


OK, I have bookmarks working from the link in user_space.asp. But clicking on the icons on topic.asp, pop_user_space.asp always forwards to default.asp. I can't figure it out.
member01
snitz

if someone wants to take a look.
http://www.stampcommunity.org/

You'll have to go to user_space.asp manually, I haven't coded a link yet.<
cripto9t
18 January 2008, 07:58


bobby it looks like your useing the beta version 1.0.00. I changed the url querystring in the bookmark link in topics which
pop_user_space checks and if its not right, it redirects.
You need version 1.1.01 and follow the update instructions. There were a lot of bugs in the initial release.

It looks like the zip file is bad. I'll post the correct links

In topic.asp overwrite the first change with this
Code:
'##BOOKMARKS ## User Space Mod ## Add Code below ###############

if trim(strUSBookmarkSwitch) <> "" then
if cLng(strUSBookmarkSwitch) = 1 then
Response.Write "<a href=""JavaScript:openWindow5('pop_user_space.asp?mode=bookmark&action=add&type=post&archive=" & ArchiveView & "&topic_id=" & TopicID & "&reply_id=" & Reply_ReplyID & "')"">" & getCurrentIcon(strIconFavorites,"Bookmark this reply","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
end if
end if

'## End #####################################################
and the second with this
Code:
'##BOOKMARKS ## User Space Mod ## Add Code below ###########################

if trim(strUSBookmarkSwitch) <> "" then
if cLng(strUSBookmarkSwitch) = 1 then
Response.Write "<a href=""JavaScript:openWindow5('pop_user_space.asp?mode=bookmark&action=add&type=post&archive=" & ArchiveView & "&topic_id=" & TopicID & "')"">" & getCurrentIcon(strIconFavorites,"Bookmark this topic","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
end if
end if

'## End ## Thats all for this file ##########################

I'm going to update the zip

<
cripto9t
18 January 2008, 08:53


I updated the zip with the correct topic.asp reference file for the bookmarks addon. <
bobby131313
18 January 2008, 09:34


Awesome, worked like a charm!
Thanks cripto9t! This is an awesome mod.
Found one little cosmetic problem, the cell that contains "User Space Management" on admin_user_space.asp has a mismatched font/bg color.
Code:
			        "                     <td bgcolor=""" & strHeadCellColor & """ colspan=""2"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><b>User Space Management</b></font></td>" & vbNewLine & _

Should be...
Code:
			        "                     <td bgcolor=""" & strCategoryCellColor & """ colspan=""2"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><b>User Space Management</b></font></td>" & vbNewLine & _

<
cripto9t
18 January 2008, 13:14


Originally posted by texanman
Thanks cripto9t
Is there a way to reduce the fonts in New topic, new friend, old topics (20 or more) etc to footer font size instead of default font?

Search for getIconLegend (there are 2 places) and in the line above it change strDefaultFontSize to strFooterFontSize. If you want to change the text find sub getIconLegend(), they are all listed there.<
cripto9t
18 January 2008, 13:21


Thanks bobby if you spot any more please post them. Using Header instead of Category is a pretty common mistake with me. Thats why I like to copy and paste as much as possible smile<
bobby131313
20 January 2008, 21:46


OK, I think I've found a bug. It seems that instead of recent posts, it's just running down the active topics that the member has posted in from the top of the forum until it gets to 50.
It's not the most recent 50. It's listing a topic for me that hasn't been posted to by anyone since last October because it's near the top of the forum.
Anyone else seeing this? You'll have to look at a member with a lot of posts for it to be obvious.<
cripto9t
21 January 2008, 10:35


I see it. It's in the sql statement. I originally wrote this with no limits where it worked fine. I think I'll have to loop through the categories and forums, like default.asp, to get it to display properly.<
thelodger
21 January 2008, 13:21


Also in bookmarks, when you bookmark a topic/post, and then go to "yourspace" and click on it, the link comes back as the main forum page and not the actual topic.<
bobby131313
21 January 2008, 14:01


For the bookmarks, try replacing the "build url" section in pop_user_space.asp with this....
Code:
                                        '# build url

ForumLink = replace(strForumUrl,"default.asp/", "topic.asp")
ArchiveLink = ""
PageLink = ""
AnchorLink = ""

if ArchiveView = "true" then
ArchiveLink = "ARCHIVE=true&"
end if
if Reply_ID <> "" then
TopicLink = "topic.asp?TOPIC_ID=" & Topic_ID
AnchorLink = "#" & Reply_ID
else
TopicLink = "topic.asp?TOPIC_ID=" & Topic_ID
end if
QueryLink = ArchiveLink & TopicLink & AnchorLink

strUrl = ForumLink & QueryLink

Backup first of course!
I don't have an archived topic to test it on, but active topics and replies are working with this.
I'm not sure why the "whichpage" line was in there, seems to me you are either BMing the topic or a post, theres no option to BM a page. If I'm missing the reason for it (which is entirely possible) feel free to blast me. bigsmile <
thelodger
22 January 2008, 12:04


Hi, no that doesn't work, when you attempt to bookmark the bookmark pop up comes up with no bookmark url is on the box so when you save bookmark it comes up witrh an error no bookmark url.<
bobby131313
22 January 2008, 12:14


Odd, works perfect for me, I just don't know if an archived topic will work yet.<
thelodger
22 January 2008, 12:37


Well ita not working for my forum sad
I have changed the code as you have said and checked but its still not working sad

I have set up a log in, username: poker, password: test

my forum url is www.forumsuperstars.com<
cripto9t
23 January 2008, 07:55


lodger could you change it back so I can see the url it was showing?<
bobby131313
23 January 2008, 09:56


Cripto, it was missing "topic.asp" in the url. So it was creating a url like this...
http://forum.snitz.com/forum/?TOPIC_ID=66286

So it was just forwarding to default.asp.<
cripto9t
23 January 2008, 11:42


Originally posted by bobby131313
Cripto, it was missing "topic.asp" in the url. So it was creating a url like this...
http://forum.snitz.com/forum/?TOPIC_ID=66286

So it was just forwarding to default.asp.
That helps smile.
lodger, In "Admin Options" open "Main Forum Configuration" and make sure your "Forum URL" is http://www.forumsuperstars.com/default.asp/
I think that may be the problem smile.
Bobby, I'm still working on the posts bug. I'm trying to write a function that will reorder the data table rows. I've got it working on a 1d array, just need to adapt it for a 2d.<
bobby131313
23 January 2008, 11:48


Bobby, I'm still working on the posts bug. I'm trying to write a function that will reorder the data table rows. I've got it working on a 1d array, just need to adapt it for a 2d.

bigsmile Cool. I appreciate your efforts. Thank you.<
thelodger
23 January 2008, 14:23


Hi mate, I have changed it back so you can see whats happining, also the forum url in the main forum congifs is correct.<
cripto9t
23 January 2008, 17:46


lodger this should fix it for you and maybe help others.
Replace this line
Code:
Code:
ForumLink = replace(strForumUrl,"default.asp/", "topic.asp")
with this
Code:
Code:
if inStr(strForumUrl,"default.asp/") then
ForumLink = replace(strForumUrl,"default.asp/", "topic.asp")
else
ForumLink = strForumUrl & "topic.asp"
end if

Image, I probably should have went that route for forum urls, but I wanted the complete address to use. I see I'm going to have to do a little more url research smile.<
thelodger
23 January 2008, 18:11


Hi crypto, did that but it has created another error, I will leave it on so you can have a look, thanks for your help so far.<
cripto9t
24 January 2008, 08:08


I posted my test code instead of the forum code blush sorry. It's fixed now.
Still, it shouldn't have given an error.
I tried to replicate it but couldn't.
Make sure the whole block looks like this
Code:
                                        '# build url

if inStr(strForumUrl,"default.asp/") then
ForumLink = replace(strForumUrl,"default.asp/", "topic.asp")
else
ForumLink = strForumUrl & "topic.asp"
end if
ArchiveLink = ""
PageLink = ""
AnchorLink = ""

if ArchiveView = "true" then
ArchiveLink = "ARCHIVE=true&"
end if
if Reply_ID <> "" then
PageLink = "whichpage=-1&"
TopicLink = "TOPIC_ID=" & Topic_ID & "&"
AnchorLink = "Reply_ID=" & Reply_ID
else
TopicLink = "TOPIC_ID=" & Topic_ID
end if
QueryLink = "?" & ArchiveLink & PageLink & TopicLink & AnchorLink


strUrl = ForumLink & QueryLink

'# Get topic subject
If you think everything looks right and your still getting an error,
I would get a fresh copy of pop_userspace and make that one change in my previous post.
Hope this helps smile.<
thelodger
24 January 2008, 12:25


Thats sorted it, thanks very much, all working great.<
thermal_seeker
26 January 2008, 13:45


what have I done wrong?
when clicking on the US folder in the members list I get this error..
Microsoft VBScript compilation error '800a0411'

Name redefined

/Forum/user_space.asp, line 52

dim strSql
----^


Dave

EDIT: I also get the same when clicking the new link in the forum menu<
phy1729
26 January 2008, 13:51


Delete that line. Apparently another mod also uses strSql and you can't redefine a variable so the error Name redefined. Cripto, you may want to rename the variable to something like UserSpace_strSql in the next version.<
thermal_seeker
26 January 2008, 13:58


thanks.. fixed :)

now to progress..to the next stage<
blackinwhite
27 January 2008, 02:09


it'S a great mod. I installed bookmarks and friends, not problem at all.
does "Posts" mod work like "active posts" in the member profile, I think it only whows last active posts?<
blackinwhite
27 January 2008, 02:25


just a minor problem. there is no control for the same link in bookmarks section, you can add the same link multiple times.<
cripto9t
28 January 2008, 10:28


"Users Posts" returns active posts that a member has participated in - started or replied in. they are not working properly, as Bobby pointed out above. I hope to have them fixed sometime this week.
Bookmarks doesn't check for duplicates. Like bookmarks in your browser, it's up to the user to manage them.<
cripto9t
14 February 2008, 10:30


1.1.02 released

Main bug fix this version, User Posts max value bug - fixed
All the other issues pointed out so far have been addressed. I also added some more constants to "user_space.asp" to make customization a little easier.
I opted to fix the user posts bug by using a date to query the db instead of a max value. It was a lot easier to go this route, plus it gives equal time to all forums.
To update, replace "user_space.asp" and "admin_user_space.asp" with the new files. You'll have to go to "admin user space" and set a default date limit.<
bobby131313
14 February 2008, 12:08


Unfortunately, posts are still not working right. sad Here is a screenshot...
http://www.stampcommunity.org/uploaded/bobby131313/posts.gif

It's set for last day which should only be about 5 topics. As you can see there are topics there that haven't been updated since January.
There's also some kind of paging problem, notice it say 1-15 of 95, well if you go to page 2 you get ...
ADODB.Recordset error '800a0bcd'

Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/user_space.asp, line 348

The "95" is not related to the admin days setting, nor the active topics table, nor total posts, nor the drop-down setting. It doesn't change, I don't know what is determining that number.
I'm going to keep investigating and see if I can maybe figure out why it's doing what it's doing.<
cripto9t
14 February 2008, 14:41


Bobby and the other 3 people that have downloaded this version, dowload the zip again and replace "user_space.asp". I didn't change the version #.
Apparantly I didn't test this with mysql blush. That and some copy and paste left over that shouldn't have been there. I think it's working now.
I also got rid of some of the options in the day dropdown list. Again if your one of the 4 who downloaded this, try it again withthe new file.<
bobby131313
14 February 2008, 14:43


I'm off.. bigsmile<
thelodger
14 February 2008, 15:14


Nice 1, looks good and works well.<
bobby131313
14 February 2008, 15:18


Weeeeeeeeeeeeeeeeeeee..............
Appears to be dead on! Thank you soooo much for your hard work. I really appreciate it. I'm going to do a little more testing and hopefully go live this evening. bigsmile
One little cosmetic change I made that might interest you for future updates...
If you search user_space.asp for "Expand this category" and change the icon to the left of it to "strIconPlus" and the icon to the left of "Hide this category" to "strIconMinus", then all the User Space sections will match default.asp perfectly. wink<
bobby131313
14 February 2008, 15:57


OK, looks like one more small bug that only affects admins.
If you look at someone elses' posts, it's fine until you go past page 1, then it reverts to your own posts.<
cripto9t
14 February 2008, 16:33


bobby find this line in user_space.asp
Code:
"                <input name=""mode"" type=""hidden"" value=""" & intMode & """>" & vbNewLine
Add this line after it
Code:
if bAdminView = true then Response.Write  "                <input name=""memid"" type=""hidden"" value=""" & memID & """>" & vbNewLine
<
bobby131313
14 February 2008, 17:09


Worked like a charm. Thanks!
You'll have to go to "admin user space" and set a default date limit.

Let me see if I understand this. This just sets the default correct? It's not actually supposed to limit how far a user can go back using the drop down?
Not that it's a big deal, but I'm playing with it and it doesn't *seem* to do anything.<
cripto9t
14 February 2008, 17:58


Default was the wrong word for this. It limits what is available in
the dropdown for normal users. You won't notice a change if you are
logged in as an admin or mod. Try this, set Post Limit to 120 days. Sign in as a normal user. click the days dropdown. 120 days should be the biggest option.
Keep testing bobby smile.<
bobby131313
14 February 2008, 18:05


OK, cool, didn't think of that, looks good. bigsmile
Now it will only pull from the active table right?
So if I stay fairly tightly archived at 90 days, all setting it to 6 months is going to do is get me a lot of "Where the heck are my posts from 4-5 months ago?" ... Correct?<
cripto9t
14 February 2008, 21:15


Originally posted by bobby131313
Now it will only pull from the active table right?
So if I stay fairly tightly archived at 90 days, all setting it to 6 months is going to do is get me a lot of "Where the heck are my posts from 4-5 months ago?" ... Correct?
Right. Nothing from the archives.
From all the copy and pasting I did, there are a couple of references to the archive table left in the code, but they don't mean squat (just more clean up smile).<
bobby131313
14 February 2008, 21:37


Okie dokie... Now we'll see how the masses like it..
Busy Forum
Not So Busy Forum
bigsmile<
bobby131313
14 February 2008, 21:44


One more bug that I noticed with my announcement post. This only occurs on a second save as a draft...
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[MySQL][ODBC 3.51 Driver][mysqld-4.1.22-community-nt-log]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' D_MESSAGE = '<font size=\"3\">[url=\"http://www.coincommunity.com/forum/user_sp' at line 1

/forum/inc_draft_info.asp, line 247

Interesting...
<
bobby131313
14 February 2008, 21:49


I got the SQL to write..
UPDATE FORUM_DRAFTS SET FORUM_ID = 71, CAT_ID = , D_MESSAGE = 'No your CCF! This may be the biggest new toy yet! Your own personal \"MySpace\" right here. Recent Topics First things first..... you can now see at a glance the last 2 months worth of topics that you posted in! This does not mean that you posted in it in the last 2 months... it means that you posted in it and someone has posted in it in the last 2 months. Cool huh? Two months worth of your active topics at your fingertips. Drafts You can now save drafts of all your posts. In addition to the \"post\" button, you will now see a \"Save as Draft\" button. Great for when your in the middle of a long post and realize the cat''s in the dryer. Or you want to wait to review it when you''re in a better mood. o|| Or you just want to save a good reply that you think you may need again. BookmarkingYou will see at the top of every topic and every reply a new icon, , click it and you can bookmark the topic or reply. You can also bookmark pages outside coin community by clicking the Add My CCF Bookmarks link on the bookmark page. You''re allowed 100 bookmarks at any one time! Friends List You have another new icon above every post, , click it to add that user to your buddy list. There''s 3 different levels of friends... Gold, Silver, and Copper. Have all your contact info together in one place. You can have 100 friends at any given time. There is a direct link to your My CCF page in the top menu now. Profile, Subscription, and Member List links have been moved to your My CCF page, since they can only be used by members anyway. If you see any bugs, be sure post in the support forum and to copy and paste any error messages you may get. Enjoy! cool', D_LAST_EDIT = '20080214214922', D_LAST_EDITBY = 2, D_IP = '71.200.32.85', D_SUBJECT = 'Your CCF, no My CCF ...' WHERE DRAFT_ID = 4
<
bobby131313
14 February 2008, 21:56


OK, previous was when you try to save the draft again.
Below is what happens when I tried to post the same post after saving as a draft and opening it again..
SELECT C.CAT_MODERATION, C.CAT_SUBSCRIPTION, C.CAT_NAME , F.F_MODERATION, F.F_SUBSCRIPTION FROM FORUM_CATEGORY C, FORUM_FORUM F WHERE C.CAT_ID = AND F.FORUM_ID = 71

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[MySQL][ODBC 3.51 Driver][mysqld-4.1.22-community-nt-log]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND F.FORUM_ID = 71' at line 1

/forum/post_info.asp, line 318
<
bobby131313
14 February 2008, 22:44


Hold off, I can only reproduce this issue on one forum, so let me triple check some code. blush Sorry.<
bobby131313
15 February 2008, 00:10


I would love to say the problem was technical, but it was a loose nut between the seat and the monitor. blush
When I did the first forum (that worked like a charm) I forgot the comments on 2 of the edits in post.asp, naturally when I copied the edits over to the other forum I searched for the comments......
Sorry. blush<
AnonJr
15 February 2008, 06:57


Funny how that happens some times. tongue<
Webbo
16 February 2008, 17:45


I've just added this to my forum, using a MySql database, and it works well smile
The only problem I have with it is that with the options 'Bookmarks' and 'Friends' it shows the following error:

Code:
Microsoft VBScript runtime error '800a000d' 
Type mismatch: '[string: "Today 10:10:18 PM"]'

/forum/user_space.asp, line 1306

Sometime ago I added a Mod that changed the dates for a post made today to 'Today' and a post made yesterday to 'Yesterday' instead of the default dates and this is causing the mismatch
I'll have a look into how to get around this but if you have any ideas in the meantime I'd be greatful smile
Edit: This is the Mod for reference but unfortunately no longer available: http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=49255<
bobby131313
16 February 2008, 18:07



Fix is in inc_function_common.asp around line 940. Search for....
' For any page that needs the actual date, add the file name to the above case statement.
Add user_space.asp to the list and the error will stop.
I plan on investigating adding the today/yesterday to this mod but haven't yet.<
Webbo
16 February 2008, 18:16


Brilliant Bobby [^]
I was half way to tearing the reaminder of my hair out trying to find where I made the changes in the files years ago bigsmile<
Webbo
16 February 2008, 18:41


A useful addition would be to add the Private Messaging link to the Friends section wink
Just taking a quick look at it we'd need to incorporate the following into user_space.asp:

Code:
#1: M.M_PMRECEIVE,

#2: If mlev > 2 and (Reply_MemberPM = "1" and strPMStatus = "1") Then
if Trim(Reply_MemberPM) <> "" then
Response.Write " <a href=""privatesend.asp?method=Topic&mname=" & ChkString(Reply_MemberName,"display") & """>" & getCurrentIcon(strIconPmprivatemessage2,"Send " & ChkString(Reply_MemberName,"display") & " a Private Message","align=""absmiddle"" hspace=""0""") & "</a>" & vbNewLine

#1 somewhere around Line 259 but tied in with the current coding
#2 at line 840 or thereabouts

Any ideas?

<
cripto9t
17 February 2008, 07:52


Originally posted by Webbo

Code:
Microsoft VBScript runtime error '800a000d' 
Type mismatch: '[string: "Today 10:10:18 PM"]'

/forum/user_space.asp, line 1306

On line 1306 change this part
Code:
chkDate(eDate,"",true)
to this
Code:
StrToDate(eDate)
Line should now look like this
Code:
if DateDiff("d",StrToDate(eDate),strForumTimeAdjust) <= intIsNew then blnDate = true

That looks like a better way to go anyway smile,
so it will be the first change for the next update.<
Webbo
23 February 2008, 03:46


There's a discrepency in the coding for the 'Friends' add on

In the file pop_userspace.asp it allows you to choose levels of friends as A, B, or C
Yet in the 'Friends' panel in 'Your Space' it shows those freinds as levels 1, 2, or 3

This is easily fixed by replacing line 467 in pop_userspace.asp with the following:

Code:
                                               Response.Write  "<b>Level:</b> 1. <input type=""radio"" name=""level"" value=""0"" checked /> 2. <input type=""radio"" name=""level"" value=""1"" /> 3. <input type=""radio"" name=""level"" value=""2"" /><br />"

Any news on adding the Private Message link to the Freinds section?<
Andy Humm
23 February 2008, 05:21


Knowing there has been a few observations and alterations in the MOD since inaugeration, can you confirm whether the existing download link has all the alterations/tweaks incorporated, thus saving doing the changes mentioned above - Download link Version 1.1.02
It would be easier that doing the changes above..Cheers Andy<
cripto9t
23 February 2008, 07:11


Webbo you can also chang those titles in user_space.asp
Look for this code at the top of the page.
Code:
Const strFriendLev1 = "Level 1"           ' Friend Level 1
Const strFriendLev2 = "Level 2" ' Friend Level 2
Const strFriendLev3 = "Level 3" ' Friend Level 3
I'll put that on my list for the next update.
I'll give PMs a look this weekend.

Andy, except for the last 2, (chkDate to StrToDate) and Friends level,
all the bugs posted in this thread have been addressed in the version 1.1.02.
Both very easy fixes smile.
Also the chkDate bug is only an issue if you use the "yesterday/today" mod.<
Andy Humm
23 February 2008, 08:56


Cheers cripto9t<
cripto9t
23 February 2008, 09:06


Webbo this is untested because I don't have pms installed. Add pm column to the sql statement red text. Make sure its right after Yahoo and don't forget the comma.
Code:
                strSql = "SELECT FRIEND_ID, F_MEMBER, F_FRIEND, F_LEVEL, F_DATE, M.M_NAME, " & _
"F.M_STATUS, F.M_LEVEL, F.M_NAME, F.M_TITLE, F.M_POSTS, F.M_DATE, F.M_EMAIL, " & _
"F.M_COUNTRY, F.M_HOMEPAGE, F.M_LASTPOSTDATE, F.M_LEVEL, F.M_AIM, " & _
"F.M_ICQ, F.M_MSN, F.M_YAHOO, M.M_PMRECEIVE " & _
"FROM " & strTablePrefix & "FRIENDS, " & strMemberTablePrefix & "MEMBERS M, " & strMemberTablePrefix & "MEMBERS F " & _
"WHERE F_MEMBER = " & memID & " AND F_MEMBER = M.MEMBER_ID " & _
"AND F_FRIEND = F.MEMBER_ID " & _
"AND F_LEVEL <= 2 " & _
"ORDER BY F_LEVEL ASC, M.M_LEVEL DESC, M.M_NAME ASC, F_DATE ASC"
Around line 773
Code:
                                        F_FriendLevel = allTableData(16,iRowCnt)
F_FriendAIM = allTableData(17,iRowCnt)
F_FriendICQ = allTableData(18,iRowCnt)
F_FriendMSN = allTableData(19,iRowCnt)
F_FriendYAHOO = allTableData(20,iRowCnt)
F_FriendPM = allTableData(21,iRowCnt)
Around line 865 add link
Code:
			If (F_FriendPM = "1" and strPMStatus = "1") Then
if Trim(F_FriendPM) <> "" then
Response.Write " <a href=""privatesend.asp?method=Topic&mname=" & ChkString(F_FriendName,"display") & """>" & getCurrentIcon(strIconPmprivatemessage,"Send " & ChkString(F_FriendName,"display") & " a Private Message","align=""absmiddle"" hspace=""0""") & "</a>" & vbNewLine
End If
End IF
that link is copy and paste from topics and it probably doesn't need that second if statement, but I'm not going to mess with it smile<
bitwise2000
23 February 2008, 11:30


Has anyone installed this on 3.4.03 ? Other than some differences in the location of the script mods, I don't see any issues. Looks like something I want to try.
One concern would be reliance by the new code on common functions which don't exist in the older version.<
cripto9t
23 February 2008, 12:12


I haven't checked it but I don't think there would be any problems
with older versions of 3.4
The only possible problem I can think of may be with drafts and the post files.
But I really doubt there would be one. AFAIK the forum funcions used, chkString(), chkDate(),etc.. were used in older versions of 3.4
<
Webbo
24 February 2008, 05:44


Crypto9t, just to confirm that the above code to add a PM link works well smile
There's a small typo in pop_userspace.asp:

On line 533, 'has been added to you forum friends folder' needs to read: 'has been added to your forum friends folder'

Good mod by the way<
Webbo
24 February 2008, 19:54


For those who have got the Active User mod implemented into their forums, I've worked out a way for the Online Status of Friends to be shown in the Friends add-on:

______________________________________________________________________

In file: inc_func_common.asp
find:

Code:
sub AUHandleLoging()
strSql = "DELETE FROM " & strTablePrefix & "ACTIVE_USERS WHERE AU_IP = '" & Chkstring(request.ServerVariables("REMOTE_ADDR"), "SQLString") & "'"
my_conn.execute (strSql)
end sub

add the following after:

Code:
function AUGetOnlineMembers()
strSql ="SELECT " & strTablePrefix & "ACTIVE_USERS.MEMBER_ID "
strSql = strSql & " FROM " & strTablePrefix & "ACTIVE_USERS "
if strAUAnon and not(bolOverride) then
strSql = strSql & "INNER JOIN " & strTablePrefix & "MEMBERS ON "
strSql = strSql & strTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "ACTIVE_USERS.MEMBER_ID "
strSql = strSql & "AND " & strTablePrefix & "MEMBERS.M_AUHIDE <> 0"
end if
set rsOnline = my_Conn.Execute(strSql)
If NOT rsOnline.EOF Then AUGetOnlineMembers = rsOnline.GetRows()
rsOnline.close
set rsOnline = nothing
end function

function AUMemberStatus(OnlineMembers, CurrentMember)
if IsArray(OnlineMembers) then
for intRow = 0 to UBound(OnlineMembers, 2)
if OnlineMembers(0,intRow) = CurrentMember then
AUMemberStatus = "Online"
exit function
end if
next
end if
AUMemberStatus = "Offline/Hidden"
end function


In: user_space.asp
Line 22, after <%
add:

Code:
 '## Get online users into an array

arrOnlineMembers = AUGetOnlineMembers()

'## end


Line 274
Change:
Code:

                redim strHeadCell(8)
strHeadCell(0) = " "
strHeadCell(1) = " "
strHeadCell(2) = "Friend"
strHeadCell(3) = "Level"
strHeadCell(4) = "Contact"
strHeadCell(5) = "Friend Since"
strHeadCell(6) = "Last Post"
strHeadCell(7) = "Member Since"
strHeadCell(8) = " "

to:

Code:
          
redim strHeadCell(9)
strHeadCell(0) = " "
strHeadCell(1) = " "
strHeadCell(2) = "Friend"
strHeadCell(3) = "Level"
strHeadCell(4) = "Status"
strHeadCell(5) = "Contact"
strHeadCell(6) = "Friend Since"
strHeadCell(7) = "Last Post"
strHeadCell(8) = "Member Since"
strHeadCell(9) = " "


Line 841
Change:

Code:
     Response.Write  " (" & F_FriendPosts & ")</font></td>" & vbNewLine & _

to:
Code:
           Response.Write  " (" & F_FriendPosts & ")</font></td>" & vbNewLine

Line 842
Add:


Code:
   '############# Online Status #########
Response.Write " <td align=""center"" bgcolor=""" & CColor & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" " & AUMemberStatus(arrOnlineMembers, F_FriendID) &"</font>" & vbNewLine & _
" </td>" & vbNewLine
'############# End Online Status #########

Line 848
Change:
Code:
      

" <td align=""left"" bgcolor=""" & CColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _


to:


Code:
Response.Write       "                <td align=""left"" bgcolor=""" & CColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _


That should do it bigsmile
(Credits for some of the coding to this thread: http://forum.snitz.com/forum/topic.asp?TOPIC_ID=42436)

Regards,

Dave


Edit: Just tidied up the code at Line 842
<
bobby131313
24 February 2008, 20:15


Awesome! Works great, Thank you!
Just need to change the 2 td align=""left"" to td align=""center"" to match the rest of the table.<
weeweeslap
25 February 2008, 20:29


the dbs file for the bookmarks is not functional. I had to manually make the tables
this is what the dbs file looks like that I downloaded.
Code:

Bookmarks

[CREATE] BOOKMARKS
BOOKMARK_ID
B_MEMBER#int (11)##0
B_URL# varchar (255)#NULL#''
B_TITLE# varchar (100)#NULL#''
B_CAT# varchar (100)#NULL#''
B_DATE# varchar (14)#NULL#''
[END]
[INSERT] CONFIG_NEW
(C_VARIABLE,C_VALUE)#('STRUSBOOKMARKSWITCH',1)
[END]
<
bobby131313
25 February 2008, 22:07


There was another bookmarks mod that I tried a while back and never got
to work. I never deleted the tables, they've just been sitting there. It
threw a monkeywrench in this mod. When I realized what happened, I
dropped all the bookmark tables from the db, old and new, and started
over. Worked fine.
Maybe you did this too?<
weeweeslap
25 February 2008, 22:22


I had old bookmarks mod in there, I did drop the tables before hand because I knew they were there and it still didn't work. So I just added the tables manually and all is working fine now smile -edit-
Forgot to mention I am on SQL server.<
Bassman
27 February 2008, 08:16


Still not working with access? sad<
cripto9t
27 February 2008, 08:51


Originally posted by Bassman
Still not working with access? sad
Whats not working with access? What errors are you getting?
I can't test but I can give it a look smile.
weeweeslap did you try the db setup file I included?
The dbs files were mainly for access users or if all else fails smile. The field B_MEMBER needs to be set up as an index, to shorten db searches. The same goes for Friends and Drafts, F_MEMBER and D_AUTHOR.<
weeweeslap
27 February 2008, 10:14


if by db set file you mean the dbs file, yes I tried it and it didn't work. But I managed to get stuff done by manually adding the fields in and setting the key to the fields that needed it. Thanks.<
cripto9t
27 February 2008, 17:18


Originally posted by weeweeslap
if by db set file you mean the dbs file
No, in "admin options > User Space Configuration" there's a link "Feature Set Up" to set up the feature tables. I wrote it because Mod Setup doesn't allow for index fields other
than identity. (That would be a good mod for someone smile).
Anyway glad you got it working. I'll give the dbs file a look, maybe I didn't try is with mssql. <
weeweeslap
27 February 2008, 17:26


Oh that, yes I used that but for some reason something wasn't going right for the bookmarks add on. Friends one went on just fine.<
leatherlips
29 February 2008, 21:36


Does this mod work with an access database? One of the addons says user_space_setup.asp (MYSQL and MS SQL users only)
I would like to try this mod but do not want to mess up my access database. <
cripto9t
02 March 2008, 09:22


No idea, I haven't had any feedback on access. The basic feature "User Posts" only adds 4 fields to the "config_new" table. You could hardcode them on the user_space page to test that feature without changes to the database.
Something like this
Code:
Const strUSSwitch = 1
Const strUSPostSwitch = 1
Const strUSPostMaxSwitch = 1
Const strUSPostMax = 50
<
leatherlips
15 April 2008, 11:21


I tried installing this using Access Database. I made the changes to my files
but when it came time for the database here is what I see:

Code:

User Space

Adding new records.. INSERT INTO FORUM_CONFIG_NEW (C_VARIABLE,C_VALUE) VALUES
('STRUSSWITCH',1)
INSERT INTO FORUM_CONFIG_NEW (C_VARIABLE,C_VALUE) VALUES
('STRUSPOSTSWITCH',1)
INSERT INTO FORUM_CONFIG_NEW (C_VARIABLE,C_VALUE) VALUES
('STRUSPOSTMAXSWITCH',1)
INSERT INTO FORUM_CONFIG_NEW (C_VARIABLE,C_VALUE) VALUES
('STRUSPOSTMAX',30)
Value(s) updated successfully
------------------------------

Database setup finished
Then when I go back to User Space Configuration it says this:

Code:
Database Needs Updated!

Run User Space Setup in Mod Setup.

It's as if I didn't do anything. Any ideas how to get this to work with Access? I would really like to try to use this mod as it looks pretty good.<
cripto9t
15 April 2008, 13:54


That means it can't find STRUSSWITCH, but your setup says it was added.
I've had problems like this before. I think it has something to do with the session.
Try logging off and and closing your session.
Then start another session and log back in.
After that look at "forum variables" in "admin options" and see if STRUSSWITCH listed. <
leatherlips
15 April 2008, 14:50


I logged back off and closed my browser and then logged back in. STRUSSWITCH is not listed. Ideas?<
leatherlips
15 April 2008, 14:55


OK, that was weird...
I went back in later and then it was suddenly there. I guess it is working now. I'll play around with it and see if I encounter any problems.<
leatherlips
15 April 2008, 15:59


Tried installing the Bookmarks mod. Here is what I get,

The Microsoft Jet database engine cannot find the input table or query 'FORUM_BOOKMARKS'. Make sure it exists and that its name is spelled correctly.

/forumtest/user_space.asp, line 386

That line is: rs.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText<
leatherlips
15 April 2008, 16:05


When I run the database setup file here is the message:


Bookmarks

Creating table(s)... CREATE TABLE FORUM_BOOKMARKS( BOOKMARK_ID int IDENTITY (1, 1) PRIMARY KEY NOT NULL , B_MEMBER int (11) NOT NULL DEFAULT 0, B_URL text (255) NULL DEFAULT '', B_TITLE text (100) NULL DEFAULT '', B_CAT text (100) NULL DEFAULT '', B_DATE text (14) NULL DEFAULT '')
Table already exists

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

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

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


Database setup finished<
© 2000-2021 Snitz™ Communications