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)
 Sticky Note (or Forum Sticker) Mod
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 5

rick7165
Senior Member

USA
1094 Posts

Posted - 06 December 2001 :  12:12:17  Show Profile  Visit rick7165's Homepage
I think that I'm missunderstanding something here.. I have this installed.. I click on edit... Type in some text
then go back to the forum and nothing shows up.

Test Site:
EastPasco Huw's Code 3.3.10 SQL 2000
Snitz Mod Resource
Email
Go to Top of Page

Traverer
New Member

Malaysia
61 Posts

Posted - 06 December 2001 :  12:51:46  Show Profile
quote:
ok, can u explain it to someone like me who doesn;t know about code, and just copies and pastes? I'm usng access for my database.
can u tell me what i need to copy and paste, and into where, so that i can use the sticky feature when making a post?

Do you follow every step in my readme file ? The only one file need to be edited is forum.asp and your sticky message will show up at there. There are three part of codes you need to add in forum.asp, the fisrt is to call the data from your database, the second will declare variable for the data you get and the last one will be where you want the sticker to be. Once you finish that, login as admin and goes to any forum you like. You will see a new sticker menu appear at the top of all forum topics, right click the Edit button you found there. Then you can enter any message you like for the sticky note, uncheck the checkbox below if you want everyone to see it.

Note: There is only one sticky note for each forum.

quote:
I think that I'm missunderstanding something here.. I have this installed.. I click on edit... Type in some text
then go back to the forum and nothing shows up.

Do you can not see the whole sticker menu at all or just your message ?

BTW, does MS SQL support "memo" data type ? Maybe you need to change to "varchar"...

Traverer is here.
Go to Top of Page

rick7165
Senior Member

USA
1094 Posts

Posted - 06 December 2001 :  12:56:38  Show Profile  Visit rick7165's Homepage
Here is the SQL settings for this to work:

1 F_STICKER nvarchar 100 1
0 S_STICKER nvarchar 100 1

Test Site:
EastPasco Huw's Code 3.3.10 SQL 2000
Snitz Mod Resource
Email
Go to Top of Page

sy_fryer
Starting Member

12 Posts

Posted - 06 December 2001 :  13:04:52  Show Profile  Send sy_fryer an AOL message  Send sy_fryer a Yahoo! Message
Hi all,

I try to implement the second suggestion made by GauravBhabu in this topic, but I just get the following:

Type mismatch: 'rsFStatus'

/desk/contcode/contcode/forum.asp, line 717


am i putting the code snippet in the correct place? (previous message says after folder navigation, I put it after the 'show topics' dropdown, on the next line.)

Has anyone else followed this and had it work? My forum is a brand new install, and I havent applied any patches or mods to it yet.

To clarify, I would like to see the database description of the forum (could be quite large, I can change the field length in the database) displayed above the comments from the user.

I am trying to link to a story (is forum description DB FORUM_FORUM/F_DESCRIPTION), with other people being able to add their comments below.

Am I thinking the solutions mentioned here will help me achieve this?

Thx

Sy

Go to Top of Page

rick7165
Senior Member

USA
1094 Posts

Posted - 06 December 2001 :  13:05:15  Show Profile  Visit rick7165's Homepage
Hangon that's not it...

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

[Microsoft][ODBC SQL Server Driver][SQL Server]String or binary data would be truncated.

/post_sticker_info.asp, line 97


Test Site:
EastPasco Huw's Code 3.3.10 SQL 2000
Snitz Mod Resource
Email
Go to Top of Page

Traverer
New Member

Malaysia
61 Posts

Posted - 06 December 2001 :  13:35:37  Show Profile
quote:
Hangon that's not it...

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

[Microsoft][ODBC SQL Server Driver][SQL Server]String or binary data would be truncated.

/post_sticker_info.asp, line 97

You set the nvarchar length limit for F_STICKER to 100 only, that's why you can't post any sticky message more than 100 length.
Do you know any data type that MS SQL support and has higher length limit ?

Traverer is here.

Edited by - Traverer on 06 December 2001 13:37:39
Go to Top of Page

Traverer
New Member

Malaysia
61 Posts

Posted - 06 December 2001 :  14:19:33  Show Profile
quote:
I try to implement the second suggestion made by GauravBhabu in this topic, but I just get the following:

Type mismatch: 'rsFStatus'

/desk/contcode/contcode/forum.asp, line 717


sy_fryer, you need to add string below into strings around the line 125 :

strTablePrefix & "FORUM.F_DESCRIPTION, " & _

like this:

