Code Monkey home page Code Monkey logo

joomla_plugin_sexypolling_reloaded's Introduction

Latest Release Joomla major version Joomla major version Joomla major version

Sexy Polling Reloaded: A Joomla 4.x migration (and Joomla 3.x update) for the Joomla extension "Sexy Polling"

  • "Sexy Polling Reloaded" is a fork of the "Sexy Polling" extension (version 2.1.7), which was developed by 2GLux.com and provided on the former website 2GLux.com
  • The fork intends to make the functionality of the former "Sexy Polling" extension available for Joomla 4 and 5, because the original extension is not provided and supported any more
  • A patch was added to fix a reported security issue
  • Some limitations of the former FREE version were removed
  • Support for the Joomla update system was added to check and install new releases of the extension
  • The code was migrated to the Joomla 4.x and 5.x CMS and module API, while still keeping it usable for Joomla 3.10
  • The latest 5.1.x release can be used for Joomla 5.x and Joomla 4.x
  • The latest 5.0.x release can be used for Joomla 4.x, and Joomla 3.10. It also runs with Joomla 5.x if using the Backward Compatibility plugin.

Installation

  • Manual installation
    • Go to the release page and download the latest release
    • Install the ZIP package in the Joomla administration backend
  • Joomla update system
    • Prerequesite: first installation has to be installed manually, see above
    • Joomla will automatically check for updates in the administration backend
    • If an update is available, change to the Extensions / Update menu and install the update
  • PHP extension intl required
    • The extension requires the PHP exension "intl" (Internationalization). Usually, the "intl" extension is included in the PHP installation. However, it might be necessary to activate it, i.e. the php.ini file must contain the following line: extension=intl
    • If the "intl" extension is not installed, PHP errors like "Class IntlTimeZone not found", or "Attempted to load class IntlTimeZone from the global namespace" might occur.
  • Migration from the former "Sexy Polling" extension
    • During installation, the extension re-uses existing data from the former Sexy Polling extension.
    • If you want to reuse data from the former Sexy Polling extension, do not uninstall the former Sexy Polling extension. Instead, just install the Sexy Polling Reloaded extension. It will re-use the existing database tables.
  • Known issues
    • Security: Due to improvements in the component architecture of release v5.0.0, it is highly recommended to upgrade from earlier 4.x.x versions to 5.x.x.
    • Installation errors with v4.1.x extension versions, failing with an "... column 'country' can't have a default value" error, are avoided if installing a extension release v5.0.0 or later.
    • If using PHP 8.2, certain deprecation messages might be shown in the frontend, see issues #58 and #61. The root cause for these warnings lies in the Joomla platform and will hopefully be solved in one of the next Joomla releases.

Date formats

The date format, which is shown in poll modules, can be specified in the Joomla administration at: Components -> Sexy Polling Reloaded -> Polls -> Edit -> Date Format.

Examples for the date format:

  • d/m/Y (22-11-2022)
  • m/d/Y (11-22-2012)
  • M d, Y (Nov 22, 2022)
  • F d, Y (November 22, 2022)

For more details about the format options, see PHP documentation about date time format.

Development and Contributions

  • The extension was developed by 2GLux.com for Joomla 2.5 and 3 with the original extension name "Sexy Polling".
  • After the "Sexy Polling" extension was removed from the web and the support was not continued, a fork of the extension was migrated to Joomla 4 with the new extension name "Sexy Polling Reloaded" by Jefferson49
  • Further contributions on Github are welcome!

Versions

  • The latest version v5.1.0 was developed and tested with:
    • Joomla 5.0.0 and Joomla 4.4.0; but should also run with other Joomla 5.x, 4.x versions.
    • PHP 8.2.5; but should also run with other PHP 8.2 versions.
  • The version v5.0.1 was developed and tested with:

Translation

You can help to translate this module:

You can use a text editor like notepad++ to work on translations.

You can contribute translations via a pull request (if you know how to do), or by opening a new Github issue and attaching the file. Updated translations will be included in the next release of this module.

Currently, the following frontend languages are available:

  • Dutch
  • English
  • Farsi
  • French
  • German
  • Greek
  • Italian
  • Russian
  • Slovenian
  • Spanish
  • Turkish

Issue reporting

If you experience any bugs create a new issue in the Github repository

Github repository

https://github.com/Jefferson49/Joomla_plugin_sexypolling_reloaded

joomla_plugin_sexypolling_reloaded's People

Contributors

hei-martin avatar jefferson49 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

joomla_plugin_sexypolling_reloaded's Issues

Allow only one vote per Joomla user name

Feature request from a user: "Another useful mod would be to allow only one vote per username. At the moment we can set the number of votes per ip address to 1 but that stops couples or people who share a house from both voting."

"Show Add Answer Icon" switch does not work

