About this module
This small module allow you to use pictures as choices. By default, Poll allow text-based options only, but this module overrides poll variables to use images. No extra modules or libraries are required.

How does it work?
When you are creating a poll, just enter an absolute URL to the picture, such as http://www.domain.com/image.png

What do I need to consider?
Provided URL must start with ftp, http, https, etc, and finished with png, jpg, gif, etc. Of course, you can configure this via administration settings form.

Project Sandbox page:
https://drupal.org/sandbox/waspper/2200805

Git Repository:
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/waspper/2200805.git graphical_poll

Drupal version
7.x

Comments

waspper’s picture

Issue summary: View changes
PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxwaspper2200805git

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

Fernly’s picture

Code review:

  • Overall: add more comments in between code lines.
  • Make sure to use the same indents (2 spaces) throughout the whole code (for example graphical_poll_form_poll_view_voting_alter in .module).
  • Add @param and @return value information in the comment block above function graphical_poll_check_choice
waspper’s picture

Issue summary: View changes
Status: Needs work » Needs review

All changes where made.

alinouman’s picture

Status: Needs review » Needs work

1- You are assinging alt the link which is very bad option you may want to input it from user.
2-Some links are very large http://themerrymakersisters.com/wp-content/uploads/2013/01/VEN-virtual-e... . And form accepts only 128 lenght fields so the solution of 1 and 2 will be create your new textfield which would use states api, so either user has option to enter some poll text or image fieldset with alt. You can look for ajax_example and ajax_example node form alter to achieve this.
3- This function is looking useless to me pardon me, if it is wrong commenting it, your code also work without it

function graphical_poll_preprocess_poll_bar(&$variables) {
  if (graphical_poll_check_choice($variables['title'], variable_get('graphical_poll_validation_method', 'string_pattern'))) {
    $data = array(
      'url' => $variables['title'],
      'alt' => $variables['title'],
    );
    $variables['title'] = theme('graphical_poll__choice', array('data' => $data));
  }
}

What is the need of it?

PA robot’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application (see also the project application workflow).

I'm a robot and this is an automated message from Project Applications Scraper.