Dec 04, 2008, 12:39 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Search via SMF or Google: modx forums all of modxcms.com web
  MODxCMS.com   Forums   Help Login Register  
Pages: [1] 2 3 4   Go Down
  Print  
Author Topic: Support/Comments for EasyPoll  (Read 4551 times)
0 Members and 1 Guest are viewing this topic.
banal
Full Member
***
Posts: 155


« on: Feb 19, 2008, 03:06 AM »

This is an auto-generated support/comment thread for EasyPoll.

Use this forum to post any comments about this addition or any questions you have regarding its use.

Brief Description:
EasyPoll is a new Poll Module for MODx. It allows the creation of Polls for multiple Languages, timed Polls, Poll Archive and highly customizable Output.
« Last Edit: Feb 19, 2008, 04:42 AM by banal » Logged
banal
Full Member
***
Posts: 155


« Reply #1 on: Feb 19, 2008, 04:29 AM »

The EasyPoll Module/Snippet has landed.
It would be great, if some of you guys could create translations of the Language files, since thats whats missing at the moment Smiley

If you would like to contribute a translation to this project:
The lang files for the Module can be found in modules/EasyPoll/lang. Have a look at the existing files. Name the file after the naming convention of MODx.

The Language files for the Snippet are located in snippets/EasyPoll/lang and should currently be named like this:
lang.<ISO 639-1 Code>.php

Snippet Translations are easier to do and have a higher priority. You can just translate the Snippet or the Module part, they are not dependent on each other. If you did a translation, zip it and post it in this thread. I'll happily integrate it into a next release of this Module/Snippet!

Current Translation status:
Thanks to all that contributed something to this module!
  • English (Module/Snippet): Original by banal, corrections and proof-reading by dflock
  • German (Module/Snippet): by banal
  • Dutch (Module/Snippet): by peterruiter
  • French (Snippet only): by banal
  • Italian (Snippet only): by banal

Feedback, error reports wishes etc. are welcome! Please post them here.
Cheers -- banal

Update Version 0.3.1 adds French and Italian translations of the Snippet
« Last Edit: Feb 20, 2008, 02:50 AM by banal » Logged
minder
Jr. Member
*
Posts: 11


« Reply #2 on: Mar 24, 2008, 04:11 AM »

I'd like the polls to be manageable by the frontend users (that belong to certain webgroup). Any suggestions?
Logged
banal
Full Member
***
Posts: 155


« Reply #3 on: Mar 24, 2008, 07:40 AM »

I'd like the polls to be manageable by the frontend users (that belong to certain webgroup). Any suggestions?
Hi minder
A Module can't be accessed by Web-Users AFAIK. It could still be doable by rewriting parts of the module code in a way that it will work as a Snippet though.
I just did a small test by copying the module code into a snippet. It works, when you remove the part where the manager language is determined. Probably you'll have to pass the desired language as a parameter to the snippet or just leave it as english (default).

Doing so will output the module to a page of your choice (by calling the newly created snippet with the module code). However there are some issues that remain:
URLs point to the wrong page if you're using friendly URLs.
To fix this you'll have to alter the EasyPollController.class.php File. In the static getURL method you'll have to replace
Code:
$self = $_SERVER['PHP_SELF'];
with:
Code:
global $modx;
$self = $modx->makeUrl($modx->documentObject['id']);

The Stylesheets are missing. You'll have to include the manager stylesheets and mootools.js as seen in the htmlHeader() method (also to be found in EasyPollController.class.php)

And last but not least you should check if the Web-User is indeed logged in (best somewhere at the beginning of the snippet code)!
Hope that helps.
Logged
minder
Jr. Member
*
Posts: 11


« Reply #4 on: Mar 24, 2008, 09:07 AM »

Thanks! Works almost flawlessly Grin
I have some comments though:
If I don't create any language, MODx exist with error that default (en) language can not be found. IMHO the Internal Title should be displayed if no translations are available. The way it works now, I am forced to add "en" language and enter poll title and choices twice (internal and en). I'll try to hack it myself, but please consider this when releasing new version.

The number of votes is redundant in the DB (once in polls table and second time at each choice). I wonder if this could not be computed simply when displaying results.

