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)
 My Polls! Well sort of....
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 7

slemieux
Junior Member

USA
234 Posts

Posted - 20 December 2000 :  18:36:51  Show Profile
OK this isn't for the faint of heart. I documented my polls when I did the upgrade and think I have everything documented correctly. However it maybe kind of confusing. If someone wants to try to follow these instructions and tell me if everything works, that would be great! I would highly suggest you backup all your files first, just incase I missed something.

http://209.35.175.12/snitz/polls.txt

Uplaoding the demo now
http://209.35.175.12/snitz/

Once we make sure the documentation is 100% correct, I'll clean it up so it is easier to follow. There are a couple small things missing in editing polls. Right now, the only way to edit a poll is go to the topic and click the pencil. However this will be easy to fix.

I am upgrading my main forums tonight and if all is well tomorrow night, I'll zip up all my code for those that want it.

Any Takers to test this out??


Scott LeMieux

slemieux
Junior Member

USA
234 Posts

Posted - 20 December 2000 :  18:51:45  Show Profile
by the way... admin pass is still admin so feel free to poke around.

The Set Feature Poll page needs work!

Scott LeMieux
Go to Top of Page

hamb0n3z
Starting Member

USA
44 Posts

Posted - 20 December 2000 :  19:24:00  Show Profile  Visit hamb0n3z's Homepage  Send hamb0n3z an ICQ Message  Send hamb0n3z a Yahoo! Message
Dang, someone delete that last post for me.

Happens everytime I try to loggin with the wrong password from post.asp and then use the back button to try again.


Great Scott! <img src=icon_smile_big.gif border=0 align=middle>
I can't wait to get home and dig into this code. This is exactly what I want!

Thanks!


"Hold on pickle." - Out of the blue while watching TV my 31/2 yr old niece pretends to drive fast with half eaten pickle in hand.
Go to Top of Page

hamb0n3z
Starting Member

USA
44 Posts

Posted - 21 December 2000 :  00:09:56  Show Profile  Visit hamb0n3z's Homepage  Send hamb0n3z an ICQ Message  Send hamb0n3z a Yahoo! Message

All righty then, <img src=icon_smile_blackeye.gif border=0 align=middle>

Your instructions are not for the squeamish.
They'll do. However, SQL doesn't like some of your statements unless I change text to char or varchar.

I've got some typos and found out that copy and paste doesn't work so good from notepad with word wrap on. (Not to visual interdev find and replace text boxes) anyway . . .

I came close. - heh

Sorry I couldn't get in done in 45 minutes, the wife and kids want me to watch one Christmas movie with them tonight. So I gotta go. I'll sneak the conversion in Thursday morning at the office.<img src=icon_smile_evil.gif border=0 align=middle>

- good night.

Go to Top of Page

slemieux
Junior Member

USA
234 Posts

Posted - 21 December 2000 :  01:32:57  Show Profile
Yes that documentation isn't any to easy. Have to get some sleep myself and will try to clean it up in the morning.

The fields I put in are Access and your right need to be varchar or char.

Scott LeMieux
Ready... Fire... Aim!! <img src="http://www.thepercussionist.com/adf/dance2.gif" border=0>
Go to Top of Page

hamb0n3z
Starting Member

USA
44 Posts

Posted - 21 December 2000 :  15:53:35  Show Profile  Visit hamb0n3z's Homepage  Send hamb0n3z an ICQ Message  Send hamb0n3z a Yahoo! Message
I am having fun digging through Snitz to weave in this poll code. <img src=icon_smile_tongue.gif border=0 align=middle>

Could someone wiser than I spell out the
database stuff. What's different between access, mysql and sql for this MOD?
I am a SQL only kind of guy so here's what I have:
count<i>n</i> set to int, and default value of 0
answer<i>n</i> set to char with default width of 50

Found a typo or two in instructions:
TOPIC.ASP - needs a , in the following line:
strSql = strSql & strTablePrefix & "TOPICS.TOPIC_ID, " & strTablePrefix & "TOPICS.T_MESSAGE<font color=red>, </font id=red>"

