NP_Vote.php

A poll plugin with its own API

General Plugin info
Author: Ilja Kuklic
Current Version: 0.1
Download: http://ilja.wz.cz/data/nucleus/NP_Vote.zip (.zip, 16 KB)
Forum Thread: http://forum.nucleuscms.org/viewtopic.php?t=15009

Installing

  1. Unzip the file and upload the contents to your plugin directory
  2. Install the plugin
  3. Place <%Vote%> to your item templates where you want your polls to appear
  4. From admin area create a poll and attach it to one of your items
  5. You can also place for example <%Vote(3,5)%> to place polls with IDs 3 and 5 anywhere in your skins

How to use the plugin

Documentation of both usage and plugin API is availible thru help page from Nucleus plugin manager.

So download it right now (ZIP archive, 16kB), includes also some plugins based on NP_Vote extending its functionality.

Package includes: NP_Vote - core package with help page, english and czech languages included NP_VoteShowResults - First of three sample plugins demonstrating NP_Poll's plugin API. User can't see poll results until clicks on a “show results” link. NP_VoteAnywhere - With this plugin you can type [+9,7+] anywhere inside your item and polls with IDs 9 and 7 will be placed there. NP_VoteMember - With this you can create polls for which only registered members can vote.

TIP: Default templates generate HTML code basis for bars. To make it visible, you have to make stylesheet for them, like this:

.poll ol{padding:0;}
.poll li{list-style-type:none;}
.pollbar{border: #000 1px solid; background-color:#fff; width:200px; height:8px; font-size:0;}
.pollbar div{height:8px; background-color:#aaa;} 

Note: Add this to the stylesheet of the skin you are using! You will also need to adjust colors to work with the colors of the skin. Here is some sample css to work with a dark background, specifically, the skin 'Description':

.poll ol{padding:0;}
.poll li{list-style-type:none;}
.pollbar{border: #d56e19 1px solid; background-color:#000; width:200px; height:8px; font-size:0;}
.pollbar div{height:8px; background-color:#aaa;} 

Available SkinVars and/or TemplateVars

  • [describe here the available skinvars and templatevars for your plugin.]

Options

  • [describe here all the available options of your plugin]

Tips and Tricks

Wishlist

Bugs

History

  • [Version 0.1, released <date> ]
    • [CHANGED: foobar]
vote.txt · Last modified: 2009/09/08 01:21 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki