Foodle Add-On for Democracy Poll

Description

Provides a seamless and flexible, interactive display option for online polls with Democracy Poll with a lot of parameters to be controlled for various display possibilities.
To be used as a shortcode alongside the poll for an interactive results display or separately just for result display purposes.
It provides and will further provide enhancements for Democracy Poll, like e.g. mixed polls (checkboxes plus radiobuttons in one poll). User fields (poll categories) can be defined and maintained in the users’ profiles to provide enhanced result statistics (e.g. showing a choir’s voices representation on proposed concert or rehearsal dates being polled in order to judge the ability to sing) – this was the author’s initial motivation.
Fields can as well be automatized in input based on regular expressions applied on the main user’s field (poll category).
Email reminders to users that didn’t vote, yet. Flexible sorting options and much more. Of course: the main shortcode is made for registered users only. Give it a try!

Inspired by and enhancing: Tkama’s Democracy Poll plugin.

Some General Considerations and more details:

The basic idea for this plugin was developed when the need for polls arrived for the choir I have the pleasure to be part of: Voices Unlimited.
This plugin can be used by any organization, association, union, society, club or group of people when polls shall be executed and results be displayed in a structured way, e.g.:

  • For this or that choir rehearsal or planned public event to be scheduled, would sufficient Sopranos 1 or Tenors 2 be available?
  • Or do the choir members support this or that idea and from which sub-group do they come from?
  • Or what could be winning ideas for the next concert stage dress (Democracy Poll with answers to be brought by the voters and be displayed for everyone easy to understand) and would this spread nicely in color on stage, considering the choir\’s stage order?

You will surely translate all this into your own environment and your own needs…

Main feature is the Foodle shortcode, which allows to display poll results in a configurable table format. Alongside the Democracy Poll shortcode, it will display the results interactively by use of AJAX communication.
However, it can as well be used independently to just display poll results.
Together with the WordPress comments function in pages or posts, this can be considered a good tool for online interaction with your registered (!) users.

The list of Foodle features comprises:

  • The interactive poll results table (shortcode)
  • This shortcode only makes sense and therefore only works for registered users (else: no display) and registered voters (else: message)
  • All other functions work regardless this necessary restriction
  • Several Democracy Poll shortcodes on one page/post (like before)
  • Full shortcode flexibility: Several Foodle shortcodes – even for the same Democracy Poll id with differing parameters – on one page/post
  • Email reminders for users who are late to vote
  • An unlimited number of user meta fields to be defined and used (user profile)
  • Manual drag-n-drop fields sorting
  • Careful (!) selection and use of existing user meta fields
  • Manual entry or drop-down entry in the user profile
  • Automated filling of user meta fields by use of Regular Expressions
  • Easy overview and control over past user entries (normalization)
  • Flexible sorting definitions
  • Definition of role & user plugin-internal capabilities
  • Dashboard widget (and shortcode) to provide statistics and check for logical errors in democracy_q, democracy_a and democracy_log databases
  • A shortcode to link to the Foodle page/post
  • A shortcode to display content based on roles
  • A free name/title definition for Foodle, e.g. for the user profile and the email
  • Changeable highlighting of Foodle & Democracy Poll in the admin menu and admin toolbar
  • You can define a list of page/post IDs where the AJAX interactivitiy is switched off.
  • Switchable interactive explanations for all functions (\’Help-Tooltips\’)
  • Warning-Tooltips can be disabled
  • Help-Tooltips and Warning-Tooltips are available anywhere for the administrator (front-end and back-end)
  • A number of Foodle CSS classes to have the design control

In addition to that, functionality is added to Democracy Poll:

  • In multiple answers polls, you can combine checkboxes and radio buttons
  • In each poll edit page, you may select from the available categories (user meta fields) for display
  • In each poll edit page, you may define the (main) category to be used for the category column
  • In each poll edit page, you may define the related text of its sorting button
  • In each poll edit page, you may decide whether to display an AJAX refresh button in the results displays (voted and/or not voted)
  • In each poll edit page, you may decide whether to have marked users to be counted (columns sums and first-come-first-serve answers)
  • In the graphical poll results, a text will indicate the voter\’s choice(s)
  • You can choose to avoid the vote expiry on polls lasting longer than 12 months
  • The use of shortcodes is now possible inside the Democracy Poll’s own text field located underneath the very poll
  • A number of Democracy CSS classes to have the design control

You will probably – at least in the beginning – want to switch-on the ‘Help-Tooltips’ (Foodle Settings) to see explanations for every function throughout the admin page tabs.
And don’t hesitate to propose additional valuable features you might still be missing – for me to review openly.

Screenshots

  • Sample front-end poll
  • Sample front-end poll #2
  • Admin tab: Meta fields
  • Admin tab: Normaization and sorting
  • Admin tab: Roles & User internal capabilities
  • Admin tab: Edit email
  • Admin tab: Foodle settings
  • Tips tab with detailed explanations
  • Tips tab with detailed explanations #2
  • Enhanced Democracy Poll edit screen
  • User profile extract

