Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Poll Mod
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

madmark
Starting Member

20 Posts

Posted - 21 July 2001 :  18:28:29  Show Profile
I have searched the boards heavily and could not find an answer so I feel pretty safe asking it.

How do you get the Featured Poll to show up on the main page? I have set and reset it in the admin section. I have set an active poll, etc. The strange thing is, when I set the show featured poll to OFF, when I come back to the admin_poll page, it's set to on again (or maybe it's supposed to be that way. At any rate, I'm missing something here.
Here is the txt files for my forum.asp and admin_poll.asp if anyone can take a shot at it:

http://www.mydta.org/forum/forum.txt

I can't get the admin_poll.txt to display so here is the code:

<!--#INCLUDE FILE="config.asp" -->
<% If Session(strCookieURL & "Approval") = "15916941253" Then %>
<!--#INCLUDE FILE="inc_functions.asp" -->
<!--#INCLUDE FILE="inc_top.asp" -->
<script language="JavaScript">
<!--
function setDays() {document.PollFilter.submit(); return 0;}
function openPollWindow(url) {
popupWin = window.open(url,'poll_preview','scrollbars=yes,width=650,height=400')
}
// -->
</script>
<table border="0" width="100%">
<tr>
<td width="33%" align="left" nowrap><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
<img src="icon_folder_open.gif" height=15 width=15 border="0"> <a href="default.asp">All Forums</a><br>
<img src="icon_bar.gif" height=15 width=15 border="0"><img src="icon_folder_open.gif" height=15 width=15 border="0"> <a href="admin_home.asp">Admin Section</a><br>
<img src="icon_blank.gif" height=15 width=15 border="0"><img src="icon_bar.gif" height=15 width=15 border="0"><img src="icon_folder_open_topic.gif" height=15 width=15 border="0"> Poll Configuration<br>
</font></td>
</tr>
</table>
<%
nDays = Request.Cookies(strCookieURL & "PollDays")

if Request.form("cookie") = 1 then
if strSetCookieToForum = "1" then
Response.Cookies(strCookieURL & "PollDays").Path = strCookieURL
end if
Response.Cookies(strCookieURL & "PollDays") = Request.Form("PollDays")
Response.Cookies(strCookieURL & "PollDays").expires = strForumTimeAdjust + 365
nDays = Request.Form("PollDays")
end if

if nDays = "" then
nDays = 30
end if

defDate = DateToStr(dateadd("d", -(nDays), StrToDate(strForumTimeAdjust)))

If Request.Form("Save_Active") = "yes" Then

strSql = "UPDATE " & strTablePrefix & "CONFIG "
if trim(Request.Form("ACTIVE")) <> "" then
strSql = strSql & " SET C_ACTIVEPOLL = '" & Request.Form("ACTIVE") & "'"
else
strSql = strSql & " SET C_ACTIVEPOLL = '" & Request.Form("ACTIVE2") & "'"
end if
my_Conn.Execute (strSql)

Application(strCookieURL & "ConfigLoaded") = ""

%>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">New Active Poll Posted!</font></p>
<meta http-equiv="Refresh" content="2; URL=admin_home.asp">

<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">Congratulations!</font></p>

<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="admin_home.asp">Back To Admin Home</font></a></p>

<!--#INCLUDE FILE="inc_footer.asp" -->

<% elseif Request.Form("Method_Type") = "Write_Configuration" then
'## Forum_SQL
strSql = "UPDATE " & strTablePrefix & "CONFIG "
strSql = strSql & "SET C_ADMINPOLLS = " & Request.Form("strAdminPolls") & ""
strSql = strSql & ", C_USERPOLLS = " & Request.Form("strUserPolls") & ""
my_Conn.Execute (strSql)

Application(strCookieURL & "ConfigLoaded") = ""
%>

<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">Configuration Posted!</font></p>
<meta http-equiv="Refresh" content="2; URL=admin_home.asp">

<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">Congratulations!</font></p>

<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="admin_home.asp">Back To Admin Home</font></a></p>

<!--#INCLUDE FILE="inc_footer.asp" -->

