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)
 Football pool mod?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

IG-88
Starting Member

8 Posts

Posted - 18 August 2003 :  01:21:26  Show Profile
I was wondering if anyone had an idea about implementing this football pool into a Snitz mod. http://www.brainjar.com/asp/pool/

Could it be done?

I wanted to set up a football pool with a place for my buddies to talk smack during the season.

Thanks for any info!

big9erfan
Average Member

540 Posts

Posted - 18 August 2003 :  01:48:10  Show Profile
It could be done, but IMO I think a fantasy football option is much better suited for a forum. Much more in depth though...

If you've got some knowledge of ASP and database design I'd be more than willing to talk it up with you, but I have far from the time to implement this myself.


This account was hacked into by Image, a very honest guy as you all can see! Stealing people's passwords is his pasttime.
Go to Top of Page

imotep
Starting Member

23 Posts

Posted - 18 August 2003 :  06:42:45  Show Profile
It was actually fairly easy to do. I just replaced all of the user code in the BrainJar code with Snitz login code. I made the pool a subfolder of my forum folder, so I just used my modified inc_header.asp.

Football Pool
Go to Top of Page

Anacrusis
Junior Member

USA
219 Posts

Posted - 18 August 2003 :  07:59:42  Show Profile  Visit Anacrusis's Homepage  Send Anacrusis an AOL message
I've also used this code for the football pool on my site. It's not too hard to do. I've also integrated it with my points mod so you use your points to enter the pool.

www.internet-clubhouse.com/football

The Internet ClubHouse
www.internet-clubhouse.com
Go to Top of Page

VodkaFish
Average Member

USA
654 Posts

Posted - 18 August 2003 :  15:48:01  Show Profile  Send VodkaFish an AOL message  Send VodkaFish an ICQ Message  Send VodkaFish a Yahoo! Message
quote:
Originally posted by imotep

It was actually fairly easy to do. I just replaced all of the user code in the BrainJar code with Snitz login code. I made the pool a subfolder of my forum folder, so I just used my modified inc_header.asp.

Football Pool

I went to take a look:

Microsoft OLE DB Provider for ODBC Drivers error '80004005' 

[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query. 

/forum/pool/header.asp, line 21 

v ø d k â f ï § h
Go to Top of Page

VodkaFish
Average Member

USA
654 Posts

Posted - 18 August 2003 :  16:02:21  Show Profile  Send VodkaFish an AOL message  Send VodkaFish an ICQ Message  Send VodkaFish a Yahoo! Message
Does this script support a spread? Doesn't look like it does "out of the box".

v ø d k â f ï § h
Go to Top of Page

Anacrusis
Junior Member

USA
219 Posts

Posted - 18 August 2003 :  16:04:46  Show Profile  Visit Anacrusis's Homepage  Send Anacrusis an AOL message
no, it doesn't

The Internet ClubHouse
www.internet-clubhouse.com
Go to Top of Page

imotep
Starting Member

23 Posts

Posted - 18 August 2003 :  21:15:51  Show Profile
quote:
I went to take a look:


Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
/forum/pool/header.asp, line 21


Thanks for heads up VodkaFish. Somehow (not too sure how) the permissions changed on my database.
Go to Top of Page

VodkaFish
Average Member

USA
654 Posts

Posted - 18 August 2003 :  23:34:33  Show Profile  Send VodkaFish an AOL message  Send VodkaFish an ICQ Message  Send VodkaFish a Yahoo! Message
Hey, almost like an Easter Egg:
http://www.brainjar.com/asp/pool/default7.asp

Found from Google.

Although this isn't necessarily how I'll be doing mine, it should help anyone who needs it.

v ø d k â f ï § h
Go to Top of Page

IG-88
Starting Member

8 Posts

Posted - 19 August 2003 :  00:23:08  Show Profile
Wow! And I thought I'd be the only one who's done this! You guys did a great job integrating it into your sites! Well done!

I haven't integrated it into the forums yet because I'm not quite sure where to put it. I'd like to put it directly under the forum categories, but I'm a severe ASP rookie. I'm really trying to learn and I've learned a lot from just playing with Snitz. But unfortunately even when you're just a really good network guy, your friends just know you as the "computer guy" which means anything and everything that has to do with a computer I must be an expert in. Volunteered against my will I guess you could say!

Our little pool is slightly different than the BrainJar pool though, which is the logic I'm trying to figure out. There's about 6 or 7 of us every year and we each throw in $100 as an entry fee. So week by week it doesn't matter who wins, just who has the most won games under their belt by the end of the season. Then the 1st place winner gets 60% of the pot, 2nd gets 30%, and 3rd place just gets their $100 back. The rest of us gets squat (me every year ). So my two new obstacles to work through are
1) changing it so there is no $5 weekly bet and
2) creating a Year to Date tally with all the current stats

If you guys have any tips that would be great! Would love to see more info on this!

Edited by - IG-88 on 19 August 2003 00:23:56
Go to Top of Page

big9erfan
Average Member

540 Posts

Posted - 19 August 2003 :  01:56:34  Show Profile
I've used this before...Easy to use, but I don't remember if it has all of what you want.

http://4horsemen.tzo.com/worldpools/index.html

This account was hacked into by Image, a very honest guy as you all can see! Stealing people's passwords is his pasttime.
Go to Top of Page

StephenD
Senior Member