POST_INFO.ASP
if txtMessage = " " then
<font color=red>ssage = " " then</font id=red>
Go_Result "You must post a message!", 0

If I remove the red text in POST_INFO.ASP it runs but I still have one remaining issue:
<img src=icon_smile_dissapprove.gif border=0 align=middle> Every new TOPIC shows up as a (poll)? Help!

Thanks


"Hold on pickle." - Out of the blue while watching TV my 31/2 yr old niece pretends to drive fast with half eaten pickle in hand.

Edited by - hamb0n3z on 21 December 2000 15:56:25

Edited by - hamb0n3z on 21 December 2000 16:00:40
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 21 December 2000 :  16:14:18  Show Profile  Visit HuwR's Homepage
I'll have a quick look at the db stuff for you

<font color=blue>'Resistance is futile'</font id=blue>
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 21 December 2000 :  16:23:28  Show Profile  Visit HuwR's Homepage
slemieux,

in your file you don't say what
C_ADMINPOLLS
C_USERPOLLS
C_ACTIVEPOLL
are supposed to be.

I released a dbsetup mod which will help with this, basically you create a file like this
Slemmies Poll
[ALTER]
TOPICS
answer1;varchar(100);NULL;
count1;int;NULL;
answer2;varchar(100);NULL;
count2;int;NULL;
answer3;varchar(100);NULL;
count3;int;NULL;
answer4;varchar(100);NULL;
count4;int;NULL;
answer5;varchar(100);NULL;
count5;int;NULL;
answer6;varchar(100);NULL;
count6;int;NULL;
answer7;varchar(100);NULL;
count7;int;NULL;
answer8;varchar(100);NULL;
count8;int;NULL;

[END]
[ALTER]
CONFIG
field23;int;NOT NULL;9
[END]
[END]

It then does the different DB types for you.

<font color=blue>'Resistance is futile'</font id=blue>
Go to Top of Page

slemieux
Junior Member

USA
234 Posts

Posted - 21 December 2000 :  17:36:21  Show Profile
OK Guys, I went through and made the changes you pointed out and added what those fields should be.

This works on both MS SQL and Access, haven't tested it on MySQL. I can never remeber MS SQL fields, so always have to connect to my database to lok those up <img src=icon_smile_blackeye.gif border=0 align=middle>

hamb0n3z, everything else works just fine? (That would be cool!)

In forum.asp search for
<% if rs("answer1") <> " " then %><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize-2 %>"> (Poll)</font><% end if %>

might try changing
rs("answer1") <> " " to
rs("answer1") <> ""

hope that fixes it!

Scott LeMieux
Ready... Fire... Aim!! <img src="http://www.thepercussionist.com/adf/dance2.gif" border=0>
Go to Top of Page

hamb0n3z
Starting Member

USA
44 Posts

Posted - 21 December 2000 :  19:20:14  Show Profile  Visit hamb0n3z's Homepage  Send hamb0n3z an ICQ Message  Send hamb0n3z a Yahoo! Message
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
might try changing
rs("answer1") <> " " to
rs("answer1") <> ""
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