<% else %>
<br>
<form method="POST" action="admin_poll.asp">
<input type="hidden" name="Method_Type" value="Write_Configuration">
<table border="0" cellspacing="0" cellpadding="0" align="center" width="60%">
<tr>
<td bgcolor="<% =strTableBorderColor %>">
<table align="center" border="0" cellPadding="1" cellSpacing="1" width="100%">
<tr>
<td bgcolor="<% =strHeadCellColor %>" align="center" vAlign="top" colspan="2">
<font color="<% =strCategoryFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Poll Configuration</b></font>
</td>
</tr>
<tr valign="top">
<td bgColor="<% =strPopUpTableColor %>" align="right"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Show Featured Poll:</b> </font></td>
<td bgColor="<% =strPopUpTableColor %>">
On: <input type="radio" name="strAdminPolls" value="1"<% if strAdminPolls <> "0" then Response.Write(" checked") %>>
Off: <input type="radio" name="strAdminPolls" value="0"<% if strAdminPolls = "0" then Response.Write(" checked") %>>
</td>
</tr>
<tr valign="top">
<td bgColor="<% =strPopUpTableColor %>" align="right"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Allow Member Polls:</b> </font></td>
<td bgColor="<% =strPopUpTableColor %>">
On: <input type="radio" name="strUserPolls" value="1"<% if strUserPolls <> "0" then Response.Write(" checked") %>>
Off: <input type="radio" name="strUserPolls" value="0"<% if strUserPolls = "0" then Response.Write(" checked") %>>
</td>
</tr>
<tr valign="top">
<td bgColor="<% =strPopUpTableColor %>" colspan="2" align="center"><input type="submit" value="Submit Poll Config"> <input type="reset" value="Reset"></td>
</tr>
</table>
</td>
</tr>
</table>
</form>

<table border="0" cellspacing="0" cellpadding="0" align="center" width="90%">
<tr>
<td bgcolor="<% =strTableBorderColor %>">
<table align="center" border="0" cellPadding="1" cellSpacing="1" width="100%">
<tr>
<td bgcolor="<% =strHeadCellColor %>" align="center" vAlign="top" colspan="2">
<font color="<% =strCategoryFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Set Active Poll</b></font>
</td>
</tr>
<tr>
<td bgcolor="<% =strPopUpTableColor %>" vAlign="top" width="100%" colspan="2">
<table border="0" width="100%">
<tr>
<td width="70%">
<form action="<% =Request.ServerVariables("SCRIPT_NAME") & "?" & Request.Querystring %>" method="post" name="PollFilter">
<font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Show Polls</b></font>
<select name="PollDays" onchange="javascript:setDays();">
<option value="0" <% if ndays = "0" then Response.Write(" SELECTED")%>>All Polls</option>
<option value="1" <% if ndays = "1" then Response.Write(" SELECTED")%>>From yesterday</option>
<option value="7" <% if ndays = "7" then Response.Write(" SELECTED")%>>From last 7 days</option>
<option value="14" <% if ndays = "14" then Response.Write(" SELECTED")%>>From last 14 days</option>
<option value="30" <% if ndays = "30" then Response.Write(" SELECTED")%>>From last 30 days</option>
<option value="60" <% if ndays = "60" then Response.Write(" SELECTED")%>>From last 60 days</option>
<option value="120" <% if ndays = "120" then Response.Write(" SELECTED")%>>From last 120 days</option>
<option value="365" <% if ndays = "365" then Response.Write(" SELECTED")%>>From last year</option>
</select>
<input type="hidden" name="Cookie" value="1">
</form>
<%
'## Forum_SQL - Find all records with the search criteria in them
strSql = "SELECT " & strTablePrefix & "FORUM.FORUM_ID, " & strTablePrefix & "FORUM.F_SUBJECT, " & strTablePrefix & "FORUM.CAT_ID, " & strTablePrefix & "TOPICS.TOPIC_ID, " & strTablePrefix & "TOPICS.T_SUBJECT, " & strTablePrefix & "TOPICS.T_MAIL, " & strTablePrefix & "TOPICS.T_STATUS, " & strTablePrefix & "TOPICS.T_LAST_POST, " & strTablePrefix & "TOPICS.T_REPLIES, " & strMemberTablePrefix & "MEMBERS.MEMBER_ID, " & strMemberTablePrefix & "MEMBERS.M_NAME, "
strSql = strSql & strTablePrefix & "TOPICS.answer1, " & strTablePrefix & "TOPICS.count1, " & strTablePrefix & "TOPICS.answer2, " & strTablePrefix & "TOPICS.count2, " & strTablePrefix & "TOPICS.answer3, " & strTablePrefix & "TOPICS.count3, " & strTablePrefix & "TOPICS.answer4, " & strTablePrefix & "TOPICS.count4, " & strTablePrefix & "TOPICS.answer5, " & strTablePrefix & "TOPICS.count5, " & strTablePrefix & "TOPICS.answer6, " & strTablePrefix & "TOPICS.count6, " & strTablePrefix & "TOPICS.answer7, " & strTablePrefix & "TOPICS.count7, " & strTablePrefix & "TOPICS.answer8, " & strTablePrefix & "TOPICS.count8 "
strSql = strSql & "FROM " & strMemberTablePrefix & "MEMBERS, " & strTablePrefix & "FORUM, "
strSql = strSql & strTablePrefix & "TOPICS, " & strMemberTablePrefix & "MEMBERS AS " & strMemberTablePrefix & "MEMBERS_1 "
strSql = strSql & "WHERE " & strTablePrefix & "TOPICS.T_LAST_POST_AUTHOR = " & strMemberTablePrefix & "MEMBERS_1.MEMBER_ID "
strSql = strSql & "AND " & strTablePrefix & "FORUM.FORUM_ID = " & strTablePrefix & "TOPICS.FORUM_ID "
strSql = strSql & "AND " & strTablePrefix & "FORUM.CAT_ID = " & strTablePrefix & "TOPICS.CAT_ID "
strSql = strSql & "AND " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "TOPICS.T_AUTHOR "
strSql = strSql & "AND " & strTablePrefix & "TOPICS.answer1 <> '' "
if nDays > 0 then
strSql = strSql & " AND (T_LAST_POST > '" & defDate & "')"
end if
strSql = strSql & " ORDER BY " & strTablePrefix & "TOPICS.FORUM_ID, " & strTablePrefix & "TOPICS.T_LAST_POST DESC"
set rs = my_Conn.Execute(strSql)

Dim vAnswers(8)
Dim vCount(8)
Dim nCount
Dim nTotal

%>
<form method="POST" action="admin_poll.asp?saveactive=yes">
<input type="hidden" name="Save_Active" value="yes">
<input type="hidden" name="ACTIVE2" value="<% =strActivePoll %>">
<table border="0" width="95%" cellspacing="0" cellpadding="0" align="center">
<tr>
<td bgcolor="<% =strTableBorderColor %>">
<table border="0" width="100%" cellspacing="1" cellpadding="4">
<tr>
<td align="center" bgcolor="<% =strHeadCellColor %>"> </td>
<td align="center" bgcolor="<% =strHeadCellColor %>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">Poll Name</font></b></td>
<td align="center" bgcolor="<% =strHeadCellColor %>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">Posted By</font></b></td>
<td align="center" bgcolor="<% =strHeadCellColor %>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">Total Votes</font></b></td>
<td align="center" bgcolor="<% =strHeadCellColor %>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">Last Vote</font></b></td>
<td align="center" bgcolor="<% =strHeadCellColor %>"> </td>
</tr>
<% if rs.EOF or rs.BOF then '## No new topic posts found in DB %>
<tr>
<td bgcolor="<% =strForumCellColor %>" colspan="6"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>No Polls Found</b></font></td>
</tr>
<%
else
showbut = 1
currForum = 0
fDisplayCount = 0
do until rs.EOF
if ChkForumAccess(rs("FORUM_ID")) then
fDisplayCount = fDisplayCount + 1
if currForum <> rs("FORUM_ID") then
%>
<tr>
<td height="20" colspan="6" bgcolor="<% =strCategoryCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>"><b> <% =ChkString(rs("F_SUBJECT"),"display") %></b></font></td>
</tr>
<%
end if

For nCount = 1 To 8
vAnswers(nCount) = rs("answer" & CStr(nCount))
vCount(nCount) = rs("count" & CStr(nCount))
Next

nTotal = 0