Australia
1044 Posts

Posted - 19 August 2003 :  03:19:09  Show Profile  Send StephenD a Yahoo! Message
Anyone care to share their modified code please for integrating this with Snitz?
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 19 August 2003 :  04:11:49  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
I'd be interested in the code as well!

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
Go to Top of Page

imotep
Starting Member

23 Posts

Posted - 19 August 2003 :  09:09:19  Show Profile
Here is what I did. Or at least what I remember (I'm still a bit the novice so I don't always document things to well )

I'm using the Football pool database for storing pool related information. I added a column to the MEMBERS_FORUM table called M_NFL. Default value of 0 (meaning not a member of the pool). It gets changed to 1 when someone becomes a member.

I've also used inc_header.asp (minus the html) from Snitz to check the user that I call usercheck.asp. I've changed the chkUser function to:
function chkUser(fName, fPassword, fAuthor)
dim rsCheck
dim strSql
'## Forum_SQL
strSql = "SELECT MEMBER_ID, M_LEVEL, M_NAME, M_PASSWORD, M_FIRSTNAME, M_LASTNAME, M_NFL "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE " & strDBNTSQLName & " = '" & ChkString(fName, "SQLString") & "' "
strSql = strSql & " AND M_PASSWORD = '" & ChkString(fPassword, "SQLString") &"'"
strSql = strSql & " AND M_STATUS = " & 1
Set rsCheck = objComm.Execute(strSql)
if rsCheck.BOF or rsCheck.EOF or not(ChkQuoteOk(fName)) or not(ChkQuoteOk(fPassword)) then
MemberID = -1
chkUser = 0 '## Invalid Password
if strDBNTUserName <> "" and chkCookie = 1 then
Call ClearCookies()
strDBNTUserName = ""
end if
else
MemberID = rsCheck("MEMBER_ID")
strFirstName = rsCheck("M_FIRSTNAME")
strLastName = rsCheck("M_LASTNAME")
strNFL = rsCheck("M_NFL")
strNFLName = rsCheck("M_NAME")
if (rsCheck("MEMBER_ID") & "" = fAuthor & "") and (cLng(rsCheck("M_LEVEL")) <> 3) then
chkUser = 1 '## Author
else
select case cLng(rsCheck("M_LEVEL"))
case 1
chkUser = 2 '## Normal User
case 2
chkUser = 3 '## Moderator
case 3
chkUser = 4 '## Admin
case else
chkUser = cLng(rsCheck("M_LEVEL"))
end select
end if
end if
rsCheck.close
set rsCheck = nothing
end function

Here I grab the username and check if they are entered in the pool. If they are not entered, they are automatically entered when the visit the pool. This is the header I use for the pool pages.


<!-- #include file="../../includes/usercheck.asp" -->
<% If strNFL <> "" Then
If (CInt(strNFL)) = 0 Then 'the user hasn't been entered in the NFL database yet
call OpenDB()
strSql = "Select Username FROM Users WHERE Username = '" & strNFLName & "'"
set rs = DbConn.Execute(strSql)
If rs.BOF AND rs.EOF Then
strSql = "INSERT INTO Users (Username) " & _
"VALUES ('" & strNFLName & "')"
DbConn.Execute(strSql)
End If
rs.Close()
set rs = nothing
'Update the forum database to show user is in nfl database
MM_Forum_String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\WWWRoot\***\snitz_forums_2000.mdb" '## MS Access 2000
set objComm = Server.CreateObject("ADODB.Connection")
objComm.Open MM_Forum_String
'add user to nfl database
strSql = "UPDATE FORUM_MEMBERS " & _
"SET M_NFL = 1 " & _
"WHERE MEMBER_ID = " & MemberID
objComm.Execute(strSql)
objComm.Close()
set objComm = nothing
End If
End If

%>

In the pool itself...

I changed protect.asp to:
<% 'Buffer output in case of redirection.

Response.Buffer = true

'If not logged in, redirect to the login page.

if mlev < 1 then
Response.Redirect("login.asp")
end if %>

Since I don't use the Football pools login, I changed that to:
<% Response.Buffer = true %>

<!-- #include file="common.asp" -->
<!-- #include file="header.asp" -->
<% If strNFLName <> "" Then
Response.Redirect("default.asp")
End If %>

In the users.asp at line 20 I changed the Admin check to
<% 'If user is not the Administrator, redirect to the login page.

if strNFLName <> ADMIN_USERNAME then
Response.Redirect("login.asp")
end if


There may a couple of other things, but that's all I remember off the top of my head

If any of the more experienced coders have suggestions, pass 'em on
Go to Top of Page

VodkaFish
Average Member

USA
654 Posts

Posted - 24 August 2003 :  12:31:52  Show Profile  Send VodkaFish an AOL message  Send VodkaFish an ICQ Message  Send VodkaFish a Yahoo! Message
Just wondering if anyone's modified this to use a spread.

v ø d k â f ï § h
Go to Top of Page

IG-88
Starting Member

8 Posts

Posted - 07 September 2003 :  01:23:43  Show Profile
I got a few ASP guys from work checking this out. I'll post back when it's done! Making it so you can enter a dollar amount per season or per week, and putting a YTD stats page. Don't think we'll use spreads but if anyone has any suggestions let me know!
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.51 seconds. Powered By: Snitz Forums 2000 Version 3.4.07