Simple Poll Extended v1.2

Release Notes

Updates:

  • This version fixes a bug in the object view.
  • This version patches an issue discovered with the add & edit functionality. The original implementation had a flaw that caused bad meta-data to be created.  (fix revised)
  • An issue wherein the content assignment drop-down wasn't appearing, has also been addressed.

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:

  • Extends the edit poll view to support before and after description fields.
  • Adds support for poll types
  • Adds support for assigning poll 'ownership' to a group
  • Overwrites post icon with the group icon (if it is associated to a group)

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.

John M

Seasoned web developer from the US

Stats

  • Category: Uncategorized
  • License: GNU General Public License (GPL) version 2
  • Updated: 2014-11-17
  • Downloads: 1052
  • Recommendations: 1

Other Projects

View John M's plugins