It looks like the "Show Add Answer Icon" switch does not work. Even if it's switched off I see the option to add a custom answer. All other switches like "Show Scale Icon" or "Show Back Icon" working as expected. (version 4.1.6)

Error on running anyfunction

Observed with Joomla 4.2.6 and plugin version v4.1.0
An error has occurred.
0 version_compare(): Argument #3 ($operator) must be a valid comparison operator

Insert votes not working

Hello,
the function insert votes doesn't work for me when i fill a number and press save i get this error:

An error has occurred.
1364 Field 'country' doesn't have a default value

Im on the latest J4 version
Regards

"Embed Code" for answers does not have the intended result

Observed with version 4.1.6.

If editing an answer and entering code in "Embed Code", the code is not included properly and executed in the front end. Example: If entering "<tag>text<\tag>", the tags are removed and only "text" is included in the answer shown.

This is already the case in the original plugin in Joomla 3.

Adding a new answer while multi answers are activated does not work correctly

Observed with Joomla 4 and 4.1.6beta

If multi answers is activated and after adding a new answer and selecting this answer for voting, the voting fails.

The error occurs in vote.php, line 226. Missing default value

Another error occurs in vote.php, line 235. The following SQL command is not accepted:
"INSERT INTO #__sexy_votes (id_answer,id_user,ip,date,country,city,region,countrycode) VALUES ('35','0',192.168.178.40','2023-04-06 20:27:10','-','-','-','-')"

BLOB 'country' cannot have a default value - BLOB 'country' ne peut avoir de valeur par defaut

Good morning,

During the installation of Sexy polling reloaded, everything goes well until the display of this message: BLOB 'country' cannot have a default value.
The installation is stopped with a message. I couldn't find a table indicating any country.
Thanks for your feedback,
Pascal

Bonjour,

Lors de l'installation de Sexy polling reloaded, tout se passe bien jusqu'à l'affichage de ce message : BLOB 'country' ne peut avoir de valeur par defaut.
L'installation est stoppée avec un message. Je n'ai pas trouvé de table indiquant un quelconque pays.
Merci pour votre retour,
Pascal

PHP error log on server contains PHP Warning: Undefined variable $styles_

Observed with version 4.1.3 and Joomla 4.2.6.

PHP error log on server contains PHP Warning:
PHP Warning: Undefined variable $styles_ in /volume1/web/joomla/components/com_sexypolling/generate.css.php on line 86
PHP Warning: foreach() argument must be of type array|object, null given in /volume1/web/joomla/components/com_sexypolling/generate.css.php on line 86

Greek language

`; com_sexypolling
; Copyright (C) 2010 - 2015 2GLux. All rights reserved.
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
; Note : All ini files need to be saved as UTF-8

COM_SEXYPOLLING_WORD_1="Ψήφοι"
COM_SEXYPOLLING_WORD_2="Σύνολο ψήφων"
COM_SEXYPOLLING_WORD_3="Πρώτη ψήφος"
COM_SEXYPOLLING_WORD_4="Τελευταία ψήφος"
COM_SEXYPOLLING_WORD_5="Προβολή χρονολογίου"
COM_SEXYPOLLING_WORD_6="Απόκρυψη χρονολογίου"
COM_SEXYPOLLING_WORD_7="Ψήφισε"
COM_SEXYPOLLING_WORD_8="Αποτελέσματα"
COM_SEXYPOLLING_WORD_9="Επιλέξτε απάντηση"
COM_SEXYPOLLING_WORD_10="Έχεις ήδη ψηφίσει μια φορά"
COM_SEXYPOLLING_WORD_11="Προσθήκη νέας απάντησης"
COM_SEXYPOLLING_WORD_12="Πρόσθεσε μια απάντηση..."
COM_SEXYPOLLING_WORD_13="Προσθήκη"
COM_SEXYPOLLING_WORD_14="Η απάντησή σου θα εμφανιστεί μετά από έλεγχο"
COM_SEXYPOLLING_WORD_15="Κλίμακας"
COM_SEXYPOLLING_WORD_16="Relative"
COM_SEXYPOLLING_WORD_17="Absolute"
COM_SEXYPOLLING_WORD_18="Ημερομηνία έναρξης δημοσκόπησης "
COM_SEXYPOLLING_WORD_19="Ημερομηνία λήξης δημοσκόπησης "
COM_SEXYPOLLING_WORD_20="Πισω στις απαντήσεις"
COM_SEXYPOLLING_WORD_21="Μπορείς να ψηφίσεις ξανά σε..."
COM_SEXYPOLLING_WORD_22="OK"
COM_SEXYPOLLING_WORD_23="Εναπομένων χρόνος ..."
COM_SEXYPOLLING_WORD_24="Επιτρεπόμενος αριθμός επιλογών είναι"
COM_SEXYPOLLING_WORD_25="Δεν μπορείς να ψηφίσεις!"
COM_SEXYPOLLING_WORD_26="Η ψήφος καταχωρήθηκε"
COM_SEXYPOLLING_POWERED_BY="Powered by"`