'## Forum_SQL - Find out the Category/Forum status and if it Exists
strSql = "SELECT " & strTablePrefix & "CATEGORY.CAT_STATUS, " & _
strTablePrefix & "CATEGORY.CAT_SUBSCRIPTION, " & _
strTablePrefix & "CATEGORY.CAT_MODERATION, " & _
strTablePrefix & "CATEGORY.CAT_ID, " & _
strTablePrefix & "FORUM.F_STATUS, " & _
strTablePrefix & "FORUM.F_SUBSCRIPTION, " & _
strTablePrefix & "FORUM.F_MODERATION, " & _
strTablePrefix & "FORUM.F_DESCRIPTION, " & _
strTablePrefix & "FORUM.F_SUBJECT " & _
" FROM " & strTablePrefix & "CATEGORY, " & _
strTablePrefix & "FORUM " & _
" WHERE " & strTablePrefix & "FORUM.FORUM_ID = " & Forum_ID & _
" AND " & strTablePrefix & "CATEGORY.CAT_ID = " & strTablePrefix & "FORUM.CAT_ID"

Hope that help

Traverer is here.
Go to Top of Page

rick7165
Senior Member

USA
1094 Posts

Posted - 06 December 2001 :  14:56:52  Show Profile  Visit rick7165's Homepage
Well I'm stuck... With 100 I guess. Nothing seems to work.

Test Site:
EastPasco Huw's Code 3.3.10 SQL 2000
Snitz Mod Resource
Email
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 06 December 2001 :  15:18:35  Show Profile
quote:

Well I'm stuck... With 100 I guess. Nothing seems to work.



rick7165, if you want to add this feature without Database modification, try the code I posted above or Here

You can see the actual working code at my site.


GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Go to Top of Page

AdamS
Starting Member

22 Posts

Posted - 06 December 2001 :  17:45:26  Show Profile  Visit AdamS's Homepage  Send AdamS an AOL message
thanks guys. i totally missed that edit button at the top. it all works fine. thanks again!

Go to Top of Page

sy_fryer
Starting Member

12 Posts

Posted - 06 December 2001 :  17:50:56  Show Profile  Send sy_fryer an AOL message  Send sy_fryer a Yahoo! Message
GauravBhabu, I really like the sound of your method, and think that your implementation of the 'article above forum' rocks, Traverer thanks for your insight.

I still get errors trying this, even after visiting forumsquare to read GauravBhabu's thread.

I mean, I'm so lame that I can't even get the text file (forumsticker.txt) angle to run either ;), that wasn't really the idea anyway for what i was planning.

I am running IIS, cashcess DB (2000), but I have to hold my hands up when i say that all your explanations and advice (gratefully recvd) are not working here.