I don't know if SimpleMachinesForum hasn't got better way of adding choices - creating a poll displays a form with title and places for possible answers (let's say 5 of them) but at any time you can add one more field. I think it's done by POSTing actual content to the same form, adding new line and displaying what was previously entered (I didn't read the code but it looks like that). Now this could be made easier with AJAX, I think - just adding new field by clicking "add choice" - and yet be good handled with JavaScript turned off. I know it is bit different philosophy, but I find it more intuitive - but it probably will be hell to handle translations this way.

Anyway thanks for this great module! Smiley
Logged
banal
Full Member
***
Posts: 155


« Reply #5 on: Mar 24, 2008, 09:26 AM »

Hi minder

Well, you don't have to create two languages at all. You can create just the language you like (eg. 'de' for German). However if you're creating another Language than English you have to add the lang Parameter to your Snippet Call.
Code:
[!EasyPoll? &lang=`de`!]
This way you can skip the creation of English Translations...

Edit:
If you do not translate the lang file for the Snippet, you'll have to specify the easylang param. Like so:
Code:
[!EasyPoll? &lang=`en` &easylang=`de`!]
This way, the english language File (lang.en.php) will be used for texts like "Vote" etc. and German will be used for the questions and answers entered in the module.

Quote
The number of votes is redundant in the DB (once in polls table and second time at each choice). I wonder if this could not be computed simply when displaying results.
Umm.. I don't know where you saw this. Number of Votes are just being counted in the "ep_choice" Table. You must confuse this module with the Poll Module created by garryn (it had this redundancy because of mysql compatibility afaik).

Yeah i know, the whole Setup of Polls and Choices could be better from a User Inteface Perspective. However it was the easiest way to do without relying on AJAX and integrate the whole Translation Idea. Personally i create Polls in 4 Languages.

Oh, regarding Translations: If you have some time it would be really nice if you could supply us with a Snippet/Module Translation in your native language? Just in case you're doing it anyway, you could send the lang Files to me. That would be great!

Cheers -- banal
« Last Edit: Mar 24, 2008, 09:33 AM by banal » Logged
shaukawla
Jr. Member
*
Posts: 1


« Reply #6 on: Mar 30, 2008, 04:26 PM »

I really like your version of the Polls Module  Smiley  I was able to easily integrate it to my existing ModX site and the admin interface was very good.

I was wondering if there was a way to make this run in a PHP4 environment? 

 
Logged
banal
Full Member
***
Posts: 155


« Reply #7 on: Mar 30, 2008, 05:08 PM »

I really like your version of the Polls Module  Smiley  I was able to easily integrate it to my existing ModX site and the admin interface was very good.

I was wondering if there was a way to make this run in a PHP4 environment? 
Hi shaukawla
Glad you like the Poll Module.
I'm pretty sure the code can be made PHP4 compliant. Currently i don't have a Testing-Environment for PHP4 though. However, most hosting providers that still run PHP4 allow you to run PHP5 in some subdirectories or similar.

If you absolutely need PHP4 support, feel free to modify the code accordingly. If you're facing problems doing so, just ask. I'll do my best to help.
Logged
danielw
Member
**
Posts: 78


« Reply #8 on: May 09, 2008, 05:31 AM »

When trying to run both the module and the snippet I get the following error:

Parse error: syntax error, unexpected '{' in /export/httpd/websites/www.creditaction.org.uk/manager/includes/document.parser.class.inc.php(766) : eval()'d code on line 77
   
Any ideas what might be causing it? Really appreciate any help. Thanks.


EDIT: I am using 0.9.6 by the way.
« Last Edit: May 09, 2008, 05:44 AM by danielw » Logged
banal
Full Member
***
Posts: 155


« Reply #9 on: May 09, 2008, 06:50 AM »

When trying to run both the module and the snippet I get the following error:

Parse error: syntax error, unexpected '{' in /export/httpd/websites/www.creditaction.org.uk/manager/includes/document.parser.class.inc.php(766) : eval()'d code on line 77
   
Any ideas what might be causing it? Really appreciate any help. Thanks.


EDIT: I am using 0.9.6 by the way.
Hi danielw

Are you running PHP 5? EasyPoll was developed on a PHP 5 Setup and might not run on a PHP 4 installation.
Logged
danielw
Member
**
Posts: 78


« Reply #10 on: May 09, 2008, 07:26 AM »

Gah! You're right.

I forgot this was running on a different server to most of my other sites. Have spoken to the hosts to try to get them to shift to PHP5.

Thanks for your help.
Logged
didko
Jr. Member
*
Posts: 10


« Reply #11 on: May 14, 2008, 03:29 AM »

Hi all!
First of all - great job!
just few little remarks:
1. It doesnt work on PHP 5.0.4. Some of the errors are because of the type hinting, which for arrays are available from PHP 5.1. I fix these issues but after that I receive more errors, so I decide to update the PHP version. So just update the requirements.
2. There is a strange symbol just in front of the first DIV tag which EasyPoll generates. In IE7 it is treated as a new line character and there is an additional padding on the top of the poll. In FF and Opera - no problems. I'm trying to review the source, and if I found the problem, I'll post it later.

Regards!
« Last Edit: May 14, 2008, 04:54 AM by didko » Logged
davidm
Marketing & Design Team
*
Posts: 6,777


The best way to predict the future is to invent it


WWW
« Reply #12 on: May 15, 2008, 04:41 AM »

Before I dig into this, does the EasyPoll module/snippet combo allow for multiple choices polls (e.g one can select several choices) ?
It would seem not but I thought I'd ask...

While I am here, here is the french translation for the EasyPoll Module (quick one, if someone wants to give this a look).

* EasyPoll-Module-francais-utf8.inc.php.zip (2.4 KB - downloaded 79 times.)
« Last Edit: May 15, 2008, 04:43 AM by davidm » Logged

.: nodeo.net : Pour un web libre, moderne et ouvert ! :: david-molliere.net : Suivez en "live" mes expérimentations et billets sur les CMS et autres applications web :.

*** Forums modxcms.fr Participez à l'élaboration du site MODx francophone ! ***

! Nouveau !  En live, ne manquez pas les news de modxcms.fr sur Twitter   ! Nouveau !

MODx est l'outil idéal pour les developpeurs et webdesigners qui cherchent un framework de gestion de contenu hautement flexible et performant, tout en étant simple d'accès pour les utilisateurs finaux.

Config : Apache 2.2.8 - MySQL 5.0.45 - PHP 5.2.6 | Debian 4.0 (Etch)

Réalisations sous MODx : | pargade-notaires.fr | soleil.info | gican.asso.fr | michelez-notaires.com | amadom.gerondicap.com | jocelyne-violet.net
banal
Full Member
***
Posts: 155


« Reply #13 on: May 15, 2008, 04:58 AM »

Before I dig into this, does the EasyPoll module/snippet combo allow for multiple choices polls (e.g one can select several choices) ?
It would seem not but I thought I'd ask...

While I am here, here is the french translation for the EasyPoll Module (quick one, if someone wants to give this a look).
Hi davidm

First of all, thanks for the translation! I'll include it in the next release if you don't mind.
Currently, the module does not allow the selection of several choices. I'll note it on my "wishes-list". May i ask you, why you'll need several choices in one vote?
Logged
davidm
Marketing & Design Team
*
Posts: 6,777


The best way to predict the future is to invent it


WWW
« Reply #14 on: May 15, 2008, 05:14 AM »

Well, it's a feature I am used to in forums polls, you can sometimes need to vote for more than one option which means you have to be able to set how many options are allowed. For some questions, it can be useful.

Since we're talking wishlist, I was looking for a sort order option but didn't find one... it seems the sorting is based on start date, is it ?
I am planning to use EasyPoll to do some questionnaires and it's not really the same logic a Poll has. Let's say I have 20 questions (I should say Polls since in EasyPolls a question is a Poll), it makes no sense in my case to start typing my questionnaire from the last to the first question so that it gets displayed on top Tongue  Sure, I can tweak dates to make it happen but it's not convenient...

The default sorting option makes sense if my Polls are "just" one question but not if I have multiples Qs.
Does it make sense ? If I could choose the sort order, or sort by IDs it would be great Grin

Edit : As a Ditto-maniac, I assumed that I could use the &pollid parameter with multiple values e.g &pollid=`2,3,5,9,10` but it doesn't work I have to make multiple calls. Of course my case (questionnaire) might not be the average and I am not complaining (great snippet-module combo) but I thought I'd make this a feature request anyway.

About the translation file, no problem I'll also provide a Latin1 encoded file since you have to french language file in MODx, one is francais.inc.php and the other francais-utf8.inc.php. But I'd like some frenchies to read it since I might have not made a "neutral" translation, I am influenced by the questionnaire approach I think Tongue
« Last Edit: May 15, 2008, 05:32 AM by davidm » Logged

.: nodeo.net : Pour un web libre, moderne et ouvert ! :: david-molliere.net : Suivez en "live" mes expérimentations et billets sur les CMS et autres applications web :.

*** Forums modxcms.fr Participez à l'élaboration du site MODx francophone ! ***

! Nouveau !  En live, ne manquez pas les news de modxcms.fr sur Twitter   ! Nouveau !

MODx est l'outil idéal pour les developpeurs et webdesigners qui cherchent un framework de gestion de contenu hautement flexible et performant, tout en étant simple d'accès pour les utilisateurs finaux.

Config : Apache 2.2.8 - MySQL 5.0.45 - PHP 5.2.6 | Debian 4.0 (Etch)

Réalisations sous MODx : | pargade-notaires.fr | soleil.info | gican.asso.fr | michelez-notaires.com | amadom.gerondicap.com | jocelyne-violet.net
Pages: [1] 2 3 4   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP

Copyright © 2005-2008 MODxCMS, All rights reserved. Contact Us
Styles by ziworks.com

Powered by SMF 1.1.4 | SMF © 2005, Simple Machines LLC

Valid XHTML 1.0! Valid CSS!