Translating the names of months impossible

Hi,

I'm interested in translating the frontend part of Sexy Polling to Turkish. As you can see in the screenshots, there is no string for translating the month's names when you debug the language. I searched through the files of the plugin and found the month names in file highstock.js (\com_sexypolling\admin\assets\js\highstock.js) in line 29. But even when I modify this file it affects nothing.

Is there a way to tranlate them, is it an issue or am I missing something?

SP-1
SP-2

aju65_sexy_polls table

While trying from Maintenance: Global Check-in to check in to aju65_sexy_polls table i recieve the error
Field 'checked_out' doesn't have a default value

Proponer opcion de imagen en opciones de respuestas - Proposal for image option in answer options

Saludo cordial, en mi caso el componente funciona correctamente en Joomla 4.3 (migrado hace 1 año desde J3.10) - php8 - plantilla Helix Ultimate.

Quisiera proponer que en la opción de respuestas por ejemplo, sea posible subir imágenes en vez de apuntarlas a enlaces externos, por ejemplo: si hago una encuesta con los mejores jugadores de fútbol, ​​que la respuesta permita subir la imagen del jugador y al terminar la encuesta eliminarla sin dejar basura.

Gracias por tenerlo presente, por lo demás, excelente complemento de encuestas para nuestro amado Joomla 4.

Class "IntlTimeZone" not found

When publishing the module in any page, I get the error "Class "IntlTimeZone" not found".
Using sexypolling_reloaded_v4.1.6 in Joomla 3.10.11.

Right to Left Middle Eastern

Hi, Thank you for the amazing Sexy Polling Joomla Extension, it's just fab.
I am having issues with Right to Left text appearing as left to right.
Thank you

request for minimum number of answers

Trying to use Sexy Polling Reloaded for board elections.
Voters must select 5 out of 9 'answers' but can currently vote with minimum of 1 selected.
Can this parameter be added please?

0 Class "IntlTimeZone" not found

Hey guys, it seems that I have an ussie with the plugin when enabled gives me an error on every frontend page:

0 Class "IntlTimeZone" not found.

I suspect this is an issue with the PHP version, I currently use PHP8
Can someone help, please?

Module css

Using the sexy polls module to display polls is not loading the css correctly.
Instead when using the shortcodes the css is loaded corectly.

Warning message after uninstalling: Table 'joomla.jos_sexy_polls' does not exist

Observed with Joomla 4.2.6 and plugin version v4.1.0

After uninstalling the plugin, a warning message is shown: Table 'joomla.jos_sexy_polls' does not exist
However, the plugin code and the database tables are removed and the uninstall routine seems to be sucessfull.

Maybe, the uninstall routine tries to delete the "_sexy_polls" table twice.

Fehler Deinstallation

Suggestion export votes

Congrats and thanks for the latest version.
I would like to suggest an option to export the votes to csv or xls format for further editing and analyse.

Keep up the good work!

Joomla exception if deleting an answer in the backend

Observed with Joomla 4.1.9 and sexy polling v4.1.7rc

If debugging is activated and an answer is deleted in the backend, Joomla throws an exception. If debugging is not activated, the exception is caught somewhere and does not show up.

The exception seems to be related to administrator/components/com_sexypolling/sexypolling.php(45), see stack trace.

Only occurs with Joomla 4

