<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "Adv. Poll - How do you display most recent poll in a list?"]]></title>
		<link>https://proxy2.de/forum/posts/list/3.php</link>
		<description><![CDATA[Latest messages posted in the topic "Adv. Poll - How do you display most recent poll in a list?"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Adv. Poll - How do you display most recent poll in a list?</title>
				<description><![CDATA[ I'm trying to customize the default "random" poll that's displayed when you use the the poll list code I pulled off the sticky in these forums [code]/* path */<br /> $poll_path = &quot;/www/proxy2/html/poll&quot;;<br /> <br /> require $poll_path.&quot;/include/config.inc.php&quot;;<br /> require $poll_path.&quot;/include/$POLLDB&#91;class&#93;&quot;;<br /> require $poll_path.&quot;/include/class_poll.php&quot;;<br /> require $poll_path.&quot;/include/class_pollcomment.php&quot;;<br /> require $poll_path.&quot;/include/class_plist.php&quot;;<br /> $CLASS&#91;&quot;db&quot;&#93; = new polldb_sql;<br /> $CLASS&#91;&quot;db&quot;&#93;-&gt;connect&#40;&#41;;<br /> <br /> $php_poll = new plist&#40;&#41;;<br /> <br /> /* poll */<br /> $php_poll-&gt;set_template_set&#40;&quot;plain&quot;&#41;;<br /> $php_poll-&gt;set_max_bar_length&#40;125&#41;;<br /> $php_poll-&gt;set_max_bar_height&#40;10&#41;;<br /> if &#40;isset&#40;$HTTP_GET_VARS&#91;'poll_id'&#93;&#41;&#41; &#123;<br />    echo $php_poll-&gt;poll_process&#40;$HTTP_GET_VARS&#91;'poll_id'&#93;&#41;;<br /> &#125; else &#123;<br />    echo $php_poll-&gt;poll_process&#40;&quot;random&quot;&#41;;<br /> &#125;<br /> <br /> /* poll list */<br /> $php_poll-&gt;set_template&#40;&quot;poll_list&quot;&#41;;<br /> $php_poll-&gt;set_date_format&#40;&quot;m/d/Y&quot;&#41;;<br /> echo $php_poll-&gt;view_poll_list&#40;&#41;;<br /> echo $php_poll-&gt;get_list_pages&#40;&#41;;[/code]<br /> <br /> Specifically I would like for the poll that's displayed by default to be the most recent poll instead of a random one from the list.  I attempted to change the parameter to [code]&#125; else &#123;<br />    echo $php_poll-&gt;poll_process&#40;&quot;newest&quot;&#41;;<br /> &#125;[/code]<br /> Doing that only half works.  When you first access the page, sure enough the most recent poll is displayed and that works fine.  The complication arrises when you click the link to any other poll.  The poll clicked will display, however if you click the poll's "result" link the page refresshes to display once again the most recent poll.  The only time you can actually view a result is if you click the result link for the [b]newest[/b] poll.<br /> <br /> Has anyone else out there gotten this concept to work properly or have any ideas as to what needs to be done to the code to get it to work correctly?<br /> <br /> Thanks a ton everyone!]]></description>
				<guid isPermaLink="true">https://proxy2.de/forum/posts/preList/5877/21348.php</guid>
				<link>https://proxy2.de/forum/posts/preList/5877/21348.php</link>
				<pubDate><![CDATA[Wed, 4 Oct 2006 18:29:28]]> GMT</pubDate>
				<author><![CDATA[ toast]]></author>
			</item>
	</channel>
</rss>