TRIM (rs("answer1")) <> ""
AND
TRIM (rs("answer1)) = ""
is a safer bet.
However, I've jinked up more than that. When I view a Topic I can't see topic titles or
rs("T_MESSAGE").Also when I have a reply to a topic I can not view it at all.
Error Type:
ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal.
/pollforum/topic.asp, line 417

I'm going to redo TOPIC.ASP from a clean copy and use the trim(rs("answer1").

<img src=icon_smile_wink.gif border=0 align=middle> Weeeee
Go to Top of Page

slemieux
Junior Member

USA
234 Posts

Posted - 21 December 2000 :  20:34:45  Show Profile
I'm going to post text files of this, maybe i missed more in documenting than I thought <img src=icon_smile_sad.gif border=0 align=middle>

http://209.35.175.12/snitz/admin_poll.txt
http://209.35.175.12/snitz/config.txt
http://209.35.175.12/snitz/default.txt
http://209.35.175.12/snitz/forum.txt
http://209.35.175.12/snitz/post.txt
http://209.35.175.12/snitz/post_info.txt
http://209.35.175.12/snitz/topic.txt

Hope that helps!!!

Scott LeMieux
Ready... Fire... Aim!! <img src="http://www.thepercussionist.com/adf/dance2.gif" border=0>
Go to Top of Page

hamb0n3z
Starting Member

USA
44 Posts

Posted - 21 December 2000 :  22:46:05  Show Profile  Visit hamb0n3z's Homepage  Send hamb0n3z an ICQ Message  Send hamb0n3z a Yahoo! Message
So Close now . . . . <img src=icon_smile_tongue.gif border=0 align=middle>

But so far

if strRqMethod = "EditTopic" then
TxtMsg = rs("T_MESSAGE")
else
if strRqMethod = "TopicQuote" then
TxtMsg = "|quote|" & vbCrLf
<font color=red>TxtMsg = TxtMsg & rs("T_MESSAGE") & vbCrLf</font id=red>
TxtMsg = TxtMsg & "|/quote|"
end if
end if
if strDBNTUserName = getMemberName(strAuthor) then boolTopic = rs("T_MAIL")
end if

Post.asp give an exception error on the line in red?
This is generated if I reply to a poll. Is something going south by trying to quote the poll?

I change the [] to || for this post, it's correct in the post.asp code.

Any Takers? . . . Help <img src=icon_smile_blackeye.gif border=0 align=middle>

"Hold on pickle." - Out of the blue while watching TV my 31/2 yr old niece pretends to drive fast with half eaten pickle in hand.
Go to Top of Page

hamb0n3z
Starting Member

USA
44 Posts

Posted - 21 December 2000 :  22:59:58  Show Profile  Visit hamb0n3z's Homepage  Send hamb0n3z an ICQ Message  Send hamb0n3z a Yahoo! Message
It's . . . w o r k i n g . . .

Thanks Scott <img src=icon_smile_approve.gif border=0 align=middle>

"Hold on pickle." - Out of the blue while watching TV my 31/2 yr old niece pretends to drive fast with half eaten pickle in hand.
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 22 December 2000 :  04:28:28  Show Profile
I almost got this pup working. Just ran into an error here.
I'm getting this error:<pre id=code><font face=courier size=2 id=code>Microsoft VBScript runtime error '800a000d'
Type mismatch: 'FormatNumber'
?</font id=code></pre id=code>
I get this error whenever I try to view the results of the poll. It's in topic.asp, the FormatNumber internal function.

I need some sleep. This took me at least 4 hours to get this far. With coffee breaks and a snack inbetween. LoL

<center><font color=green>*----*----*----*----*----*----*----*----*
<font size=2>"To Get To Heaven,
It's Who You Know That Counts."</font id=size2>
*----*----*----*----*----*----*----*----*</font id=green></center>
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 25 December 2000 :  01:38:26  Show Profile
Ahhh!! Finally got this working. And just in time for Christmas too!! <img src=icon_smile.gif border=0 align=middle>
I traced back the problem to the count fields being empty. They didn't have the default values of 0. So therefore, the variable nTotal was empty and you can't divide by nothing, so FormatNumber spat it out. :-)
But there is still one more problem though. Just a minor one. :-) I had set all the count values to 0 manually. And I thought I had set them to have a default value of 0, but when I create a new poll, the count values contain nothing so I get the error.

HuwR could you write a small dbs script to update the count fields to have a default value of 0? Just for this situation anyway.
Thanks

Merry Christmas Guys.

<center><font color=green>*----*----*----*----*----*----*----*----*
<font size=2>"To Get To Heaven,
It's Who You Know That Counts."</font id=size2>
*----*----*----*----*----*----*----*----*</font id=green></center>
Go to Top of Page

Charles McRobert
Starting Member

United Kingdom
10 Posts

Posted - 27 December 2000 :  11:56:15  Show Profile  Visit Charles McRobert's Homepage  Send Charles McRobert an ICQ Message
Is http://209.35.175.12/snitz/polls.txt the most up-to-date code?

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