FAQ

When will Q&As be available?

As soon as questions will have been raised…

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Foodle Add-On for Democracy Poll” is open source software. The following people have contributed to this plugin.

Contributors

“Foodle Add-On for Democracy Poll” has been translated into 1 locale. Thank you to the translators for their contributions.

Translate “Foodle Add-On for Democracy Poll” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.5.5.6

  • Further SQL optimization.

1.5.5.5

  • Avoid any output if poll (referred to in the shortcode) does not exist.
  • Some SQL optimizations.

1.5.5.4

  • Added a hint whether marked voters are counted in the answer column sums or not.
  • Compatibility improvement #9 for PHP 8.0.
  • Some CSS improvements.

1.5.5.3

  • Improved tick image and size.
  • Improved Foodle table background.

1.5.5.2

  • Improved category counting behaviour and CSS color scheme in a first-com/first-serve scenario.
  • Compatibility improvement #8 for PHP 8.0.

1.5.5.1

  • Corrected: Ensure marked users NOT to be counted by default.

1.5.5.0

  • For each individual poll, it can be decided, whether to count a marked voter both, in the total count per answer column and in a first-come-first-serve answer.
  • Added class ‘foodle-cell-is-marked-in’ for the cells mith marked user names being counted in the Foodle table.

1.5.4.1

  • Corrected location of a translation string.

1.5.4.0

  • Added to display “Unknown User” when voting user is not known in the database.
  • Compatibility improvement #7 for PHP 8.0.

1.5.3.0

  • Tested ok with WordPress 5.8.
  • Added links in the help-tabs to plugin settings.

1.5.2.0

  • Foodle table headline text is now part of the Foodle settings.
  • Missing help translation string added and linked to settings.

1.5.1.0

  • Parameter ‘status’ added in shortcode ‘foodle-link-democracy-poll’ to select link button display when ‘logged-in’ and/or ‘not-logged-in’ as comma-separated list.

1.5.0.0

  • Democracy Poll shortcode now allows shortcode usage inside its own text field (underneath the very poll).
  • New parameter ‘horizontal’ added to shortcode ‘foodle-link-democracy-poll’ for button alignment (left, center, right).
  • Shortcode ‘foodle-link-democracy-poll’ now accepts ‘self’ as id content for usage inside the Democracy Poll’s own text field (located underneath the very poll).
  • Added related class ‘.foodle-link-button’ for the button used by shortcode ‘foodle-link-democracy-poll’.
  • With the above, a usage like [foodle-link-democracy-poll id=”self” not_same=”true” verbose=”false” horizontal=”center”] could be interesting.
  • Some still missing text and messages wrapped by <div></div>.

1.4.9.3

  • Avoid to offer any existing user meta with array content for field selection.
  • Added parameter ‘verbose’ to shortcode [foodle-link-democracy-poll].
  • Some text and messages wrapped by <div></div>.
  • Updated refresh button design.

1.4.9.2

  • Compatibility improvement #6 for PHP 8.0.

1.4.9.1

  • Correction of refresh button placement when multiple result displays are shown on one page/post.

1.4.9.0

  • Added an optional AJAX refresh button in both, the results display before and after voting. Both options can be selected individually for each poll id in the related Democracy Poll admin page.
  • Added related class ‘.democracy-refresh-button’. However, the button uses class ‘.dem-button’ as well and therefore follows the Democracy CSS settings – if not otherwise decided.
  • Compatibility improvement #5 for PHP 8.0.
  • Minor code and format improvements.

1.4.8.1

  • Added classes ‘.democracy-voted’ and ‘.democracy-not-voted’ to the existing ‘.democracy’ class and class ‘.democracy-your-vote’ inside the poll results for the text indicating the users votes – all three to be able to differentiate for CSS use.

1.4.8.0

  • Added classes ‘.democracy-voting’ and ‘.democracy-results’ to the existing ‘.democracy’ class in order to be able to differentiate for CSS use.

1.4.7.0

  • As the main shortcode was designed (and only makes sense) for registered users and registered voters only, it will now be disabled for other purposes.
  • All other functions work regardless this necessary restriction.

1.4.6.0

  • Compatibility improvement #4 for PHP 8.0.
  • Code structure and robustness further improved.
  • CSS class ‘foodle-statistics-check-table’ added for the related dashboard widget / shortcode.

1.4.5.0

  • Compatibility improvement #3 for PHP 8.0.
  • Better cross-browser design compatibility (e.g. IE, Safari, Firefox).

1.4.4.0

  • A few format adaptations and code improvements.

1.4.3.1

  • Table width behaviour and table column width behaviour – while moving a row – was ‘beautified’.

1.4.3.0

  • Compatibility improvement #2 for PHP 8.0.
  • Corrected behaviour during new user registration.
  • Improved recognition of invalid user meta fields in the user profile

1.4.2.0

  • Improved behaviour in Foodle check (dashboard widget & shortcode) to handle polls without responses so far.

1.4.1.0

  • Compatibility improvement #1 for PHP 8.0.