I was using a forum software called 'philboard' (http://youngpip.com) that had the feature i wanted out of the zip, but without so many of the excellent features, and ability for customization of Snitz, such as profanity filter, and all the good mods.

If anyone can send me the forum.asp with GauravBhabu's mod that puts the description of the forum above the user comment, then I would be immensely grateful, cos whatever I have tried hasn't worked out.

The last error I had was

error '80020009'
Exception occurred.

/desk/contcode/contcode/inc_functions.asp, line 1438



I know, i know, i must be missing something, but I can't get this to run, cheers for all the assistance & help you guys have given me!

GauravBhabu, the riddle collection doesn't belong to me, it's just one that gets updated once in a while and has some interesting ones, I would guess they are all PD, but who knows?

On my site there is a 'conundrum' page, with slightly longer puzzles, good for partys e.t.c. Mail me and i will send some over or leave on your board, 1ce again they aren't my creation but I guess like jokes they will be PD.

Have a cool chrimbo all!,

Sy

Syrf1@yahoo.com

Go to Top of Page

Traverer
New Member

Malaysia
61 Posts

Posted - 07 December 2001 :  06:29:53  Show Profile
quote:
Well I'm stuck... With 100 I guess. Nothing seems to work.

Rick7165, I just found an interesting article about common SQL Server 7.0 datatypes and you should take a look at the description of common datatypes in the first table.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfoxtk99/html/ft99b20.asp

BTW, below is what I found in admin_mod_dbsetup.asp :

if fAction = "ADD" or fAction = "ALTER" then
select case strDBType
case "access"
fType = replace(fType,"varchar","text")
case "sqlserver"
select case sqlVer
case 7
fType = replace(fType,"memo","ntext")
fType = replace(fType,"varchar","nvarchar")
fType = replace(fType,"date","datetime")

case else
fType = replace(fType,"memo","text")
end select
case "mysql"
fType = replace(fType,"#int","#int (11)")
fType = replace(fType,"#smallint","#smallint (6)")
end select


Hence, this is the best solution I could think for you though you might try that before :

Sticky Note Mod
[ALTER]
FORUM
ADD#F_STICKER#memo#NULL##
[END]
[ALTER]
FORUM
ADD#S_STICKER#varchar(10)#NULL#0#
[END]


Or a better way :

Sticky Note Mod
[ALTER]
FORUM
ADD#F_STICKER#ntext#NULL##
[END]
[ALTER]
FORUM
ADD#S_STICKER#varchar(10)#NULL#0#
[END]


Additional info : nvarchar can support up to 4000 bytes !

Traverer is here.
Go to Top of Page

Traverer
New Member

Malaysia
61 Posts

Posted - 07 December 2001 :  07:33:45  Show Profile
Sy_fryer, in case you want to use GauravBhabu's second method, these are what you need to do. I have just test it with Access 2000 and it works fine.

1. Add blue coloured string below around line 133 :

'## Forum_SQL - Find out the Category/Forum status and if it Exists
strSql = "SELECT " & strTablePrefix & "CATEGORY.CAT_STATUS, " & _
strTablePrefix & "CATEGORY.CAT_SUBSCRIPTION, " & _
strTablePrefix & "CATEGORY.CAT_MODERATION, " & _
strTablePrefix & "CATEGORY.CAT_ID, " & _
strTablePrefix & "FORUM.F_STATUS, " & _
strTablePrefix & "FORUM.F_SUBSCRIPTION, " & _
strTablePrefix & "FORUM.F_MODERATION, " & _
strTablePrefix & "FORUM.F_DESCRIPTION, " & _
strTablePrefix & "FORUM.F_SUBJECT " & _
" FROM " & strTablePrefix & "CATEGORY, " & _
strTablePrefix & "FORUM " & _
" WHERE " & strTablePrefix & "FORUM.FORUM_ID = " & Forum_ID & _
" AND " & strTablePrefix & "CATEGORY.CAT_ID = " & strTablePrefix & "FORUM.CAT_ID"

2. Add blue coloured string below around line 153 :

else
Cat_ID = rsCFStatus("CAT_ID")
Cat_Status = rsCFStatus("CAT_STATUS")
Cat_Subscription = rsCFStatus("CAT_SUBSCRIPTION")
Cat_Moderation = rsCFStatus("CAT_MODERATION")
Forum_Status = rsCFStatus("F_STATUS")
Forum_Subject = rsCFStatus("F_SUBJECT")
Forum_Description = rsCFStatus("F_DESCRIPTION")
Forum_Subscription = rsCFStatus("F_SUBSCRIPTION")
Forum_Moderation = rsCFStatus("F_MODERATION")
rsCFStatus.close
set rsCFStatus = nothing
end if

3. Add codes below to where you like to show your forum description :

<% if (Forum_Description <> "") then %>
<table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
<tr>
<td bgcolor="<% =strTableBorderColor %>">
<table border="0" width="100%" cellspacing="1" cellpadding="0">
<tr>
<td bgcolor="<%= strForumCellColor %>" width="100%">
<table border="0" cellpadding=4 cellspacing=0 width="100%">
<tr>
<td bgcolor="<%= strForumCellColor %>" width="100%">
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
<% =formatStr(Forum_Description) %>
</font>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<% end if %>


You can put it around line 259 :

<script language="JavaScript">
<!-----
function jumpTo(s) {if (s.selectedIndex != 0) top.location.href = s.options[s.selectedIndex].value;return 1;}

function setDays() {document.DaysFilter.submit(); return 0;}
// -->
</script>
<---- Here
<table border="0" width="100%">
<tr>
<td width="33%" align="left" nowrap><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">

Or around line 321 :

<% else %>
 
<% end if %>
</td>
</tr>
</table>
<---- Here
<table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
<tr>
<td bgcolor="<% =strTableBorderColor %>">
<table border="0" width="100%" cellspacing="1" cellpadding="4">

Traverer is here.

Edited by - Traverer on 07 December 2001 07:35:14
Go to Top of Page

rick7165
Senior Member

USA
1094 Posts

Posted - 07 December 2001 :  08:55:31  Show Profile  Visit rick7165's Homepage
Sticky Note Mod
[ALTER]
FORUM
ADD#F_STICKER#varchar(255)#NULL##
[END]
[ALTER]
FORUM
ADD#S_STICKER#varchar(10)#NULL#0#
[END]

Test Site:
EastPasco Huw's Code 3.3.10 SQL 2000
Snitz Mod Resource
Email
Go to Top of Page

Traverer
New Member

Malaysia
61 Posts

Posted - 07 December 2001 :  09:53:25  Show Profile
quote:
Sticky Note Mod
[ALTER]
FORUM
ADD#F_STICKER#varchar(255)#NULL##
[END]
[ALTER]
FORUM
ADD#S_STICKER#varchar(10)#NULL#0#
[END]

Rick7165, could you put any number higher than 255 for varchar in F_STICKER or try other datatypes like ntext or others ?

I would like to know whether I can use ntext in my mod for MS SQL 2000 or not. Thanks

Traverer is here.
Go to Top of Page
Page: of 5 Previous Topic Topic Next Topic  
Previous Page | Next Page
 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.21 seconds. Powered By: Snitz Forums 2000 Version 3.4.07