FatalError
Error: Uncaught UnexpectedValueException: Dispatcher not set in Joomla\CMS\MVC\Model\BaseDatabaseModel in /volume1/web/joomla/libraries/vendor/joomla/event/src/DispatcherAwareTrait.php:41
Stack trace:
#0 /volume1/web/joomla/libraries/src/MVC/Model/BaseDatabaseModel.php(343): Joomla\CMS\MVC\Model\BaseDatabaseModel->getDispatcher()
#1 /volume1/web/joomla/libraries/src/MVC/Model/BaseDatabaseModel.php(314): Joomla\CMS\MVC\Model\BaseDatabaseModel->dispatchEvent(Object(Joomla\Event\Event))
#2 /volume1/web/joomla/libraries/src/MVC/Model/AdminModel.php(923): Joomla\CMS\MVC\Model\BaseDatabaseModel->cleanCache()
#3 /volume1/web/joomla/libraries/src/MVC/Controller/AdminController.php(143): Joomla\CMS\MVC\Model\AdminModel->delete(Array)
#4 /volume1/web/joomla/libraries/src/MVC/Controller/BaseController.php(672): Joomla\CMS\MVC\Controller\AdminController->delete()
#5 /volume1/web/joomla/administrator/components/com_sexypolling/sexypolling.php(45): Joomla\CMS\MVC\Controller\BaseController->execute('delete')
#6 /volume1/web/joomla/libraries/src/Dispatcher/LegacyComponentDispatcher.php(71): require_once('/volume1/web/jo...')
#7 /volume1/web/joomla/libraries/src/Dispatcher/LegacyComponentDispatcher.php(73): Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}('/volume1/web/jo...')
#8 /volume1/web/joomla/libraries/src/Component/ComponentHelper.php(355): Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch()
#9 /volume1/web/joomla/libraries/src/Application/AdministratorApplication.php(143): Joomla\CMS\Component\ComponentHelper::renderComponent('com_sexypolling')
#10 /volume1/web/joomla/libraries/src/Application/AdministratorApplication.php(186): Joomla\CMS\Application\AdministratorApplication->dispatch()
#11 /volume1/web/joomla/libraries/src/Application/CMSApplication.php(294): Joomla\CMS\Application\AdministratorApplication->doExecute()
#12 /volume1/web/joomla/administrator/includes/app.php(61): Joomla\CMS\Application\CMSApplication->execute()
#13 /volume1/web/joomla/administrator/index.php(32): require_once('/volume1/web/jo...')
#14 {main}
thrown

Attempted to load class "IntlTimeZone" from the global namespace. Did you forget a "use" statement?

I just upgrade from Joomla 3.10 to 4 / php 8.0 thinking I will lose this extension and was amazed to find that you "reload" it, thanks.

The install was fine and the admin works (all my polls stay there), but as soon I try to load a module Joomla crash with the above message:

Attempted to load class "IntlTimeZone" from the global namespace.
Did you forget a "use" statement?

Exceptions 2 / Stack Traces 2
Symfony\Component\ErrorHandler\Error
ClassNotFoundError

in D:\Shorted\ServerJ4\www\components\com_sexypolling\helpers\helper.php (line 171)
//load language and timezone
$lang = JFactory::getLanguage();
$lang->load('com_sexypolling');
$lang_tag = $lang->getTag();
$iterator = new ArrayIterator(iterator_to_array(IntlTimeZone::createEnumeration(substr($lang_tag, -2))));
$iterator->rewind();
$time_zone = $iterator->current();
setcookie("sexy_poll_lang_tag", $lang_tag, time()+36060, '/');
setcookie("sexy_poll_time_zone", $time_zone, time()+36060, '/');

Any idea to solve that?

Deprecation messages are shown if using the plugin with PHP 8.2

Observed with Joomla 4.3.4, PHP 8.2, and plugin version v4.1.7 or v4.1.6

If the plugin is used with PHP 8.2, deprecation messages are shown in the backend and in the frontend.

Backend:
Deprecated: Creation of dynamic property plgSystemSexypolling::$_plugin is deprecated in /volume1/web/joomla/plugins/system/sexypolling/sexypolling.php on line 30 Deprecated: Creation of dynamic property plgSystemSexypolling::$_params is deprecated in /volume1/web/joomla/plugins/system/sexypolling/sexypolling.php on line 31

Frontend:
Deprecated: Creation of dynamic property SexypollingHelper::$id_poll is deprecated in /volume1/web/joomla/modules/mod_sexypolling/mod_sexypolling.php on line 27 Deprecated: Creation of dynamic property SexypollingHelper::$id_category is deprecated in /volume1/web/joomla/modules/mod_sexypolling/mod_sexypolling.php on line 29 Deprecated: Creation of dynamic property SexypollingHelper::$module_id is deprecated in /volume1/web/joomla/modules/mod_sexypolling/mod_sexypolling.php on line 30 Deprecated: Creation of dynamic property SexypollingHelper::$type is deprecated in /volume1/web/joomla/modules/mod_sexypolling/mod_sexypolling.php on line 31 Deprecated: Creation of dynamic property SexypollingHelper::$class_suffix is deprecated in /volume1/web/joomla/modules/mod_sexypolling/mod_sexypolling.php on line 32 Deprecated: Creation of dynamic property SexypollingHelper::$_data is deprecated in /volume1/web/joomla/components/com_sexypolling/helpers/helper.php on line 144

Newly added answer is counted with 0 votes if shown for the first time

Observed with Joomla 3.10 and sexy polling v4.1.7rc

In certain situations, a newly added answer is counted with 0 votes if shown for the first time. After reloading the website, the correct number of 1 vote is shown.

This seems to happen if the vote is the first vote of the day and only happens if multiple answers are deactivated. In vote.php, the incoming max_date seems to be from an earlier date. Therefore, votes of the current date are not counted.

Mobile viewport

For some reason on mobile view there is some blank space to the right side that causes page to overflow

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.