1.4.0.2

  • Ensure that jquery-ui-sortable is active and don’t rely that other acctive plugins did this job already.

1.4.0.1

  • Avoid undefinded message for ‘is_plugin_active()’ under certain conditions (controlling dependency between Foodle and Democracy Poll).

1.4.0.0

  • Foodle’s back-end tooltips (Help & Warning) are now available in the front-end (and the back-end) for anywhere-use by the administrator.
  • Foodle’s individual back-end CSS and back-end javascript/jQuery are now limited to the Foodle admin pages to avoid unnecessary loading elsewhere.
  • A few format adaptations in the back-end.

1.3.1.0

  • Back-End manual row moving (for sorting) now works on touchscreens as well (Touch Punch).
  • Inadvertent scroll-up upon row moving is being prevented – even for newly added (and not yet saved) rows.
  • Row swapping is initiated as soon as the pointer hovers above another row.
  • Minor mouse pointer corections.

1.3.0.0

  • In the Meta Field definition table, rows can now be dragged manually to generate a new sorting order.
  • In the same manner, the Foodle user capabilities table can be sorted manually as well.
  • A few jQuery use improvements.

1.2.3.0

  • Further improved timing of initialization events (user_meta, shortcodes, and so on).
  • Reduced javascript output size by combining some elements.
  • Avoid unnecessary duplication of output.

1.2.2.1

  • Logic improvements to avoid unnecessary function calls.
  • A few page format enhancements, e.g. with solo=”true”, ‘foodle_table_top_spacing’ is no longer used in order to improve administrator layout control.

1.2.2.0

  • New shortcode to display content depending on roles. Can e.g. be used to display the Democracy Poll archive or certain polls for selected roles only. Can as well be used for anything in your site.

1.2.1.0

  • AJAX improved to avoid potential conflicts with other plugins.

1.2.0.1

  • Some explaining strings still needed to be updated following the big move in 1.2.0.0.

1.2.0.0

  • Full shortcode flexibility added (thus improving vs. 1.1.6.0), including several Foodle shortcodes with individual parameters for one Democracy Poll on the same page/post.
  • Individual Foodle AJAX parameters on the front-end are now stored in user-meta in order to avoid any potential conflicting scenarios.
  • Added CSS classes ‘foodle_democracy_top_spacing’ and ‘foodle-table-headline’.
  • Format improvements in the email reminder area and the Foodle table area.
  • The shortcode parameter ‘solo=”true”‘ will not only switch off the email reminder area and the headline above the Foodle table but the date column as well, if hidden (this column is hidden and only visible for selected users, when ‘show_date=”false”‘).
  • Minor code and stability improvements.

1.1.7.0

  • Small AJAX bug corrected (introduced with 1.1.6.0).

1.1.6.0

  • Several Democracy Poll shortcodes and several related Foodle shortcodes on the same page/post are possible now. However, several Foodle shortcodes for the same poll id will further not be allowed for the sake of the dynamic AJAX interaction. But – if really needed – you may choose to switch AJAX off on such pages/posts (see the Foodle Settings).
  • A number of further CSS classes added (see the tipps tab) for more administrator design control.

1.1.5.0

  • Format error in email-reminder-area corrected.
  • Foodle table (column-width) optimized for columns with no responses so far.
  • Potential division-by-zero error removed.
  • Added class ‘foodle-button’.
  • Minor improvements.

1.1.4.0

  • A few visibility improvements.

1.1.3.0

  • Minor adjustments and stability enhancements.

1.1.2.0

  • A few strings precised and German translations adapted.
  • Position of donation button moved to help tabs.
  • Foodle admin footer beautified.

1.1.1.0

  • Enhanced check of regular expressions incl. error display upon form submit.
  • Strings further optimized and German translation completed.

1.1.0.9

  • Missing translation strings completed.

1.1.0.8

  • Optimized input validation including Regular Expressions.
  • Optimized a few strings.

1.1.0.7

  • Page format error corrected. Was introduced with 1.1.0.6 unintentionally.

1.1.0.6

  • Previous reminders are shown as well for closed polls or polls, where reminders are switched off.
  • Display optimization for answers marked radio (‘••’) when in radio polls anyway.

1.1.0.5

  • Bug in statistics for email reminders corrected.

1.1.0.4

  • Added tips tab content: How to handle own CSS styles for the Democracy Poll and Foodle front-end.
  • Email placeholder added: {user-login}.

1.1.0.3

  • Activation conditions checks upon plugin activation and during operation were optimized.
  • Minor enhancements in the tips tab.

1.1.0.2

  • Minor tips table and CSS adjustments.

1.1.0.1

  • Tested ok with WordPress 5.7.1.

1.1.0.0

  • Added Democracy Poll enhancement to allow mixed polls (checkboxes and radiobuttons in one poll).
  • Added Regular Expressions to control user profile fields.
  • Added full control of categories per poll from within the democracy poll edit screen.
  • Added further Foodle parameter settings.

1.0.0.0

  • First stable version with all initial features.