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 |
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;}