'Go through all and get total
For nCount = 1 To 8
If trim(vAnswers(nCount)) <> "" Then
nTotal = nTotal + vCount(nCount)
End If
Next
%>
<tr>
<td bgcolor="<% =strForumCellColor %>" align="center"><input type="radio" value="<% =rs("TOPIC_ID") %>" name="ACTIVE"<% if rs("TOPIC_ID") = strActivePoll then %> checked<% end if %>></a></td>
<td bgcolor="<% =strForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="topic.asp?TOPIC_ID=<% =rs("TOPIC_ID") %>&FORUM_ID=<% =rs("FORUM_ID") %>&CAT_ID=<% =rs("CAT_ID") %>&Topic_Title=<% =ChkString(left(rs("T_SUBJECT"), 50),"urlpath") %>&Forum_Title=<% =ChkString(rs("F_SUBJECT"),"urlpath") %>"><% =ChkString(left(rs("T_SUBJECT"), 50),"display") %></a> </font></td>
<td bgcolor="<% =strForumCellColor %>" valign="top" align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strForumFontColor %>"><% =ChkString(rs("M_NAME"),"display") %></font></td>
<td bgcolor="<% =strForumCellColor %>" valign="top" align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strForumFontColor %>"><% =rs("T_REPLIES") %></font></td>
<td bgcolor="<% =strForumCellColor %>" valign="top" align="center" nowrap><font face="<% =strDefaultFontFace %>" color="<% =strForumFontColor %>" size="<% =strFooterFontSize %>"><b><% =ChkDate(rs("T_LAST_POST")) %></b> <% =ChkTime(rs("T_LAST_POST")) %></font></td>
<td bgcolor="<% =strForumCellColor %>" valign="top" align="center"><a href="javaScript:openWindow('pop_delete.asp?mode=Topic&TOPIC_ID=<% =rs("TOPIC_ID") %>&FORUM_ID=<% =rs("FORUM_ID") %>')"><img border="0" src="icon_trashcan.gif" alt="Delete Poll" height=12 width=12 border=0></a></td>
</tr>
<% end if
currForum = rs("FORUM_ID")
rs.MoveNext
loop
end if %>


</table>
</td>
</tr>
</table>
<% if showbut = 1 then %>
<br>
<div align="center"><input type="submit" value="Set active poll!" name="B1"></div>
<% end if %>
</form>

<% on error resume next %>
<% set rs = nothing %>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--#INCLUDE FILE="inc_footer.asp" -->
<% End If %>
<% Else %>
<% Response.Redirect "admin_login.asp" %>
<% End IF %>

Thanks!

Mark Swanson

madmark
Starting Member

20 Posts

Posted - 21 July 2001 :  21:43:20  Show Profile
Oh, and here is the link to my default.asp

http://www.mydta.org/default.txt

There must be another mod that is preventing this from working.....

Thanks!



Edited by - madmark on 22 July 2001 14:34:31
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 23 July 2001 :  01:42:58  Show Profile
hmmm, could you give me admin access to your forums so I can take a look?
you can email me your admin username password.

no, it's not a mod preventing it from working.

- David
Go to Top of Page

madmark
Starting Member

20 Posts

Posted - 23 July 2001 :  09:26:39  Show Profile
On it's way, thank you sir!

Mark

Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 23 July 2001 :  10:58:52  Show Profile
You haven't added the poll mod code to your config.asp file.

Also, can you edit your first message and take out all that code, so if users run into this same error, they won't have to load all that code to read the messages.

- David
Go to Top of Page

madmark
Starting Member

20 Posts

Posted - 23 July 2001 :  11:28:27  Show Profile
bangs head on monitor

I'm sorry Davio, I am going to place a minimum 1 week moratorium on posts from myself for posting stupid questions.
I swear I have been though that config file 50 times and each time I overlooked the one modification that was really important. A million thanks however for helping out a novice like myself. I am going to spend the next week really learning this stuff so that maybe I can help others and return the favor. It's nice being a school teacher because I get a solid 2 months to pound away on stuff just like this!

Thanks again-
Mark

Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 23 July 2001 :  11:34:09  Show Profile
No problem Mark.
That's why we guys are here!!! To point out the simple things that you overlooked. Makes out jobs more easier. LoL

Oh, and you can change your password too. Just to have that feeling, knowing that no one knows your password.

- David
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.44 seconds. Powered By: Snitz Forums 2000 Version 3.4.07