Updates:
Description:
This plugin enhances the Simple Poll Plug-in in a number of ways. Most importantly it allows users to post Polls associated with a group they belong to. It also causes Polls to be included in the Group Menu and as a widget on the Group Profile Page.
This plugin was loosely based on Diego Andrés Ramírez Aragón's Blogextended Plug-in.
Features:
Install:
Just drop it on your mod directory and then go to the admin panel and activate it.
Keep in mind that this plug-in overwrites some poll plug-in behaviors so it needs
to be loaded after it.
The order in Tool Admin should look like:
poll
poll_extended
....
NOTES:
There is a known issue with regards to Elgg 1.5 compatibility which has not been addressed, so this plug-in is best used with Elgg 1.2.
This Plugin REQUIRES the latest version of the Simple Poll Plug-in (1.3.2 or better)
to function properly.
If you have an earlier version you must add the following lines of code to mod/poll/index.php
(starting at line 32)
// Get a poll posts
if(!$polls = $page_owner->getObjects('poll',50,0))
{
//if we didn't get any polls, try to get them from metadata
$polls = get_entities_from_metadata("content_owner",page_owner(), "object","poll",0, 5, false,false,false);
}
//if there are still no polls, show a friendly message
if(empty($polls))
{
$area2 .= sprintf(elgg_echo("polls:nonefound"),$page_owner->name);
}
foreach($polls as $poll)
{
$area2 .= elgg_view("poll/listing", array('entity' => $poll));
}
// code continues-->
You will also need to add the following to the poll/languages/en.php file:
'polls:nonefound' => "No Polls were found from %s",
How the poll post group 'ownership' works?
This plug-in lets the user specify whether a poll is published to their profile or a
group they belong to. The user continues being the post owner, however the Poll is
published in their profile AND in the group profile.
Disclaimer:
While every effort has been made toward testing, I still consider this to be 'in development'. Of course, that's not to say it isn't useable. I have implemented a version of this for a project I am working on and it appears to be stable.
There's always room for improvement, so feel free to suggest additions, share bug-fixes, or extend and modify.
View John M's plugins
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
Get a missing token error when running this in 1.7.