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
 Site Poll Mod & Portal Mod
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

StephenD
Senior Member

Australia
1044 Posts

Posted - 14 November 2003 :  17:35:25  Show Profile  Send StephenD a Yahoo! Message
OK I've been playing around with the Site Poll add-on for the Poll Mod and have incorporated it in my Portal page using the Portal Mods code for drawing tables. I've commented out the edit/lock/delete buttons too.

At the moment I've got it sitting below the Centre Content display because it displays the 'Results' (bar graph and stats) for Members who have voted .. and this is the only spot it will fit as it fills a large space.

What I would like to do is move it over to the left column which is 170px wide and therefore want the table to display the following:

If you have not voted ... then list the vote options (it is doing this now)

If you have voted ... a "thank you for voting" message and view results button which will open a small popup window with the results .. instead of going to the topic in the forum.

Anyone able to help with this?

Here is a link to my site to see how it is working now:

http://www.cashbackaustralia.com/

And here's a link to a text version of my site_poll.asp

http://www.cashbackaustralia.com/site_poll.txt

Here's the code in portal.asp if anyone is interested too:

	'CENTRE CONTENT
		Response.Write	"			<td width=""100%"" valign=""top"">"
	if lContentID > 0 and lCategoryID > 0 then
		call DisplayContentItem(lContentID, lCategoryID)
	elseif lCategoryID > 0 then
		call ListCategoryItems(lCategoryID)
	elseif lContentID > 0 then
		call DisplayContentItem(lContentID, "")
	elseif Request.Form("Method_Type") = "Search" then 
		call SearchResults(sSearchTerm)
	else 'must be home page so show default text
		if IsNumeric(strCMSDefaultCID) then
			call DisplayContentItem(strCMSDefaultCID, "")
		else
			call NoContent()
	  	end if
	end if
call StartTable("100%","Featured Poll")
%>
<!--#INCLUDE FILE="site_poll.asp"-->
<%
endTable        
		Response.Write  "			</td>"


Thank you very much.

StephenD
Senior Member

Australia
1044 Posts

Posted - 16 November 2003 :  21:56:35  Show Profile  Send StephenD a Yahoo! Message
OK, sorry guys my ISP had a supposed problem after upgrading their Windows Server so my site was down all weekend.

I've been hammering this trying to get it to work.
Question - How do you get the results to display after a guest has voted on the main page (site_poll.asp include in portal) without having to click the view results button.

What I mean is .. the exact same behavior as when a member votes. I've tried modifying all the mlevs in site_poll but I think the cookie itself or inc_func_common needs to be modified.
Go to Top of Page

DavidRhodes
Senior Member

United Kingdom
1222 Posts

Posted - 17 November 2003 :  03:24:07  Show Profile
Have a look t the code in the topic polls, eg topic.asp, not quite sure what it does but I think, when you vote, it creates a cookie and enters you into the db (so admin know whos voted). There must be an if voted then show results else show poll in topic.asp somewhere.

The UK MkIVs Forum
Go to Top of Page

StephenD
Senior Member

Australia
1044 Posts

Posted - 17 November 2003 :  04:31:43  Show Profile  Send StephenD a Yahoo! Message
Thanks David, I will look in that file and give it a try.
Go to Top of Page

StephenD
Senior Member

Australia
1044 Posts

Posted - 17 November 2003 :  22:56:46  Show Profile  Send StephenD a Yahoo! Message
Well I believe I'm getting close now. I think the code is only checking to see if members have voted. Therefore I need to get it to check the cookie. Can someone debug these lines of code please.

	'Following stores True or False in the variable 'Voted' if the user has voted
		'in this poll.
		VoteSaved = (cLng(chkUser(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Fpoll"),-1)) > 0)
		If VoteSaved then
		Voted = GetVote(pTopic_id)
	end if
Go to Top of Page

StephenD
Senior Member

Australia
1044 Posts

Posted - 18 November 2003 :  02:07:07  Show Profile  Send StephenD a Yahoo! Message
Getting closer:
'Following stores True or False in the variable 'Voted' if the user has voted
		'in this poll.
                cpoll = Request.Cookies(strCookieURL & "poll")("" & Topic_ID & "")
			if instr(cpoll, Topic_ID) > 0 then
			Voted = true
	end if

Edited by - StephenD on 18 November 2003 02:55:27
Go to Top of Page

StephenD
Senior Member

Australia
1044 Posts

Posted - 18 November 2003 :  05:29:59  Show Profile  Send StephenD a Yahoo! Message
Nah, I'm convinced I still need to alter the GetVote function in inc_func_common so that results are visible to guests who voted and members who voted and logged out or members who voted whilst logged out.
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.38 seconds. Powered By: Snitz Forums 2000 Version 3.4.07