public_html/docs/english/polls.html
author Dirk Haun <dirk@haun-online.de>
Sat, 07 Nov 2009 18:22:52 +0100
branchHEAD
changeset 7451 42760e758229
parent 7325 27d076900eaf
child 7474 d560b8c577b6
permissions -rw-r--r--
Updated documentation, mostly to document the autotags provided by the plugins
     1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
     2 <html>
     3 <head>
     4   <title>Geeklog Documentation - Polls Plugin</title>
     5   <link rel="stylesheet" type="text/css" href="../docstyle.css" title="Dev Stylesheet">
     6 </head>
     7 
     8 <body>
     9 <p><a href="http://www.geeklog.net/" style="background:transparent"><img src="../images/newlogo.gif" alt="Geeklog" width="243" height="90"></a></p>
    10 <div class="menu"><a href="index.html">Geeklog Documentation</a> - Polls Plugin</div>
    11 
    12 <h1>Polls Plugin</h1>
    13 
    14 <p>Polls used to be an integral part of the Geeklog core code, but have been
    15 moved to a plugin as of Geeklog 1.4.0.</p>
    16 
    17 <h2><a name="config.php">Configuration</a></h2>
    18 
    19 <p>The Polls plugin's configuration can be changed from the Configuration admin
    20 panel:</p>
    21 
    22 <h3><a name="general">General Polls Settings</a></h3>
    23 
    24 <table>
    25 <tr><th style="width:25%">Variable</th>
    26     <th style="width:25%">Default Value</th>
    27     <th style="width:50%">Description</th>
    28 </tr>
    29 <tr>
    30   <td><a name="desc_pollsloginrequired">pollsloginrequired</a></td>
    31   <td>0</td>
    32   <td>When set to 1, only registered users can access the list of recent
    33     polls.<br>
    34     Please note that <code>$_CONF['<a
    35     href="config.html#desc_loginrequired">loginrequired</a>']</code> in
    36     Geeklog's main configuration takes precedence over this setting. So when
    37     <code>'loginrequired'</code> is set to 1, anonymous users can not access
    38     the recent polls even when <code>'pollsloginrequired'</code> is set
    39     to 0.</td>
    40 </tr>
    41 <tr class="r2">
    42   <td><a name="desc_hidepollsmenu">hidepollsmenu</a></td>
    43   <td>0</td>
    44   <td>Whether to hide the "Polls" entry from Geeklog's menu bar (when set to 1)
    45     or to show it (when set to 0).</td>
    46 </tr>
    47 <tr>
    48   <td><a name="desc_maxquestions">maxquestions</a></td>
    49   <td>10</td>
    50   <td>Maximum number of questions in a poll.</td>
    51 </tr>
    52 <tr class="r2">
    53   <td><a name="desc_maxanswers">maxanswers</a></td>
    54   <td>10</td>
    55   <td>Maximum number of options per question.</td>
    56 </tr>
    57 <tr>
    58   <td><a name="desc_answerorder">answerorder</a></td>
    59   <td>submitorder</td>
    60   <td>Sort answers by the number of results ('voteorder') or keep the order
    61     in which they were entered ('submitorder').</td>
    62 </tr>
    63 <tr class="r2">
    64   <td><a name="desc_pollcookietime">pollcookietime</a></td>
    65   <td>86400</td>
    66   <td>Number of seconds to set a poll answer cookie to time out on.</td>
    67 </tr>
    68 <tr>
    69   <td><a name="desc_polladdresstime">polladdresstime</a></td>
    70   <td>604800</td>
    71   <td>Number of seconds to set a poll answer IP address to time out on.</td>
    72 </tr>
    73 <tr class="r2">
    74   <td><a name="desc_delete_polls">delete_polls</a></td>
    75   <td>0</td>
    76   <td>Defines what to do when a user is deleted that is the owner of a poll.
    77     When set to 0, all polls owned by the deleted user will be assigned to a
    78     user of the "Root" group (e.g. the site admin). When set to 1, the polls
    79     are deleted, including all the comments posted on that poll.</td>
    80 </tr>
    81 <tr>
    82   <td><a name="desc_aftersave">aftersave</a></td>
    83   <td>'list'</td>
    84   <td>Which page to go to after a poll has been saved:
    85     <ul>
    86     <li>'item': display the poll</li>
    87     <li>'list': show admin's list of polls (default)</li>
    88     <li>'plugin': display the public list of polls</li>
    89     <li>'home': display the site's homepage</li>
    90     <li>'admin': go to the "Admin Home" page, i.e. Command &amp; Control</li>
    91     </ul></td>
    92 </tr>
    93 <tr>
    94   <td><a name="desc_meta_tags">meta_tags</a></td>
    95   <td>false</td>
    96   <td>Whether to include the meta tags of the poll when it is displayed.</td>
    97 </tr>
    98 </table>
    99 
   100 <h2>How do the polls work?</h2>
   101 
   102 <p><small>(Taken from the <a href="http://www.geeklog.net/faqman/">Geeklog
   103 FAQ</a>)</small></p>
   104 
   105 <p>In order to prevent manipulation of polls (or at least make it harder),
   106 Geeklog does two things when you vote:</p>
   107 
   108 <ol>
   109   <li>It stores a cookie</li>
   110   <li>It stores your IP address</li>
   111 </ol>
   112 
   113 <p>Both the cookie and the IP are valid for a certain amount of time (see below)
   114 and during that time, you can't vote again on the same poll.</p>
   115 
   116 <p>The amount of time your cookie and IP are stored can be changed in the polls
   117 plugin's configuration (see above):</p>
   118 
   119 <pre>$_PO_CONF['<a href="#desc_pollcookietime">pollcookietime</a>']    = 86400;
   120 $_PO_CONF['<a href="#desc_polladdresstime">polladdresstime</a>']   = 604800;</pre>
   121 
   122 <p>Both times are in seconds, i.e. the cookie is valid for 24 hours and the IP
   123 is stored for a week.</p>
   124 
   125 <p>In setups where more than one person uses the same computer or the same IP
   126 address, you can set one (or both) of them to 1.</p>
   127 
   128 <p>Please keep in mind that <strong>any</strong> poll can be manipulated, so
   129 you shouldn't take the results too seriously.</p>
   130 
   131 
   132 <h2><a name="autotags">Autotags</a></h2>
   133 
   134 <p>The Polls Plugin provides 3 <a href="http://www.geeklog.net/article.php/autolinks" title="geeklog.net: About Autolinks and Autotags">autotags</a>,
   135 <code>[poll:]</code>, <code>[poll_result:]</code>, and <code>[poll_vote:]</code>.</p>
   136 
   137 <ul>
   138 <li>The <code>[poll:]</code> autotag will provide a link to a poll. Simply add
   139 the poll's ID after the colon. By default, the poll's title will be used as the
   140 link text. You can provide your own link text after the poll ID (but before the
   141 closing bracket).</li>
   142 <li>The <code>[poll_result:]</code> autotag lets you embed the results from a
   143 poll in a story (or anywhere else where autotags are allowed).</li>
   144 <li>The <code>[poll_vote:]</code> autotag can be used to embed a poll into an
   145 article (or anywhere else where autotags are allowed) so that users don't need
   146 to go to the polls block to vote.</li>
   147 </ul>
   148 
   149 
   150 <div class="footer">
   151     <a href="http://wiki.geeklog.net/">The Geeklog Documentation Project</a><br>
   152     All trademarks and copyrights on this page are owned by their respective owners. Geeklog is copyleft.
   153 </div>
   154 
   155 </body>
   156 </html>