0byt3m1n1
Path:
/
data
/
applications
/
aps
/
geeklog
/
1.8.0-0
/
standard
/
htdocs
/
public_html
/
docs
/
english
/
[
Home
]
File: polls.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head> <title>Geeklog Documentation - Polls Plugin</title> <link rel="stylesheet" type="text/css" href="../docstyle.css" title="Dev Stylesheet"> </head> <body> <p><a href="http://www.geeklog.net/" style="background:transparent"><img src="../images/newlogo.gif" alt="Geeklog" width="243" height="90"></a></p> <div class="menu"><a href="index.html">Geeklog Documentation</a> - Polls Plugin</div> <h1>Polls Plugin</h1> <p>Polls used to be an integral part of the Geeklog core code, but have been moved to a plugin as of Geeklog 1.4.0.</p> <h2><a name="config.php">Configuration</a></h2> <p>The Polls plugin's configuration can be changed from the Configuration admin panel:</p> <h3><a name="general">General Polls Settings</a></h3> <table> <tr><th style="width:25%">Variable</th> <th style="width:25%">Default Value</th> <th style="width:50%">Description</th> </tr> <tr> <td><a name="desc_pollsloginrequired">pollsloginrequired</a></td> <td>0</td> <td>When set to 1, only registered users can access the list of recent polls.<br> Please note that <code>$_CONF['<a href="config.html#desc_loginrequired">loginrequired</a>']</code> in Geeklog's main configuration takes precedence over this setting. So when <code>'loginrequired'</code> is set to 1, anonymous users can not access the recent polls even when <code>'pollsloginrequired'</code> is set to 0.</td> </tr> <tr class="r2"> <td><a name="desc_hidepollsmenu">hidepollsmenu</a></td> <td>0</td> <td>Whether to hide the "Polls" entry from Geeklog's menu bar (when set to 1) or to show it (when set to 0).</td> </tr> <tr> <td><a name="desc_maxquestions">maxquestions</a></td> <td>10</td> <td>Maximum number of questions in a poll.</td> </tr> <tr class="r2"> <td><a name="desc_maxanswers">maxanswers</a></td> <td>10</td> <td>Maximum number of options per question.</td> </tr> <tr> <td><a name="desc_answerorder">answerorder</a></td> <td>submitorder</td> <td>Sort answers by the number of results ('voteorder') or keep the order in which they were entered ('submitorder').</td> </tr> <tr class="r2"> <td><a name="desc_pollcookietime">pollcookietime</a></td> <td>86400</td> <td>Number of seconds to set a poll answer cookie to time out on.</td> </tr> <tr> <td><a name="desc_polladdresstime">polladdresstime</a></td> <td>604800</td> <td>Number of seconds to set a poll answer IP address to time out on.</td> </tr> <tr class="r2"> <td><a name="desc_delete_polls">delete_polls</a></td> <td>0</td> <td>Defines what to do when a user is deleted that is the owner of a poll. When set to 0, all polls owned by the deleted user will be assigned to a user of the "Root" group (e.g. the site admin). When set to 1, the polls are deleted, including all the comments posted on that poll.</td> </tr> <tr> <td><a name="desc_aftersave">aftersave</a></td> <td>'list'</td> <td>Which page to go to after a poll has been saved: <ul> <li>'item': display the poll</li> <li>'list': show admin's list of polls (default)</li> <li>'plugin': display the public list of polls</li> <li>'home': display the site's homepage</li> <li>'admin': go to the "Admin Home" page, i.e. Command & Control</li> </ul></td> </tr> <tr> <td><a name="desc_meta_tags">meta_tags</a></td> <td>false</td> <td>Whether to include the meta tags of the poll when it is displayed.</td> </tr> </table> <h3><a name="whatsnew">What's New Block</a></h3> <table> <tr><th style="width:25%">Variable</th> <th style="width:25%">Default Value</th> <th style="width:50%">Description</th> </tr> <tr> <td valign="top"><a name="desc_newpollsinterval">newpollsinterval</a></td> <td valign="top">1209600</td> <td valign="top">Polls are "new" if they are this many seconds old.</td></tr> <tr class="r2"> <td valign="top"><a name="desc_hidenewpolls">hidenewpolls</a></td> <td valign="top">'hide'</td> <td valign="top">Set to 'modified' date or 'created' date to display new polls in the What's New block.</td></tr> <tr> <td valign="top"><a name="desc_title_trim_length">title_trim_length</a></td> <td valign="top">20</td> <td valign="top">Max. length of the title of items listed in the What's New block.</td></tr> </table> <h2>How do the polls work?</h2> <p><small>(Taken from the <a href="http://www.geeklog.net/faqman/">Geeklog FAQ</a>)</small></p> <p>In order to prevent manipulation of polls (or at least make it harder), Geeklog does two things when you vote:</p> <ol> <li>It stores a cookie</li> <li>It stores your IP address</li> </ol> <p>Both the cookie and the IP are valid for a certain amount of time (see below) and during that time, you can't vote again on the same poll.</p> <p>The amount of time your cookie and IP are stored can be changed in the polls plugin's configuration (see above):</p> <pre>$_PO_CONF['<a href="#desc_pollcookietime">pollcookietime</a>'] = 86400; $_PO_CONF['<a href="#desc_polladdresstime">polladdresstime</a>'] = 604800;</pre> <p>Both times are in seconds, i.e. the cookie is valid for 24 hours and the IP is stored for a week.</p> <p>In setups where more than one person uses the same computer or the same IP address, you can set one (or both) of them to 1.</p> <p>Please keep in mind that <strong>any</strong> poll can be manipulated, so you shouldn't take the results too seriously.</p> <h2><a name="autotags">Autotags</a></h2> <p>The Polls Plugin provides 3 <a href="http://www.geeklog.net/article.php/autolinks" title="geeklog.net: About Autolinks and Autotags">autotags</a>, <code>[poll:]</code>, <code>[poll_result:]</code>, and <code>[poll_vote:]</code>.</p> <ul> <li>The <code>[poll:]</code> autotag will provide a link to a poll. Simply add the poll's ID after the colon. By default, the poll's title will be used as the link text. You can provide your own link text after the poll ID (but before the closing bracket).</li> <li>The <code>[poll_result:]</code> autotag lets you embed the results from a poll in a story (or anywhere else where autotags are allowed).</li> <li>The <code>[poll_vote:]</code> autotag can be used to embed a poll into an article (or anywhere else where autotags are allowed) so that users don't need to go to the polls block to vote.</li> </ul> <div class="footer"> <a href="http://wiki.geeklog.net/">The Geeklog Documentation Project</a><br> All trademarks and copyrights on this page are owned by their respective owners. Geeklog is copyleft. </div> </body> </html>